diff options
author | dinoex <dinoex@FreeBSD.org> | 2003-10-08 00:45:15 +0800 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2003-10-08 00:45:15 +0800 |
commit | 5c51495a7cdc47125e7a5ba0b3f1622437db6b37 (patch) | |
tree | ccf067bcacd10749ab8b1e754397c18cba9c0a3f /lang/php4 | |
parent | 61d085f589d106eb772c03b01bebaf21776d73bf (diff) | |
download | freebsd-ports-gnome-5c51495a7cdc47125e7a5ba0b3f1622437db6b37.tar.gz freebsd-ports-gnome-5c51495a7cdc47125e7a5ba0b3f1622437db6b37.tar.zst freebsd-ports-gnome-5c51495a7cdc47125e7a5ba0b3f1622437db6b37.zip |
Mega-patch:
- Add mnogosearch extension
- Use USE_OPENSSL knob instead of direct including of bsd.openssl.mk
- Fix OpenSSL undefind symbols at runtime
- Fix OpenLDAP/MySQL dependencies, by moving down the inclusion of the
bsd.port.pre.mk makefile
- Fix make describe/all-depends-list to catch correct libraries
- Fix mcrypt extension (add ltdl dependency)
PR: 57699
Submitted by: sysadmin@alexdupre.co
Diffstat (limited to 'lang/php4')
-rw-r--r-- | lang/php4/Makefile | 156 | ||||
-rw-r--r-- | lang/php4/scripts/configure.php | 1 | ||||
-rw-r--r-- | lang/php4/scripts/php4_options | 1 |
3 files changed, 83 insertions, 75 deletions
diff --git a/lang/php4/Makefile b/lang/php4/Makefile index 127ec13bc077..9b3e1b088617 100644 --- a/lang/php4/Makefile +++ b/lang/php4/Makefile @@ -127,10 +127,11 @@ SAPI_FILE= "bin/php" ALL_OPTIONS= BCMATH BZIP2 CALENDAR CDB CRACK CTYPE CURL DB4 DBASE DBX \ DOMXML DOMXSLT EXIF FILEPRO FRIBIDI FTP GD GDBM GETTEXT GMP \ HYPERWAVE ICONV IMAP INTERBASE INIFILE MBSTRING MCAL MCVE \ - MCRYPT MHASH MIME MING MYSQL NCURSES OPENLDAP OPENSSL ORACLE \ - OVERLOAD PCNTL PCRE PDFLIB POSIX POSTGRESQL PSPELL READLINE \ - RECODE SESSION SHMOP SNMP SOCKETS SYBASEDB SYBASECT SYSVSEM \ - SYSVSHM TOKENIZER UNIXODBC WDDX XML XMLRPC XSLT YAZ YP ZIP ZLIB + MCRYPT MHASH MIME MING MNOGOSEARCH MYSQL NCURSES OPENLDAP \ + OPENSSL ORACLE OVERLOAD PCNTL PCRE PDFLIB POSIX POSTGRESQL \ + PSPELL READLINE RECODE SESSION SHMOP SNMP SOCKETS SYBASEDB \ + SYBASECT SYSVSEM SYSVSHM TOKENIZER UNIXODBC WDDX XML XMLRPC \ + XSLT YAZ YP ZIP ZLIB .for opt in ${ALL_OPTIONS} .if defined(WITH_${opt}) || defined(WITHOUT_${opt}) @@ -142,40 +143,13 @@ BATCH= yes IS_INTERACTIVE= yes .endif -.include <bsd.port.pre.mk> - -.if ${OSVERSION} < 400014 || defined(WITHOUT_IPV6) -CONFIGURE_ARGS+=--disable-ipv6 -.endif - .if !defined(WITHOUT_APACHE) -.if exists(${LOCALBASE}/include/apache2/apr.h) -WITH_APACHE2= yes -.endif - APXS?= ${LOCALBASE}/sbin/apxs - -.if defined(WITH_APACHE2) -APACHE_PORT?= ${PORTSDIR}/www/apache2 -CONFIGURE_ARGS+=--with-apxs2=${APXS} -SAPI_FILE= libexec/apache2/libphp4.so -.else -APACHE_PORT?= ${PORTSDIR}/www/apache13 -CONFIGURE_ARGS+=--with-apxs=${APXS} -SAPI_FILE= libexec/apache/libphp4.so -.endif - -BUILD_DEPENDS+= ${APXS}:${APACHE_PORT} -RUN_DEPENDS+= ${APXS}:${APACHE_PORT} - PLIST_SUB+= APACHE="" .else PLIST_SUB+= APACHE="@comment " .endif -PLIST_SUB+= SAPI_FILE=${SAPI_FILE} \ - EXT_DIR=${EXT_DIR} - WRKDIR?= ${WRKDIRPREFIX}${.CURDIR}/work PHP4_OPTFILE?= ${HOME}/php4_options @@ -189,6 +163,9 @@ SEL_OPTIONS+= ${opt} .for opt in ${PHP4_OPTIONS} .if !defined(WITHOUT_${opt}) SEL_OPTIONS+= ${opt} +.if !exists(${WRKDIR}/Makefile.inc) +WITH_${opt}= yes +.endif .endif SCRIPTS_ENV+= WITH_${opt}=ON .endfor @@ -199,11 +176,6 @@ SCRIPTS_ENV+= SEL_OPTIONS="${SEL_OPTIONS}" \ CAT="${CAT}" \ SED="${SED}" -.ifmake describe -WITH_MYSQL= yes -WITH_XML= yes -.endif - .if exists(${WRKDIR}/Makefile.inc) .include "${WRKDIR}/Makefile.inc" .endif @@ -353,30 +325,13 @@ CONFIGURE_ARGS+=--with-hyperwave .if defined(WITH_ICONV) || defined(WITH_ICONV_DEP) LIB_DEPENDS+= iconv.3:${PORTSDIR}/converters/libiconv +CONFIGURE_ARGS+=--with-iconv-dir=${LOCALBASE} .endif .if defined(WITH_ICONV) CONFIGURE_ARGS+=--with-iconv=${LOCALBASE} .endif -.if defined(WITH_IMAP) -LIB_DEPENDS+= c-client4.8:${PORTSDIR}/mail/cclient -.if !exists(${LOCALBASE}/lib/libc-client4.so) -.if !defined(WITHOUT_SSL) -CONFIGURE_ARGS+=--with-imap=${LOCALBASE} --with-imap-ssl=${LOCALBASE} -.else -CONFIGURE_ARGS+=--with-imap=${LOCALBASE} -.endif -.else -WITH_IMAP_SSL!=/usr/bin/ldd ${LOCALBASE}/lib/libc-client4.so | ${GREP} libssl || ${TRUE} -.if !empty(WITH_IMAP_SSL) -CONFIGURE_ARGS+=--with-imap=${LOCALBASE} --with-imap-ssl=${LOCALBASE} -.else -CONFIGURE_ARGS+=--with-imap=${LOCALBASE} -.endif -.endif -.endif - .if defined(WITH_INIFILE) CONFIGURE_ARGS+=--with-inifile .endif @@ -402,6 +357,7 @@ CONFIGURE_ARGS+=--with-mcve=${LOCALBASE} .if defined(WITH_MCRYPT) LIB_DEPENDS+= mcrypt.8:${PORTSDIR}/security/libmcrypt +LIB_DEPENDS+= ltdl.4:${PORTSDIR}/devel/libltdl CONFIGURE_ARGS+=--with-mcrypt=${LOCALBASE} .endif @@ -419,28 +375,25 @@ LIB_DEPENDS+= ming.3:${PORTSDIR}/graphics/ming CONFIGURE_ARGS+=--with-ming=${LOCALBASE} .endif +.if defined(WITH_MNOGOSEARCH) +LIB_DEPENDS+= udmsearch.1:${PORTSDIR}/www/mnogosearch +CONFIGURE_ARGS+=--with-mnogosearch=${LOCALBASE} +.endif + .if defined(WITH_MYSQL) USE_MYSQL= yes CONFIGURE_ARGS+=--with-mysql=${LOCALBASE} .endif -.if defined(WITH_NCURSES) -.if ${OSVERSION} < 400000 -NCURSESBASE= ${LOCALBASE} -LIB_DEPENDS+= ncurses.5:${PORTSDIR}/devel/ncurses -.else -NCURSESBASE= /usr -.endif -CONFIGURE_ARGS+=--with-ncurses=${NCURSESBASE} -.endif - .if defined(WITH_OPENLDAP) USE_OPENLDAP= yes CONFIGURE_ARGS+=--with-ldap=${LOCALBASE} .endif .if defined(WITH_OPENSSL) || defined(WITH_OPENSSL_DEP) -.include "${PORTSDIR}/Mk/bsd.openssl.mk" +USE_OPENSSL= yes +LDFLAGS+= -lcrypto -lssl +CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}" CONFIGURE_ARGS+=--with-openssl-dir=${OPENSSLBASE} .endif @@ -502,15 +455,6 @@ CONFIGURE_ARGS+=--enable-session CONFIGURE_ARGS+=--enable-shmop .endif -.if defined(WITH_SNMP) -.if exists(${LOCALBASE}/lib/libsnmp.so.4) -LIB_DEPENDS+= snmp.4:${PORTSDIR}/net/net-snmp4 -.else -LIB_DEPENDS+= netsnmp.5:${PORTSDIR}/net/net-snmp -.endif -CONFIGURE_ARGS+=--with-snmp=${LOCALBASE} --enable-ucd-snmp-hack -.endif - .if defined(WITH_SOCKETS) CONFIGURE_ARGS+=--enable-sockets .endif @@ -548,10 +492,11 @@ CONFIGURE_ARGS+=--enable-wddx .if defined(WITH_XML) || defined(WITH_XML_DEP) LIB_DEPENDS+= expat.4:${PORTSDIR}/textproc/expat2 +CONFIGURE_ARGS+=--with-expat-dir=${LOCALBASE} .endif .if defined(WITH_XML) -CONFIGURE_ARGS+=--enable-xml --with-expat-dir=${LOCALBASE} +CONFIGURE_ARGS+=--enable-xml .endif .if defined(WITH_XMLRPC) @@ -581,6 +526,67 @@ CONFIGURE_ARGS+=--with-zip=${LOCALBASE} CONFIGURE_ARGS+=--with-zlib=yes .endif +.include <bsd.port.pre.mk> + +.if !defined(WITHOUT_APACHE) +APXS?= ${LOCALBASE}/sbin/apxs +.if defined(WITH_APACHE2) +APACHE_PORT?= ${PORTSDIR}/www/apache2 +CONFIGURE_ARGS+=--with-apxs2=${APXS} +SAPI_FILE= libexec/apache2/libphp4.so +.else +APACHE_PORT?= ${PORTSDIR}/www/apache13 +CONFIGURE_ARGS+=--with-apxs=${APXS} +SAPI_FILE= libexec/apache/libphp4.so +.endif +BUILD_DEPENDS= ${APXS}:${APACHE_PORT} +RUN_DEPENDS= ${APXS}:${APACHE_PORT} +.endif + +PLIST_SUB+= SAPI_FILE=${SAPI_FILE} \ + EXT_DIR=${EXT_DIR} + +.if ${OSVERSION} < 400014 || defined(WITHOUT_IPV6) +CONFIGURE_ARGS+=--disable-ipv6 +.endif + +.if defined(WITH_IMAP) +LIB_DEPENDS+= c-client4.8:${PORTSDIR}/mail/cclient +.if !exists(${LOCALBASE}/lib/libc-client4.so) +.if !defined(WITHOUT_SSL) +CONFIGURE_ARGS+=--with-imap=${LOCALBASE} --with-imap-ssl=${LOCALBASE} +.else +CONFIGURE_ARGS+=--with-imap=${LOCALBASE} +.endif +.else +WITH_IMAP_SSL!= /usr/bin/ldd ${LOCALBASE}/lib/libc-client4.so | ${GREP} libssl || ${TRUE} +.if !empty(WITH_IMAP_SSL) +CONFIGURE_ARGS+=--with-imap=${LOCALBASE} --with-imap-ssl=${LOCALBASE} +.else +CONFIGURE_ARGS+=--with-imap=${LOCALBASE} +.endif +.endif +.endif + +.if defined(WITH_NCURSES) +.if ${OSVERSION} < 400000 +NCURSESBASE= ${LOCALBASE} +LIB_DEPENDS+= ncurses.5:${PORTSDIR}/devel/ncurses +.else +NCURSESBASE= /usr +.endif +CONFIGURE_ARGS+=--with-ncurses=${NCURSESBASE} +.endif + +.if defined(WITH_SNMP) +.if exists(${LOCALBASE}/lib/libsnmp.so.4) +LIB_DEPENDS+= snmp.4:${PORTSDIR}/net/net-snmp4 +.else +LIB_DEPENDS+= netsnmp.5:${PORTSDIR}/net/net-snmp +.endif +CONFIGURE_ARGS+=--with-snmp=${LOCALBASE} --enable-ucd-snmp-hack +.endif + pre-patch: @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.php diff --git a/lang/php4/scripts/configure.php b/lang/php4/scripts/configure.php index 65e71155f80c..5c9b96862b5a 100644 --- a/lang/php4/scripts/configure.php +++ b/lang/php4/scripts/configure.php @@ -50,6 +50,7 @@ MCRYPT "Encryption support" ${WITH_MCRYPT:-OFF} \ MHASH "Crypto-hashing support" ${WITH_MHASH:-OFF} \ MIME "mime_magic support" ${WITH_MIME:-OFF} \ MING "ming shockwave flash support" ${WITH_MING:-OFF} \ +MNOGOSEARCH "mnoGoSearch support" ${WITH_MNOGOSEARCH:-OFF} \ MYSQL "MySQL database support" ${WITH_MYSQL:-OFF} \ NCURSES "ncurses support (CLI only)" ${WITH_NCURSES:-OFF} \ OPENLDAP "OpenLDAP support" ${WITH_OPENLDAP:-OFF} \ diff --git a/lang/php4/scripts/php4_options b/lang/php4/scripts/php4_options index 87c95afff1b8..1a50c04229bc 100644 --- a/lang/php4/scripts/php4_options +++ b/lang/php4/scripts/php4_options @@ -30,6 +30,7 @@ WITH_MCRYPT=OFF WITH_MHASH=OFF WITH_MIME=OFF WITH_MING=OFF +WITH_MNOGOSEARCH=OFF WITH_MYSQL=ON WITH_NCURSES=OFF WITH_OPENLDAP=OFF |