Subject: Re: Pbms building ap2-php4 and ap2-perl
To: None <tech-pkg@netbsd.org>
From: Eric Gillespie <epg@pretzelnet.org>
List: tech-pkg
Date: 05/30/2003 05:30:29
"Jean-Luc Wasmer" <jl.netbsd@wasmer.ca> writes:

> Did I do something wrong?

No.  I did something wrong when i pulled apr out of the apache2
package so the subversion packages could use it.

php4 finds the apache2 includes by running apxs -q INCLUDEDIR.
I'm no apache expert, but judging from the name of that variable
i can't just make it print two directories (the httpd one + the
apr one).  So i guess php4 just needs to ask apr-config where to
find the includes.  It probably ought to do this anyway, since it
does after all directly consume apr header files.

How does this patch look?  Eventually, of course, it can be made
to look for apr-config just as it does for apxs, then the patch
can be submitted back the php folks.  But this should solve the
problem for pkgsrc.

BTW, this package's patches are a mess.  There is a patch to a
.m4 file but those changes are not reflected in the patched
configure file!  Furthermore, the changes that *are* present in
the patched configure file are not patched into any .m4 file.  I
just stuck with what was working for now and patched only the
configure file.  Someone who cares about this package and has the
time should probably clean this up.

Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/www/php4/distinfo,v
retrieving revision 1.19
diff -a -u -r1.19 distinfo
--- distinfo	2003/02/21 05:39:03	1.19
+++ distinfo	2003/05/30 10:24:19
@@ -5,7 +5,7 @@
 SHA1 (patch-aa) = 09fb15fde09bf866d9be016839f33c889d9cefb9
 SHA1 (patch-ab) = daac6888e758b39bc40abed41eba9e55a0fa30e5
 SHA1 (patch-ac) = f3a3a4a5af6f03a6274aa4875a922b838f1bde1b
-SHA1 (patch-ad) = f1d129a8f0ef45f274a42033c5494e4a0a516f66
+SHA1 (patch-ad) = 452ee7c2ef9cb9456653f376c5cc350e227bf10d
 SHA1 (patch-ae) = e7acc06a63f47053c81ab442b53c68d89d122f78
 SHA1 (patch-ag) = a1948af6361e898880e4598654a8ac15fd193b7d
 SHA1 (patch-ah) = 27ac564d2d378852ba328fbc0458d222a4bfdb22
Index: patches/patch-ad
===================================================================
RCS file: /cvsroot/pkgsrc/www/php4/patches/patch-ad,v
retrieving revision 1.13
diff -a -u -r1.13 patch-ad
--- patches/patch-ad	2003/01/12 14:31:58	1.13
+++ patches/patch-ad	2003/05/30 10:24:19
@@ -1,7 +1,5 @@
-$NetBSD: patch-ad,v 1.13 2003/01/12 14:31:58 christos Exp $
-
---- configure.orig	Thu Sep  5 19:40:53 2002
-+++ configure	Sun Jan 12 09:17:58 2003
+--- configure.orig	Thu Sep  5 23:40:53 2002
++++ configure	Fri May 30 10:04:07 2003
 @@ -3220,9 +3220,10 @@
      { echo "configure: error: Please specify the path to the root of AOLserver using --with-aolserver=DIR" 1>&2; exit 1; }
    fi
@@ -28,7 +26,15 @@
    fi
  
    echo "$ac_t""yes" 1>&6
-@@ -3951,9 +3953,10 @@
+@@ -3794,6 +3796,7 @@
+ 
+ 
+   PHP_VAR_SUBST="$PHP_VAR_SUBST APXS"
++  INCLUDES="$INCLUDES `apr-config --includes`"
+ 
+ 
+ 
+@@ -3951,9 +3954,10 @@
  	*** Pike include dir(s) used: $PIKE_INCLUDE_DIR
  	*** Pike version:             $PIKE_VERSION"
          
@@ -41,7 +47,7 @@
    fi
  
  
-@@ -4304,9 +4307,10 @@
+@@ -4304,9 +4308,10 @@
  	fi
  	test -f "$ZEUSPATH/web/include/httpext.h" || { echo "configure: error: Unable to find httpext.h in $ZEUSPATH/web/include" 1>&2; exit 1; }
  	
@@ -54,7 +60,7 @@
    fi
  
  	cat >> confdefs.h <<\EOF
-@@ -4424,9 +4428,10 @@
+@@ -4424,9 +4429,10 @@
    fi
  
    
@@ -67,7 +73,7 @@
    fi
  
    cat >> confdefs.h <<\EOF
-@@ -4454,9 +4459,10 @@
+@@ -4454,9 +4460,10 @@
  		{ echo "configure: error: You did not specify a directory" 1>&2; exit 1; }
  	fi
  	
@@ -80,7 +86,7 @@
    fi
  
  	PHTTPD_DIR=$withval
-@@ -4565,9 +4571,10 @@
+@@ -4565,9 +4572,10 @@
  	fi
  	test -f "$PI3PATH/PiAPI/PiAPI.h" || { echo "configure: error: Unable to find PiAPI.h in $PI3PATH/PiAPI" 1>&2; exit 1; }
  	
@@ -93,7 +99,7 @@
    fi
  
  	cat >> confdefs.h <<\EOF
-@@ -4855,9 +4862,10 @@
+@@ -4855,9 +4863,10 @@
    php_build_target=shared
  
      
@@ -106,7 +112,7 @@
    fi
  
      echo "$ac_t""yes" 1>&6
-@@ -5396,10 +5404,6 @@
+@@ -5396,10 +5405,6 @@
  
    fi
  
@@ -117,7 +123,7 @@
  INCLUDES="$INCLUDES -I\$(top_builddir)/Zend"
  test -d /usr/ucblib && 
    if test "/usr/ucblib" != "/usr/lib"; then
-@@ -26847,19 +26851,10 @@
+@@ -26847,19 +26852,10 @@
  
  
    else
@@ -137,7 +143,7 @@
    echo "$ac_t""no" 1>&6
  
  fi
-@@ -67729,8 +67724,8 @@
+@@ -67729,8 +67725,8 @@
      if test "$lib_build_shared" != "yes"; then
          enable_shared=no
      fi
@@ -148,7 +154,7 @@
  ;;
  shared)
      enable_static=no
-@@ -72831,7 +72826,7 @@
+@@ -72831,7 +72827,7 @@
  
  TSRM_LIB='TSRM/libtsrm.la'
  TSRM_DIR=TSRM
@@ -157,7 +163,7 @@
  
  if test "$ZEND_EXPERIMENTAL_ZTS" = "yes"; then
    cat >> confdefs.h <<\EOF
-@@ -73625,7 +73620,7 @@
+@@ -73625,7 +73621,7 @@
  
  if test "$enable_debug" != "yes"; then