Subject: postgres patch for postfix (what am i doing wrong?)
To: None <tech-pkg@NetBSD.org>
From: Charlie Allom <charlie@rubberduck.com>
List: tech-pkg
Date: 02/15/2004 22:55:10
--Apple-Mail-9--245336783
Content-Type: multipart/mixed; boundary=Apple-Mail-8--245336790


--Apple-Mail-8--245336790
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed

What am I doing wrong here? I actually had this working some months ago 
- and then lost my patch.

[see attached]


--Apple-Mail-8--245336790
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="postfix.pgsql.patch"
Content-Disposition: attachment;
	filename=postfix.pgsql.patch

--- Makefile     2004-01-29 03:03:02.000000000 +1100                                                                                                                   +++ Makefile.new        2004-02-09 16:19:26.551384000 +1100
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.115 2004/01/23 12:03:44 martti Exp $
+# $NetBSD: Makefile,v 1.116 2004/01/28 16:03:02 martti Exp $

 DISTNAME=      postfix-2.0.18
 CATEGORIES=    mail
@@ -77,6 +77,17 @@
 BUILD_DEFS+=   POSTFIX_USE_MYSQL
 .endif

+.if defined(POSTFIX_USE_PGSQL) && ${POSTFIX_USE_PGSQL} == "YES"
+.  include "../../databases/postgresql-lib/buildlink3.mk"
+PATCHFILES+=   postfix-pg.postfix-2.0.0.2.patch
+PATCH_SITES+=  http://www.mat.cc/postfix/
+PATCH_DIST_STRIP=      -p1
+CCARGS+= -DHAS_PGSQL -I${BUILDLINK_PREFIX.postgresql-lib}/include/postgresql
+AUXLIBS+=      -L${BUILDLINK_PREFIX.postgresql-lib}/lib/libpq.a \
+               -L${RPATH_FLAG}${BUILDLINK_PREFIX.postgresql-lib}/lib
+BUILD_DEFS+=   POSTFIX_USE_PGSQL
+.endif
+
 .if defined(USE_SASL2) && ${USE_SASL2} == "YES"
 USING_SASL=YES
 .  include "../../security/cyrus-sasl2/buildlink3.mk"

--Apple-Mail-8--245336790
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed




--Apple-Mail-8--245336790
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	x-unix-mode=0644;
	name="postfix.die.txt"
Content-Disposition: attachment;
	filename=postfix.die.txt

[src/error]
gcc -DDEF_CONFIG_DIR=\"/usr/pkg/etc/postfix\" -DDEF_SENDMAIL_PATH=\"/usr/pkg/sbin/sendmail\" -DDEF_MAILQ_PATH=\"/usr/pkg/bin/mailq\" -DDEF_NEWALIAS_PATH=\"/usr/pkg/bin/newaliases\" -DDEF_COMMAND_DIR=\"/usr/pkg/sbin\" -DDEF_DAEMON_DIR=\"/usr/pkg/libexec/postfix\" -DHAS_PCRE -DHAS_PGSQL -I/usr/obj/pkgsrc/mail/postfix/work.backspace/.buildlink/include/pgsql -g -O2 -I/usr/pkg/include -I/usr/pkg/include/postgresql -I/usr/include -I. -I../../include -DNETBSD1 -c error.c
gcc -DDEF_CONFIG_DIR=\"/usr/pkg/etc/postfix\" -DDEF_SENDMAIL_PATH=\"/usr/pkg/sbin/sendmail\" -DDEF_MAILQ_PATH=\"/usr/pkg/bin/mailq\" -DDEF_NEWALIAS_PATH=\"/usr/pkg/bin/newaliases\" -DDEF_COMMAND_DIR=\"/usr/pkg/sbin\" -DDEF_DAEMON_DIR=\"/usr/pkg/libexec/postfix\" -DHAS_PCRE -DHAS_PGSQL -I/usr/obj/pkgsrc/mail/postfix/work.backspace/.buildlink/include/pgsql -g -O2 -I/usr/pkg/include -I/usr/pkg/include/postgresql -I/usr/include -I. -I../../include -DNETBSD1 -o error error.o ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a -L/usr/pkg/lib                                -Wl,-R/usr/pkg/lib              -lpcre -L/usr/obj/pkgsrc/mail/postfix/work.backspace/.buildlink/lib/libpq.a -Wl,-R/usr/obj/pkgsrc/mail/postfix/work.backspace/.buildlink/lib -lcrypt
../../lib/libutil.a(dict_pgsql.o): In function `dict_pgsql_lookup':
/usr/obj/pkgsrc/mail/postfix/work.backspace/postfix-2.0.18/src/util/dict_pgsql.c:210: undefined reference to `PQntuples'
/usr/obj/pkgsrc/mail/postfix/work.backspace/postfix-2.0.18/src/util/dict_pgsql.c:225: undefined reference to `PQnfields'
/usr/obj/pkgsrc/mail/postfix/work.backspace/postfix-2.0.18/src/util/dict_pgsql.c:229: undefined reference to `PQgetvalue'
/usr/obj/pkgsrc/mail/postfix/work.backspace/postfix-2.0.18/src/util/dict_pgsql.c:236: undefined reference to `PQclear'
/usr/obj/pkgsrc/mail/postfix/work.backspace/postfix-2.0.18/src/util/dict_pgsql.c:215: undefined reference to `PQclear'
../../lib/libutil.a(dict_pgsql.o): In function `plpgsql_query':
/usr/obj/pkgsrc/mail/postfix/work.backspace/postfix-2.0.18/src/util/dict_pgsql.c:302: undefined reference to `PQexec'
/usr/obj/pkgsrc/mail/postfix/work.backspace/postfix-2.0.18/src/util/dict_pgsql.c:303: undefined reference to `PQresultStatus'
/usr/obj/pkgsrc/mail/postfix/work.backspace/postfix-2.0.18/src/util/dict_pgsql.c:315: undefined reference to `PQerrorMessage'
../../lib/libutil.a(dict_pgsql.o): In function `plpgsql_connect_single':
/usr/obj/pkgsrc/mail/postfix/work.backspace/postfix-2.0.18/src/util/dict_pgsql.c:368: undefined reference to `PQconnectdb'
/usr/obj/pkgsrc/mail/postfix/work.backspace/postfix-2.0.18/src/util/dict_pgsql.c:370: undefined reference to `PQstatus'
/usr/obj/pkgsrc/mail/postfix/work.backspace/postfix-2.0.18/src/util/dict_pgsql.c:379: undefined reference to `PQerrorMessage'
../../lib/libutil.a(dict_pgsql.o): In function `plpgsql_down_host':
/usr/obj/pkgsrc/mail/postfix/work.backspace/postfix-2.0.18/src/util/dict_pgsql.c:398: undefined reference to `PQfinish'
../../lib/libutil.a(dict_pgsql.o): In function `plpgsql_dealloc':
/usr/obj/pkgsrc/mail/postfix/work.backspace/postfix-2.0.18/src/util/dict_pgsql.c:648: undefined reference to `PQfinish'
*** Error code 1

Stop.
make: stopped in /usr/obj/pkgsrc/mail/postfix/work.backspace/postfix-2.0.18/src/error
*** Error code 1

Stop.
make: stopped in /usr/obj/pkgsrc/mail/postfix/work.backspace/postfix-2.0.18
*** Error code 1

Stop.
make: stopped in /usr/export/pkgsrc/mail/postfix
*** Error code 1

Stop.
make: stopped in /usr/export/pkgsrc/mail/postfix
backspace#

--Apple-Mail-8--245336790
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed



   C.
-- 
  charlie@rubberduck.com - Melbourne, Australia
  http://rubberduck.com/~yeled/
  PGP: 0x14AA7941 || finger yeled@lazy.spodder.com

--Apple-Mail-8--245336790--

--Apple-Mail-9--245336783
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iD8DBQFAL14fqiZDwhSqeUERAh/gAKCvXe0FtJs9f3JNXhT31EhVpZVcZgCfWJFJ
P1Nw0DhHnzdSDHcD+f0Fkto=
=NTi7
-----END PGP SIGNATURE-----

--Apple-Mail-9--245336783--