blob: 21a45939745ce7e02bd0f5cf7809e2b644315f91 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Ports collection makefile for: pear-mailparse
# Date created: 09 January 2003
# Whom: Thierry Thomas (<thierry@pompo.net>)
#
# $FreeBSD$
#
PORTNAME= mailparse
PORTVERSION= 0.9.1
PORTREVISION= 1
CATEGORIES= mail www
MAINTAINER= ports@FreeBSD.org
COMMENT= PEAR classes to create and decode MIME messages
BUILD_DEPENDS= ${PEARDIR}/PEAR.php:${PORTSDIR}/devel/pear-PEAR
RUN_DEPENDS= ${PEARDIR}/PEAR.php:${PORTSDIR}/devel/pear-PEAR
USE_PHPIZE= yes
USE_REINPLACE= yes
REINPLACE_ARGS= -i.before_mailparse
.include <bsd.port.pre.mk>
.include "${.CURDIR}/../../lang/php4/bsd.php.mk"
.include "${.CURDIR}/../../devel/pear-PEAR/Makefile.common"
.if exists(${LOCALBASE}/bin/php-config)
EXT_DIR!= ${LOCALBASE}/bin/php-config --extension-dir | ${SED} -e \
"s:${PHP_BASE}/::"
.endif
PHP_DIR?= ${LOCALBASE}/etc
PHP_INI= ${PHP_DIR}/php.ini
PLIST_SUB+= EXTDIR=${EXT_DIR}
DOCSDIR= ${PEARDIR}/docs/${PORTNAME}
DOCS= CREDITS README try.php
TESTDIR= ${PEARDIR}/tests/${PORTNAME}
pre-configure:
@if ! ${LOCALBASE}/bin/php -i | ${GREP} -q -e "--enable-mbstring"; then \
${ECHO_MSG} "" ; \
${ECHO_MSG} "Please configure PHP with mbstring support." ; \
${ECHO_MSG} "" ; \
${FALSE} ; \
fi
post-install-script:
@${STRIP_CMD} ${PHP_BASE}/${EXT_DIR}/mailparse.so
# Configure extension_dir
@if [ ! -f ${PHP_INI} ]; then \
${ECHO_MSG} "===> Creating ${PHP_INI} for PHP" ; \
${CP} -p ${PHP_INI}-dist ${PHP_INI} ; \
fi
@if ${GREP} -q -e '^extension_dir = ./' ${PHP_INI} ; then \
${ECHO_MSG} "===> Configuring ${PHP_INI}" ; \
${REINPLACE_CMD} -e 's!^extension_dir = ./!extension_dir = ${PHP_BASE}/${EXT_DIR}!' \
${PHP_INI} ; \
fi
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for FILE in ${DOCS}
@${INSTALL_DATA} ${WRKSRC}/${FILE} ${DOCSDIR}
.endfor
@${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
@${MKDIR} ${TESTDIR}
@${CP} -Rp ${WRKSRC}/tests ${TESTDIR}
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${TESTDIR}
@${ECHO_MSG} "===> Examples installed in ${TESTDIR}."
.endif
.include <bsd.port.post.mk>
|