aboutsummaryrefslogtreecommitdiffstats
path: root/lang/php4
diff options
context:
space:
mode:
authorale <ale@FreeBSD.org>2006-09-04 15:58:58 +0800
committerale <ale@FreeBSD.org>2006-09-04 15:58:58 +0800
commit02fed9f50a1a16562fd608165fabb54db268721c (patch)
tree01bb64ac9d9efcf820989ef885467625f6c3cbc1 /lang/php4
parent3780884810692d3f971ac69d5f5a27d8fc7be0b2 (diff)
downloadfreebsd-ports-gnome-02fed9f50a1a16562fd608165fabb54db268721c.tar.gz
freebsd-ports-gnome-02fed9f50a1a16562fd608165fabb54db268721c.tar.zst
freebsd-ports-gnome-02fed9f50a1a16562fd608165fabb54db268721c.zip
- Add experimental suhosin protection system support
- Add the possibility to build zlib extension static - Remove the php->php-cgi temporary hack
Diffstat (limited to 'lang/php4')
-rw-r--r--lang/php4/Makefile32
-rw-r--r--lang/php4/distinfo3
-rw-r--r--lang/php4/pkg-plist2
3 files changed, 25 insertions, 12 deletions
diff --git a/lang/php4/Makefile b/lang/php4/Makefile
index 0636477295fb..130ec648b921 100644
--- a/lang/php4/Makefile
+++ b/lang/php4/Makefile
@@ -37,13 +37,15 @@ OPTIONS= CLI "Build CLI version" on \
CGI "Build CGI version" on \
APACHE "Build Apache module" off \
DEBUG "Enable debug" off \
+ SUHOSIN "Enable Suhosin protection system" off \
MULTIBYTE "Enable zend multibyte support" off \
IPV6 "Enable ipv6 support" on \
REDIRECT "Enable force-cgi-redirect support (CGI only)" off \
DISCARD "Enable discard-path support (CGI only)" off \
FASTCGI "Enable fastcgi support (CGI only)" on \
PATHINFO "Enable path-info-check support (CGI only)" on \
- OPENSSL "Build static OpenSSL extension" off
+ OPENSSL "Build static OpenSSL extension" off \
+ ZLIB "Build static zlib extension" off
CONFLICTS= php5-5*
@@ -51,17 +53,21 @@ MAN1= php-config.1 phpize.1
.include <bsd.port.pre.mk>
+.if defined(WITH_SUHOSIN)
+PATCHFILES= suhosin-patch-${PORTVERSION}-0.9.2.patch.gz
+PATCH_SITES= http://www.hardened-php.net/suhosin/_media/
+PATCH_DIST_STRIP= -p1
+PLIST_SUB+= SUHOSIN=""
+.else
+PLIST_SUB+= SUHOSIN="@comment "
+.endif
+
.if !defined(WITHOUT_CLI)
PHP_SAPI+= cli
PLIST_SUB+= CLI=""
MAN1+= php.1
.else
-# XXX Temporary hack
-.if !defined(WITHOUT_CGI)
-PLIST_SUB+= CLI=""
-.else
PLIST_SUB+= CLI="@comment "
-.endif
CONFIGURE_ARGS+=--disable-cli
.endif
@@ -121,6 +127,12 @@ CONFIGURE_ENV+= ac_cv_pthreads_lib=${PTHREAD_LIBS} \
CONFIGURE_ARGS+=--with-openssl=${OPENSSLBASE} \
--with-openssl-dir=${OPENSSLBASE}
LDFLAGS+= -L${OPENSSLLIB} -lcrypto -lssl
+PHP_EXT_INC+= openssl
+.endif
+
+.if defined(WITH_ZLIB)
+CONFIGURE_ARGS+=--with-zlib=/usr
+PHP_EXT_INC+= zlib
.endif
.if defined(WITH_DEBUG)
@@ -146,8 +158,8 @@ post-build:
@${ECHO_CMD} "PHP_VER=4" > ${WRKDIR}/php.conf
@${ECHO_CMD} "PHP_VERSION=${PORTVERSION}" >> ${WRKDIR}/php.conf
@${ECHO_CMD} "PHP_SAPI=${PHP_SAPI}" >> ${WRKDIR}/php.conf
-.if defined(WITH_OPENSSL)
- @${ECHO_CMD} "PHP_EXT_INC=openssl" >> ${WRKDIR}/php.conf
+.if defined(PHP_EXT_INC)
+ @${ECHO_CMD} "PHP_EXT_INC=${PHP_EXT_INC}" >> ${WRKDIR}/php.conf
.endif
post-install:
@@ -155,10 +167,6 @@ post-install:
@${INSTALL_DATA} ${WRKSRC}/php.ini-recommended ${PREFIX}/etc
@${INSTALL_DATA} ${WRKDIR}/php.conf ${PREFIX}/etc
@${TOUCH} ${PREFIX}/include/php/ext/php_config.h
-# XXX Temporary hack
-.if !defined(WITHOUT_CGI) && defined(WITHOUT_CLI)
- @${LN} -sf ${PREFIX}/bin/php-cgi ${PREFIX}/bin/php
-.endif
.if defined(WITH_APACHE)
@${CAT} ${PKGMESSAGE}
.endif
diff --git a/lang/php4/distinfo b/lang/php4/distinfo
index 2d4a808fb156..d61ae2f15384 100644
--- a/lang/php4/distinfo
+++ b/lang/php4/distinfo
@@ -1,3 +1,6 @@
MD5 (php-4.4.4.tar.bz2) = bc6fa8908e2ac36e93bab9f7d42cda3a
SHA256 (php-4.4.4.tar.bz2) = 9f0742fce014a255f8453c1264afee5de289a9e9dcd57c448c77b46978f6a76b
SIZE (php-4.4.4.tar.bz2) = 4478698
+MD5 (suhosin-patch-4.4.4-0.9.2.patch.gz) = e1ef01355410d846b8a0bd6c4a3d7d3c
+SHA256 (suhosin-patch-4.4.4-0.9.2.patch.gz) = 43e592712c4e524976117f881632a006d9d259d85e996e65ae623494e7186238
+SIZE (suhosin-patch-4.4.4-0.9.2.patch.gz) = 14230
diff --git a/lang/php4/pkg-plist b/lang/php4/pkg-plist
index 26f9c70d1036..1d79bbf66871 100644
--- a/lang/php4/pkg-plist
+++ b/lang/php4/pkg-plist
@@ -150,6 +150,8 @@ include/php/main/rfc1867.h
include/php/main/safe_mode.h
include/php/main/snprintf.h
include/php/main/spprintf.h
+%%SUHOSIN%%include/php/main/suhosin_globals.h
+%%SUHOSIN%%include/php/main/suhosin_patch.h
include/php/main/win95nt.h
include/php/regex/cclass.h
include/php/regex/cname.h