summaryrefslogtreecommitdiff
path: root/databases/postgresql80
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2005-08-05 19:43:44 +0000
committerjlam <jlam@pkgsrc.org>2005-08-05 19:43:44 +0000
commitc27abb4a8785cf89fd3289f873d59c595986351e (patch)
tree63eec019bfb4aeb95776bd987fe6d34dc836ea8c /databases/postgresql80
parentded486c7474bcd1420d1a30ec5e8d7de2152e5d4 (diff)
downloadpkgsrc-c27abb4a8785cf89fd3289f873d59c595986351e.tar.gz
Several changes to the postgresql80-* packages:
* Become maintainer for the postgresql80-* packages (ok'd by recht) * Libtoolize postgresql80 build so that the shared libraries and loadable shared modules are built using libtool. This should make PostgreSQL 8.0.x in pkgsrc build correctly on more pkgsrc-supported platforms. This is accomplished with the Makefile.libtool file which replaces the Makefile.shlib file in the PostgreSQL distribution. * Add libltdl modifications from the postgresql74-* packages so that this can work on Interix (untested). * Fix some mismatches between static function declarations and their subsesquent definitions in the src/timezone module. Fixes provided by Georg Schwarz. * Convert PGSQL_USE_HIER into the PKG_OPTION "pgsql-hier-query", and teach both postgresql80-client and postgresql80-server to use it. * Use BUILDLINK_TRANSFORM's "rm" action to remove unwanted compiler flags. * Remove zlib/buildlink3.mk from postgresql80-client/buildlink3.mk as zlib is only used by the pg_dump client. * Convert some files in files/* into patches that can be fed back to the PostgreSQL team. * Install data and documentation files into share/postgresql instead of share/postgresql80 -- it's only possible to install one PostgreSQL version at a time in pkgsrc, and the new paths more closely match the rest of the installation paths. * Add more mirrors to the MASTER_SITES list, and add a new variable POSTGRESQL_MIRRORS_SORT that has the same syntax as MASTER_SORT that can help people pick a nearby mirror. * Nuke references to libpgtcl which is no longer distributed as part of a standard PostgreSQL installation as of version 8.0. * Provide better documentation for Makefile.custom. * Avoid linking in the pthread library in the correct way on NetBSD by setting DLOPEN_REQUIRE_PTHREADS=no. Also, provide better documentation on why we can't enable thread-safety in the PostgreSQL libraries on NetBSD (at least for now). * Preliminary support for installing postgresql80-* into a separate subdirectory under ${LOCALBASE} so possibly allow for multiple installations of PostgreSQL on the same machine. Note that THIS DOES NOT WORK YET. * Update the hierarchical-queries patch to "8.0.3-0.5.5" which fixes a bug which was crashing the backend when PRIOR was used in the target list. The _level_ column is no longer automatically added to target list. This makes it possible to use hierarchical queries as IN subqueries. To get _level_ back you just have to explicitly mention it in target list. Bump the following PKGREVISIONs: postgresql80-client -> 2 postgresql80-server -> 2 postgresql80 -> 1
Diffstat (limited to 'databases/postgresql80')
-rw-r--r--databases/postgresql80/Makefile7
-rw-r--r--databases/postgresql80/Makefile.common113
-rw-r--r--databases/postgresql80/Makefile.mirrors101
-rw-r--r--databases/postgresql80/distinfo19
-rw-r--r--databases/postgresql80/files/GNUmakefile.libpgtcl20
-rw-r--r--databases/postgresql80/files/Makefile.custom38
-rw-r--r--databases/postgresql80/files/Makefile.libtool120
-rw-r--r--databases/postgresql80/files/dynloader-ltdl.h17
-rw-r--r--databases/postgresql80/files/netbsd.c73
-rw-r--r--databases/postgresql80/files/netbsd.h45
-rw-r--r--databases/postgresql80/options.mk26
-rw-r--r--databases/postgresql80/patches/patch-aa44
-rw-r--r--databases/postgresql80/patches/patch-ab87
-rw-r--r--databases/postgresql80/patches/patch-ac45
-rw-r--r--databases/postgresql80/patches/patch-ad9
-rw-r--r--databases/postgresql80/patches/patch-ae7
-rw-r--r--databases/postgresql80/patches/patch-af31
-rw-r--r--databases/postgresql80/patches/patch-ag15
-rw-r--r--databases/postgresql80/patches/patch-ah13
-rw-r--r--databases/postgresql80/patches/patch-ai80
20 files changed, 670 insertions, 240 deletions
diff --git a/databases/postgresql80/Makefile b/databases/postgresql80/Makefile
index cdf3a44eb48..17df7b1652c 100644
--- a/databases/postgresql80/Makefile
+++ b/databases/postgresql80/Makefile
@@ -1,10 +1,11 @@
-# $NetBSD: Makefile,v 1.4 2005/07/02 14:31:11 rillig Exp $
+# $NetBSD: Makefile,v 1.5 2005/08/05 19:43:44 jlam Exp $
PKGNAME= postgresql80-${BASE_VERS}
+PKGREVISION= 1
COMMENT= Robust, next generation, object-relational DBMS
-DEPENDS+= postgresql80-client>=${BASE_VERS}:../../databases/postgresql80-client
-DEPENDS+= postgresql80-server>=${BASE_VERS}:../../databases/postgresql80-server
+DEPENDS+= postgresql80-client>=${BASE_VERS}nb2:../../databases/postgresql80-client
+DEPENDS+= postgresql80-server>=${BASE_VERS}nb2:../../databases/postgresql80-server
.include "Makefile.common"
diff --git a/databases/postgresql80/Makefile.common b/databases/postgresql80/Makefile.common
index e560b7e71e6..9dadcd10996 100644
--- a/databases/postgresql80/Makefile.common
+++ b/databases/postgresql80/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.5 2005/05/22 20:07:46 jlam Exp $
+# $NetBSD: Makefile.common,v 1.6 2005/08/05 19:43:44 jlam Exp $
#
# This Makefile fragment is included by all PostgreSQL packages built from
# the main sources of the PostgreSQL distribution except jdbc-postgresql.
@@ -9,22 +9,17 @@
# <lang>-postgresql client-side interface to PostgreSQL
# postgresql-<lang> server-side module for PostgreSQL backend
-DISTNAME?= postgresql-${DIST_VERS}
-CATEGORIES+= databases
-MASTER_SITES?= \
- ftp://ftp.de.postgresql.org/mirror/postgresql/source/v${DIST_VERS}/ \
- ftp://gd.tuwien.ac.at/db/www.postgresql.org/pub/source/v${DIST_VERS}/ \
- ftp://ftp.sunsite.auc.dk/mirrors/postgresql/source/v${DIST_VERS}/ \
- ftp://ftp.jaist.ac.jp/pub/dbms/postgres95/source/v${DIST_VERS}/ \
- http://www.postgresql.org/ftpsite/source/v${DIST_VERS}/ \
- ftp://ftp.postgresql.org/pub/source/v${DIST_VERS}/
+.include "../postgresql80/Makefile.mirrors"
-EXTRACT_SUFX= .tar.bz2
+DISTNAME?= postgresql-${DIST_VERS}
+CATEGORIES+= databases
+MASTER_SITES?= ${POSTGRESQL_MIRRORS:=source/v${DIST_VERS}/}
+EXTRACT_SUFX= .tar.bz2
-MAINTAINER?= recht@NetBSD.org
-HOMEPAGE?= http://www.postgresql.org/
+MAINTAINER?= jlam@NetBSD.org
+HOMEPAGE?= http://www.postgresql.org/
-CONFLICTS+= postgresql-[0-9]* postgresql73-* postgresql74-*
+CONFLICTS+= postgresql-[0-9]* postgresql73-* postgresql74-*
DISTINFO_FILE?= ${.CURDIR}/../postgresql80/distinfo
COMMON_FILESDIR?= ${.CURDIR}/../postgresql80/files
@@ -36,10 +31,11 @@ PATCHDIR?= ${.CURDIR}/../postgresql80/patches
# BASE_VERS pkgsrc-mangled version number (convert pl -> .)
#
# Note: Do not forget jdbc-postgresql when updating version
+#
DIST_VERS?= 8.0.3
BASE_VERS?= ${DIST_VERS}
-BUILDLINK_DEPENDS.postgresql80-client?= postgresql80-client>=${BASE_VERS}
+BUILDLINK_DEPENDS.postgresql80-client+= postgresql80-client>=${BASE_VERS}
GNU_CONFIGURE= yes
BUILD_USES_MSGFMT= yes
@@ -48,71 +44,94 @@ PKG_SYSCONFSUBDIR= postgresql
# in 7.4.x/8.0.x, this is done by autoconf stuff which has leading whitespace
USE_PKGLOCALEDIR= yes
-SUBST_CLASSES+= pkglocaledir2
-SUBST_FILES.pkglocaledir2= configure config/programs.m4
-SUBST_STAGE.pkglocaledir2= pre-configure
-SUBST_SED.pkglocaledir2= -e 's|\( localedir[ :]*=\).*|\1${_PKGLOCALEDIR}|'
+SUBST_CLASSES+= pglocale
+SUBST_FILES.pglocale= configure config/programs.m4
+SUBST_STAGE.pglocale= pre-configure
+SUBST_SED.pglocale= -e 's|\( localedir[ :]*=\).*|\1${PG_LOCALE_DIR}|'
.include "../../mk/bsd.prefs.mk"
-# Add support for hierarchical queries with Oracle like CONNECT BY syntax.
-# see http://gppl.moonbone.ru/README.html for details.
-.if defined(PGSQL_USE_HIER) && !empty(PGSQL_USE_HIER:M[yY][eE][sS])
-PATCH_SITES= http://gppl.moonbone.ru/
-PATCHFILES= hier-Pg8.0.1-0.5.4.diff.gz
-PATCH_DIST_STRIP= -p1
+PGSQL_TEMPLATE.SunOS= solaris
+PGSQL_TEMPLATE.IRIX= irix5
+.if !defined(PGSQL_TEMPLATE.${OPSYS})
+PGSQL_TEMPLATE.${OPSYS}= ${LOWER_OPSYS}
.endif
-BUILD_DEFS+= PGSQL_USE_HIER
-PG_DIR= ${PREFIX}
-GNU_CONFIGURE_PREFIX= ${PG_DIR}
-INSTALLATION_DIRS+= ${PG_DIR}
-PG_DATA_DIR= ${PREFIX}/share/postgresql80
-PG_DOC_DIR= ${PREFIX}/share/doc/postgresql80
+PG_SUBPREFIX= # empty
+.if empty(PG_SUBPREFIX)
+PG_PREFIX= ${PREFIX}
+PLIST_SUBST+= PG_SUBPREFIX=
+.else
+PG_PREFIX= ${PREFIX}/${PG_SUBPREFIX}
+BUILD_DEFS+= PG_SUBPREFIX
+PLIST_SUBST+= PG_SUBPREFIX=${PG_SUBPREFIX}/
+BUILDLINK_PASSTHRU_DIRS+= ${PG_PREFIX}
+.endif
+PG_DATA_DIR= ${PG_PREFIX}/share/postgresql
+PG_DOC_DIR= ${PG_PREFIX}/share/doc/postgresql
+PG_LOCALE_DIR= ${PG_PREFIX}/${PKGLOCALEDIR}/locale
+PG_ETC_DIR= ${PKG_SYSCONFDIR:S/^${PREFIX}\//${PG_PREFIX}\//}
-#CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
+GNU_CONFIGURE_PREFIX= ${PG_PREFIX}
+CONFIGURE_ARGS+= --sysconfdir=${PG_ETC_DIR}
CONFIGURE_ARGS+= --datadir=${PG_DATA_DIR}
CONFIGURE_ARGS+= --with-docdir=${PG_DOC_DIR}
+CONFIGURE_ARGS+= --with-template=${PGSQL_TEMPLATE.${OPSYS}}
CONFIGURE_ARGS+= --without-readline
-CONFIGURE_ARGS+= --with-zlib
-CONFIGURE_ARGS+= --with-openssl
+CONFIGURE_ARGS+= --without-zlib
CONFIGURE_ARGS+= --enable-nls
CONFIGURE_ARGS+= --without-java
CONFIGURE_ARGS+= --without-perl
CONFIGURE_ARGS+= --without-python
CONFIGURE_ARGS+= --without-tcl
-CONFIGURE_ARGS+= --without-tk
-# enable Rendezvous (recommended on Mac OS X)
+# Enable Rendezvous on Mac OS X
.if ${OPSYS} == "Darwin"
CONFIGURE_ARGS+= --with-rendezvous
.endif
# PostgreSQL explicitly forbids any use of -ffast-math
-CFLAGS:= ${CFLAGS:S/-ffast-math//}
+BUILDLINK_TRANSFORM+= rm:-ffast-math
+
+# USE_LIBLTDL is "yes" or "no" depending on whether we're using libltdl
+# to provide "dlopen" functionality for the PostgreSQL backend.
+#
+.if ${OPSYS} == "Interix"
+USE_LIBLTDL?= yes
+.endif
+USE_LIBLTDL?= no
+
+FILES_SUBST+= PG_PREFIX=${PG_PREFIX:Q}
+
+.include "../../devel/gettext-lib/buildlink3.mk"
post-extract:
- if [ -d ${WRKSRC}/src ]; then \
+ if ${TEST} -d ${WRKSRC}/src; then \
${RM} -f ${WRKSRC}/src/Makefile.custom; \
${CP} -f ${COMMON_FILESDIR}/Makefile.custom \
${WRKSRC}/src/Makefile.custom; \
+ ${RM} -f ${WRKSRC}/src/Makefile.shlib; \
+ ${CP} -f ${COMMON_FILESDIR}/Makefile.libtool \
+ ${WRKSRC}/src/Makefile.shlib; \
fi
- if [ -d ${WRKSRC}/src/interfaces/libpq ]; then \
+ if ${TEST} -d ${WRKSRC}/src/interfaces/libpq; then \
${RM} -f ${WRKSRC}/src/interfaces/libpq/GNUmakefile; \
${CP} -f ${COMMON_FILESDIR}/GNUmakefile.libpq \
${WRKSRC}/src/interfaces/libpq/GNUmakefile; \
fi
- if [ -d ${WRKSRC}/src/interfaces/libpgtcl ]; then \
+ if ${TEST} -d ${WRKSRC}/src/interfaces/libpgtcl; then \
${RM} -f ${WRKSRC}/src/interfaces/libpgtcl/GNUmakefile; \
${CP} -f ${COMMON_FILESDIR}/GNUmakefile.libpgtcl \
${WRKSRC}/src/interfaces/libpgtcl/GNUmakefile; \
fi
- if [ -d ${WRKSRC}/src/backend/port/dynloader ]; then \
- ${RM} -f ${WRKSRC}/src/backend/port/dynloader/netbsd.[ch];\
- ${CP} -f ${COMMON_FILESDIR}/netbsd.[ch] \
- ${WRKSRC}/src/backend/port/dynloader/; \
+.if !empty(USE_LIBLTDL:M[yY][eE][sS])
+ if ${TEST} -d ${WRKSRC}/src/backend/port/dynloader; then \
+ template=${PGSQL_TEMPLATE.${OPSYS}:Q}; \
+ ${RM} -f ${WRKSRC}/src/backend/port/dynloader/$$template.[ch]; \
+ ${CP} -f ${COMMON_FILESDIR}/dynloader-ltdl.h \
+ ${WRKSRC}/src/backend/port/dynloader/$$template.h; \
+ ${ECHO} "static int dummy = 0;" \
+ >${WRKSRC}/src/backend/port/dynloader/$$template.c
fi
-
-.include "../../devel/gettext-lib/buildlink3.mk"
-.include "../../devel/zlib/buildlink3.mk"
+.endif
diff --git a/databases/postgresql80/Makefile.mirrors b/databases/postgresql80/Makefile.mirrors
new file mode 100644
index 00000000000..c8b0a336a5c
--- /dev/null
+++ b/databases/postgresql80/Makefile.mirrors
@@ -0,0 +1,101 @@
+# $NetBSD: Makefile.mirrors,v 1.1 2005/08/05 19:43:45 jlam Exp $
+#
+# This Makefile fragment contains the mirror sites for fetching PostgreSQL.
+#
+# To fetch from the nearest mirror, you may need to set
+# POSTGRESQL_MIRRORS_SORT appropriately, e.g.:
+#
+# POSTGRESQL_MIRRORS_SORT= .at .de
+#
+
+###
+### This list was last updated on 20050801.
+###
+POSTGRESQL_MIRRORS= \
+ ftp://ftp.au.postgresql.org/pub/postgresql/ \
+ ftp://ftp2.au.postgresql.org/pub/postgresql/ \
+ ftp://ftp.at.postgresql.org/db/www.postgresql.org/pub/ \
+ ftp://ftp.be.postgresql.org/postgresql/ \
+ ftp://ftp.ba.postgresql.org/pub/postgresql/ \
+ ftp://ftp.br.postgresql.org/pub/PostgreSQL/ \
+ ftp://ftp3.bg.postgresql.org/postgresql/ \
+ ftp://ftp3.ca.postgresql.org/pub/ \
+ ftp://ftp4.ca.postgresql.org/pub/postgresql/ \
+ ftp://ftp.cl.postgresql.org/ftp/pub/postgresql/ \
+ ftp://ftp.cn.postgresql.org/ftp.postgresql.org/ \
+ ftp://ftp.co.postgresql.org/pub/mirrors/postgresql/ \
+ ftp://ftp2.cr.postgresql.org/pub/Unix/postgres/ \
+ ftp://ftp.hr.postgresql.org/postgresql/ \
+ ftp://ftp.cz.postgresql.org/pub/ftp.postgresql.org/ \
+ ftp://ftp2.cz.postgresql.org/pub/postgresql/ \
+ ftp://ftp.dk.postgresql.org/postgresql/ \
+ ftp://ftp.ee.postgresql.org/mirrors/postgresql/ \
+ ftp://ftp.fr.postgresql.org/ \
+ ftp://ftp2.fr.postgresql.org/postgresql/ \
+ ftp://ftp3.fr.postgresql.org/pub/postgresql/ \
+ ftp://ftp.de.postgresql.org/mirror/postgresql/ \
+ ftp://ftp2.de.postgresql.org/pub/postgresql/ \
+ ftp://ftp3.de.postgresql.org/pub/Mirrors/ftp.postgresql.org/ \
+ ftp://ftp7.de.postgresql.org/pub/ftp.postgresql.org/ \
+ ftp://ftp8.de.postgresql.org/pub/misc/pgsql/ \
+ ftp://ftp.gr.postgresql.org/pub/databases/postgresql/ \
+ ftp://ftp2.gr.postgresql.org/pub/databases/postgresql/ \
+ ftp://ftp.hk.postgresql.org/postgresql/ \
+ ftp://ftp3.hu.postgresql.org/pub/postgresql/ \
+ ftp://ftp7.id.postgresql.org/pub/postgresql/ \
+ ftp://ftp8.id.postgresql.org/pub/PostgreSQL/ \
+ ftp://ftp.ie.postgresql.org/mirrors/ftp.postgresql.org/pub/ \
+ ftp://ftp2.ie.postgresql.org/mirrors/ftp.postgresql.org/ \
+ ftp://ftp.il.postgresql.org/ftp.postgresql.org/ \
+ ftp://ftp2.it.postgresql.org/mirrors/postgres/ \
+ ftp://ftp6.it.postgresql.org/pub/PostgreSQL/ \
+ ftp://ftp7.it.postgresql.org/pub/unix/postgres/ \
+ ftp://ftp.jp.postgresql.org/ \
+ ftp://ftp2.jp.postgresql.org/pub/postgresql/ \
+ ftp://ftp.kr.postgresql.org/postgresql/ \
+ ftp://ftp.lv.postgresql.org/pub/software/postgresql/ \
+ ftp://ftp.eu.postgresql.org/pub/unix/db/postgresql/ \
+ ftp://ftp.nl.postgresql.org:21/pub/mirror/postgresql/ \
+ ftp://ftp2.nl.postgresql.org/mirror/postgresql/ \
+ ftp://ftp4.nl.postgresql.org/postgresql.zeelandnet.nl/ \
+ ftp://ftp.nz.postgresql.org/postgresql/ \
+ ftp://ftp.no.postgresql.org/pub/databases/postgresql/ \
+ ftp://ftp6.pl.postgresql.org/pub/postgresql/ \
+ ftp://ftp7.pl.postgresql.org/pub/mirror/ftp.postgresql.org/ \
+ ftp://ftp8.pl.postgresql.org/pub/postgresql/ \
+ ftp://ftp.pt.postgresql.org/postgresql/ \
+ ftp://ftp.pr.postgresql.org/pub/Mirrors/postgresql/ \
+ ftp://ftp6.ro.postgresql.org/pub/mirrors/ftp.postgresql.org/ \
+ ftp://ftp.ru.postgresql.org/pub/mirrors/pgsql/ \
+ ftp://ftp2.ru.postgresql.org/pub/databases/postgresql/ \
+ ftp://ftp3.ru.postgresql.org/pub/mirror/postgresql/pub/ \
+ ftp://ftp7.ru.postgresql.org/pub/mirror/postgresql/ \
+ ftp://ftp2.sk.postgresql.org/pub/postgresql/ \
+ ftp://ftp5.es.postgresql.org/mirror/postgresql/ \
+ ftp://ftp.se.postgresql.org/pub/databases/relational/postgresql/ \
+ ftp://ftp2.ch.postgresql.org/pub/postgresql/ \
+ ftp://ftp.tw.postgresql.org/pub/postgresql/ \
+ ftp://ftp3.tw.postgresql.org/pub/Unix/Database/postgresql/ \
+ ftp://ftp5.tw.postgresql.org/pub/Unix/Database/PostgreSQL/ \
+ ftp://ftp6.tr.postgresql.org/postgresql/ \
+ ftp://ftp2.uk.postgresql.org/sites/ftp.postgresql.org/ \
+ ftp://ftp4.uk.postgresql.org/sites/ftp.postgresql.org/ \
+ ftp://ftp8.uk.postgresql.org/sites/ftp.postgresql.org/ \
+ ftp://ftp.us.postgresql.org/pub/mirrors/postgresql/ \
+ ftp://ftp3.us.postgresql.org/pub/postgresql/ \
+ ftp://ftp5.us.postgresql.org/pub/PostgreSQL/ \
+ ftp://ftp8.us.postgresql.org/postgresql/ \
+ ftp://ftp9.us.postgresql.org/pub/mirrors/postgresql/ \
+ ftp://ftp10.us.postgresql.org/pub/postgresql/ \
+ ftp://ftp22.us.postgresql.org/mirrors/ftp.postgresql.org/ \
+ ftp://ftp24.us.postgresql.org/postgresql/
+
+# Default to fetching from a .us mirror for the sake of the main NetBSD
+# ftp server.
+#
+POSTGRESQL_MIRRORS_SORT?= .us
+
+# Craft a MASTER_SORT_REGEX that understands the location of the country
+# code in the FTP server name for the PostgreSQL mirror sites.
+#
+MASTER_SORT_REGEX+= ${POSTGRESQL_MIRRORS_SORT:S/./\\./g:C/.*/:\/\/[^[\/]*&\/ :\/\/[^\/]*&\\./}
diff --git a/databases/postgresql80/distinfo b/databases/postgresql80/distinfo
index 5965fbf6db8..d93a774a404 100644
--- a/databases/postgresql80/distinfo
+++ b/databases/postgresql80/distinfo
@@ -1,10 +1,17 @@
-$NetBSD: distinfo,v 1.6 2005/07/05 09:45:25 grant Exp $
+$NetBSD: distinfo,v 1.7 2005/08/05 19:43:45 jlam Exp $
SHA1 (postgresql-8.0.3.tar.bz2) = 45f9a739e414e617d1e5f43779046546ee1a0d3a
RMD160 (postgresql-8.0.3.tar.bz2) = 62e6a28c0041a3f0d456efe1e985f03778e4bdfa
Size (postgresql-8.0.3.tar.bz2) = 11069624 bytes
-SHA1 (hier-Pg8.0.1-0.5.4.diff.gz) = c1a1141363c1d3c14025d97993b5367166c85da4
-RMD160 (hier-Pg8.0.1-0.5.4.diff.gz) = f212f840d06a914fd668398848baef5a269875eb
-Size (hier-Pg8.0.1-0.5.4.diff.gz) = 30662 bytes
-SHA1 (patch-aa) = cb718b62a0559b41421176801c015ae9d21230b6
-SHA1 (patch-ab) = 02586d2016a96f1b6fd28d4c0b7619765d54c55d
+SHA1 (hier-Pg8.0.3-0.5.5.diff.gz) = d054398f7d9c899dbeb033168ed84f4edbed0f1e
+RMD160 (hier-Pg8.0.3-0.5.5.diff.gz) = d43083bf10e58941fe546e38f6b453fe28d98721
+Size (hier-Pg8.0.3-0.5.5.diff.gz) = 30555 bytes
+SHA1 (patch-aa) = d681a5b2bb4dfce4e3db1490b97fed1b99ff445f
+SHA1 (patch-ab) = 1a80710d13723f2c8130d8235bb40c43af9d9ccd
+SHA1 (patch-ac) = 092d96fe2baafe8eef731b45a85d33fc40584044
+SHA1 (patch-ad) = 85d198dad09de6c11799ca88e8d6749db78eaca8
+SHA1 (patch-ae) = 41cfd6912343a304e2f84757fbf3ee5d632e78a3
+SHA1 (patch-af) = ebe7996d07b17d39b9853fc8ad6978edd5acfab4
+SHA1 (patch-ag) = 6a7b3eab5a5f2911d75a32ad8f47570a7d6414e8
+SHA1 (patch-ah) = 840c5e4f76317314b0f37c346076eb48c26541f9
+SHA1 (patch-ai) = d480379c41b73da6eaa7914a557292d4124c8bbf
diff --git a/databases/postgresql80/files/GNUmakefile.libpgtcl b/databases/postgresql80/files/GNUmakefile.libpgtcl
deleted file mode 100644
index b1ea47d2775..00000000000
--- a/databases/postgresql80/files/GNUmakefile.libpgtcl
+++ /dev/null
@@ -1,20 +0,0 @@
-# $NetBSD: GNUmakefile.libpgtcl,v 1.1.1.1 2005/02/06 12:32:05 jdolecek Exp $
-#
-# This GNUmakefile overrides the `all' target of $(libpgtcl_srcdir)/Makefile
-# to be empty if INSTALLED_LIBPGTCL is defined. This handles the submake
-# targets sprinkled throughout the PostgreSQL Makefiles that execute
-#
-# @$(MAKE) -C $(libpgtcl_builddir) all
-#
-# to ensure that the libpgtcl libraries are built first. If INSTALLED_LIBPGTCL
-# is defined, then have the `all' target simple return success.
-
-ifdef INSTALLED_LIBPGTCL
-all:
- @test -f libpgtcl.a || touch libpgtcl.a
-endif
-
-%: force
- @$(MAKE) -f Makefile $@
-
-force: ;
diff --git a/databases/postgresql80/files/Makefile.custom b/databases/postgresql80/files/Makefile.custom
index 2c27efbc3a4..f6aca95b6b6 100644
--- a/databases/postgresql80/files/Makefile.custom
+++ b/databases/postgresql80/files/Makefile.custom
@@ -1,15 +1,39 @@
-# $NetBSD: Makefile.custom,v 1.1.1.1 2005/02/06 12:32:05 jdolecek Exp $
+# $NetBSD: Makefile.custom,v 1.2 2005/08/05 19:43:45 jlam Exp $
#
-# This file is included by Makefile.global, which is included by every
-# sub-Makefile in the build tree. Makefiles for shared libraries include
-# Makefile.global then Makefile.shlib.
+# This file is included at the end of Makefile.global, which is included
+# by every sub-Makefile in the build tree. Makefiles for shared
+# libraries include Makefile.global then Makefile.shlib.
+#
+
+# Override any OS-specific locations for where to put SQL man pages.
+sqlmansect = 7
-pkglibdir = $(exec_prefix)/lib/postgresql
+# Override installation paths to avoid logic in Makefile.global.
+includedir = $(prefix)/include
+libdir = $(exec_prefix)/lib
+pkglibdir = $(libdir)/postgresql
+pkgincludedir = $(includedir)/postgresql
+# INSTALLED_LIBPQ is passed in from the environment and tells the build
+# system how to link to an installed libpq.*.
+#
ifdef INSTALLED_LIBPQ
libpq = -lpq
+else
+ifdef LIBTOOL
+libpq = -L$(libpq_builddir)/.libs -lpq
endif
+endif
+
+# In pkgsrc, libpython is always present as a shared library.
+shared_libpython = yes
-ifdef INSTALLED_LIBPGTCL
-libpgtcl = -lpgtcl
+# $(libpq_builddir)/libpq.a is used in several places as a dependency,
+# but if we're building with libtool, then we don't actually want to
+# create that file since it will mess up the re-linking process.
+# Declare it to be phony to prevent GNU make from thinking it's a
+# target.
+#
+ifdef LIBTOOL
+.PHONY: $(libpq_builddir)/libpq.a
endif
diff --git a/databases/postgresql80/files/Makefile.libtool b/databases/postgresql80/files/Makefile.libtool
new file mode 100644
index 00000000000..64b98479d85
--- /dev/null
+++ b/databases/postgresql80/files/Makefile.libtool
@@ -0,0 +1,120 @@
+#-------------------------------------------------------------------------
+#
+# Makefile.libtool
+# Common rules for buildling libtool archives
+#
+# IDENTIFICATION
+# $NetBSD: Makefile.libtool,v 1.1 2005/08/05 19:43:45 jlam Exp $
+#
+#-------------------------------------------------------------------------
+
+##
+## Hacks/workarounds for makefiles in certain directories
+##
+
+# The following directories are building loadable shared modules, not
+# shared libraries.
+#
+ifneq (,$(findstring src/backend/utils/mb/conversion_procs/,$(subdir)))
+shmodule = yes
+else
+ifneq (,$(findstring src/pl/,$(subdir)))
+shmodule = yes
+else
+shmodule = no
+endif
+endif
+
+# Fix dependencies in some makefiles that assume the target matches
+# %.o so that when built for libtool, the target matches the corresponding
+# %.lo.
+#
+ifeq ($(subdir), src/interfaces/ecpg/ecpglib)
+path.lo: path.c $(top_builddir)/src/port/pg_config_paths.h
+endif
+
+ifeq ($(subdir), src/interfaces/libpq)
+fe-connect.lo: fe-connect.c $(top_builddir)/src/port/pg_config_paths.h
+endif
+
+ifeq ($(subdir), src/pl/plpgsql/src)
+pl_gram.lo pl_handler.lo pl_comp.lo pl_exec.lo pl_funcs.lo: plpgsql.h $(srcdir)/pl.tab.h
+pl_gram.lo: $(srcdir)/pl_scan.c
+endif
+
+
+##
+## VARIABLE DEFINITIONS
+##
+
+# Loadable shared modules are named differently from shared libraries
+# and are installed into $(pkglibdir).
+#
+ifeq ($(shmodule),yes)
+ltlib = $(NAME)$(DLSUFFIX)
+ltmodule = -module
+rpathdir = $(pkglibdir)
+else
+ltlib = lib$(NAME)$(DLSUFFIX)
+ltmodule =
+endif
+
+DLSUFFIX = .la
+
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(CPPFLAGS)
+LTLINK = $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(ltmodule) -rpath $(rpathdir) -version-info $(SO_MAJOR_VERSION):$(SO_MINOR_VERSION)
+LTOBJS = $(OBJS:%.o=%.lo)
+
+# Define INSTALL_SHLIB and shlib for the benefit of Makefiles for
+# loadable modules that have their own target for installing the
+# module.
+#
+INSTALL_LTLIB = $(LIBTOOL) --mode=install $(INSTALL)
+INSTALL_STLIB = $(INSTALL_LTLIB)
+INSTALL_SHLIB = $(INSTALL_LTLIB)
+shlib = $(ltlib)
+
+%.lo : %.c
+ $(LTCOMPILE) -c $< -o $@
+
+
+##
+## BUILD
+##
+
+.PHONY: all-lib all-static-lib all-shared-lib all-la-lib
+all-lib all-static-lib all-shared-lib: all-la-lib
+
+all-la-lib: $(ltlib)
+
+$(ltlib): $(LTOBJS)
+ $(LTLINK) -o $@ $(LTOBJS) $(SHLIB_LINK)
+
+
+##
+## INSTALL
+##
+
+.PHONY: install-lib install-lib-static install-lib-shared install-lib-la
+install-lib install-static-lib install-shared-lib: install-lib-la
+
+install-lib-la: $(ltlib)
+ $(INSTALL_LTLIB) $< $(DESTDIR)$(libdir)/$(ltlib)
+
+
+##
+## UNINSTALL
+##
+
+.PHONY: uninstall-lib
+uninstall-lib:
+ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$(ltlib)
+
+
+##
+## CLEAN
+##
+
+.PHONY: clean-lib
+clean-lib:
+ $(LIBTOOL) --mode=clean rm -f $(ltlib) $(LTOBJS)
diff --git a/databases/postgresql80/files/dynloader-ltdl.h b/databases/postgresql80/files/dynloader-ltdl.h
new file mode 100644
index 00000000000..d99d0ff4897
--- /dev/null
+++ b/databases/postgresql80/files/dynloader-ltdl.h
@@ -0,0 +1,17 @@
+/* $NetBSD: dynloader-ltdl.h,v 1.1 2005/08/05 19:43:45 jlam Exp $ */
+
+/*
+ * dynamic loader based on libltdl
+ */
+#ifndef PORT_PROTOS_H
+#define PORT_PROTOS_H
+
+#include <ltdl.h>
+#include "utils/dynamic_loader.h"
+
+#define pg_dlopen(a) ((void *)lt_dlopen(a))
+#define pg_dlsym(a,b) lt_dlsym((lt_dlhandle)(a), (b))
+#define pg_dlclose(a) lt_dlclose((lt_dlhandle)(a))
+#define pg_dlerror lt_dlerror
+
+#endif /* PORT_PROTOS_H */
diff --git a/databases/postgresql80/files/netbsd.c b/databases/postgresql80/files/netbsd.c
deleted file mode 100644
index d2ef8e70699..00000000000
--- a/databases/postgresql80/files/netbsd.c
+++ /dev/null
@@ -1,73 +0,0 @@
-/*-
- * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
- * Portions Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)dl.c 5.4 (Berkeley) 2/23/91";
-#endif /* LIBC_SCCS and not lint */
-
-#include "postgres.h"
-
-#include <nlist.h>
-#include <link.h>
-#include <dlfcn.h>
-
-#include "dynloader.h"
-
-#ifndef HAVE_DLOPEN
-
-char *
-pg_dlerror(void)
-{
- return "dynaloader unsupported";
-}
-
-void *
-pg_dlopen(const char *file, int num)
-{
- elog(ERROR, "dynamic load not supported");
- return NULL;
-}
-
-void *
-pg_dlsym(void *handle, const char *name)
-{
- return NULL;
-}
-
-void
-pg_dlclose(void *handle)
-{
-}
-
-#endif /* ! HAVE_DLOPEN */
diff --git a/databases/postgresql80/files/netbsd.h b/databases/postgresql80/files/netbsd.h
deleted file mode 100644
index b9ac224d9e5..00000000000
--- a/databases/postgresql80/files/netbsd.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * netbsd.h
- * port-specific prototypes for NetBSD
- *
- *
- * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * $Id: netbsd.h,v 1.1.1.1 2005/02/06 12:32:05 jdolecek Exp $
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PORT_PROTOS_H
-#define PORT_PROTOS_H
-
-#include <sys/types.h>
-#include <nlist.h>
-#include <link.h>
-#include <dlfcn.h>
-
-#include "utils/dynamic_loader.h"
-
-#ifdef HAVE_DLOPEN
-/*
- * In some older systems, the RTLD_NOW flag isn't defined and the mode
- * argument to dlopen must always be 1. The RTLD_GLOBAL flag is wanted
- * if available, but it doesn't exist everywhere.
- * If it doesn't exist, set it to 0 so it has no effect.
- */
-#ifndef RTLD_NOW
-#define RTLD_NOW 1
-#endif
-#ifndef RTLD_GLOBAL
-#define RTLD_GLOBAL 0
-#endif
-
-#define pg_dlopen(f) dlopen((f), RTLD_NOW | RTLD_GLOBAL)
-#define pg_dlsym dlsym
-#define pg_dlclose dlclose
-#define pg_dlerror dlerror
-
-#endif /* HAVE_DLOPEN */
-
-#endif /* PORT_PROTOS_H */
diff --git a/databases/postgresql80/options.mk b/databases/postgresql80/options.mk
new file mode 100644
index 00000000000..c4cbb5518f7
--- /dev/null
+++ b/databases/postgresql80/options.mk
@@ -0,0 +1,26 @@
+# $NetBSD: options.mk,v 1.1 2005/08/05 19:43:45 jlam Exp $
+
+PKG_SUPPORTED_OPTIONS+= pgsql-hier-query
+PKG_OPTIONS_LEGACY_VARS+= PGSQL_USE_HIER:pgsql-hier-query
+.include "../../mk/bsd.options.mk"
+
+###
+### PAM authentication for the PostgreSQL backend.
+###
+.if !empty(PKG_OPTIONS:Mpam)
+. include "../../mk/pam.buildlink3.mk"
+CONFIGURE_ARGS+= --with-pam
+.endif
+
+###
+### Support for hierarchical queries with Oracle-like CONNECT BY syntax.
+### See http://gppl.moonbone.ru/README.html for details.
+###
+.if !empty(PKG_OPTIONS:Mpgsql-hier-query)
+PATCH_SITES= http://gppl.moonbone.ru/
+PATCHFILES= hier-Pg8.0.3-0.5.5.diff.gz
+PATCH_DIST_STRIP= -p1
+PLIST_SUBST+= PG_HIER=
+.else
+PLIST_SUBST+= PG_HIER="@comment "
+.endif
diff --git a/databases/postgresql80/patches/patch-aa b/databases/postgresql80/patches/patch-aa
index 4832382ae0f..2e1e2c1c3ed 100644
--- a/databases/postgresql80/patches/patch-aa
+++ b/databases/postgresql80/patches/patch-aa
@@ -1,31 +1,15 @@
-$NetBSD: patch-aa,v 1.2 2005/04/11 20:34:43 recht Exp $
+$NetBSD: patch-aa,v 1.3 2005/08/05 19:43:45 jlam Exp $
---- src/Makefile.shlib.orig Sat Nov 20 22:13:04 2004
-+++ src/Makefile.shlib Sun Apr 10 15:58:34 2005
-@@ -132,7 +132,7 @@
-
- ifeq ($(PORTNAME), freebsd)
- ifdef ELF_SYSTEM
-- shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
-+ shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
- LINK.shared = $(COMPILER) -shared -Wl,-x,-soname,$(soname)
- else
- shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
-@@ -149,7 +149,7 @@
- endif
-
- ifeq ($(PORTNAME), hpux)
-- shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
-+ shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
- ifeq ($(GCC), yes)
- SHLIB_LINK += `$(CC) $(LDFLAGS) -print-libgcc-file-name`
- endif
-@@ -167,7 +167,7 @@
- endif
-
- ifeq ($(PORTNAME), irix)
-- shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)
-+ shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
- LINK.shared = $(COMPILER) -shared -Wl,-set_version,sgi$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)
- endif
-
+--- src/backend/Makefile.orig 2005-01-26 16:57:32.000000000 -0500
++++ src/backend/Makefile
+@@ -13,6 +13,10 @@ subdir = src/backend
+ top_builddir = ../..
+ include $(top_builddir)/src/Makefile.global
+
++CFLAGS+= $(DL_CFLAGS)
++LDFLAGS+= $(DL_LDFLAGS)
++LIBS+= $(DL_LIBS)
++
+ DIRS := access bootstrap catalog parser commands executor lib libpq \
+ main nodes optimizer port postmaster regex rewrite \
+ storage tcop utils $(top_builddir)/src/timezone
diff --git a/databases/postgresql80/patches/patch-ab b/databases/postgresql80/patches/patch-ab
index f74ce54c9ba..087fbc9ccb0 100644
--- a/databases/postgresql80/patches/patch-ab
+++ b/databases/postgresql80/patches/patch-ab
@@ -1,10 +1,79 @@
-$NetBSD: patch-ab,v 1.3 2005/07/05 09:45:25 grant Exp $
+$NetBSD: patch-ab,v 1.4 2005/08/05 19:43:45 jlam Exp $
---- src/makefiles/Makefile.solaris.orig 2004-12-22 05:47:42.000000000 +1100
-+++ src/makefiles/Makefile.solaris
-@@ -19,4 +19,4 @@ endif
- %.so: %.o
- $(LD) -G -Bdynamic -o $@ $<
-
--sqlmansect = 5sql
-+sqlmansect = 7
+--- src/backend/port/dynloader/netbsd.c.orig 2004-12-31 17:00:32.000000000 -0500
++++ src/backend/port/dynloader/netbsd.c
+@@ -44,65 +44,30 @@ static char sccsid[] = "@(#)dl.c 5.4 (Be
+
+ #include "dynloader.h"
+
+-static char error_message[BUFSIZ];
++#ifndef HAVE_DLOPEN
+
+ char *
+-BSD44_derived_dlerror(void)
++pg_dlerror(void)
+ {
+- static char ret[BUFSIZ];
+-
+- strcpy(ret, error_message);
+- error_message[0] = 0;
+- return (ret[0] == 0) ? NULL : ret;
++ return "dynaloader unsupported";
+ }
+
+ void *
+-BSD44_derived_dlopen(const char *file, int num)
++pg_dlopen(const char *file, int num)
+ {
+-#if defined(__mips__)
+- snprintf(error_message, sizeof(error_message),
+- "dlopen (%s) not supported", file);
++ elog(ERROR, "dynamic load not supported");
+ return NULL;
+-#else
+- void *vp;
+-
+- if ((vp = dlopen((char *) file, num)) == NULL)
+- snprintf(error_message, sizeof(error_message),
+- "dlopen (%s) failed", file);
+- return vp;
+-#endif
+ }
+
+ void *
+-BSD44_derived_dlsym(void *handle, const char *name)
++pg_dlsym(void *handle, const char *name)
+ {
+-#if defined(__mips__)
+- snprintf(error_message, sizeof(error_message),
+- "dlsym (%s) failed", name);
+ return NULL;
+-#elif defined(__ELF__)
+- return dlsym(handle, name);
+-#else
+- void *vp;
+- char buf[BUFSIZ];
+-
+- if (*name != '_')
+- {
+- snprintf(buf, sizeof(buf), "_%s", name);
+- name = buf;
+- }
+- if ((vp = dlsym(handle, (char *) name)) == NULL)
+- snprintf(error_message, sizeof(error_message),
+- "dlsym (%s) failed", name);
+- return vp;
+-#endif
+ }
+
+ void
+-BSD44_derived_dlclose(void *handle)
++pg_dlclose(void *handle)
+ {
+-#if defined(__mips__)
+-#else
+- dlclose(handle);
+-#endif
+ }
++
++#endif /* ! HAVE_DLOPEN */
diff --git a/databases/postgresql80/patches/patch-ac b/databases/postgresql80/patches/patch-ac
new file mode 100644
index 00000000000..44c44df52de
--- /dev/null
+++ b/databases/postgresql80/patches/patch-ac
@@ -0,0 +1,45 @@
+$NetBSD: patch-ac,v 1.1 2005/08/05 19:43:45 jlam Exp $
+
+--- src/backend/port/dynloader/netbsd.h.orig 2004-12-31 17:00:32.000000000 -0500
++++ src/backend/port/dynloader/netbsd.h
+@@ -21,19 +21,7 @@
+
+ #include "utils/dynamic_loader.h"
+
+-/*
+- * Dynamic Loader on NetBSD 1.0.
+- *
+- * this dynamic loader uses the system dynamic loading interface for shared
+- * libraries (ie. dlopen/dlsym/dlclose). The user must specify a shared
+- * library as the file to be dynamically loaded.
+- *
+- * agc - I know this is all a bit crufty, but it does work, is fairly
+- * portable, and works (the stipulation that the d.l. function must
+- * begin with an underscore is fairly tricky, and some versions of
+- * NetBSD (like 1.0, and 1.0A pre June 1995) have no dlerror.)
+- */
+-
++#ifdef HAVE_DLOPEN
+ /*
+ * In some older systems, the RTLD_NOW flag isn't defined and the mode
+ * argument to dlopen must always be 1. The RTLD_GLOBAL flag is wanted
+@@ -47,14 +35,11 @@
+ #define RTLD_GLOBAL 0
+ #endif
+
+-#define pg_dlopen(f) BSD44_derived_dlopen((f), RTLD_NOW | RTLD_GLOBAL)
+-#define pg_dlsym BSD44_derived_dlsym
+-#define pg_dlclose BSD44_derived_dlclose
+-#define pg_dlerror BSD44_derived_dlerror
++#define pg_dlopen(f) dlopen((f), RTLD_NOW | RTLD_GLOBAL)
++#define pg_dlsym dlsym
++#define pg_dlclose dlclose
++#define pg_dlerror dlerror
+
+-char *BSD44_derived_dlerror(void);
+-void *BSD44_derived_dlopen(const char *filename, int num);
+-void *BSD44_derived_dlsym(void *handle, const char *name);
+-void BSD44_derived_dlclose(void *handle);
++#endif /* HAVE_DLOPEN */
+
+ #endif /* PORT_PROTOS_H */
diff --git a/databases/postgresql80/patches/patch-ad b/databases/postgresql80/patches/patch-ad
new file mode 100644
index 00000000000..248661bdcb9
--- /dev/null
+++ b/databases/postgresql80/patches/patch-ad
@@ -0,0 +1,9 @@
+$NetBSD: patch-ad,v 1.1 2005/08/05 19:43:45 jlam Exp $
+
+--- src/template/interix3.orig 2005-08-05 00:27:00.000000000 -0400
++++ src/template/interix3
+@@ -0,0 +1,4 @@
++THREAD_SUPPORT=yes
++THREAD_CPPFLAGS="-D_REENTRANT"
++THREAD_LIBS="-lpthread"
++NEED_REENTRANT_FUNCS=yes
diff --git a/databases/postgresql80/patches/patch-ae b/databases/postgresql80/patches/patch-ae
new file mode 100644
index 00000000000..e3ce11f7c36
--- /dev/null
+++ b/databases/postgresql80/patches/patch-ae
@@ -0,0 +1,7 @@
+$NetBSD: patch-ae,v 1.1 2005/08/05 19:43:45 jlam Exp $
+
+--- src/template/irix5.orig 2005-08-05 00:27:00.000000000 -0400
++++ src/template/irix5
+@@ -0,0 +1,2 @@
++THREAD_SUPPORT=yes
++THREAD_LIBS="-lpthread"
diff --git a/databases/postgresql80/patches/patch-af b/databases/postgresql80/patches/patch-af
new file mode 100644
index 00000000000..8cb1a2f34f1
--- /dev/null
+++ b/databases/postgresql80/patches/patch-af
@@ -0,0 +1,31 @@
+$NetBSD: patch-af,v 1.1 2005/08/05 19:43:45 jlam Exp $
+
+--- src/timezone/localtime.c.orig 2004-11-01 16:34:44.000000000 -0500
++++ src/timezone/localtime.c
+@@ -109,19 +109,19 @@ struct rule
+
+ static long detzcode(const char *codep);
+ static const char *getzname(const char *strp);
+-static const char *getnum(const char *strp, int *nump, int min, int max);
++static const char *getnum(const char *strp, int *nump, const int min, const int max);
+ static const char *getsecs(const char *strp, long *secsp);
+ static const char *getoffset(const char *strp, long *offsetp);
+ static const char *getrule(const char *strp, struct rule * rulep);
+ static void gmtload(struct state * sp);
+-static void gmtsub(const pg_time_t *timep, long offset, struct pg_tm * tmp);
+-static void localsub(const pg_time_t *timep, long offset, struct pg_tm * tmp);
+-static void timesub(const pg_time_t *timep, long offset,
++static void gmtsub(const pg_time_t *timep, const long offset, struct pg_tm * tmp);
++static void localsub(const pg_time_t *timep, const long offset, struct pg_tm * tmp);
++static void timesub(const pg_time_t *timep, const long offset,
+ const struct state * sp, struct pg_tm * tmp);
+-static pg_time_t transtime(pg_time_t janfirst, int year,
+- const struct rule * rulep, long offset);
++static pg_time_t transtime(const pg_time_t janfirst, const int year,
++ const struct rule * rulep, const long offset);
+ static int tzload(const char *name, struct state * sp);
+-static int tzparse(const char *name, struct state * sp, int lastditch);
++static int tzparse(const char *name, struct state * sp, const int lastditch);
+
+ static struct state lclmem;
+ static struct state gmtmem;
diff --git a/databases/postgresql80/patches/patch-ag b/databases/postgresql80/patches/patch-ag
new file mode 100644
index 00000000000..521f24c085f
--- /dev/null
+++ b/databases/postgresql80/patches/patch-ag
@@ -0,0 +1,15 @@
+$NetBSD: patch-ag,v 1.1 2005/08/05 19:43:45 jlam Exp $
+
+--- src/timezone/private.h.orig 2004-08-29 01:07:02.000000000 -0400
++++ src/timezone/private.h
+@@ -66,8 +66,8 @@ extern int unlink(const char *filename);
+ extern char *icalloc(int nelem, int elsize);
+ extern char *icatalloc(char *old, const char *new);
+ extern char *icpyalloc(const char *string);
+-extern char *imalloc(int n);
+-extern void *irealloc(void *pointer, int size);
++extern char *imalloc(const int n);
++extern void *irealloc(void *pointer, const int size);
+ extern void icfree(char *pointer);
+ extern void ifree(char *pointer);
+ extern char *scheck(const char *string, const char *format);
diff --git a/databases/postgresql80/patches/patch-ah b/databases/postgresql80/patches/patch-ah
new file mode 100644
index 00000000000..8a87485d3ba
--- /dev/null
+++ b/databases/postgresql80/patches/patch-ah
@@ -0,0 +1,13 @@
+$NetBSD: patch-ah,v 1.1 2005/08/05 19:43:45 jlam Exp $
+
+--- src/timezone/strftime.c.orig 2004-08-29 01:07:02.000000000 -0400
++++ src/timezone/strftime.c
+@@ -90,7 +90,7 @@ static const struct lc_time_T C_time_loc
+ };
+
+ static char *_add(const char *, char *, const char *);
+-static char *_conv(int, const char *, char *, const char *);
++static char *_conv(const int, const char *, char *, const char *);
+ static char *_fmt(const char *, const struct pg_tm *, char *,
+ const char *, int *);
+
diff --git a/databases/postgresql80/patches/patch-ai b/databases/postgresql80/patches/patch-ai
new file mode 100644
index 00000000000..a5243d0bbd1
--- /dev/null
+++ b/databases/postgresql80/patches/patch-ai
@@ -0,0 +1,80 @@
+$NetBSD: patch-ai,v 1.1 2005/08/05 19:43:45 jlam Exp $
+
+--- src/timezone/zic.c.orig 2004-09-27 15:16:03.000000000 -0400
++++ src/timezone/zic.c
+@@ -101,52 +101,52 @@ struct zone
+ };
+
+ extern int link(const char *fromname, const char *toname);
+-static void addtt(pg_time_t starttime, int type);
+-static int addtype(long gmtoff, const char *abbr, int isdst,
+- int ttisstd, int ttisgmt);
+-static void leapadd(pg_time_t t, int positive, int rolling, int count);
++static void addtt(const pg_time_t starttime, int type);
++static int addtype(const long gmtoff, const char *abbr, const int isdst,
++ const int ttisstd, const int ttisgmt);
++static void leapadd(const pg_time_t t, const int positive, const int rolling, int count);
+ static void adjleap(void);
+ static void associate(void);
+ static int ciequal(const char *ap, const char *bp);
+-static void convert(long val, char *buf);
++static void convert(const long val, char *buf);
+ static void dolink(const char *fromfile, const char *tofile);
+ static void doabbr(char *abbr, const char *format,
+- const char *letters, int isdst);
+-static void eat(const char *name, int num);
+-static void eats(const char *name, int num,
+- const char *rname, int rnum);
+-static long eitol(int i);
++ const char *letters, const int isdst);
++static void eat(const char *name, const int num);
++static void eats(const char *name, const int num,
++ const char *rname, const int rnum);
++static long eitol(const int i);
+ static void error(const char *message);
+ static char **getfields(char *buf);
+ static long gethms(const char *string, const char *errstrng,
+- int signable);
++ const int signable);
+ static void infile(const char *filename);
+-static void inleap(char **fields, int nfields);
+-static void inlink(char **fields, int nfields);
+-static void inrule(char **fields, int nfields);
+-static int inzcont(char **fields, int nfields);
+-static int inzone(char **fields, int nfields);
+-static int inzsub(char **fields, int nfields, int iscont);
++static void inleap(char **fields, const int nfields);
++static void inlink(char **fields, const int nfields);
++static void inrule(char **fields, const int nfields);
++static int inzcont(char **fields, const int nfields);
++static int inzone(char **fields, const int nfields);
++static int inzsub(char **fields, const int nfields, const int iscont);
+ static int itsabbr(const char *abbr, const char *word);
+ static int itsdir(const char *name);
+ static int lowerit(int c);
+ static char *memcheck(char *tocheck);
+ static int mkdirs(char *filename);
+ static void newabbr(const char *abbr);
+-static long oadd(long t1, long t2);
+-static void outzone(const struct zone * zp, int ntzones);
+-static void puttzcode(long code, FILE *fp);
++static long oadd(const long t1, const long t2);
++static void outzone(const struct zone * zp, const int ntzones);
++static void puttzcode(const long code, FILE *fp);
+ static int rcomp(const void *leftp, const void *rightp);
+-static pg_time_t rpytime(const struct rule * rp, int wantedy);
++static pg_time_t rpytime(const struct rule * rp, const int wantedy);
+ static void rulesub(struct rule * rp,
+ const char *loyearp, const char *hiyearp,
+ const char *typep, const char *monthp,
+ const char *dayp, const char *timep);
+ static void setboundaries(void);
+-static pg_time_t tadd(pg_time_t t1, long t2);
++static pg_time_t tadd(const pg_time_t t1, const long t2);
+ static void usage(void);
+ static void writezone(const char *name);
+-static int yearistype(int year, const char *type);
++static int yearistype(const int year, const char *type);
+
+ static int charcnt;
+ static int errors;