rpms/apr-util/devel apr-util-1.3.2-pgsql.patch, 1.1, 1.2 apr-util.spec, 1.53, 1.54

Bojan Smojver (bojan) fedora-extras-commits at redhat.com
Wed Jul 2 06:51:00 UTC 2008


Author: bojan

Update of /cvs/pkgs/rpms/apr-util/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11857

Modified Files:
	apr-util-1.3.2-pgsql.patch apr-util.spec 
Log Message:
Properly fix PostgreSQL detection.

apr-util-1.3.2-pgsql.patch:

Index: apr-util-1.3.2-pgsql.patch
===================================================================
RCS file: /cvs/pkgs/rpms/apr-util/devel/apr-util-1.3.2-pgsql.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- apr-util-1.3.2-pgsql.patch	2 Jul 2008 06:11:51 -0000	1.1
+++ apr-util-1.3.2-pgsql.patch	2 Jul 2008 06:50:16 -0000	1.2
@@ -2,12 +2,118 @@
 ===================================================================
 --- build/dbd.m4	(revision 672960)
 +++ build/dbd.m4	(working copy)
-@@ -35,7 +35,7 @@
+@@ -35,16 +35,32 @@
        if test "x$PGSQL_CONFIG" != 'x'; then
          pgsql_CPPFLAGS="-I`$PGSQL_CONFIG --includedir`"
          pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir`"
 -        pgsql_LIBS="`$PGSQL_CONFIG --libs`"
-+        pgsql_LIBS=""
  
          APR_ADDTO(CPPFLAGS, [$pgsql_CPPFLAGS])
          APR_ADDTO(LDFLAGS, [$pgsql_LDFLAGS])
+-        APR_ADDTO(LIBS, [$pgsql_LIBS])
+       fi
+ 
+-      AC_CHECK_HEADERS(libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
++      AC_CHECK_HEADERS(libpq-fe.h, [
++        AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1],[
++        if test "x$PGSQL_CONFIG" != 'x'; then
++          unset ac_cv_lib_pq_PQsendQueryPrepared
++          pgsql_LIBS="`$PGSQL_CONFIG --libs`"
++          APR_ADDTO(LIBS, [$pgsql_LIBS])
++          AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1])
++        fi
++        ])
++      ])
+       if test "$apu_have_pgsql" = "0"; then
+-        AC_CHECK_HEADERS(postgresql/libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
++        AC_CHECK_HEADERS(postgresql/libpq-fe.h, [
++          AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1],[
++          if test "x$PGSQL_CONFIG" != 'x'; then
++            unset ac_cv_lib_pq_PQsendQueryPrepared
++            pgsql_LIBS="`$PGSQL_CONFIG --libs`"
++            APR_ADDTO(LIBS, [$pgsql_LIBS])
++            AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1])
++          fi
++          ])
++        ])
+       fi
+       if test "$apu_have_pgsql" != "0" && test "x$PGSQL_CONFIG" != 'x'; then
+         APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$pgsql_CPPFLAGS])
+@@ -56,7 +72,6 @@
+       if test "x$PGSQL_CONFIG" != 'x'; then
+         pgsql_CPPFLAGS="-I`$PGSQL_CONFIG --includedir`"
+         pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir`"
+-        pgsql_LIBS="`$PGSQL_CONFIG --libs`"
+       else
+         pgsql_CPPFLAGS="-I$withval/include"
+         pgsql_LDFLAGS="-L$withval/lib "
+@@ -64,12 +79,29 @@
+ 
+       APR_ADDTO(CPPFLAGS, [$pgsql_CPPFLAGS])
+       APR_ADDTO(LDFLAGS, [$pgsql_LDFLAGS])
+-      APR_ADDTO(LIBS, [$pgsql_LIBS])
+ 
+       AC_MSG_NOTICE(checking for pgsql in $withval)
+-      AC_CHECK_HEADERS(libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
++      AC_CHECK_HEADERS(libpq-fe.h, [
++        AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1],[
++        if test "x$PGSQL_CONFIG" != 'x'; then
++          unset ac_cv_lib_pq_PQsendQueryPrepared
++          pgsql_LIBS="`$PGSQL_CONFIG --libs`"
++          APR_ADDTO(LIBS, [$pgsql_LIBS])
++          AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1])
++        fi
++        ])
++      ])
+       if test "$apu_have_pgsql" != "1"; then
+-        AC_CHECK_HEADERS(postgresql/libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
++        AC_CHECK_HEADERS(postgresql/libpq-fe.h, [
++          AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1],[
++          if test "x$PGSQL_CONFIG" != 'x'; then
++            unset ac_cv_lib_pq_PQsendQueryPrepared
++            pgsql_LIBS="`$PGSQL_CONFIG --libs`"
++            APR_ADDTO(LIBS, [$pgsql_LIBS])
++            AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1])
++          fi
++          ])
++        ])
+       fi
+       if test "$apu_have_pgsql" != "0"; then
+         APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$pgsql_CPPFLAGS])
+@@ -80,16 +112,32 @@
+     if test "x$PGSQL_CONFIG" != 'x'; then
+       pgsql_CPPFLAGS="-I`$PGSQL_CONFIG --includedir`"
+       pgsql_LDFLAGS="-L`$PGSQL_CONFIG --libdir`"
+-      pgsql_LIBS="`$PGSQL_CONFIG --libs`"
+ 
+       APR_ADDTO(CPPFLAGS, [$pgsql_CPPFLAGS])
+       APR_ADDTO(LDFLAGS, [$pgsql_LDFLAGS])
+-      APR_ADDTO(LIBS, [$pgsql_LIBS])
+     fi
+ 
+-    AC_CHECK_HEADERS(libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
++    AC_CHECK_HEADERS(libpq-fe.h, [
++      AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1],[
++      if test "x$PGSQL_CONFIG" != 'x'; then
++        unset ac_cv_lib_pq_PQsendQueryPrepared
++        pgsql_LIBS="`$PGSQL_CONFIG --libs`"
++        APR_ADDTO(LIBS, [$pgsql_LIBS])
++        AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1])
++      fi
++      ])
++    ])
+     if test "$apu_have_pgsql" = "0"; then
+-      AC_CHECK_HEADERS(postgresql/libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
++      AC_CHECK_HEADERS(postgresql/libpq-fe.h, [
++        AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1],[
++        if test "x$PGSQL_CONFIG" != 'x'; then
++          unset ac_cv_lib_pq_PQsendQueryPrepared
++          pgsql_LIBS="`$PGSQL_CONFIG --libs`"
++          APR_ADDTO(LIBS, [$pgsql_LIBS])
++          AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1])
++        fi
++        ])
++      ])
+     fi
+     if test "$apu_have_pgsql" != "0" && test "x$PGSQL_CONFIG" != 'x'; then
+       APR_ADDTO(APRUTIL_PRIV_INCLUDES, [$pgsql_CPPFLAGS])


Index: apr-util.spec
===================================================================
RCS file: /cvs/pkgs/rpms/apr-util/devel/apr-util.spec,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- apr-util.spec	2 Jul 2008 06:13:20 -0000	1.53
+++ apr-util.spec	2 Jul 2008 06:50:16 -0000	1.54
@@ -4,7 +4,7 @@
 Summary: Apache Portable Runtime Utility library
 Name: apr-util
 Version: 1.3.2
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: ASL 2.0
 Group: System Environment/Libraries
 URL: http://apr.apache.org/
@@ -183,6 +183,9 @@
 %{_libdir}/pkgconfig/*.pc
 
 %changelog
+* Wed Jul  2 2008 Bojan Smojver <bojan at rexursive.com> - 1.3.2-4
+- properly fix PostgreSQL detection
+
 * Wed Jul  2 2008 Bojan Smojver <bojan at rexursive.com> - 1.3.2-3
 - revert build dependencies, change from -2 didn't help
 - add apr-util-1.3.2-pgsql.patch (remove pgsql_LIBS during detection)




More information about the fedora-extras-commits mailing list