Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Aug 2001 06:32:46 -0700 (PDT)
From:      Paul Marquis <pmarquis@pobox.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/29565: Update port: www/mod_php4
Message-ID:  <200108091332.f79DWk020316@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         29565
>Category:       ports
>Synopsis:       Update port: www/mod_php4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 09 06:40:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Paul Marquis
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
>Environment:
FreeBSD sboy.pmarquis.com 4.3-STABLE FreeBSD 4.3-STABLE #3: Wed Jul 18 15:10:26
EDT 2001     pmarquis@sboy.pmarquis.com:/usr/obj/usr/src/sys/SBOY  i386

>Description:
The attached patch adds DOM XML support to the PHP4 port.  DOM support requires that the libxml2 port be installed.  However, the include directory for libxml2 isn't automatically recognized by the PHP configure script, so a patch is required.  There is already a patch to configure for thread support, so this adds a second patch.  If it's more desirable to merge this patch into the already existing patch, please let me know.

This is a duplicate of bug ports/29556 except submitted as a patch instead of a shar file.

The patch can be applied by running:

  # cd /usr/ports/www/mod_php4
  # patch -Np1 < patch

>How-To-Repeat:

>Fix:
diff -Naur mod_php4.orig/files/patch-au mod_php4/files/patch-au
--- mod_php4.orig/files/patch-au	Wed Dec 31 19:00:00 1969
+++ mod_php4/files/patch-au	Wed Aug  8 20:38:26 2001
@@ -0,0 +1,52 @@
+--- configure.orig	Wed Aug  8 20:27:07 2001
++++ configure	Wed Aug  8 20:36:28 2001
+@@ -15340,12 +15340,18 @@
+ if test "$PHP_DOM" != "no"; then
+ 
+   if test -r $PHP_DOM/include/libxml/tree.h; then
++    DOMXML_INCLUDE_DIR=$PHP_DOM/include
+     DOMXML_DIR=$PHP_DOM
+   else
+     echo $ac_n "checking for DOM in default path""... $ac_c" 1>&6
+ echo "configure:15347: checking for DOM in default path" >&5
+     for i in /usr/local /usr; do
+       if test -r $i/include/libxml/tree.h; then
++        DOMXML_INCLUDE_DIR=$i/include
++        DOMXML_DIR=$i
++        echo "$ac_t""found in $i" 1>&6
++      elif test -r $i/include/libxml2/libxml/tree.h; then
++        DOMXML_INCLUDE_DIR=$i/include/libxml2
+         DOMXML_DIR=$i
+         echo "$ac_t""found in $i" 1>&6
+       fi
+@@ -15359,7 +15365,7 @@
+ 
+   
+   old_CPPFLAGS=$CPPFLAGS
+-  CPPFLAGS=-I$DOMXML_DIR/include
++  CPPFLAGS=-I$DOMXML_INCLUDE_DIR
+   echo $ac_n "checking for libxml version""... $ac_c" 1>&6
+ echo "configure:15365: checking for libxml version" >&5
+   cat > conftest.$ac_ext <<EOF
+@@ -15390,16 +15396,16 @@
+ 
+ 
+   
+-  if test "$DOMXML_DIR/include" != "/usr/include"; then
++  if test "$DOMXML_INCLUDE_DIR" != "/usr/include"; then
+     
+-  if test -z "$DOMXML_DIR/include" || echo "$DOMXML_DIR/include" | grep '^/' >/dev/null ; then
+-    ai_p="$DOMXML_DIR/include"
++  if test -z "$DOMXML_INCLUDE_DIR" || echo "$DOMXML_INCLUDE_DIR" | grep '^/' >/dev/null ; then
++    ai_p="$DOMXML_INCLUDE_DIR"
+   else
+     
+-    ep_dir="`echo $DOMXML_DIR/include|sed 's%/*[^/][^/]*/*$%%'`"
++    ep_dir="`echo $DOMXML_INCLUDE_DIR|sed 's%/*[^/][^/]*/*$%%'`"
+     
+     ep_realdir="`(cd \"$ep_dir\" && pwd)`"
+-    ai_p="$ep_realdir/`basename \"$DOMXML_DIR/include\"`"
++    ai_p="$ep_realdir/`basename \"$DOMXML_INCLUDE_DIR\"`"
+   fi
+ 
+     
diff -Naur mod_php4.orig/scripts/configure.php mod_php4/scripts/configure.php
--- mod_php4.orig/scripts/configure.php	Wed Aug  8 17:50:45 2001
+++ mod_php4/scripts/configure.php	Wed Aug  8 20:41:57 2001
@@ -46,6 +46,7 @@
 sysvsem		"System V semaphore support" OFF \
 sysvshm		"System V shared memory support" OFF \
 transsid	"Transparent session id" OFF \
+DOMXML		"DOM XML support (implies iconv)" OFF \
 2> $tempfile
 
 	retval=$?
@@ -273,6 +274,13 @@
 			;;
 		\"transsid\")
 			echo "CONFIGURE_ARGS+=--enable-trans-sid"
+			;;
+		\"DOMXML\")
+			echo "LIB_DEPENDS+=	xml2.5:\${PORTSDIR}/textproc/libxml2"
+			echo "CONFIGURE_ARGS+=--with-dom=\${PREFIX}"
+			if [ -z "$ICONV" ]; then
+				set $* \"iconv\"
+			fi
 			;;
 		*)
 			echo "Invalid option(s): $*" > /dev/stderr

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108091332.f79DWk020316>