summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Herbert <stuart@gentoo.org>2005-09-04 16:58:08 +0000
committerStuart Herbert <stuart@gentoo.org>2005-09-04 16:58:08 +0000
commitcbf2f23fea4ac0a2dd85b147acba29b42a4bb2b7 (patch)
treeae4e75e8aa94ca328ca1f219d6b1652d62f1f202 /dev-lang
parentInitial import for PHP5 (diff)
downloadgentoo-2-cbf2f23fea4ac0a2dd85b147acba29b42a4bb2b7.tar.gz
gentoo-2-cbf2f23fea4ac0a2dd85b147acba29b42a4bb2b7.tar.bz2
gentoo-2-cbf2f23fea4ac0a2dd85b147acba29b42a4bb2b7.zip
Initial import; replaces dev-php/php* packages
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/php/ChangeLog7
-rw-r--r--dev-lang/php/Manifest16
-rw-r--r--dev-lang/php/files/4.4.0/apache-1.3/70_mod_php.conf19
-rw-r--r--dev-lang/php/files/4.4.0/apache-2.0/70_mod_php.conf19
-rw-r--r--dev-lang/php/files/4.4.0/fastbuild.patch250
-rw-r--r--dev-lang/php/files/4.4.0/php4-imap-symlink.diff15
-rw-r--r--dev-lang/php/files/4.4.0/php4-iodbc-config.diff14
-rw-r--r--dev-lang/php/files/4.4.0/php4-with-iodbc.diff13
-rw-r--r--dev-lang/php/files/5.0.0/php5-imap-symlink.diff15
-rw-r--r--dev-lang/php/files/5.0.0/php5-iodbc-config.diff14
-rw-r--r--dev-lang/php/files/5.1.0/apache-1.3/70_mod_php5.conf20
-rw-r--r--dev-lang/php/files/5.1.0/apache-2.0/70_mod_php5.conf20
-rw-r--r--dev-lang/php/files/digest-php-4.4.02
-rw-r--r--dev-lang/php/files/digest-php-5.0.42
-rw-r--r--dev-lang/php/metadata.xml5
-rw-r--r--dev-lang/php/php-4.4.0.ebuild290
-rw-r--r--dev-lang/php/php-5.0.4.ebuild184
17 files changed, 905 insertions, 0 deletions
diff --git a/dev-lang/php/ChangeLog b/dev-lang/php/ChangeLog
new file mode 100644
index 000000000000..f7d0c1037dda
--- /dev/null
+++ b/dev-lang/php/ChangeLog
@@ -0,0 +1,7 @@
+# ChangeLog for dev-lang/php
+# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/ChangeLog,v 1.34 2005/09/04 16:58:08 stuart Exp $
+
+ 05 Sep 2005; <stuart@gentoo.org> ChangeLog:
+ Initial version; replaces older dev-php/* packages
+
diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest
new file mode 100644
index 000000000000..03810b584878
--- /dev/null
+++ b/dev-lang/php/Manifest
@@ -0,0 +1,16 @@
+MD5 e2e6843a3a4b0a92d1da6344e947036e php-4.4.0.ebuild 7450
+MD5 c58d07ca1c1235bbad9bccaec96fc062 metadata.xml 157
+MD5 d04d34d0bfadd5fcdb99994b30045184 ChangeLog 213
+MD5 dca81da54de52aa9298d97c548333a57 php-5.0.4.ebuild 4381
+MD5 5bdec1212806fa8f4ccc046325e4ea52 files/digest-php-4.4.0 143
+MD5 11e54e6a5fade48c67bab392af4e33c7 files/digest-php-5.0.4 143
+MD5 110af7b300bcbbfb821fbb58f7923d8b files/5.0.0/php5-iodbc-config.diff 511
+MD5 7d198bde60f94cc8cea5ad9479901e21 files/5.0.0/php5-imap-symlink.diff 620
+MD5 22ed61ab0175cd83985a90e5d2b3b8b2 files/4.4.0/php4-iodbc-config.diff 511
+MD5 f2ab14c7be0482a4f25fc438fa6f5399 files/4.4.0/php4-with-iodbc.diff 443
+MD5 6d2047e069da7178fc841c4c7c890aa8 files/4.4.0/php4-imap-symlink.diff 620
+MD5 030fb5433c0418ee3034d5b502d32548 files/4.4.0/fastbuild.patch 9004
+MD5 96ed6efe383833dbb880fef3b6c562bb files/5.1.0/apache-1.3/70_mod_php5.conf 524
+MD5 21bc6cc85150b5a5385f213d45efbe67 files/5.1.0/apache-2.0/70_mod_php5.conf 525
+MD5 389638f1d46b6c41cd4d87b471572f4b files/4.4.0/apache-1.3/70_mod_php.conf 484
+MD5 ee36e31632adb08b7abf70f78b5b2125 files/4.4.0/apache-2.0/70_mod_php.conf 485
diff --git a/dev-lang/php/files/4.4.0/apache-1.3/70_mod_php.conf b/dev-lang/php/files/4.4.0/apache-1.3/70_mod_php.conf
new file mode 100644
index 000000000000..34a41d81193c
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/apache-1.3/70_mod_php.conf
@@ -0,0 +1,19 @@
+# vim: ft=apache sw=4 ts=4
+<IfDefine PHP4>
+
+ # Load the module first
+ <IfModule !sapi_apache.c>
+ LoadModule php4_module modules/libphp4.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/4.4.0/apache-2.0/70_mod_php.conf b/dev-lang/php/files/4.4.0/apache-2.0/70_mod_php.conf
new file mode 100644
index 000000000000..ce680323f6e0
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/apache-2.0/70_mod_php.conf
@@ -0,0 +1,19 @@
+# vim: ft=apache sw=4 ts=4
+<IfDefine PHP4>
+
+ # Load the module first
+ <IfModule !sapi_apache2.c>
+ LoadModule php4_module modules/libphp4.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/4.4.0/fastbuild.patch b/dev-lang/php/files/4.4.0/fastbuild.patch
new file mode 100644
index 000000000000..0af555e9bcb6
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/fastbuild.patch
@@ -0,0 +1,250 @@
+diff -u --recursive php-4.4.0/aclocal.m4 php-4.4.0-cgi/aclocal.m4
+--- php-4.4.0/aclocal.m4 2005-07-11 11:07:27.000000000 +0100
++++ php-4.4.0-cgi/aclocal.m4 2005-09-01 08:03:20.000000000 +0100
+@@ -84,7 +84,7 @@
+ dnl
+ dnl which array to append to?
+ AC_DEFUN([PHP_ADD_SOURCES],[
+- PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS)))
++ PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,ifelse($4,cgi,PHP_CGI_OBJS,PHP_GLOBAL_OBJS))))
+ ])
+ dnl
+ dnl _PHP_ASSIGN_BUILD_VARS(type)
+diff -u --recursive php-4.4.0/configure.in php-4.4.0-cgi/configure.in
+--- php-4.4.0/configure.in 2005-07-11 08:45:09.000000000 +0100
++++ php-4.4.0-cgi/configure.in 2005-09-01 08:00:54.000000000 +0100
+@@ -1216,20 +1216,20 @@
+ INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
+ CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
+
+-all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)'
++all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET) $(PHP_CGI_TARGET)'
+ install_targets="$install_modules $install_pear install-build install-headers install-programs"
+
+-case $PHP_SAPI in
+- cgi)
+- install_targets="install-sapi $install_targets"
+- ;;
+- cli)
+- install_targets="$PHP_INSTALL_CLI_TARGET $install_targets"
+- ;;
+- *)
+- install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $install_targets"
+- ;;
+-esac
++if test "$PHP_SAPI_CGI" != "no" ; then
++ install_targets="install-sapi $install_targets"
++fi
++
++if test "$PHP_SAPI_CLI" != "no" ; then
++ install_targets="$PHP_INSTALL_CLI_TARGET $install_targets"
++fi
++
++if test "$PHP_SAPI" != "default" ; then
++ install_targets="install-sapi $PHP_INSTALL_CLI_TARGET $install_targets"
++fi
+
+ PHP_SUBST(all_targets)
+ PHP_SUBST(install_targets)
+diff -u --recursive php-4.4.0/sapi/cgi/Makefile.frag php-4.4.0-cgi/sapi/cgi/Makefile.frag
+--- php-4.4.0/sapi/cgi/Makefile.frag 2003-07-02 02:06:29.000000000 +0100
++++ php-4.4.0-cgi/sapi/cgi/Makefile.frag 2005-09-01 08:03:20.000000000 +0100
+@@ -1,2 +1,6 @@
+-$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
++$(SAPI_CGI_PATH): $(PHP_GLOBAL_OBJS) $(PHP_CGI_OBJS)
+ $(BUILD_CGI)
++
++install-cgi: $(SAPI_CGI_PATH)
++ @echo "Installing PHP CGI binary: $(INSTALL_ROOT)$(bindir)/"
++ @$(INSTALL_CGI)
+diff -u --recursive php-4.4.0/sapi/cgi/config9.m4 php-4.4.0-cgi/sapi/cgi/config9.m4
+--- php-4.4.0/sapi/cgi/config9.m4 2004-12-30 07:02:18.000000000 +0000
++++ php-4.4.0-cgi/sapi/cgi/config9.m4 2005-09-01 08:05:08.000000000 +0100
+@@ -81,93 +81,107 @@
+ ])
+
+
+-if test "$PHP_SAPI" = "default"; then
+- AC_MSG_CHECKING(for CGI build)
+- if test "$PHP_SAPI_CGI" != "no"; then
+- AC_MSG_RESULT(yes)
+-
+- PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag)
+- case $host_alias in
+- *cygwin* )
+- SAPI_CGI_PATH=sapi/cgi/php.exe
+- ;;
+- * )
+- SAPI_CGI_PATH=sapi/cgi/php
+- ;;
+- esac
+- PHP_SUBST(SAPI_CGI_PATH)
+-
+- PHP_TEST_WRITE_STDOUT
+-
+- AC_MSG_CHECKING(whether to force Apache CGI redirect)
+- if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then
+- REDIRECT=1
+- else
+- REDIRECT=0
+- fi
+- AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT,$REDIRECT,[ ])
+- AC_MSG_RESULT($PHP_FORCE_CGI_REDIRECT)
++AC_MSG_CHECKING(for CGI build)
++if test "$PHP_SAPI_CGI" != "no"; then
++ AC_MSG_RESULT(yes)
++
++ PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/cgi/Makefile.frag)
++ case $host_alias in
++ *cygwin* )
++ SAPI_CGI_PATH=sapi/cgi/php.exe
++ ;;
++ * )
++ SAPI_CGI_PATH=sapi/cgi/php
++ ;;
++ esac
++ PHP_SUBST(SAPI_CGI_PATH)
+
++ PHP_TEST_WRITE_STDOUT
+
+- AC_MSG_CHECKING(whether to discard path_info + path_translated)
+- if test "$PHP_DISCARD_PATH" = "yes"; then
+- DISCARD_PATH=1
+- else
+- DISCARD_PATH=0
+- fi
+- AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ])
+- AC_MSG_RESULT($PHP_DISCARD_PATH)
++ AC_MSG_CHECKING(whether to force Apache CGI redirect)
++ if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then
++ REDIRECT=1
++ else
++ REDIRECT=0
++ fi
++ AC_DEFINE_UNQUOTED(FORCE_CGI_REDIRECT,$REDIRECT,[ ])
++ AC_MSG_RESULT($PHP_FORCE_CGI_REDIRECT)
+
+- AC_MSG_CHECKING(whether to enable path info checking)
+- if test "$PHP_ENABLE_PATHINFO_CHECK" = "yes"; then
+- ENABLE_PATHINFO_CHECK=1
+- else
+- ENABLE_PATHINFO_CHECK=0
+- fi
+- AC_DEFINE_UNQUOTED(ENABLE_PATHINFO_CHECK, $ENABLE_PATHINFO_CHECK, [ ])
+- AC_MSG_RESULT($PHP_ENABLE_PATHINFO_CHECK)
+
+- AC_MSG_CHECKING(whether to enable fastcgi support)
+- PHP_LIBFCGI_DIR="$abs_srcdir/sapi/cgi/libfcgi"
+- if test -z $PHP_LIBFCGI_DIR; then
+- echo "$PHP_LIBFCGI_DIR does not exist"
+- exit 1
+- fi
+- if test "$PHP_ENABLE_FASTCGI" = "yes"; then
+- PHP_ADD_BUILD_DIR($abs_builddir/sapi/cgi/libfcgi)
+- PHP_FASTCGI=1
+- PHP_FCGI_FILES="libfcgi/fcgi_stdio.c libfcgi/fcgiapp.c libfcgi/os_unix.c"
+- PHP_FCGI_INCLUDE="-I$PHP_LIBFCGI_DIR/include"
+- PHP_FCGI_STATIC=1
+- else
+- PHP_FASTCGI=0
+- PHP_FCGI_FILES=""
+- PHP_FCGI_INCLUDE=""
+- PHP_FCGI_STATIC=0
+- fi
+- AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ])
+- AC_DEFINE_UNQUOTED(PHP_FCGI_STATIC, $PHP_FCGI_STATIC, [ ])
+- AC_MSG_RESULT($PHP_ENABLE_FASTCGI)
+-
+- INSTALL_IT="@echo \"Installing PHP CGI into: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)"
+- PHP_SELECT_SAPI(cgi, program, $PHP_FCGI_FILES cgi_main.c getopt.c, $PHP_FCGI_INCLUDE, '$(SAPI_CGI_PATH)')
+-
+- case $host_alias in
+- *darwin*)
+- BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
++ AC_MSG_CHECKING(whether to discard path_info + path_translated)
++ if test "$PHP_DISCARD_PATH" = "yes"; then
++ DISCARD_PATH=1
++ else
++ DISCARD_PATH=0
++ fi
++ AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ])
++ AC_MSG_RESULT($PHP_DISCARD_PATH)
++
++ AC_MSG_CHECKING(whether to enable path info checking)
++ if test "$PHP_ENABLE_PATHINFO_CHECK" = "yes"; then
++ ENABLE_PATHINFO_CHECK=1
++ else
++ ENABLE_PATHINFO_CHECK=0
++ fi
++ AC_DEFINE_UNQUOTED(ENABLE_PATHINFO_CHECK, $ENABLE_PATHINFO_CHECK, [ ])
++ AC_MSG_RESULT($PHP_ENABLE_PATHINFO_CHECK)
++
++ AC_MSG_CHECKING(whether to enable fastcgi support)
++ PHP_LIBFCGI_DIR="$abs_srcdir/sapi/cgi/libfcgi"
++ if test -z $PHP_LIBFCGI_DIR; then
++ echo "$PHP_LIBFCGI_DIR does not exist"
++ exit 1
++ fi
++ if test "$PHP_ENABLE_FASTCGI" = "yes"; then
++ PHP_ADD_BUILD_DIR($abs_builddir/sapi/cgi/libfcgi)
++ PHP_FASTCGI=1
++ PHP_FCGI_FILES="libfcgi/fcgi_stdio.c libfcgi/fcgiapp.c libfcgi/os_unix.c"
++ PHP_FCGI_INCLUDE="-I$PHP_LIBFCGI_DIR/include"
++ PHP_FCGI_STATIC=1
++ else
++ PHP_FASTCGI=0
++ PHP_FCGI_FILES=""
++ PHP_FCGI_INCLUDE=""
++ PHP_FCGI_STATIC=0
++ fi
++ AC_DEFINE_UNQUOTED(PHP_FASTCGI, $PHP_FASTCGI, [ ])
++ AC_DEFINE_UNQUOTED(PHP_FCGI_STATIC, $PHP_FCGI_STATIC, [ ])
++ AC_MSG_RESULT($PHP_ENABLE_FASTCGI)
++
++ INSTALL_CGI="@echo \"Installing PHP CGI into: \$(INSTALL_ROOT)\$(bindir)/\"; \$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/\$(program_prefix)php\$(program_suffix)"
++ PHP_ADD_SOURCES(sapi/cgi, $PHP_FCGI_FILES cgi_main.c getopt.c, $PHP_FCGI_INCLUDE, cgi)
++ PHP_ADD_SOURCES(/main, internal_functions.c,,cgi)
++
++ case $host_alias in
++ *darwin*)
++ BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_CGI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
+ ;;
+- *)
+- BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
++ *)
++ BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS_PROGRAM) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_CGI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)"
+ ;;
+- esac
++ esac
+
+- PHP_SUBST(BUILD_CGI)
++ PHP_CGI_TARGET="$SAPI_CGI_PATH"
++ PHP_INSTALL_CGI_TARGET="install-cgi"
+
+- elif test "$PHP_SAPI_CLI" != "no"; then
+- AC_MSG_RESULT(no)
+- OVERALL_TARGET=
+- PHP_SAPI=cli
+- else
+- AC_MSG_ERROR([No SAPIs selected.])
++ PHP_SUBST(BUILD_CGI)
++ PHP_SUBST(INSTALL_CGI)
++ PHP_SUBST(PHP_CGI_OBJS)
++ PHP_SUBST(PHP_CGI_TARGET)
++ PHP_SUBST(PHP_INSTALL_CGI_TARGET)
++
++ if test "$PHP_SAPI" = "default" ; then
++ PHP_BUILD_PROGRAM($SAPI_CGI_PATH)
++ fi
++
++else
++ AC_MSG_RESULT(no)
++ if test "$PHP_SAPI" = "default" ; then
++ if test "$PHP_SAPI_CLI" != "no"; then
++ OVERALL_TARGET=
++ PHP_SAPI=cli
++ else
++ AC_MSG_ERROR([No SAPIs selected.])
++ fi
+ fi
+ fi
diff --git a/dev-lang/php/files/4.4.0/php4-imap-symlink.diff b/dev-lang/php/files/4.4.0/php4-imap-symlink.diff
new file mode 100644
index 000000000000..cf74905e5c3e
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/php4-imap-symlink.diff
@@ -0,0 +1,15 @@
+--- ext/imap/config.m4 2005-09-04 02:48:47.000000000 +0200
++++ ext/imap/config.m4 2005-09-04 02:49:05.000000000 +0200
+@@ -158,12 +158,6 @@
+ AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.)
+ fi
+
+- if test -r "$IMAP_DIR/c-client/c-client.a"; then
+- ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1
+- elif test -r "$IMAP_DIR/lib/c-client.a"; then
+- ln -s "$IMAP_DIR/lib/c-client.a" "$IMAP_DIR/lib/libc-client.a" >/dev/null 2>&1
+- fi
+-
+ for lib in c-client4 c-client imap; do
+ IMAP_LIB=$lib
+ IMAP_LIB_CHK(lib)
diff --git a/dev-lang/php/files/4.4.0/php4-iodbc-config.diff b/dev-lang/php/files/4.4.0/php4-iodbc-config.diff
new file mode 100644
index 000000000000..a706916fad5e
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/php4-iodbc-config.diff
@@ -0,0 +1,14 @@
+--- ext/odbc/config.m4 2005-08-10 02:05:26.000000000 +0200
++++ ext/odbc/config.m4 2005-08-10 02:06:10.000000000 +0200
+@@ -401,9 +401,9 @@
+ fi
+ if test "$withval" != "no"; then
+ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib)
+- PHP_ADD_INCLUDE($withval/include, 1)
++ PHP_ADD_INCLUDE($withval/include/iodbc, 1)
+ ODBC_TYPE=iodbc
+- ODBC_INCLUDE=-I$withval/include
++ ODBC_INCLUDE=-I$withval/include/iodbc
+ ODBC_LFLAGS=-L$withval/lib
+ ODBC_LIBS=-liodbc
+ AC_DEFINE(HAVE_IODBC,1,[ ])
diff --git a/dev-lang/php/files/4.4.0/php4-with-iodbc.diff b/dev-lang/php/files/4.4.0/php4-with-iodbc.diff
new file mode 100644
index 000000000000..81afcc0f2de1
--- /dev/null
+++ b/dev-lang/php/files/4.4.0/php4-with-iodbc.diff
@@ -0,0 +1,13 @@
+--- ext/odbc/php_odbc_includes.h 2005-02-22 17:55:18.000000000 +0000
++++ ext/odbc/php_odbc_includes.h 2005-02-22 17:55:26.000000000 +0000
+@@ -91,8 +91,8 @@
+ #elif defined(HAVE_IODBC) /* iODBC library */
+
+ #define ODBC_TYPE "iODBC"
+-#include <isql.h>
+-#include <isqlext.h>
++#include <iodbc/isql.h>
++#include <iodbc/isqlext.h>
+ #define HAVE_SQL_EXTENDED_FETCH 1
+ #define SQL_FD_FETCH_ABSOLUTE 0x00000010L
+ #define SQL_CURSOR_DYNAMIC 2UL
diff --git a/dev-lang/php/files/5.0.0/php5-imap-symlink.diff b/dev-lang/php/files/5.0.0/php5-imap-symlink.diff
new file mode 100644
index 000000000000..99cfc9b68976
--- /dev/null
+++ b/dev-lang/php/files/5.0.0/php5-imap-symlink.diff
@@ -0,0 +1,15 @@
+--- ext/imap/config.m4 2005-09-04 02:49:45.000000000 +0200
++++ ext/imap/config.m4 2005-09-04 02:50:00.000000000 +0200
+@@ -146,12 +146,6 @@
+ AC_MSG_ERROR(Cannot find rfc822.h. Please check your c-client installation.)
+ fi
+
+- if test -r "$IMAP_DIR/c-client/c-client.a"; then
+- ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1
+- elif test -r "$IMAP_DIR/lib/c-client.a"; then
+- ln -s "$IMAP_DIR/lib/c-client.a" "$IMAP_DIR/lib/libc-client.a" >/dev/null 2>&1
+- fi
+-
+ for lib in c-client4 c-client imap; do
+ IMAP_LIB=$lib
+ IMAP_LIB_CHK(lib)
diff --git a/dev-lang/php/files/5.0.0/php5-iodbc-config.diff b/dev-lang/php/files/5.0.0/php5-iodbc-config.diff
new file mode 100644
index 000000000000..1e7a7c556439
--- /dev/null
+++ b/dev-lang/php/files/5.0.0/php5-iodbc-config.diff
@@ -0,0 +1,14 @@
+--- ext/odbc/config.m4 2005-08-31 01:16:38.000000000 +0200
++++ ext/odbc/config.m4 2005-08-31 01:17:24.000000000 +0200
+@@ -408,9 +408,9 @@
+ fi
+ if test "$withval" != "no"; then
+ PHP_ADD_LIBRARY_WITH_PATH(iodbc, $withval/lib)
+- PHP_ADD_INCLUDE($withval/include, 1)
++ PHP_ADD_INCLUDE($withval/include/iodbc, 1)
+ ODBC_TYPE=iodbc
+- ODBC_INCLUDE=-I$withval/include
++ ODBC_INCLUDE=-I$withval/include/iodbc
+ ODBC_LFLAGS=-L$withval/lib
+ ODBC_LIBS=-liodbc
+ AC_DEFINE(HAVE_IODBC,1,[ ])
diff --git a/dev-lang/php/files/5.1.0/apache-1.3/70_mod_php5.conf b/dev-lang/php/files/5.1.0/apache-1.3/70_mod_php5.conf
new file mode 100644
index 000000000000..c6f14262e3f0
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/apache-1.3/70_mod_php5.conf
@@ -0,0 +1,20 @@
+# vim: ft=apache sw=4 ts=4
+<IfDefine PHP5>
+
+ # Load the module first
+ <IfModule !sapi_apache.c>
+ LoadModule php5_module modules/libphp5.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php .php5
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/5.1.0/apache-2.0/70_mod_php5.conf b/dev-lang/php/files/5.1.0/apache-2.0/70_mod_php5.conf
new file mode 100644
index 000000000000..40dfa869e4ff
--- /dev/null
+++ b/dev-lang/php/files/5.1.0/apache-2.0/70_mod_php5.conf
@@ -0,0 +1,20 @@
+# vim: ft=apache sw=4 ts=4
+<IfDefine PHP5>
+
+ # Load the module first
+ <IfModule !sapi_apache2.c>
+ LoadModule php5_module modules/libphp5.so
+ </IfModule>
+
+ # Set it to handle the files
+ <IfModule mod_mime.c>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php .phtml
+ AddType application/x-httpd-php .php3
+ AddType application/x-httpd-php .php4
+ AddType application/x-httpd-php .php5
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+
+ AddDirectoryIndex index.php index.phtml
+</IfDefine>
diff --git a/dev-lang/php/files/digest-php-4.4.0 b/dev-lang/php/files/digest-php-4.4.0
new file mode 100644
index 000000000000..f073a5de27eb
--- /dev/null
+++ b/dev-lang/php/files/digest-php-4.4.0
@@ -0,0 +1,2 @@
+MD5 e85b606fe48198bfcd785e5a5b1c9613 php-4.4.0.tar.bz2 4086074
+MD5 4d489ca6274366c1c1b1407d2ca8f440 hardening-patch-4.4.0-0.4.1.patch.gz 37189
diff --git a/dev-lang/php/files/digest-php-5.0.4 b/dev-lang/php/files/digest-php-5.0.4
new file mode 100644
index 000000000000..7f7e8495ddda
--- /dev/null
+++ b/dev-lang/php/files/digest-php-5.0.4
@@ -0,0 +1,2 @@
+MD5 fb1aac107870f897d26563a9cc5053c0 php-5.0.4.tar.bz2 4731383
+MD5 361cc41c54174e098169d38ce6510c36 hardening-patch-5.0.4-0.4.1.patch.gz 81342
diff --git a/dev-lang/php/metadata.xml b/dev-lang/php/metadata.xml
new file mode 100644
index 000000000000..fd3dbe39fa64
--- /dev/null
+++ b/dev-lang/php/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>php</herd>
+</pkgmetadata>
diff --git a/dev-lang/php/php-4.4.0.ebuild b/dev-lang/php/php-4.4.0.ebuild
new file mode 100644
index 000000000000..10f5b974049c
--- /dev/null
+++ b/dev-lang/php/php-4.4.0.ebuild
@@ -0,0 +1,290 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-4.4.0.ebuild,v 1.1 2005/09/04 16:58:08 stuart Exp $
+
+IUSE="${IUSE} cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~ppc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+SLOT="4"
+PHPSAPI_ALLOWED="cli cgi apache apache2"
+MY_PHP_P="php-${PV}"
+PHP_S="${WORKDIR}/${MY_PHP_P}"
+PHP_PACKAGE=1
+
+inherit eutils php4_4-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ if useq fastbuild ; then
+ ewarn
+ ewarn "'fastbuild' attempts to build all SAPIs in a single pass."
+ ewarn "This is an experimental feature, which may fail to compile"
+ ewarn "and may produce PHP binaries which are broken."
+ ewarn
+ ewarn "Rebuild without 'fastbuild' and reproduce any bugs before filing"
+ ewarn "any bugs in Gentoo's Bugzilla or bugs.php.net."
+ ewarn
+ fi
+
+ php4_4-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ if useq fastbuild ; then
+ src_compile_fastbuild
+ else
+ src_compile_normal
+ fi
+}
+
+src_compile_fastbuild() {
+ php_determine_sapis
+
+ build_cli=0
+ build_cgi=0
+ build_apache=0
+
+ for x in ${PHPSAPIS} ; do
+ case ${x} in
+ cli)
+ build_cli=1
+ ;;
+ cgi)
+ build_cgi=1
+ ;;
+ apache*)
+ build_apache=1
+ ;;
+ esac
+ done
+
+ if [[ ${build_cli} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cli"
+ else
+ my_conf="${my_conf} --disable-cli"
+ fi
+
+ if [[ ${build_cgi} = 1 ]] ; then
+ my_conf="${my_conf} --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ else
+ my_conf="${my_conf} --disable-cgi"
+ fi
+
+ if [[ ${build_apache} = 1 ]] ; then
+ my_conf="${my_conf} --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ fi
+
+ # now we know what we are building, build it
+ php4_4-sapi_src_compile
+
+ # to keep the separate php.ini files for each SAPI, we change the
+ # build-defs.h and recompile
+
+ if [[ ${build_cli} = 1 ]] ; then
+ einfo
+ einfo "Building CLI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cli-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cli-php4/ext"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cli/php || die "Unable to make CLI SAPI"
+ cp sapi/cli/php php-cli || die "Unable to copy CLI SAPI"
+ fi
+ if [[ ${build_cgi} = 1 ]] ; then
+ einfo
+ einfo "Building CGI SAPI"
+ einfo
+
+ sed -e 's|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH "/etc/php/cgi-php4"|g;' -i main/build-defs.h
+ sed -e 's|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR "/etc/php/cgi-php4/ext"|g;' -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make sapi/cgi/php || die "Unable to make CGI SAPI"
+ cp sapi/cgi/php php-cgi || die "Unable to copy CGI SAPI"
+ fi
+ if [[ ${build_apache} = 1 ]] ; then
+ einfo
+ einfo "Building apache${USE_APACHE2} SAPI"
+ einfo
+
+ sed -e "s|^#define PHP_CONFIG_FILE_PATH.*|#define PHP_CONFIG_FILE_PATH \"/etc/php/apache${USE_APACHE2}-php4\"|g;" -i main/build-defs.h
+ sed -e "s|^#define PHP_CONFIG_FILE_SCAN_DIR.*|#define PHP_CONFIG_FILE_SCAN_DIR \"/etc/php/apache${USE_APACHE2}-php4/ext\"|g;" -i main/build-defs.h
+ for x in main/main.o main/main.lo main/php_ini.o main/php_ini.lo ; do
+ [[ -f ${x} ]] && rm -f ${x}
+ done
+ make || die "Unable to build mod_php"
+ fi
+}
+
+src_compile_normal() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ # echo > /dev/null
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php4_4-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php4_4-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php4_4-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php4
+
+ # let the eclass do the heavy lifting
+ php4_4-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php4_4-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT=${D} install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4.4.0/apache-2.0/70_mod_php.conf"
+ else
+ einfo "Installing Apache config for PHP (70_mod_php.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/4.4.0/apache-1.3/70_mod_php.conf"
+ fi
+ php4_4-sapi_install_ini
+ ;;
+ esac
+ done
+
+}
+
+pkg_postinst()
+{
+ # Create the symlinks with eselect
+ if useq cli ; then
+ eselect php set php4
+ eselect php-devel set php4
+ fi
+
+ if useq cgi ; then
+ eselect php-cgi set php4
+ eselect php-devel set php4
+ fi
+
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP4"
+ APACHE1_MOD_CONF="70_mod_php.conf"
+ APACHE2_MOD_DEFINE="PHP4"
+ APACHE2_MOD_CONF="70_mod_php.conf"
+ apache-module_pkg_postinst
+ fi
+ php4_4-sapi_pkg_postinst
+}
diff --git a/dev-lang/php/php-5.0.4.ebuild b/dev-lang/php/php-5.0.4.ebuild
new file mode 100644
index 000000000000..f15387af9eb8
--- /dev/null
+++ b/dev-lang/php/php-5.0.4.ebuild
@@ -0,0 +1,184 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/php-5.0.4.ebuild,v 1.1 2005/09/04 16:58:08 stuart Exp $
+
+IUSE="${IUSE} cgi cli discard-path force-cgi-redirect"
+KEYWORDS="~ppc ~x86"
+
+# NOTE: Portage doesn't support setting PROVIDE based on the USE flags
+# that have been enabled, so we have to PROVIDE everything for now
+# and hope for the best
+#
+# This will be sorted out when GLEP 37 is implemented
+
+PROVIDE="virtual/php virtual/httpd-php"
+
+SLOT="5"
+PHPSAPI_ALLOWED="cli cgi apache apache2"
+MY_PHP_P="php-${PV}"
+PHP_S="${WORKDIR}/${MY_PHP_P}"
+PHP_PACKAGE=1
+
+inherit eutils php5_0-sapi apache-module
+
+want_apache
+
+DESCRIPTION="The PHP language runtime engine"
+
+DEPEND="${DEPEND} app-admin/eselect-php"
+RDEPEND="${RDEPEND} app-admin/eselect-php"
+
+pkg_setup() {
+ # make sure the user has specified a SAPI
+ einfo "Determining SAPI(s) to build"
+ confutils_require_any " Enabled SAPI:" " Disabled SAPI:" cli cgi apache apache2
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ] ; then
+ if ! useq threads ; then
+ APACHE2_SAFE_MPMS="peruser prefork"
+ else
+ APACHE2_SAFE_MPMS="event leader metuxmpm perchild threadpool worker"
+ fi
+
+ ewarn
+ ewarn "If this package fails with a fatal error about Apache2 not having"
+ ewarn "been compiled with a compatible MPM, this is normally because you"
+ ewarn "need to toggle the 'threads' USE flag."
+ ewarn
+ ewarn "If 'threads' is off, try switching it on."
+ ewarn "If 'threads' is on, try switching it off."
+ ewarn
+
+ apache-module_pkg_setup
+ fi
+ fi
+
+ php5_0-sapi_pkg_setup
+}
+
+php_determine_sapis() {
+
+ # holds the list of sapis that we want to build
+ PHPSAPIS=
+
+ if useq cli ; then
+ PHPSAPIS="${PHPSAPIS} cli"
+ fi
+
+ if useq cgi ; then
+ PHPSAPIS="${PHPSAPIS} cgi"
+ fi
+
+ # note - we can only build one apache sapi for now
+ # note - apache SAPI comes after the simpler cli/cgi sapis
+
+ if useq apache || useq apache2 ; then
+ if [ "${APACHE_VERSION}" != "0" ]; then
+ PHPSAPIS="${PHPSAPIS} apache${APACHE_VERSION}"
+ fi
+ fi
+}
+
+src_compile() {
+ php_determine_sapis
+
+ CLEAN_REQUIRED=0
+
+ for x in ${PHPSAPIS} ; do
+ if [ "${CLEAN_REQUIRED}" = 1 ]; then
+ make clean
+ fi
+
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ my_conf="--enable-cli --disable-cgi"
+ php5_0-sapi_src_compile
+ cp sapi/cli/php php-cli
+ ;;
+ cgi)
+ my_conf="${orig_conf} --disable-cli --enable-cgi --enable-fastcgi"
+ enable_extension_enable "discard-path" "discard-path" 0
+ enable_extension_enable "force-cgi-redirect" "force-cgi-redirect" 0
+ php5_0-sapi_src_compile
+ cp sapi/cgi/php php-cgi
+ ;;
+ apache*)
+ my_conf="${orig_conf} --disable-cli --with-apxs${USE_APACHE2}=/usr/sbin/apxs${USE_APACHE2}"
+ php5_0-sapi_src_compile
+ ;;
+ esac
+
+ CLEAN_REQUIRED=1
+ done
+}
+
+src_install() {
+ php_determine_sapis
+
+ destdir=/usr/$(get_libdir)/php5
+
+ # let the eclass do the heavy lifting
+ php5_0-sapi_src_install
+
+ einfo
+ einfo "Installing SAPI(s) ${PHPSAPIS}"
+ einfo
+
+ for x in ${PHPSAPIS} ; do
+ PHPSAPI=${x}
+ case ${x} in
+ cli)
+ einfo "Installing CLI SAPI"
+ into ${destdir}
+ newbin php-cli php || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ cgi)
+ einfo "Installing CGI SAPI"
+ into ${destdir}
+ dobin php-cgi || die "Unable to install ${x} sapi"
+ php5_0-sapi_install_ini
+ ;;
+ apache*)
+ einfo "Installing apache${USE_APACHE2} SAPI"
+ make INSTALL_ROOT=${D} install-sapi || die "Unable to install ${x} SAPI"
+ if [ -n "${USE_APACHE2}" ] ; then
+ einfo "Installing Apache2 config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.1.0/apache-2.0/70_mod_php5.conf"
+ else
+ einfo "Installing Apache config for PHP5 (70_mod_php5.conf)"
+ insinto ${APACHE_MODULES_CONFDIR}
+ doins "${FILESDIR}/5.1.0/apache-1.3/70_mod_php5.conf"
+ fi
+ php5_0-sapi_install_ini
+ ;;
+ esac
+ done
+}
+
+pkg_postinst()
+{
+ # Create the symlinks with eselect
+ if useq cli ; then
+ eselect php set php5
+ eselect php-devel set php5
+ fi
+
+ if useq cgi ; then
+ eselect php-cgi set php5
+ eselect php-devel set php5
+ fi
+
+ # Output some general info to the user
+ if useq apache || useq apache2 ; then
+ APACHE1_MOD_DEFINE="PHP5"
+ APACHE1_MOD_CONF="70_mod_php5.conf"
+ APACHE2_MOD_DEFINE="PHP5"
+ APACHE2_MOD_CONF="70_mod_php5.conf"
+ apache-module_pkg_postinst
+ fi
+ php5_0-sapi_pkg_postinst
+}