Subject: pkg/30220: Allow databases/libpqxx to work with all versions of postgresql
To: None <,,>
From: None <>
List: pkgsrc-bugs
Date: 05/12/2005 23:39:00
>Number:         30220
>Category:       pkg
>Synopsis:       Allow databases/libpqxx to work with all versions of postgresql
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 12 23:39:00 +0000 2005
>Release:        NetBSD 1.6.1
Brook G. Milligan                      Internet:
Department of Biology
New Mexico State University            Telephone:  (505) 646-7980
Las Cruces, New Mexico  88003  U.S.A.  FAX:        (505) 646-5665
System: NetBSD 1.6.1 NetBSD 1.6.1 (VIOLA) #0: Thu Dec 2 22:13:05 MST 2004 i386
Architecture: i386
Machine: i386
Currently databases/libpqxx has a hack in the Makefile restricting it
to postgresql v7.3.  This is because of some inconsistencies in the
installation of header files among postgresql versions.  Part of the
problem has to do with incomplete files in the
postgresql libraries (see pkg/30219).  The other part of the problem
has to do with setting the appropriate configure arguments for libpqxx.
Try to install databases/libpqxx with a version of postgresql other
than v7.3.  Even with fixes as in pkg/30219 the configuration will
fail because it is looking for the header files in the wrong directory.
Apply the following patch so that the appropriate configure arguments
reflect the version of postgresql.

--- Makefile.orig	Thu May 12 17:33:05 2005
+++ Makefile	Thu May 12 17:32:01 2005
@@ -13,14 +13,17 @@
+.include "../../mk/"
 CONFIGURE_ARGS+=	--with-postgres-lib=${PGSQL_PREFIX}/lib
+.if ${_PGSQL_VERSION} == "73"
 CONFIGURE_ARGS+=	--with-postgres-include=${PGSQL_PREFIX}/include/postgresql
+CONFIGURE_ARGS+=	--with-postgres-include=${PGSQL_PREFIX}/include
 # Avoid an ICE in gcc2 on sparc64
-.include "../../mk/"
 .include "../../mk/"