blob: 856f3415bf5cddab2775761ce7ce15a5014a4008 (
plain) (
blame)
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
# New ports collection makefile for: php-ice
# Date created: 2007-08-21
# Whom: DIrk Ye <dirk.ye@gmail.com>
#
# $FreeBSD$
#
PORTNAME= Ice
PORTVERSION= 3.4.2
CATEGORIES= devel
MASTER_SITES= http://download.zeroc.com/Ice/3.4/
PKGNAMEPREFIX= php5-
DISTNAME= Ice-${PORTVERSION}
MAINTAINER= ports@FreeBSD.org
COMMENT= An Ice (Internet Communications Engine) language mapping for PHP
LIB_DEPENDS= Ice.${LIB_VRS}:${PORTSDIR}/devel/ice
USE_GMAKE= yes
MAKE_ARGS+= PHP_EXT_DIR=${PHP_EXT_DIR}
USE_PHP= yes
USE_PHP_BUILD= yes
DEFAULT_PHP_VER=53
IGNORE_WITH_PHP=5
BUILD_WRKSRC= ${WRKSRC}/php
INSTALL_WRKSRC= ${WRKSRC}/php
LIB_VRS= ${PORTVERSION:S|.||g:C|2$||}
PHP_MODNAME?= IcePHP
CFLAGS+= -ftemplate-depth-128 -fPIC -DPIC -Wall -D_REENTRANT ${PTHREAD_CFLAGS}
.if defined(DEBUG)
CFLAGS+= -g
.else
CFLAGS+= -DNDEBUG
.endif
.include <bsd.port.pre.mk>
.if ${ARCH} == "ia64"
BROKEN= does not compile on ia64
.endif
.if ((${ARCH} != i386) && (${ARCH} != powerpc))
MAKE_ENV= LP64=yes
.endif
.if defined(NOPORTDOCS)
MAKE_ENV+= NOPORTDOCS=yes
.endif
post-patch:
@${REINPLACE_CMD} -e 's|-pthread|${PTHREAD_LIBS}|' ${WRKSRC}/php/config/Make.rules.php
${REINPLACE_CMD} 's|%%INSTALL_PROGRAM%%|${INSTALL_PROGRAM}|g; \
s|%%INSTALL_DATA%%|${INSTALL_DATA}|g; \
s|%%PREFIX%%|${PREFIX}|g ; \
s|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/php/config/Make.rules.php
post-install:
@${MKDIR} ${PREFIX}/etc/php
@${ECHO_CMD} extension=${PHP_MODNAME}.so \
>> ${PREFIX}/etc/php/extensions.ini
@${CAT} ${PKGMESSAGE}
add-plist-info:
@${ECHO_CMD} "@exec mkdir -p %D/etc/php" \
>> ${TMPPLIST}
@${ECHO_CMD} "@exec echo extension=${PHP_MODNAME}.so >> %D/etc/php/extensions.ini" \
>> ${TMPPLIST}
@${ECHO_CMD} "@unexec cp %D/etc/php/extensions.ini %D/etc/php/extensions.ini.orig" \
>> ${TMPPLIST}
@${ECHO_CMD} "@unexec grep -v extension=${PHP_MODNAME}\\\.so %D/etc/php/extensions.ini.orig > %D/etc/php/extensions.ini || true" \
>> ${TMPPLIST}
@${ECHO_CMD} "@unexec rm %D/etc/php/extensions.ini.orig" \
>> ${TMPPLIST}
@${ECHO_CMD} "@unexec [ -s %D/etc/php/extensions.ini ] || rm %D/etc/php/extensions.ini" \
>> ${TMPPLIST}
@${ECHO_CMD} "@unexec rmdir %D/etc/php 2> /dev/null || true" \
>> ${TMPPLIST}
security-check:
@${ECHO_CMD} "****************************************************************************"
@${ECHO_CMD} ""
@${ECHO_CMD} "The following line has been added to your ${PREFIX}/etc/php/extensions.ini"
@${ECHO_CMD} "configuration file to automatically load the installed extension:"
@${ECHO_CMD} ""
@${ECHO_CMD} "extension=${PHP_MODNAME}.so"
@${ECHO_CMD} ""
@${ECHO_CMD} "****************************************************************************"
.include <bsd.port.post.mk>
|