aboutsummaryrefslogtreecommitdiff
path: root/lang/php5
diff options
context:
space:
mode:
authorNorikatsu Shigemura <nork@FreeBSD.org>2003-05-22 18:26:28 +0000
committerNorikatsu Shigemura <nork@FreeBSD.org>2003-05-22 18:26:28 +0000
commit18ea1afefe75baf9e9d5a81ea4e2820433993faa (patch)
tree1edc7b7cce0659feb4e86a0fdd1cd78d96db73ef /lang/php5
parent39d494631f7bbf3f7c1f5472f6e33bafc7f1af89 (diff)
downloadports-18ea1afefe75baf9e9d5a81ea4e2820433993faa.tar.gz
ports-18ea1afefe75baf9e9d5a81ea4e2820433993faa.zip
Notes
Diffstat (limited to 'lang/php5')
-rw-r--r--lang/php5/Makefile556
-rw-r--r--lang/php5/distinfo1
-rw-r--r--lang/php5/files/patch-configure136
-rw-r--r--lang/php5/files/patch-pear::Makefile.frag22
-rw-r--r--lang/php5/files/patch-pear::scripts::pearcmd.php18
-rw-r--r--lang/php5/pkg-descr11
-rw-r--r--lang/php5/pkg-message18
-rw-r--r--lang/php5/pkg-plist249
-rw-r--r--lang/php5/scripts/configure.php102
-rw-r--r--lang/php5/scripts/php_options58
10 files changed, 1171 insertions, 0 deletions
diff --git a/lang/php5/Makefile b/lang/php5/Makefile
new file mode 100644
index 000000000000..f4bbd0450363
--- /dev/null
+++ b/lang/php5/Makefile
@@ -0,0 +1,556 @@
+# New ports collection makefile for: php4
+# Date created: Tue Feb 18 11:17:13 CET 2003
+# Whom: Alex Dupre <sysadmin@alexdupre.com>
+#
+# $FreeBSD$
+#
+# There are many ways to select which extensions you want to enable, either
+# in interactive mode or in batch mode.
+#
+# By default, the enabled extensions are: CTYPE, MYSQL, PCRE, POSIX, SESSION,
+# TOKENIZER, XML and ZLIB. This behaviour can be changed overriding the
+# PHP_OPTIONS variable (e.g. PHP_OPTIONS="EXT1 EXT2 EXT3").
+#
+# Another way is to use the WITH_<EXT> and WITHOUT_<EXT> knobs, for additional
+# and default extensions respectively (implies batch mode).
+#
+# The last way reads an "extension" file, located in ~/php_options (the
+# location is overridable by the OPTION_FILE variable). You may find an
+# example in scripts/php_options (interactive mode only).
+#
+
+PORTNAME= php4
+PORTVERSION= 4.3.2.r4
+CATEGORIES?= lang devel www
+MASTER_SITES= http://downloads.php.net/jani/ \
+ http://www.gufi.org/~alex/php/
+.if defined(WITHOUT_CLI)
+PKGNAMEPREFIX= mod_
+.endif
+.if defined(WITHOUT_APACHE)
+PKGNAMESUFFIX= -cli
+.endif
+DISTNAME= php-${PORTVERSION:S/.r/RC/}
+
+MAINTAINER?= sysadmin@alexdupre.com
+COMMENT= PHP Scripting Language (Apache Module and CLI)
+.if defined(WITHOUT_APACHE)
+COMMENT= PHP Command Line Interpreter
+.endif
+.if defined(WITHOUT_CLI)
+COMMENT= PHP Apache Module
+.endif
+
+USE_BZIP2= yes
+USE_SUBMAKE= yes
+GNU_CONFIGURE= yes
+USE_BISON= yes
+USE_LIBTOOL= yes
+
+CONFIGURE_ARGS= --enable-versioning \
+ --enable-memory-limit \
+ --with-layout=GNU \
+ --with-zlib-dir=/usr \
+ --disable-all
+
+EXT_DIR= 20020429
+SAPI_FILE= ""
+
+.if defined(WITHOUT_APACHE)
+CONFLICTS= php4-4* mod_php4-4*
+.endif
+
+.if defined(WITHOUT_CLI)
+CONFLICTS= php4-4* php4-cli-4*
+CONFIGURE_ARGS+=--disable-cli
+PLIST_SUB+= CLI="@comment "
+.else
+MAN1= php.1
+PLIST_SUB+= CLI=""
+.endif
+
+CONFLICTS?= php4-cli-4* mod_php4-4*
+
+ALL_OPTIONS= BCMATH BZIP2 CALENDAR CRACK CTYPE CURL DBASE DBX DOMXML \
+ DOMXSLT EXIF FILEPRO FTP GD GDBM GETTEXT GMP HYPERWAVE ICONV \
+ IMAP INTERBASE MBSTRING MCAL MCVE MCRYPT MHASH MIME MING MYSQL \
+ NCURSES OPENLDAP OPENSSL 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})
+BATCH= yes
+.endif
+.endfor
+
+.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
+IS_INTERACTIVE= yes
+.endif
+
+PBDIR= ${PREFIX}/share/pear/boot
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 400014
+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
+OPTION_FILE?= ${HOME}/php_options
+
+PHP_OPTIONS?= CTYPE MYSQL PCRE POSIX SESSION TOKENIZER XML ZLIB
+
+.for opt in ${ALL_OPTIONS}
+.if defined(WITH_${opt})
+SEL_OPTIONS+= ${opt}
+.endif
+.endfor
+.for opt in ${PHP_OPTIONS}
+.if !defined(WITHOUT_${opt})
+SEL_OPTIONS+= ${opt}
+.endif
+SCRIPTS_ENV+= WITH_${opt}=ON
+.endfor
+
+SCRIPTS_ENV+= SEL_OPTIONS="${SEL_OPTIONS}" \
+ OPTION_FILE="${OPTION_FILE}" \
+ WRKDIR="${WRKDIR}" \
+ CAT="${CAT}" \
+ SED="${SED}"
+
+.ifmake describe
+WITH_MYSQL= yes
+WITH_XML= yes
+.endif
+
+.if exists(${WRKDIR}/Makefile.inc)
+.include "${WRKDIR}/Makefile.inc"
+.endif
+
+.if defined(WITH_DOMXSLT)
+WITH_DOMXML= yes
+.endif
+
+.if defined(WITH_XMLRPC) || defined(WITH_XSLT)
+WITH_ICONV_DEP= yes
+.endif
+
+.if defined(WITH_SNMP) || defined(WITH_POSTGRESQL)
+WITH_OPENSSL_DEP= yes
+.endif
+
+.if defined(WITH_WDDX) || defined(WITH_XMLRPC) || defined(WITH_XSLT)
+WITH_XML_DEP= yes
+.endif
+
+.if defined(WITH_BCMATH)
+CONFIGURE_ARGS+=--enable-bcmath
+.endif
+
+.if defined(WITH_BZIP2)
+.if exists(/usr/bin/bzip2)
+BZIP2BASE= /usr
+.else
+BZIP2BASE= ${LOCALBASE}
+LIB_DEPENDS+= bz2.1:${PORTSDIR}/archivers/bzip2
+.endif
+CONFIGURE_ARGS+=--with-bz2=${BZIP2BASE}
+.endif
+
+.if defined(WITH_CALENDAR)
+CONFIGURE_ARGS+=--enable-calendar
+.endif
+
+.if defined(WITH_CRACK)
+BUILD_DEPENDS+= ${LOCALBASE}/lib/libcrack.a:${PORTSDIR}/security/cracklib
+CONFIGURE_ARGS+=--with-crack=${LOCALBASE}
+.endif
+
+.if defined(WITH_CTYPE)
+CONFIGURE_ARGS+=--enable-ctype
+.endif
+
+.if defined(WITH_CURL)
+LIB_DEPENDS+= curl.2:${PORTSDIR}/ftp/curl
+CONFIGURE_ARGS+=--with-curl=${LOCALBASE}
+.endif
+
+.if defined(WITH_DBASE)
+CONFIGURE_ARGS+=--enable-dbase
+.endif
+
+.if defined(WITH_DBX)
+CONFIGURE_ARGS+=--enable-dbx
+.endif
+
+.if defined(WITH_DOMXML)
+LIB_DEPENDS+= xml2.5:${PORTSDIR}/textproc/libxml2
+CONFIGURE_ARGS+=--with-dom=${LOCALBASE}
+.endif
+
+.if defined(WITH_DOMXSLT)
+LIB_DEPENDS+= xslt.1:${PORTSDIR}/textproc/libxslt
+CONFIGURE_ARGS+=--with-dom-xslt=${LOCALBASE} --with-dom-exslt=${LOCALBASE}
+.endif
+
+.if defined(WITH_EXIF)
+CONFIGURE_ARGS+=--enable-exif
+.endif
+
+.if defined(WITH_FILEPRO)
+CONFIGURE_ARGS+=--enable-filepro
+.endif
+
+.if defined(WITH_FTP)
+CONFIGURE_ARGS+=--enable-ftp
+.endif
+
+.if defined(WITH_GD)
+LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2
+LIB_DEPENDS+= png.5:${PORTSDIR}/graphics/png
+LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg
+CONFIGURE_ARGS+=--with-gd \
+ --enable-gd-native-ttf \
+ --with-freetype-dir=${LOCALBASE} \
+ --with-jpeg-dir=${LOCALBASE} \
+ --with-png-dir=${LOCALBASE}
+.if !defined(WITHOUT_X11)
+LIB_DEPENDS+= Xpm.4:${PORTSDIR}/x11/XFree86-4-libraries
+CONFIGURE_ARGS+=--with-xpm-dir=${LOCALBASE}
+.endif
+.endif
+
+.if defined(WITH_GDBM)
+LIB_DEPENDS+= gdbm.3:${PORTSDIR}/databases/gdbm
+CONFIGURE_ARGS+=--enable-dba --with-gdbm=${LOCALBASE}
+.endif
+
+.if defined(WITH_GETTEXT)
+LIB_DEPENDS+= intl.4:${PORTSDIR}/devel/gettext
+CONFIGURE_ARGS+=--with-gettext=${LOCALBASE}
+.endif
+
+.if defined(WITH_GMP)
+LIB_DEPENDS+= gmp.6:${PORTSDIR}/math/libgmp4
+CONFIGURE_ARGS+=--with-gmp=${LOCALBASE}
+.endif
+
+.if defined(WITH_HYPERWAVE)
+CONFIGURE_ARGS+=--with-hyperwave
+.endif
+
+.if defined(WITH_ICONV) || defined(WITH_ICONV_DEP)
+LIB_DEPENDS+= iconv.3:${PORTSDIR}/converters/libiconv
+.endif
+
+.if defined(WITH_ICONV)
+CONFIGURE_ARGS+=--with-iconv=${LOCALBASE}
+.endif
+
+.if defined(WITH_IMAP)
+LIB_DEPENDS+= c-client4.8:${PORTSDIR}/mail/cclient
+CONFIGURE_ARGS+=--with-imap=${LOCALBASE} --with-imap-ssl=${LOCALBASE}
+.endif
+
+.if defined(WITH_INTERBASE)
+LIB_DEPENDS+= gds.1:${PORTSDIR}/databases/firebird
+CONFIGURE_ARGS+=--with-interbase=${LOCALBASE}/firebird
+.endif
+
+.if defined(WITH_MBSTRING)
+CONFIGURE_ARGS+=--enable-mbstring --enable-mbregex
+.endif
+
+.if defined(WITH_MCAL)
+LIB_DEPENDS+= mcal.0:${PORTSDIR}/misc/libmcal
+CONFIGURE_ARGS+=--with-mcal=${LOCALBASE}
+.endif
+
+.if defined(WITH_MCVE)
+LIB_DEPENDS+= mcve.3:${PORTSDIR}/devel/libmcve
+CONFIGURE_ARGS+=--with-mcve=${LOCALBASE}
+.endif
+
+.if defined(WITH_MCRYPT)
+LIB_DEPENDS+= mcrypt.8:${PORTSDIR}/security/libmcrypt
+CONFIGURE_ARGS+=--with-mcrypt=${LOCALBASE}
+.endif
+
+.if defined(WITH_MHASH)
+LIB_DEPENDS+= mhash.2:${PORTSDIR}/security/mhash
+CONFIGURE_ARGS+=--with-mhash=${LOCALBASE}
+.endif
+
+.if defined(WITH_MIME)
+CONFIGURE_ARGS+=--with-mime-magic=/usr/share/misc/magic.mime
+.endif
+
+.if defined(WITH_MING)
+LIB_DEPENDS+= ming.3:${PORTSDIR}/graphics/ming
+CONFIGURE_ARGS+=--with-ming=${LOCALBASE}
+.endif
+
+.if defined(WITH_MYSQL)
+.if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.10)
+LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client
+.else
+.if exists(${LOCALBASE}/lib/mysql/libmysqlclient.so.14)
+LIB_DEPENDS+= mysqlclient.14:${PORTSDIR}/databases/mysql41-client
+.else
+LIB_DEPENDS+= mysqlclient.12:${PORTSDIR}/databases/mysql40-client
+.endif
+.endif
+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)
+.if exists(${LOCALBASE}/lib/libldap.so.1)
+LIB_DEPENDS+= ldap.1:${PORTSDIR}/net/openldap12
+.else
+LIB_DEPENDS+= ldap.2:${PORTSDIR}/net/openldap21
+.endif
+CONFIGURE_ARGS+=--with-ldap=${LOCALBASE}
+.endif
+
+.if defined(WITH_OPENSSL) || defined(WITH_OPENSSL_DEP)
+.if exists(${LOCALBASE}/lib/libcrypto.so.3)
+OPENSSLBASE= ${LOCALBASE}
+LIB_DEPENDS+= crypto.3:${PORTSDIR}/security/openssl
+.else
+OPENSSLBASE= /usr
+.endif
+.endif
+
+.if defined(WITH_OPENSSL)
+CONFIGURE_ARGS+=--with-openssl=${OPENSSLBASE}
+.endif
+
+.if defined(WITH_PCNTL)
+CONFIGURE_ARGS+=--enable-pcntl
+.endif
+
+.if defined(WITH_PCRE)
+CONFIGURE_ARGS+=--with-pcre-regex=yes
+.endif
+
+.if defined(WITH_PDFLIB)
+LIB_DEPENDS+= pdf.5:${PORTSDIR}/print/pdflib
+CONFIGURE_ARGS+=--with-pdflib=${LOCALBASE}
+.endif
+
+.if defined(WITH_POSIX)
+CONFIGURE_ARGS+=--enable-posix
+.endif
+
+.if defined(WITH_POSTGRESQL)
+LIB_DEPENDS+= pq.3:${PORTSDIR}/databases/postgresql7
+CONFIGURE_ARGS+=--with-pgsql=${LOCALBASE}
+.endif
+
+.if defined(WITH_PSPELL)
+LIB_DEPENDS+= aspell.15:${PORTSDIR}/textproc/aspell
+CONFIGURE_ARGS+=--with-pspell=${LOCALBASE}
+.endif
+
+.if defined(WITH_READLINE)
+CONFIGURE_ARGS+=--with-readline
+.endif
+
+.if defined(WITH_RECODE)
+LIB_DEPENDS+= recode.3:${PORTSDIR}/converters/recode
+CONFIGURE_ARGS+=--with-recode=${LOCALBASE}
+.endif
+
+.if defined(WITH_SESSION)
+CONFIGURE_ARGS+=--enable-session
+.endif
+
+.if defined(WITH_SHMOP)
+CONFIGURE_ARGS+=--enable-shmop
+.endif
+
+.if defined(WITH_SNMP)
+LIB_DEPENDS+= snmp.4:${PORTSDIR}/net/net-snmp4
+CONFIGURE_ARGS+=--with-snmp=${LOCALBASE} --enable-ucd-snmp-hack
+.endif
+
+.if defined(WITH_SOCKETS)
+CONFIGURE_ARGS+=--enable-sockets
+.endif
+
+.if defined(WITH_SYBASEDB)
+LIB_DEPENDS+= sybdb.3:${PORTSDIR}/databases/freetds
+CONFIGURE_ARGS+=--with-sybase=${LOCALBASE}
+.endif
+
+.if defined(WITH_SYBASECT)
+LIB_DEPENDS+= ct.1:${PORTSDIR}/databases/freetds
+CONFIGURE_ARGS+=--with-sybase-ct=${LOCALBASE}
+.endif
+
+.if defined(WITH_SYSVSEM)
+CONFIGURE_ARGS+=--enable-sysvsem
+.endif
+
+.if defined(WITH_SYSVSHM)
+CONFIGURE_ARGS+=--enable-sysvshm
+.endif
+
+.if defined(WITH_TOKENIZER)
+CONFIGURE_ARGS+=--enable-tokenizer
+.endif
+
+.if defined(WITH_UNIXODBC)
+LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC
+CONFIGURE_ARGS+=--with-unixODBC=${LOCALBASE}
+.endif
+
+.if defined(WITH_WDDX)
+CONFIGURE_ARGS+=--enable-wddx
+.endif
+
+.if defined(WITH_XML) || defined(WITH_XML_DEP)
+LIB_DEPENDS+= expat.4:${PORTSDIR}/textproc/expat2
+.endif
+
+.if defined(WITH_XML)
+CONFIGURE_ARGS+=--enable-xml --with-expat-dir=${LOCALBASE}
+.endif
+
+.if defined(WITH_XMLRPC)
+CONFIGURE_ARGS+=--with-xmlrpc
+.endif
+
+.if defined(WITH_XSLT)
+LIB_DEPENDS+= sablot.70:${PORTSDIR}/textproc/sablotron
+CONFIGURE_ARGS+=--enable-xslt --with-xslt-sablot=${LOCALBASE}
+.endif
+
+.if defined(WITH_YAZ)
+LIB_DEPENDS+= yaz.2:${PORTSDIR}/net/yaz
+CONFIGURE_ARGS+=--with-yaz=${LOCALBASE}/bin
+.endif
+
+.if defined(WITH_YP)
+CONFIGURE_ARGS+=--enable-yp
+.endif
+
+.if defined(WITH_ZIP)
+LIB_DEPENDS+= zzip-0.10:${PORTSDIR}/devel/zziplib
+CONFIGURE_ARGS+=--with-zip=${LOCALBASE}
+.endif
+
+.if defined(WITH_ZLIB)
+CONFIGURE_ARGS+=--with-zlib=yes
+.endif
+
+pre-patch:
+ @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.php
+
+post-patch:
+ @${SED} "s|%%PREFIX%%|${PREFIX}|g" \
+ ${WRKSRC}/pear/scripts/pearcmd.php > ${WRKSRC}/pear/scripts/pear
+
+pre-configure:
+.if defined(WITH_IMAP) && defined(WITH_RECODE)
+ @${ECHO_CMD} "You cannot define WITH_IMAP *and* WITH_RECODE!"
+ @${FALSE}
+.endif
+.if defined(WITH_IMAP) && defined(WITH_YAZ)
+ @${ECHO_CMD} "You cannot define WITH_IMAP *and* WITH_YAZ!"
+ @${FALSE}
+.endif
+.if defined(WITH_RECODE) && defined(WITH_YAZ)
+ @${ECHO_CMD} "You cannot define WITH_RECODE *and* WITH_YAZ!"
+ @${FALSE}
+.endif
+.if defined(WITH_SYBASEDB) && defined(WITH_SYBASECT)
+ @${ECHO_CMD} "You cannot define WITH_SYBASEDB *and* WITH_SYBASECT!"
+ @${FALSE}
+.endif
+.if defined(WITHOUT_CLI) && defined(WITHOUT_APACHE)
+ @${ECHO_CMD} "You cannot define WITHOUT_CLI *and* WITHOUT_APACHE!"
+ @${FALSE}
+.endif
+.if !defined(WITHOUT_CLI) && !defined(WITHOUT_APACHE)
+ @${ECHO_CMD} ""
+ @${ECHO_CMD} "You may use the following build options:"
+ @${ECHO_CMD} ""
+.if !defined(WITHOUT_CLI) && !defined(WITHOUT_APACHE)
+ @${ECHO_CMD} " WITHOUT_CLI=yes Disable Command Line Interpreter"
+ @${ECHO_CMD} " WITHOUT_APACHE=yes Disable Apache Module"
+.endif
+ @${ECHO_CMD} ""
+.endif
+
+post-build:
+ @${ECHO_CMD} ""
+ @${ECHO_CMD} "You may run the tests from the PHP test framework."
+ @${ECHO_CMD} "You can do this by typing 'make test' now."
+ @${ECHO_CMD} ""
+
+test: all
+ @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} \
+ ${MAKEFILE} ${MAKE_ARGS} ${.TARGET})
+
+post-install:
+.if !defined(WITHOUT_CLI)
+ @${INSTALL_SCRIPT} ${WRKSRC}/pear/scripts/pear ${PREFIX}/bin
+.endif
+ @${INSTALL_DATA} ${WRKSRC}/php.ini-dist ${PREFIX}/etc
+ @${INSTALL_DATA} ${WRKSRC}/php.ini-recommended ${PREFIX}/etc
+ @${TOUCH} ${PREFIX}/lib/php/${EXT_DIR}/.php
+.if !defined(WITHOUT_APACHE)
+ @${ECHO_CMD} "*****************************************************************************"
+ @${ECHO_CMD} ""
+ @${ECHO_CMD} "Make sure index.php is part of your DirectoryIndex."
+ @${ECHO_CMD} ""
+ @${ECHO_CMD} "You should add the following lines to your Apache configuration file:"
+ @${ECHO_CMD} ""
+ @${ECHO_CMD} "AddType application/x-httpd-php .php"
+ @${ECHO_CMD} "AddType application/x-httpd-php-source .phps"
+ @${ECHO_CMD} ""
+ @${ECHO_CMD} "*****************************************************************************"
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/lang/php5/distinfo b/lang/php5/distinfo
new file mode 100644
index 000000000000..d6aba4b19e76
--- /dev/null
+++ b/lang/php5/distinfo
@@ -0,0 +1 @@
+MD5 (php-4.3.2RC4.tar.bz2) = 9efabc2c2ee949b256b46d7fc1818154
diff --git a/lang/php5/files/patch-configure b/lang/php5/files/patch-configure
new file mode 100644
index 000000000000..eda6b0e7209a
--- /dev/null
+++ b/lang/php5/files/patch-configure
@@ -0,0 +1,136 @@
+--- configure.orig Thu May 1 23:30:59 2003
++++ configure Fri May 2 15:59:58 2003
+@@ -70925,29 +70925,6 @@
+ else
+
+
+- case cs in
+- c|c_r|pthread*) ;;
+- *)
+- if test "$ext_shared" = "yes"; then
+- SYBASE_CT_SHARED_LIBADD="-lcs $SYBASE_CT_SHARED_LIBADD"
+- else
+-
+-
+- case cs in
+- c|c_r|pthread*) ;;
+- *)
+- LIBS="-lcs $LIBS"
+- ;;
+- esac
+-
+-
+- fi
+- ;;
+- esac
+-
+-
+-
+-
+ case ct in
+ c|c_r|pthread*) ;;
+ *)
+@@ -70971,52 +70948,7 @@
+
+
+
+- case comn in
+- c|c_r|pthread*) ;;
+- *)
+- if test "$ext_shared" = "yes"; then
+- SYBASE_CT_SHARED_LIBADD="-lcomn $SYBASE_CT_SHARED_LIBADD"
+- else
+-
+-
+- case comn in
+- c|c_r|pthread*) ;;
+- *)
+- LIBS="-lcomn $LIBS"
+- ;;
+- esac
+-
+-
+- fi
+- ;;
+- esac
+-
+-
+-
+-
+- case intl in
+- c|c_r|pthread*) ;;
+- *)
+- if test "$ext_shared" = "yes"; then
+- SYBASE_CT_SHARED_LIBADD="-lintl $SYBASE_CT_SHARED_LIBADD"
+- else
+-
+-
+- case intl in
+- c|c_r|pthread*) ;;
+- *)
+- LIBS="-lintl $LIBS"
+- ;;
+- esac
+-
+-
+- fi
+- ;;
+- esac
+-
+-
+-
+- SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lcs -lct -lcomn -lintl"
++ SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lct"
+
+
+ save_old_LDFLAGS=$LDFLAGS
+@@ -71086,37 +71018,6 @@
+
+
+
+-else
+- echo "$ac_t""no" 1>&6
+-
+- LDFLAGS=$save_old_LDFLAGS
+- unset ac_cv_func_tcl
+-
+-
+-
+- case sybtcl in
+- c|c_r|pthread*) ;;
+- *)
+- if test "$ext_shared" = "yes"; then
+- SYBASE_CT_SHARED_LIBADD="-lsybtcl $SYBASE_CT_SHARED_LIBADD"
+- else
+-
+-
+- case sybtcl in
+- c|c_r|pthread*) ;;
+- *)
+- LIBS="-lsybtcl $LIBS"
+- ;;
+- esac
+-
+-
+- fi
+- ;;
+- esac
+-
+-
+-
+-
+ fi
+
+
+@@ -84050,10 +83951,7 @@
+ CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
+
+ all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)'
+-install_targets="install-sapi install-modules $install_pear install-build install-headers install-programs"
+-if test "$PHP_SAPI" != "cgi"; then
+- install_targets="$PHP_INSTALL_CLI_TARGET $install_targets"
+-fi
++install_targets="install-sapi $PHP_INSTALL_CLI_TARGET install-modules $install_pear install-build install-headers install-programs"
+
+
+ PHP_VAR_SUBST="$PHP_VAR_SUBST all_targets"
diff --git a/lang/php5/files/patch-pear::Makefile.frag b/lang/php5/files/patch-pear::Makefile.frag
new file mode 100644
index 000000000000..6653c7852f69
--- /dev/null
+++ b/lang/php5/files/patch-pear::Makefile.frag
@@ -0,0 +1,22 @@
+--- pear/Makefile.frag.orig Sat Apr 12 01:48:37 2003
++++ pear/Makefile.frag Sat May 17 10:08:54 2003
+@@ -13,10 +13,13 @@
+
+ install-pear:
+ @echo "Installing PEAR environment: $(INSTALL_ROOT)$(peardir)/"
+- @if $(mkinstalldirs) $(INSTALL_ROOT)$(peardir); then \
+- $(MAKE) -s install-pear-installer install-pear-packages; \
+- else \
+- cat $(srcdir)/install-pear.txt; \
+- exit 5; \
+- fi
++ @$(mkinstalldirs) $(INSTALL_ROOT)$(peardir)/bootstrap \
++ $(INSTALL_ROOT)$(peardir)/bootstrap/Archive \
++ $(INSTALL_ROOT)$(peardir)/bootstrap/Console
++ @cp $(srcdir)/PEAR.php $(srcdir)/System.php \
++ $(INSTALL_ROOT)$(peardir)/bootstrap
++ @cp $(srcdir)/Archive/*.php $(INSTALL_ROOT)$(peardir)/bootstrap/Archive
++ @cp $(srcdir)/Console/*.php $(INSTALL_ROOT)$(peardir)/bootstrap/Console
++ @cp -R $(srcdir)/OS $(INSTALL_ROOT)$(peardir)/bootstrap/OS
++ @cp -R $(srcdir)/PEAR $(INSTALL_ROOT)$(peardir)/bootstrap/PEAR
+
diff --git a/lang/php5/files/patch-pear::scripts::pearcmd.php b/lang/php5/files/patch-pear::scripts::pearcmd.php
new file mode 100644
index 000000000000..642fc7e118a1
--- /dev/null
+++ b/lang/php5/files/patch-pear::scripts::pearcmd.php
@@ -0,0 +1,18 @@
+--- pear/scripts/pearcmd.php.orig Fri May 16 17:31:37 2003
++++ pear/scripts/pearcmd.php Fri May 16 17:36:10 2003
+@@ -1,3 +1,4 @@
++#!%%PREFIX%%/bin/php -n -dsafe_mode=0 -doutput_buffering=1
+ <?php
+ //
+ // +----------------------------------------------------------------------+
+@@ -24,9 +25,7 @@
+ /**
+ * @nodep Gtk
+ */
+-if ('@include_path@' != '@'.'include_path'.'@') {
+- ini_set('include_path', '@include_path@');
+-}
++ini_set('include_path', '%%PREFIX%%/share/pear:%%PREFIX%%/share/pear/bootstrap');
+ ini_set('allow_url_fopen', true);
+ set_time_limit(0);
+ ob_implicit_flush(true);
diff --git a/lang/php5/pkg-descr b/lang/php5/pkg-descr
new file mode 100644
index 000000000000..a14e137ec10f
--- /dev/null
+++ b/lang/php5/pkg-descr
@@ -0,0 +1,11 @@
+PHP, which stands for "PHP: Hypertect Preprocessor" is a widely-used Open
+Source general-purpose scripting language that is especially suited for
+for Web development and can be embedded into HTML. Its syntax draws upon C,
+Java, and Perl, and is easy to learn. The main goal of the language is to
+allow web developers to write dinamically generated webpages quickly, but
+you can do much more with PHP.
+
+WWW: http://www.php.net/
+
+- Alex Dupre
+sysadmin@alexdupre.com
diff --git a/lang/php5/pkg-message b/lang/php5/pkg-message
new file mode 100644
index 000000000000..e53a3cf9b4df
--- /dev/null
+++ b/lang/php5/pkg-message
@@ -0,0 +1,18 @@
+*****************************************************************************
+
+You have installed the php4 package.
+
+Have a look at the php-dev port if you need additional extensions
+other than ctype, MySQL, PCRE, POSIX, session, tokenizer, XML and ZLIB.
+
+You can find it at
+ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/ports/lang/php4.tar
+
+Make sure index.php is part of your DirectoryIndex.
+
+You should add the following to your Apache configuration file:
+
+AddType application/x-httpd-php .php
+AddType application/x-httpd-php-source .phps
+
+*****************************************************************************
diff --git a/lang/php5/pkg-plist b/lang/php5/pkg-plist
new file mode 100644
index 000000000000..ca605327ebf0
--- /dev/null
+++ b/lang/php5/pkg-plist
@@ -0,0 +1,249 @@
+%%CLI%%bin/pear
+%%CLI%%bin/php
+bin/php-config
+bin/phpextdist
+bin/phpize
+etc/php.ini-dist
+etc/php.ini-recommended
+include/php/TSRM/TSRM.h
+include/php/TSRM/acconfig.h
+include/php/TSRM/readdir.h
+include/php/TSRM/tsrm_config.h
+include/php/TSRM/tsrm_config.nw.h
+include/php/TSRM/tsrm_config.w32.h
+include/php/TSRM/tsrm_config_common.h
+include/php/TSRM/tsrm_nw.h
+include/php/TSRM/tsrm_strtok_r.h
+include/php/TSRM/tsrm_virtual_cwd.h
+include/php/TSRM/tsrm_win32.h
+include/php/Zend/FlexLexer.h
+include/php/Zend/acconfig.h
+include/php/Zend/zend.h
+include/php/Zend/zend_API.h
+include/php/Zend/zend_alloc.h
+include/php/Zend/zend_builtin_functions.h
+include/php/Zend/zend_compile.h
+include/php/Zend/zend_config.h
+include/php/Zend/zend_config.w32.h
+include/php/Zend/zend_constants.h
+include/php/Zend/zend_dynamic_array.h
+include/php/Zend/zend_errors.h
+include/php/Zend/zend_execute.h
+include/php/Zend/zend_execute_globals.h
+include/php/Zend/zend_execute_locks.h
+include/php/Zend/zend_extensions.h
+include/php/Zend/zend_fast_cache.h
+include/php/Zend/zend_globals.h
+include/php/Zend/zend_globals_macros.h
+include/php/Zend/zend_hash.h
+include/php/Zend/zend_highlight.h
+include/php/Zend/zend_indent.h
+include/php/Zend/zend_ini.h
+include/php/Zend/zend_ini_parser.h
+include/php/Zend/zend_ini_scanner.h
+include/php/Zend/zend_istdiostream.h
+include/php/Zend/zend_language_parser.h
+include/php/Zend/zend_language_scanner.h
+include/php/Zend/zend_list.h
+include/php/Zend/zend_llist.h
+include/php/Zend/zend_modules.h
+include/php/Zend/zend_multibyte.h
+include/php/Zend/zend_multiply.h
+include/php/Zend/zend_operators.h
+include/php/Zend/zend_ptr_stack.h
+include/php/Zend/zend_qsort.h
+include/php/Zend/zend_stack.h
+include/php/Zend/zend_static_allocator.h
+include/php/Zend/zend_types.h
+include/php/Zend/zend_variables.h
+include/php/acconfig.h
+include/php/ext/mbstring/cp932_table.h
+include/php/ext/mbstring/mbfilter.h
+include/php/ext/mbstring/mbfilter_cn.h
+include/php/ext/mbstring/mbfilter_ja.h
+include/php/ext/mbstring/mbfilter_kr.h
+include/php/ext/mbstring/mbfilter_ru.h
+include/php/ext/mbstring/mbfilter_tw.h
+include/php/ext/mbstring/mbregex.h
+include/php/ext/mbstring/mbstring.h
+include/php/ext/mbstring/php_mbregex.h
+include/php/ext/mbstring/php_unicode.h
+include/php/ext/mbstring/unicode_data.h
+include/php/ext/mbstring/unicode_table.h
+include/php/ext/mbstring/unicode_table_cn.h
+include/php/ext/mbstring/unicode_table_ja.h
+include/php/ext/mbstring/unicode_table_kr.h
+include/php/ext/mbstring/unicode_table_ru.h
+include/php/ext/mbstring/unicode_table_tw.h
+include/php/ext/pgsql/php_pgsql.h
+include/php/ext/session/mod_files.h
+include/php/ext/session/mod_mm.h
+include/php/ext/session/mod_user.h
+include/php/ext/session/php_session.h
+include/php/ext/standard/aggregation.h
+include/php/ext/standard/base64.h
+include/php/ext/standard/basic_functions.h
+include/php/ext/standard/crc32.h
+include/php/ext/standard/credits.h
+include/php/ext/standard/credits_ext.h
+include/php/ext/standard/credits_sapi.h
+include/php/ext/standard/css.h
+include/php/ext/standard/cyr_convert.h
+include/php/ext/standard/datetime.h
+include/php/ext/standard/dl.h
+include/php/ext/standard/dns.h
+include/php/ext/standard/exec.h
+include/php/ext/standard/file.h
+include/php/ext/standard/flock_compat.h
+include/php/ext/standard/fsock.h
+include/php/ext/standard/head.h
+include/php/ext/standard/html.h
+include/php/ext/standard/info.h
+include/php/ext/standard/md5.h
+include/php/ext/standard/microtime.h
+include/php/ext/standard/pack.h
+include/php/ext/standard/pageinfo.h
+include/php/ext/standard/parsedate.h
+include/php/ext/standard/php_array.h
+include/php/ext/standard/php_assert.h
+include/php/ext/standard/php_browscap.h
+include/php/ext/standard/php_crypt.h
+include/php/ext/standard/php_dir.h
+include/php/ext/standard/php_ext_syslog.h
+include/php/ext/standard/php_filestat.h
+include/php/ext/standard/php_fopen_wrappers.h
+include/php/ext/standard/php_ftok.h
+include/php/ext/standard/php_image.h
+include/php/ext/standard/php_incomplete_class.h
+include/php/ext/standard/php_iptc.h
+include/php/ext/standard/php_lcg.h
+include/php/ext/standard/php_link.h
+include/php/ext/standard/php_mail.h
+include/php/ext/standard/php_math.h
+include/php/ext/standard/php_metaphone.h
+include/php/ext/standard/php_parsedate.h
+include/php/ext/standard/php_rand.h
+include/php/ext/standard/php_smart_str.h
+include/php/ext/standard/php_smart_str_public.h
+include/php/ext/standard/php_standard.h
+include/php/ext/standard/php_string.h
+include/php/ext/standard/php_type.h
+include/php/ext/standard/php_var.h
+include/php/ext/standard/php_versioning.h
+include/php/ext/standard/quot_print.h
+include/php/ext/standard/reg.h
+include/php/ext/standard/scanf.h
+include/php/ext/standard/sha1.h
+include/php/ext/standard/uniqid.h
+include/php/ext/standard/url.h
+include/php/ext/standard/url_scanner.h
+include/php/ext/standard/url_scanner_ex.h
+include/php/ext/xml/expat/ascii.h
+include/php/ext/xml/expat/asciitab.h
+include/php/ext/xml/expat/expat.h
+include/php/ext/xml/expat/iasciitab.h
+include/php/ext/xml/expat/latin1tab.h
+include/php/ext/xml/expat/nametab.h
+include/php/ext/xml/expat/utf8tab.h
+include/php/ext/xml/expat/winconfig.h
+include/php/ext/xml/expat/xmlrole.h
+include/php/ext/xml/expat/xmltok.h
+include/php/ext/xml/expat/xmltok_impl.h
+include/php/ext/xml/php_xml.h
+include/php/main/SAPI.h
+include/php/main/build-defs.h
+include/php/main/config.nw.h
+include/php/main/config.w32.h
+include/php/main/fopen_wrappers.h
+include/php/main/internal_functions_registry.h
+include/php/main/logos.h
+include/php/main/php.h
+include/php/main/php3_compat.h
+include/php/main/php_compat.h
+include/php/main/php_config.h
+include/php/main/php_content_types.h
+include/php/main/php_embed.h
+include/php/main/php_globals.h
+include/php/main/php_ini.h
+include/php/main/php_logos.h
+include/php/main/php_main.h
+include/php/main/php_memory_streams.h
+include/php/main/php_network.h
+include/php/main/php_open_temporary_file.h
+include/php/main/php_output.h
+include/php/main/php_reentrancy.h
+include/php/main/php_regex.h
+include/php/main/php_scandir.h
+include/php/main/php_streams.h
+include/php/main/php_syslog.h
+include/php/main/php_ticks.h
+include/php/main/php_variables.h
+include/php/main/php_version.h
+include/php/main/rfc1867.h
+include/php/main/safe_mode.h
+include/php/main/snprintf.h
+include/php/main/spprintf.h
+include/php/main/win95nt.h
+include/php/regex/cclass.h
+include/php/regex/cname.h
+include/php/regex/regex.h
+include/php/regex/regex2.h
+include/php/regex/regex_extra.h
+include/php/regex/utils.h
+lib/php/%%EXT_DIR%%/.php
+lib/php/build/Makefile.global
+lib/php/build/acinclude.m4
+lib/php/build/mkdep.awk
+lib/php/build/phpize.m4
+lib/php/build/scan_makefile_in.awk
+lib/php/build/shtool
+%%APACHE%%%%SAPI_FILE%%
+%%APACHE%%@exec %D/sbin/apxs -e -a -n php4 %f
+%%APACHE%%@unexec %D/sbin/apxs -e -A -n php4 %f
+%%CLI%%share/pear/bootstrap/Archive/Tar.php
+%%CLI%%share/pear/bootstrap/PEAR.php
+%%CLI%%share/pear/bootstrap/System.php
+%%CLI%%share/pear/bootstrap/Console/Getopt.php
+%%CLI%%share/pear/bootstrap/OS/Guess.php
+%%CLI%%share/pear/bootstrap/PEAR/Command/Auth.php
+%%CLI%%share/pear/bootstrap/PEAR/Command/Build.php
+%%CLI%%share/pear/bootstrap/PEAR/Command/Common.php
+%%CLI%%share/pear/bootstrap/PEAR/Command/Config.php
+%%CLI%%share/pear/bootstrap/PEAR/Command/Install.php
+%%CLI%%share/pear/bootstrap/PEAR/Command/Package.php
+%%CLI%%share/pear/bootstrap/PEAR/Command/Registry.php
+%%CLI%%share/pear/bootstrap/PEAR/Command/Remote.php
+%%CLI%%share/pear/bootstrap/PEAR/Autoloader.php
+%%CLI%%share/pear/bootstrap/PEAR/Builder.php
+%%CLI%%share/pear/bootstrap/PEAR/Command.php
+%%CLI%%share/pear/bootstrap/PEAR/Common.php
+%%CLI%%share/pear/bootstrap/PEAR/Config.php
+%%CLI%%share/pear/bootstrap/PEAR/Dependency.php
+%%CLI%%share/pear/bootstrap/PEAR/Installer.php
+%%CLI%%share/pear/bootstrap/PEAR/Packager.php
+%%CLI%%share/pear/bootstrap/PEAR/Registry.php
+%%CLI%%share/pear/bootstrap/PEAR/Remote.php
+%%CLI%%share/pear/bootstrap/PEAR/Frontend/CLI.php
+@dirrm include/php/TSRM
+@dirrm include/php/Zend
+@dirrm include/php/ext/mbstring
+@dirrm include/php/ext/pgsql
+@dirrm include/php/ext/session
+@dirrm include/php/ext/standard
+@dirrm include/php/ext/xml/expat
+@dirrm include/php/ext/xml
+@dirrm include/php/ext
+@dirrm include/php/main
+@dirrm include/php/regex
+@dirrm include/php/
+@unexec rmdir %D/lib/php/%%EXT_DIR%% 2> /dev/null || true
+@dirrm lib/php/build
+@unexec rmdir %D/lib/php 2> /dev/null || true
+%%CLI%%@dirrm share/pear/bootstrap/Archive
+%%CLI%%@dirrm share/pear/bootstrap/Console
+%%CLI%%@dirrm share/pear/bootstrap/OS
+%%CLI%%@dirrm share/pear/bootstrap/PEAR/Command
+%%CLI%%@dirrm share/pear/bootstrap/PEAR/Frontend
+%%CLI%%@dirrm share/pear/bootstrap/PEAR
+%%CLI%%@dirrm share/pear/bootstrap
+%%CLI%%@unexec rmdir %D/share/pear 2> /dev/null || true
diff --git a/lang/php5/scripts/configure.php b/lang/php5/scripts/configure.php
new file mode 100644
index 000000000000..69b378289b80
--- /dev/null
+++ b/lang/php5/scripts/configure.php
@@ -0,0 +1,102 @@
+#!/bin/sh
+# $FreeBSD$
+
+if [ -f ${WRKDIR}/Makefile.inc ]; then
+ exit
+fi
+
+tempfile=`/usr/bin/mktemp -t checklist`
+
+if [ "${BATCH}" ]; then
+ echo "${SEL_OPTIONS}" > $tempfile
+else
+ if [ -f "${OPTION_FILE}" ]; then
+ for i in `${CAT} ${OPTION_FILE}`
+ do
+ export $i
+ done
+ fi
+ /usr/bin/dialog --title "configuration options" --clear --checklist "\n\
+Please select desired options:" -1 -1 16 \
+BCMATH "bc style precision math functions" ${WITH_BCMATH:-OFF} \
+BZIP2 "bzip2 library support" ${WITH_BZIP2:-OFF} \
+CALENDAR "calendar conversion support" ${WITH_CALENDAR:-OFF} \
+CRACK "crack support" ${WITH_CRACK:-OFF} \
+CTYPE "ctype functions" ${WITH_CTYPE:-OFF} \
+CURL "CURL support" ${WITH_CURL:-OFF} \
+DBASE "dBase library support" ${WITH_DBASE:-OFF} \
+DBX "dbx support" ${WITH_DBX:-OFF} \
+DOMXML "DOM support" ${WITH_DOMXML:-OFF} \
+DOMXSLT "DOM XSLT and EXSLT support (implies DOMXML)" ${WITH_DOMXSLT:-OFF} \
+EXIF "EXIF support" ${WITH_EXIF:-OFF} \
+FILEPRO "filePro support" ${WITH_FILEPRO:-OFF} \
+FTP "FTP support" ${WITH_FTP:-OFF} \
+GD "GD library support" ${WITH_GD:-OFF} \
+GDBM "GDBM database support" ${WITH_GDBM:-OFF} \
+GETTEXT "gettext library support" ${WITH_GETTEXT:-OFF} \
+GMP "GNU MP support" ${WITH_GMP:-OFF} \
+HYPERWAVE "Hyperwave support" ${WITH_HYPERWAVE:-OFF} \
+ICONV "iconv support" ${WITH_ICONV:-OFF} \
+IMAP "IMAP support" ${WITH_IMAP:-OFF} \
+INTERBASE "Interbase 6 database support (Firebird)" ${WITH_INTERBASE:-OFF} \
+MBSTRING "multibyte string support" ${WITH_MBSTRING:-OFF} \
+MCAL "Modular Calendar Access Library support" ${WITH_MCAL:-OFF} \
+MCVE "MCVE support" ${WITH_MCVE:-OFF} \
+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} \
+MYSQL "MySQL database support" ${WITH_MYSQL:-OFF} \
+NCURSES "ncurses support (CLI only)" ${WITH_NCURSES:-OFF} \
+OPENLDAP "OpenLDAP support" ${WITH_OPENLDAP:-OFF} \
+OPENSSL "OpenSSL support" ${WITH_OPENSSL:-OFF} \
+PCNTL "pcntl support (CLI only)" ${WITH_PCNTL:-OFF} \
+PCRE "Perl Compatible Regular Expression support" ${WITH_PCRE:-OFF} \
+PDFLIB "PDFlib support" ${WITH_PDFLIB:-OFF} \
+POSIX "POSIX-like functions" ${WITH_POSIX:-OFF} \
+POSTGRESQL "PostgreSQL database support" ${WITH_POSTGRESQL:-OFF} \
+PSPELL "pspell support" ${WITH_PSPELL:-OFF} \
+READLINE "readline support (CLI only)" ${WITH_READLINE:-OFF} \
+RECODE "recode support" ${WITH_RECODE:-OFF} \
+SESSION "session support" ${WITH_SESSION:-OFF} \
+SHMOP "shmop support" ${WITH_SHMOP:-OFF} \
+SNMP "SNMP support" ${WITH_SNMP:-OFF} \
+SOCKETS "sockets support" ${WITH_SOCKETS:-OFF} \
+SYBASEDB "Sybase/MS-SQL database support (DB-lib)" ${WITH_SYBASEDB:-OFF} \
+SYBASECT "Sybase/MS-SQL database support (CT-lib)" ${WITH_SYBASECT:-OFF} \
+SYSVSEM "System V semaphore support" ${WITH_SYSVSEM:-OFF} \
+SYSVSHM "System V shared memory support" ${WITH_SYSVSHM:-OFF} \
+TOKENIZER "tokenizer support" ${WITH_TOKENIZER:-OFF} \
+UNIXODBC "unixODBC support" ${WITH_UNIXODBC:-OFF} \
+WDDX "WDDX support" ${WITH_WDDX:-OFF} \
+XML "XML support" ${WITH_XML:-OFF} \
+XMLRPC "XMLRPC-EPI support" ${WITH_XMLRPC:-OFF} \
+XSLT "XSLT Sablotron support" ${WITH_XSLT:-OFF} \
+YAZ "YAZ support (ANSI/NISO Z39.50)" ${WITH_YAZ:-OFF} \
+YP "YP/NIS support" ${WITH_YP:-OFF} \
+ZIP "ZIP support" ${WITH_ZIP:-OFF} \
+ZLIB "ZLIB support" ${WITH_ZLIB:-OFF} \
+2> $tempfile
+fi
+
+retval=$?
+
+if [ -s $tempfile ]; then
+ set `${CAT} $tempfile | ${SED} 's|"||g'`
+fi
+rm -f $tempfile
+
+case $retval in
+ 0) if [ -z "$*" ]; then
+ echo "Nothing selected"
+ fi
+ ;;
+ 1) echo "Cancel pressed."
+ exit 1
+ ;;
+esac
+exec > ${WRKDIR}/Makefile.inc
+while [ $1 ]; do
+ echo "WITH_$1=yes";
+ shift
+done
diff --git a/lang/php5/scripts/php_options b/lang/php5/scripts/php_options
new file mode 100644
index 000000000000..ddbb15ea9ea5
--- /dev/null
+++ b/lang/php5/scripts/php_options
@@ -0,0 +1,58 @@
+WITH_BCMATH=OFF
+WITH_BZIP2=OFF
+WITH_CALENDAR=OFF
+WITH_CRACK=OFF
+WITH_CTYPE=ON
+WITH_CURL=OFF
+WITH_DBASE=OFF
+WITH_DBX=OFF
+WITH_DOMXML=OFF
+WITH_DOMXSLT=OFF
+WITH_EXIF=OFF
+WITH_FILEPRO=OFF
+WITH_FTP=OFF
+WITH_GD=OFF
+WITH_GDBM=OFF
+WITH_GETTEXT=OFF
+WITH_GMP=OFF
+WITH_HYPERWAVE=OFF
+WITH_ICONV=OFF
+WITH_IMAP=OFF
+WITH_INTERBASE=OFF
+WITH_MBSTRING=OFF
+WITH_MCAL=OFF
+WITH_MCVE=OFF
+WITH_MCRYPT=OFF
+WITH_MHASH=OFF
+WITH_MIME=OFF
+WITH_MING=OFF
+WITH_MYSQL=ON
+WITH_NCURSES=OFF
+WITH_OPENLDAP=OFF
+WITH_OPENSSL=OFF
+WITH_PCNTL=OFF
+WITH_PCRE=ON
+WITH_PDFLIB=OFF
+WITH_POSIX=ON
+WITH_POSTGRESQL=OFF
+WITH_PSPELL=OFF
+WITH_READLINE=OFF
+WITH_RECODE=OFF
+WITH_SESSION=ON
+WITH_SHMOP=OFF
+WITH_SNMP=OFF
+WITH_SOCKETS=OFF
+WITH_SYBASEDB=OFF
+WITH_SYBASECT=OFF
+WITH_SYSVSEM=OFF
+WITH_SYSVSHM=OFF
+WITH_TOKENIZER=ON
+WITH_UNIXODBC=OFF
+WITH_WDDX=OFF
+WITH_XML=ON
+WITH_XMLRPC=OFF
+WITH_XSLT=OFF
+WITH_YAZ=OFF
+WITH_YP=OFF
+WITH_ZIP=OFF
+WITH_ZLIB=ON