ports/60541: support Berkeley DB 4.1 in ports/lang/php4

Sunpoet Po-Chuan Hsieh sunpoet at sunpoet.net
Wed Dec 24 13:20:30 UTC 2003


>Number:         60541
>Category:       ports
>Synopsis:       support Berkeley DB 4.1 in ports/lang/php4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 24 05:20:17 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Sunpoet Po-Chuan Hsieh
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:
System: FreeBSD IRIS.sunpoet.net 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Sun Dec 21 18:12:22 CST 2003 root@:/usr/obj/usr/src/sys/sunpoet i386

>Description:
1. Makefile
   In ports/lang/php4, original makefile depends on Berkeley DB 4.0 only.
   ( LIB_DEPENDS += db4.0:${PORTSDIR}/databases/db4 )
   If Berkeley DB 4.1 is installed, it will be ignored.

2. configure
   Even though the configure in php4 will try to detect the directory of db4
   or db41, it does not work correctly with ports/databases/db41.
   For Berkeley DB 4.1 users, they can't make build php4 depends on libdb41.a.
   (ports/databases/db41: ${LOCALBASE}/lib/libdb41.a)

>How-To-Repeat:
cd /usr/ports/lang/php4; make -DWITH_DB4 all
	
>Fix:
Add WITH_DB4_VER=41 for Berkeley DB 4.1 users and patch configure in lang/php4.

% cd /usr/ports/lang/php4; diff -u Makefile.orig Makefile
--- Makefile.orig       Tue Dec 23 03:02:16 2003
+++ Makefile	Wed Dec 24 20:26:06 2003
@@ -246,7 +246,11 @@
 .endif
 
 .if defined(WITH_DB4)
+.if defined(WITH_DB4_VER) && ${WITH_DB4_VER} == "41"
+LIB_DEPENDS+=	db41.1:${PORTSDIR}/databases/db41
+.else
 LIB_DEPENDS+=	db4.0:${PORTSDIR}/databases/db4
+.endif
 CONFIGURE_ARGS+=--with-db4=${LOCALBASE}
 .endif

% cd /usr/ports/lang/php4/work/php-4.3.4; diff -u configure.orig configure
--- configure.orig	Wed Dec 24 20:35:30 2003
+++ configure	Wed Dec 24 20:39:28 2003
@@ -23072,6 +23072,10 @@
         THIS_PREFIX=$i
         THIS_INCLUDE=$i/db4/db.h
         break
+      elif test -f "$i/include/db41/db.h"; then
+        THIS_PREFIX=$i
+        THIS_INCLUDE=$i/include/db41/db.h
+        break
       elif test -f "$i/include/db4/db.h"; then
         THIS_PREFIX=$i
         THIS_INCLUDE=$i/include/db4/db.h
@@ -23091,7 +23095,7 @@
       fi
     done
     
-  for LIB in db-4.1 db-4.0 db-4 db4 db; do
+  for LIB in db-4.1 db-4.0 db-4 db41 db4 db; do
     if test -f $THIS_PREFIX/lib/lib$LIB.a -o -f $THIS_PREFIX/lib/lib$LIB.$SHLIB_SUFFIX_NAME; then
       
   old_LDFLAGS=$LDFLAGS

Note that the configure.orig here is the patched configure file with
ports/lang/php4/files/patch-configure.

-- 
                              Sunpoet Po-Chuan Hsieh <sunpoet at sunpoet.net>
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list