Subject: pkg/21715: ap2-php4 now depends on apr
To: None <gnats-bugs@gnats.netbsd.org>
From: None <chris@cjones.org>
List: netbsd-bugs
Date: 05/29/2003 14:17:40
>Number:         21715
>Category:       pkg
>Synopsis:       ap2-php4 now depends on apr
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 29 20:18:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Chris Jones
>Release:        NetBSD 1.6_STABLE
>Organization:
Chris Jones               chris@cjones.org                www.cjones.org
>Environment:
	
	
System: NetBSD maxine.cjones.org 1.6_STABLE NetBSD 1.6_STABLE (MAXINE) #0: Mon Dec 9 10:40:50 MST 2002 chris@maxine.cjones.org:/usr/src/sys/arch/i386/compile/MAXINE i386
Architecture: i386
Machine: i386
>Description:
The www/ap2-php4 package depends on devel/apr:

...
Making all in apache2filter
/bin/sh /usr/pkgsrc/www/ap2-php4/work.i386/php-4.2.3/libtool --mode=compile cc  -I. -I/usr/pkgsrc/www/ap2-php4/work.i386/php-4.2.3/sapi/apache2filter -I/usr/pkgsrc/www/ap2-php4/work.i386/php-4.2.3/main -I/usr/pkgsrc/www/ap2-php4/work.i386/php-4.2.3 -I/usr/pkg/include/httpd -I/usr/pkgsrc/www/ap2-php4/work.i386/php-4.2.3/Zend -I/usr/pkgsrc/www/ap2-php4/work.i386/php-4.2.3/TSRM  -I/usr/pkg/include -O2 -I/usr/pkg/include -prefer-pic  -c sapi_apache2.c
cc -I. -I/usr/pkgsrc/www/ap2-php4/work.i386/php-4.2.3/sapi/apache2filter -I/usr/pkgsrc/www/ap2-php4/work.i386/php-4.2.3/main -I/usr/pkgsrc/www/ap2-php4/work.i386/php-4.2.3 -I/usr/pkg/include/httpd -I/usr/pkgsrc/www/ap2-php4/work.i386/php-4.2.3/Zend -I/usr/pkgsrc/www/ap2-php4/work.i386/php-4.2.3/TSRM -I/usr/pkg/include -O2 -I/usr/pkg/include -c sapi_apache2.c  -fPIC -DPIC -o sapi_apache2.lo
sapi_apache2.c:31: apr_strings.h: No such file or directory
In file included from sapi_apache2.c:32:
/usr/pkgsrc/www/ap2-php4/work.i386/.buildlink/include/httpd/ap_config.h:58: apr.h: No such file or directory
...

>How-To-Repeat:
cd www/ap2-php4 ; make
>Fix:
The first patch does the apr buildlink step.  The second patch is
against the PHP sources (suitable for inclusion in the patches
directory), and it adds the apr include directory to the appropriate
part of the compile.  The second patch is probably wrong, but it
does work.


Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/www/ap2-php4/Makefile,v
retrieving revision 1.2
diff -u -w -r1.2 Makefile
--- Makefile	2002/11/05 07:33:19	1.2
+++ Makefile	2003/05/29 20:08:17
@@ -18,5 +18,6 @@
 	${INSTALL_DATA} ${WRKSRC}/.libs/libphp4.so	\
 		${PREFIX}/lib/httpd/mod_php4.so
 
+.include "../../devel/apr/buildlink2.mk"
 .include "../../www/apache2/buildlink2.mk"
 .include "../../mk/bsd.pkg.mk"



--- sapi/apache2filter/Makefile.in.orig	Thu May 29 14:05:56 2003
+++ sapi/apache2filter/Makefile.in	Thu May 29 14:06:16 2003
@@ -2,6 +2,6 @@
 LTLIBRARY_NAME    = libsapi.la
 LTLIBRARY_SOURCES = sapi_apache2.c apache_config.c php_functions.c
 
-EXTRA_INCLUDES = $(APACHE_INCLUDE)
+EXTRA_INCLUDES = $(APACHE_INCLUDE) -I../../../.buildlink/include/apr-0
 
 include $(top_srcdir)/build/ltlib.mk
>Release-Note:
>Audit-Trail:
>Unformatted: