Index: eclass/php.eclass =================================================================== RCS file: /home/cvsroot/gentoo-x86/eclass/php.eclass,v retrieving revision 1.23 diff -u -r1.23 php.eclass --- eclass/php.eclass 24 May 2003 13:36:47 -0000 1.23 +++ eclass/php.eclass 24 May 2003 20:51:51 -0000 @@ -188,7 +188,14 @@ [ -x "/usr/sbin/sendmail" ] || die "You need a virtual/mta that provides /usr/sbin/sendmail!" - use berkdb && myconf="${myconf} --with-db3=/usr" + #Hack to use db4 + if has_version =sys-libs/db-4* && grep -q "\--with-db4" configure; then + einfo "enabling db4" + use berkdb && myconf="${myconf} --with-db4=/usr" + else + use berkdb && myconf="${myconf} --with-db3=/usr" + fi + use cjk && myconf="${myconf} --enable-mbstring --enable-mbregex" use crypt && myconf="${myconf} --with-mcrypt=/usr --with-mhash" use firebird && myconf="${myconf} --with-interbase=/opt/interbase" Index: dev-php/mod_php/mod_php-4.3.1-r3.ebuild =================================================================== RCS file: /home/cvsroot/gentoo-x86/dev-php/mod_php/mod_php-4.3.1-r3.ebuild,v retrieving revision 1.8 diff -u -r1.8 mod_php-4.3.1-r3.ebuild --- dev-php/mod_php/mod_php-4.3.1-r3.ebuild 14 May 2003 20:08:59 -0000 1.8 +++ dev-php/mod_php/mod_php-4.3.1-r3.ebuild 24 May 2003 20:51:51 -0000 @@ -16,6 +16,13 @@ >=net-www/apache-1.3.26-r2 )" +src_unpack() { + php_src_unpack + epatch ${FILESDIR}/php-${PV}-db4.diff + cd ${S} + autoconf +} + src_compile() { #no readline on server SAPI myconf="${myconf} --without-readline " Index: dev-php/mod_php/files/php-4.3.1-db4.diff =================================================================== RCS file: dev-php/mod_php/files/php-4.3.1-db4.diff diff -N dev-php/mod_php/files/php-4.3.1-db4.diff --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ dev-php/mod_php/files/php-4.3.1-db4.diff 24 May 2003 20:51:51 -0000 @@ -0,0 +1,51 @@ +--- ext/dba/config.m4.orig 2003-05-24 19:47:25.000000000 +0000 ++++ ext/dba/config.m4 2003-05-24 19:59:37.000000000 +0000 +@@ -189,6 +189,48 @@ + AC_MSG_CHECKING(for Berkeley DB3 support) + AC_DBA_STD_RESULT + ++AC_ARG_WITH(db4, ++[ --with-db4[=DIR] Include Berkeley DB4 support],[ ++ if test "$withval" != "no"; then ++ for i in /usr/local /usr /usr/local/BerkeleyDB.4.0 $withval; do ++ if test -f "$i/db4/db.h"; then ++ THIS_PREFIX=$i ++ DB3_EXTRA=db4 ++ elif test -f "$i/include/db4/db.h"; then ++ THIS_PREFIX=$i ++ DB3_EXTRA=db4/db.h ++ elif test -f "$i/include/db/db4.h"; then ++ THIS_PREFIX=$i ++ DB3_EXTRA=db/db4.h ++ elif test -f "$i/include/db4.h"; then ++ THIS_PREFIX=$i ++ DB3_EXTRA=db4.h ++ elif test -f "$i/include/db.h"; then ++ THIS_PREFIX=$i ++ DB3_EXTRA=db.h ++ fi ++ done ++ ++ if test -n "$DB3_EXTRA"; then ++ AC_DEFINE_UNQUOTED(DB3_INCLUDE_FILE, "$DB3_EXTRA", [ ]) ++ fi ++ ++ for LIB in db-4.0 db-4 db4 db; do ++ PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[ ++ for func in db_create db_create_4000 db_create_4001; do ++ AC_CHECK_LIB($LIB, ${func} , [AC_DEFINE(DBA_DB3,1,[ ]) THIS_LIBS=$LIB]) ++ done ++ ]) ++ done ++ ++ PHP_DBA_STD_ASSIGN ++ PHP_DBA_STD_CHECK ++ PHP_DBA_STD_ATTACH ++ fi ++]) ++AC_MSG_CHECKING(for Berkeley DB4 support) ++AC_DBA_STD_RESULT ++ + AC_ARG_WITH(dbm, + [ --with-dbm[=DIR] Include DBM support],[ + if test "$withval" != "no"; then Index: dev-php/php/php-4.3.1-r2.ebuild =================================================================== RCS file: /home/cvsroot/gentoo-x86/dev-php/php/php-4.3.1-r2.ebuild,v retrieving revision 1.4 diff -u -r1.4 php-4.3.1-r2.ebuild --- dev-php/php/php-4.3.1-r2.ebuild 15 May 2003 21:31:33 -0000 1.4 +++ dev-php/php/php-4.3.1-r2.ebuild 24 May 2003 20:51:51 -0000 @@ -16,6 +16,13 @@ RDEPEND="${RDEPEND}" +src_unpack() { + php_src_unpack + epatch ${FILESDIR}/php-${PV}-db4.diff + cd ${S} + autoconf +} + src_compile() { use readline && myconf="${myconf} --with-readline" Index: dev-php/php/files/php-4.3.1-db4.diff =================================================================== RCS file: dev-php/php/files/php-4.3.1-db4.diff diff -N dev-php/php/files/php-4.3.1-db4.diff --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ dev-php/php/files/php-4.3.1-db4.diff 24 May 2003 20:51:51 -0000 @@ -0,0 +1,51 @@ +--- ext/dba/config.m4.orig 2003-05-24 19:47:25.000000000 +0000 ++++ ext/dba/config.m4 2003-05-24 19:59:37.000000000 +0000 +@@ -189,6 +189,48 @@ + AC_MSG_CHECKING(for Berkeley DB3 support) + AC_DBA_STD_RESULT + ++AC_ARG_WITH(db4, ++[ --with-db4[=DIR] Include Berkeley DB4 support],[ ++ if test "$withval" != "no"; then ++ for i in /usr/local /usr /usr/local/BerkeleyDB.4.0 $withval; do ++ if test -f "$i/db4/db.h"; then ++ THIS_PREFIX=$i ++ DB3_EXTRA=db4 ++ elif test -f "$i/include/db4/db.h"; then ++ THIS_PREFIX=$i ++ DB3_EXTRA=db4/db.h ++ elif test -f "$i/include/db/db4.h"; then ++ THIS_PREFIX=$i ++ DB3_EXTRA=db/db4.h ++ elif test -f "$i/include/db4.h"; then ++ THIS_PREFIX=$i ++ DB3_EXTRA=db4.h ++ elif test -f "$i/include/db.h"; then ++ THIS_PREFIX=$i ++ DB3_EXTRA=db.h ++ fi ++ done ++ ++ if test -n "$DB3_EXTRA"; then ++ AC_DEFINE_UNQUOTED(DB3_INCLUDE_FILE, "$DB3_EXTRA", [ ]) ++ fi ++ ++ for LIB in db-4.0 db-4 db4 db; do ++ PHP_TEMP_LDFLAGS(-L$THIS_PREFIX/lib,[ ++ for func in db_create db_create_4000 db_create_4001; do ++ AC_CHECK_LIB($LIB, ${func} , [AC_DEFINE(DBA_DB3,1,[ ]) THIS_LIBS=$LIB]) ++ done ++ ]) ++ done ++ ++ PHP_DBA_STD_ASSIGN ++ PHP_DBA_STD_CHECK ++ PHP_DBA_STD_ATTACH ++ fi ++]) ++AC_MSG_CHECKING(for Berkeley DB4 support) ++AC_DBA_STD_RESULT ++ + AC_ARG_WITH(dbm, + [ --with-dbm[=DIR] Include DBM support],[ + if test "$withval" != "no"; then