diff options
author | jlam <jlam> | 2000-12-17 09:19:32 +0000 |
---|---|---|
committer | jlam <jlam> | 2000-12-17 09:19:32 +0000 |
commit | 8e3d0e661a2cee7c39b5c9900e55ca3ed9fe4679 (patch) | |
tree | e8a5fdba8dbe219d986cded38fe20b79f23b8b7a | |
parent | f8f5c5955e22c1fe91d09853eeac3b72aa556dd6 (diff) | |
download | pkgsrc-8e3d0e661a2cee7c39b5c9900e55ca3ed9fe4679.tar.gz |
Create a php4 package upon which both HTTP/PHP4 servers and PHP4 extension
modules depend. Move most of the guts of the ap-php4 package into this
one.
-rw-r--r-- | www/php4/Makefile | 35 | ||||
-rw-r--r-- | www/php4/Makefile.common | 63 | ||||
-rw-r--r-- | www/php4/Makefile.module | 41 | ||||
-rw-r--r-- | www/php4/files/md5 | 3 | ||||
-rw-r--r-- | www/php4/files/patch-sum | 4 | ||||
-rw-r--r-- | www/php4/patches/patch-aa | 21 | ||||
-rw-r--r-- | www/php4/patches/patch-ab | 15 | ||||
-rw-r--r-- | www/php4/pkg/COMMENT | 1 | ||||
-rw-r--r-- | www/php4/pkg/DESCR | 4 | ||||
-rw-r--r-- | www/php4/pkg/MESSAGE | 12 | ||||
-rw-r--r-- | www/php4/pkg/MESSAGE.module | 10 | ||||
-rw-r--r-- | www/php4/pkg/PLIST | 5 | ||||
-rw-r--r-- | www/php4/pkg/PLIST.module | 3 |
13 files changed, 217 insertions, 0 deletions
diff --git a/www/php4/Makefile b/www/php4/Makefile new file mode 100644 index 00000000000..806ad800868 --- /dev/null +++ b/www/php4/Makefile @@ -0,0 +1,35 @@ +# $NetBSD: Makefile,v 1.1.1.1 2000/12/17 09:19:32 jlam Exp $ + +.include "../../www/php4/Makefile.common" + +CATEGORIES+= www lang + +MAINTAINER= jlam@netbsd.org +HOMEPAGE= http://www.php.net/ + +CONFLICTS+= ap-php-4.0.3pl1 + +EXTRACT_ELEMENTS= ${DISTNAME}/php.ini-dist +EXTRACT_ELEMENTS+= ${DISTNAME}/php.ini-optimized +EXTRACT_ELEMENTS+= ${DISTNAME}/php4.gif + +MESSAGE_FILE= ${WRKDIR}/.MESSAGE + +# This package only installs some PHP4-related files, and doesn't require +# any of these steps. +# +NO_PATCH= # defined +NO_CONFIGURE= # defined +NO_BUILD= # defined + +pre-install: + ${SED} -e "s,@PREFIX@,${PREFIX},g" \ + < ${PKGDIR}/MESSAGE > ${MESSAGE_FILE} + +do-install: + ${INSTALL_DATA} ${WRKSRC}/php.ini-dist ${PREFIX}/etc + ${INSTALL_DATA} ${WRKSRC}/php.ini-optimized ${PREFIX}/etc + ${INSTALL_DATA_DIR} ${PREFIX}/share/php4 + ${INSTALL_DATA} ${WRKSRC}/php4.gif ${PREFIX}/share/php4 + +.include "../../mk/bsd.pkg.mk" diff --git a/www/php4/Makefile.common b/www/php4/Makefile.common new file mode 100644 index 00000000000..c39dcc373f6 --- /dev/null +++ b/www/php4/Makefile.common @@ -0,0 +1,63 @@ +# $NetBSD: Makefile.common,v 1.1.1.1 2000/12/17 09:19:32 jlam Exp $ + +DISTNAME= php-${PHP_VERS} +PHP_VERS= 4.0.3pl1 +CATEGORIES+= php4 + +# Note the http address is written this way by purpose, so that bsd.pkg.mk DTRT +MASTER_SITES= http://www.php.net/do_download.php?source_site=www.php.net&download_file= \ + ftp://ftp.php.net/pub/distributions/ + +MAINTAINER= jdolecek@netbsd.org +HOMEPAGE= http://www.php.net/ + +# Put this dependency here to compile in dbm support for all PHP4 modules. +DEPENDS+= gdbm>=1.7.3:../../databases/gdbm + +FILESDIR= ${.CURDIR}/../../www/php4/files +PATCHDIR= ${.CURDIR}/../../www/php4/patches + +# Location of installed PHP4 loadable modules under ${PREFIX}. +PHP_EXTENSION_DIR= lib/php4 +PLIST_SUBST+= PHP_EXTENSION_DIR=${PHP_EXTENSION_DIR} + +USE_LIBTOOL= # defined +LTCONFIG_OVERRIDE= ${WRKSRC}/ltconfig + +# Here we configure only for what NetBSD ships. We add the rest via modules. +# +GNU_CONFIGURE= # defined +CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" +CONFIGURE_ENV+= LIBS="${LIBS}" + +CONFIGURE_ARGS+= --without-gd +CONFIGURE_ARGS+= --without-mysql +CONFIGURE_ARGS+= --with-gdbm=${LOCALBASE} +CONFIGURE_ARGS+= --with-yp --with-zlib +CONFIGURE_ARGS+= --with-config-file-path=${PREFIX}/etc +CONFIGURE_ARGS+= --with-system-regex +CONFIGURE_ARGS+= --with-exec-dir=${PREFIX}/libexec/php4 +CONFIGURE_ARGS+= --enable-track-vars +CONFIGURE_ARGS+= --enable-force-cgi-redirect +CONFIGURE_ARGS+= --enable-discard-path +CONFIGURE_ARGS+= --enable-memory-limit +CONFIGURE_ARGS+= --enable-sysvsem +CONFIGURE_ARGS+= --enable-sysvshm +CONFIGURE_ARGS+= --enable-wddx + +# The following two modules are bogus to include, but we need it to maintain +# version/capability compatibility with older binary packages of ap-php4. +# +CONFIGURE_ARGS+= --with-dbase +CONFIGURE_ARGS+= --with-filepro + +.include "../../mk/bsd.prefs.mk" + +.if ${OPSYS} == "SunOS" +DEPENDS+= zlib-*:../../devel/zlib +.endif + +pre-configure: pre-common-configure + +pre-common-configure: + ${LN} -sf ${WRKSRC}/libtool ${WRKSRC}/shlibtool diff --git a/www/php4/Makefile.module b/www/php4/Makefile.module new file mode 100644 index 00000000000..2618dd688b2 --- /dev/null +++ b/www/php4/Makefile.module @@ -0,0 +1,41 @@ +# $NetBSD: Makefile.module,v 1.1.1.1 2000/12/17 09:19:32 jlam Exp $ +# +# This Makefile is provided to ease creating PHP4 packages for the extension +# modules distributed in the PHP4 sources. +# +# Just include this file, define MODNAME, add dependencies, and add the +# appropriate --with-configure-arg, then include bsd.pkg.mk. + +.include "../../www/php4/Makefile.common" + +PKGNAME= php-${MODNAME}-${PHP_VERS} + +DEPENDS+= php-${PHP_VERS}:../../www/php4 + +EXTDIR= ${WRKSRC}/ext/${MODNAME} +MODULESDIR= ${WRKSRC}/modules +PLIST_SUBST+= MODNAME=${MODNAME} + +MESSAGE_SRC= ${.CURDIR}/../../www/php4/pkg/MESSAGE.module +MESSAGE_FILE= ${WRKDIR}/MESSAGE + +PLIST_SRC= ${.CURDIR}/../../www/php4/pkg/PLIST.module + +do-build: + @cd ${EXTDIR}; ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${ALL_TARGET} + +pre-install: pre-module-install + +do-install: do-module-install + +pre-module-install: + ${CAT} ${MESSAGE_SRC} | ${SED} \ + -e "s,@MODNAME@,${MODNAME},g" \ + -e "s,@PHP_EXTENSION_DIR@,${PHP_EXTENSION_DIR},g" \ + -e "s,@PREFIX@,${PREFIX},g" \ + > ${MESSAGE_FILE} + +do-module-install: + ${INSTALL_DATA_DIR} ${PREFIX}/${PHP_EXTENSION_DIR} + ${INSTALL_DATA} ${MODULESDIR}/${MODNAME}.so \ + ${PREFIX}/${PHP_EXTENSION_DIR} diff --git a/www/php4/files/md5 b/www/php4/files/md5 new file mode 100644 index 00000000000..d6f7d3a6e39 --- /dev/null +++ b/www/php4/files/md5 @@ -0,0 +1,3 @@ +$NetBSD: md5,v 1.1.1.1 2000/12/17 09:19:32 jlam Exp $ + +MD5 (php-4.0.3pl1.tar.gz) = 6969bc69588400557f70a014ab1536c1 diff --git a/www/php4/files/patch-sum b/www/php4/files/patch-sum new file mode 100644 index 00000000000..d919b266912 --- /dev/null +++ b/www/php4/files/patch-sum @@ -0,0 +1,4 @@ +$NetBSD: patch-sum,v 1.1.1.1 2000/12/17 09:19:32 jlam Exp $ + +MD5 (patch-aa) = e482b233021c7a3efc82e0ee4c1a3973 +MD5 (patch-ab) = 5f23b48e9a5a14d282b458831f6769f7 diff --git a/www/php4/patches/patch-aa b/www/php4/patches/patch-aa new file mode 100644 index 00000000000..67de5eb2a05 --- /dev/null +++ b/www/php4/patches/patch-aa @@ -0,0 +1,21 @@ +$NetBSD: patch-aa,v 1.1.1.1 2000/12/17 09:19:32 jlam Exp $ + +--- configure.orig Sun Oct 15 13:47:10 2000 ++++ configure +@@ -37830,6 +37830,7 @@ + fi + + ++if false; then + echo $ac_n "checking for pam_start in -lpam""... $ac_c" 1>&6 + echo "configure:37835: checking for pam_start in -lpam" >&5 + ac_lib_var=`echo pam'_'pam_start | sed 'y%./+-%__p_%'` +@@ -37874,6 +37875,8 @@ + else + echo "$ac_t""no" 1>&6 + fi ++ ++fi # if false + + + for ac_func in getcwd getwd diff --git a/www/php4/patches/patch-ab b/www/php4/patches/patch-ab new file mode 100644 index 00000000000..bb15397e19a --- /dev/null +++ b/www/php4/patches/patch-ab @@ -0,0 +1,15 @@ +$NetBSD: patch-ab,v 1.1.1.1 2000/12/17 09:19:32 jlam Exp $ + +--- ext/standard/config.m4.orig Wed Nov 1 12:20:14 2000 ++++ ext/standard/config.m4 Wed Nov 1 12:20:36 2000 +@@ -120,10 +120,6 @@ main() { + + AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_LIBDL,1,[ ])]) + +-AC_CHECK_LIB(pam, pam_start, [ +- EXTRA_LIBS="$EXTRA_LIBS -lpam" +- AC_DEFINE(HAVE_LIBPAM,1,[ ]) ], []) +- + AC_CHECK_FUNCS(getcwd getwd) + + AC_CRYPT_CAP diff --git a/www/php4/pkg/COMMENT b/www/php4/pkg/COMMENT new file mode 100644 index 00000000000..ae5e24e6e7d --- /dev/null +++ b/www/php4/pkg/COMMENT @@ -0,0 +1 @@ +PHP4: Hypertext Preprocessor diff --git a/www/php4/pkg/DESCR b/www/php4/pkg/DESCR new file mode 100644 index 00000000000..14527807a53 --- /dev/null +++ b/www/php4/pkg/DESCR @@ -0,0 +1,4 @@ +PHP is an HTML-embedded scripting language. Much of its syntax is +borrowed from C, Java and Perl with a couple of unique PHP-specific +features thrown in. The goal of the language is to allow web +developers to write dynamically generated pages quickly. diff --git a/www/php4/pkg/MESSAGE b/www/php4/pkg/MESSAGE new file mode 100644 index 00000000000..c47374d77a0 --- /dev/null +++ b/www/php4/pkg/MESSAGE @@ -0,0 +1,12 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1.1.1 2000/12/17 09:19:32 jlam Exp $ + +Example configuration files suitable as a basis for a custom php.ini may +be found at: + + @PREFIX@/etc/php.ini-dist + @PREFIX@/etc/php.ini-optimized + +To process PHP scripts, you will need a PHP-enabled HTTP server, e.g. +www/ap-php4. +=========================================================================== diff --git a/www/php4/pkg/MESSAGE.module b/www/php4/pkg/MESSAGE.module new file mode 100644 index 00000000000..37214817a55 --- /dev/null +++ b/www/php4/pkg/MESSAGE.module @@ -0,0 +1,10 @@ +=========================================================================== +$NetBSD: MESSAGE.module,v 1.1.1.1 2000/12/17 09:19:32 jlam Exp $ + +To enable this package, add the following lines to php.ini: + + extension_dir=@PREFIX@/@PHP_EXTENSION_DIR@ + extension=@MODNAME@.so + +and restart your PHP4-enabled HTTP server to load this module. +=========================================================================== diff --git a/www/php4/pkg/PLIST b/www/php4/pkg/PLIST new file mode 100644 index 00000000000..ffb44564517 --- /dev/null +++ b/www/php4/pkg/PLIST @@ -0,0 +1,5 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2000/12/17 09:19:32 jlam Exp $ +etc/php.ini-dist +etc/php.ini-optimized +share/php4/php4.gif +@dirrm share/php4 diff --git a/www/php4/pkg/PLIST.module b/www/php4/pkg/PLIST.module new file mode 100644 index 00000000000..4a20fdb7199 --- /dev/null +++ b/www/php4/pkg/PLIST.module @@ -0,0 +1,3 @@ +@comment $NetBSD: PLIST.module,v 1.1.1.1 2000/12/17 09:19:32 jlam Exp $ +${PHP_EXTENSION_DIR}/${MODNAME}.so +@unexec rmdir -p %D/${PHP_EXTENSION_DIR} 2>/dev/null || true |