You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by "Philip M. Gollucci" <pg...@p6m7g8.com> on 2008/04/08 19:51:19 UTC

[PATCH]: FreeBSD ports devel/apr

Hi,

I'm sending this patch upstream, apr is one of the projects I don't have 
a commit bit too, so please review commit, and MFC as needed.

Will require a ./builconf to regen ./configure.

Thanks.

Recent PR
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/122555


-- 
------------------------------------------------------------------------
Philip M. Gollucci (philip@ridecharge.com)
o:703.549.2050x206
Senior System Admin - Riderway, Inc.
http://riderway.com / http://ridecharge.com
1024D/EC88A0BF 0DE5 C55C 6BF3 B235 2DAB  B89E 1324 9B4F EC88 A0BF

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.


Re: [PATCH]: FreeBSD ports devel/apr

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Joe Orton wrote:
 > On Tue, Apr 08, 2008 at 01:51:19PM -0400, Philip M. Gollucci wrote:
 >> I'm sending this patch upstream, apr is one of the projects I don't 
have a commit bit too, so please review commit, and MFC as needed.
 >
 > That code should be using LDFLAGS rather than LIBS, and it should be 
adding to, rather than overwriting, both the variables.  Can you try 
this instead?

via visual inspection, your patch looks much more correct, but I don't 
expect any differences, as dbm related things already compile/link 
correctly, so the result will be the same for FreeBSD's devel/apr; however,

I don't happen to be setup to do manual building atm...; even if I was, 
I'm not sure what I'd have to try without the patch to break it then 
apply and verify it fixes it.

It looks like back in 2006/04/06
adding
+APR_UTIL_CONF_ARGS+=   --with-gdbm=${LOCALBASE}
aka ./configure for apr-util
blew away the CFLAGS and was affecting subsequent linking aka berkely db.

As seen in the below log snippet, the default freebsd compile still 
works with this patch applied.

HTH

building apr-1.2.12 in directory /usr/home/space/8.0-FreeBSD
Looking for apr source in /work/a/ports/devel/apr/work/apr-1.2.12
Creating include/private/apu_config.h ...
Creating configure ...
Generating 'make' outputs ...
rebuilding rpm spec file
checking for ldap support...
checking for default DBM... sdbm (default)
checking libpq-fe.h usability... no
checking libpq-fe.h presence... no
checking for libpq-fe.h... no
checking sqlite3.h usability... no
checking sqlite3.h presence... no
checking for sqlite3.h... no
checking sqlite.h usability... no
checking sqlite.h presence... no
checking for sqlite.h... no
   setting LDFLAGS to "-L/usr/local/lib"
   adding "-I/usr/local/include" to CPPFLAGS
   setting APRUTIL_INCLUDES to "-I/usr/local/include"
   setting APRUTIL_LDFLAGS to "-L/usr/local/lib"
------------------------------------------------------------------------
Philip M. Gollucci (philip@ridecharge.com)
o:703.549.2050x206
Senior System Admin - Riderway, Inc.
http://riderway.com / http://ridecharge.com
1024D/EC88A0BF 0DE5 C55C 6BF3 B235 2DAB  B89E 1324 9B4F EC88 A0BF

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.


Re: [PATCH]: FreeBSD ports devel/apr

Posted by Joe Orton <jo...@redhat.com>.
On Tue, Apr 08, 2008 at 01:51:19PM -0400, Philip M. Gollucci wrote:
> I'm sending this patch upstream, apr is one of the projects I don't have a 
> commit bit too, so please review commit, and MFC as needed.

That code should be using LDFLAGS rather than LIBS, and it should be 
adding to, rather than overwriting, both the variables.  Can you try 
this instead?

Index: build/dbm.m4
===================================================================
--- build/dbm.m4	(revision 646297)
+++ build/dbm.m4	(working copy)
@@ -671,8 +671,10 @@
     elif test "$withval" = "no"; then
       apu_have_gdbm=0
     else
-      CPPFLAGS="-I$withval/include"
-      LIBS="-L$withval/lib "
+      saved_cppflags="$CPPFLAGS"
+      saved_ldflags="$LDFLAGS"
+      CPPFLAGS="$CPPFLAGS -I$withval/include"
+      LDFLAGS="$LDFLAGS -L$withval/lib "
 
       AC_MSG_CHECKING(checking for gdbm in $withval)
       AC_CHECK_HEADER(gdbm.h, AC_CHECK_LIB(gdbm, gdbm_open, [apu_have_gdbm=1]))
@@ -680,6 +682,8 @@
         APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
         APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include])
       fi
+      CPPFLAGS="$saved_cppflags"
+      LDFLAGS="$saved_ldflags"
     fi
   ])