summaryrefslogtreecommitdiff
path: root/databases/postgresql/patches
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-05-14 14:52:36 +0000
committerjlam <jlam@pkgsrc.org>2001-05-14 14:52:36 +0000
commitba8db6ad362a4884523a396c5391688d34cb3c3d (patch)
tree574143e98b7dc21350cf03486d528a58b82e0e77 /databases/postgresql/patches
parentb7bb1f6a67bddf4a301d089e5a99882ddd268127 (diff)
downloadpkgsrc-ba8db6ad362a4884523a396c5391688d34cb3c3d.tar.gz
Update postgresql to 7.1.1 Pkgsrc changes include splitting into:
postgresql-lib postgresql-client postgresql-server postgresql-doc with postgresql as a meta-package. Major changes from version 7.1.1 include: Write-ahead Log (WAL) - To maintain database consistency in case of an operating system crash, previous releases of PostgreSQL have forced all data modifications to disk before each transaction commit. With WAL, only one log file must be flushed to disk, greatly improving performance. If you have been using -F in previous releases to disable disk flushes, you may want to consider discontinuing its use. TOAST - Previous releases had a compiled-in row length limit, typically 8 - 32 kB. This limit made storage of long text fields difficult. With TOAST, long rows of any length can be stored with good performance. Outer Joins - We now support outer joins. The UNION/NOT IN workaround for outer joins is no longer required. We use the SQL92 outer join syntax. Function Manager - The previous C function manager did not handle NULLs properly, nor did it support 64-bit CPU's (Alpha). The new function manager does. You can continue using your old custom functions, but you may want to rewrite them in the future to use the new function manager call interface. Complex Queries - A large number of complex queries that were unsupported in previous releases now work. Many combinations of views, aggregates, UNION, LIMIT, cursors, subqueries, and inherited tables now work properly. Inherited tables are now accessed by default. Subqueries in FROM are now supported. Migration to 7.1.1 A dump/restore using pg_dump is required for those wishing to migrate data from any previous release.
Diffstat (limited to 'databases/postgresql/patches')
-rw-r--r--databases/postgresql/patches/patch-aa50
-rw-r--r--databases/postgresql/patches/patch-ab143
-rw-r--r--databases/postgresql/patches/patch-ac46
-rw-r--r--databases/postgresql/patches/patch-ad30
-rw-r--r--databases/postgresql/patches/patch-ae60
-rw-r--r--databases/postgresql/patches/patch-af32
-rw-r--r--databases/postgresql/patches/patch-ag28
-rw-r--r--databases/postgresql/patches/patch-ah60
-rw-r--r--databases/postgresql/patches/patch-ai63
-rw-r--r--databases/postgresql/patches/patch-aj33
-rw-r--r--databases/postgresql/patches/patch-ak22
11 files changed, 375 insertions, 192 deletions
diff --git a/databases/postgresql/patches/patch-aa b/databases/postgresql/patches/patch-aa
new file mode 100644
index 00000000000..408707ae336
--- /dev/null
+++ b/databases/postgresql/patches/patch-aa
@@ -0,0 +1,50 @@
+$NetBSD: patch-aa,v 1.8 2001/05/14 14:52:38 jlam Exp $
+
+--- configure.in.orig Sat May 5 16:05:37 2001
++++ configure.in
+@@ -150,6 +150,15 @@
+
+
+ #
++# Readline support
++#
++AC_MSG_CHECKING([whether to build with readline support])
++PGAC_ARG_BOOL(enable, readline, yes,
++ [ --disable-readline disable readline support])
++AC_MSG_RESULT([$enable_readline])
++
++
++#
+ # Locale (--enable-locale)
+ #
+ AC_MSG_CHECKING([whether to build with locale support])
+@@ -401,6 +410,18 @@
+ [AC_MSG_RESULT(no)])
+ AC_SUBST(with_python)
+
++# If python is enabled (above), then optionally byte-compile the modules.
++AC_MSG_CHECKING([whether to byte-compile Python modules])
++if test "$with_python" = yes; then
++ PGAC_ARG_BOOL(with, python_compile, no,
++ [ --with-python-compile byte-compile modules if Python is enabled])
++else
++ with_python_compile=no
++fi
++AC_MSG_RESULT([$with_python_compile])
++AC_SUBST([with_python_compile])
++
++
+ #
+ # Optionally build the Java/JDBC tools
+ #
+@@ -649,8 +670,10 @@
+ ## Libraries
+ ##
+
++if test "$enable_readline" = yes; then
+ PGAC_CHECK_READLINE
+ AC_SEARCH_LIBS(using_history, history, [AC_DEFINE(HAVE_HISTORY_FUNCTIONS)])
++fi
+
+ if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
+ then
diff --git a/databases/postgresql/patches/patch-ab b/databases/postgresql/patches/patch-ab
index 1e05ae81158..b7d0a4a046b 100644
--- a/databases/postgresql/patches/patch-ab
+++ b/databases/postgresql/patches/patch-ab
@@ -1,13 +1,136 @@
-$NetBSD: patch-ab,v 1.10 2000/05/20 19:34:17 jlam Exp $
+$NetBSD: patch-ab,v 1.11 2001/05/14 14:52:38 jlam Exp $
---- bin/pgtclsh/Makefile.orig Tue Mar 7 20:58:21 2000
-+++ bin/pgtclsh/Makefile Sat May 20 00:14:18 2000
-@@ -22,7 +22,7 @@
- include Makefile.tkdefs
- endif
+--- configure.orig Sat May 5 16:05:37 2001
++++ configure
+@@ -19,6 +19,8 @@
+ ac_help="$ac_help
+ --with-libs=DIRS alternative spelling of --with-libraries"
+ ac_help="$ac_help
++ --disable-readline disable readline support"
++ac_help="$ac_help
+ --enable-locale enable locale support"
+ ac_help="$ac_help
+ --enable-recode enable character set recode support"
+@@ -53,6 +55,8 @@
+ ac_help="$ac_help
+ --with-python build Python interface module"
+ ac_help="$ac_help
++ --with-python-compile byte-compile modules if Python is enabled"
++ac_help="$ac_help
+ --with-java build JDBC interface and Java tools"
+ ac_help="$ac_help
+ --with-krb4[=DIR] build with Kerberos 4 support [/usr/athena]"
+@@ -811,10 +815,36 @@
--CFLAGS+= $(X_CFLAGS) -I$(LIBPGTCLDIR)
-+CFLAGS+= $(X_CFLAGS) -I$(LIBPQDIR) -I$(LIBPGTCLDIR)
- ifdef KRBVERS
- LDFLAGS+= $(KRBLIBS)
+ #
++# Readline support
++#
++echo $ac_n "checking whether to build with readline support""... $ac_c" 1>&6
++echo "configure:822: checking whether to build with readline support" >&5
++# Check whether --enable-readline was given
++if test x"${enable_readline+set}" = xset; then
++ case $enable_readline in
++ yes)
++ :
++ ;;
++ no)
++ :
++ ;;
++ *)
++ enableval=$enable_readline
++ { echo "configure: error: no argument expected for --enable-readline option" 1>&2; exit 1; }
++ ;;
++ esac # $enable_readline
++else
++ enable_readline=yes
++
++fi
++echo "$ac_t""$enable_readline" 1>&6
++
++
++#
+ # Locale (--enable-locale)
+ #
+ echo $ac_n "checking whether to build with locale support""... $ac_c" 1>&6
+-echo "configure:818: checking whether to build with locale support" >&5
++echo "configure:848: checking whether to build with locale support" >&5
+ # Check whether --enable-locale was given
+ if test x"${enable_locale+set}" = xset; then
+ case $enable_locale in
+@@ -1905,11 +1935,40 @@
+ fi
+
+
++# If python is enabled (above), then optionally byte-compile the modules.
++echo $ac_n "checking whether to byte-compile Python modules""... $ac_c" 1>&6
++echo "configure:1941: checking whether to byte-compile Python modules" >&5
++if test "$with_python" = yes; then
++ # Check whether --with-python_compile was given
++if test x"${with_python_compile+set}" = xset; then
++ case $with_python_compile in
++ yes)
++ :
++ ;;
++ no)
++ :
++ ;;
++ *)
++ withval=$with_python_compile
++ { echo "configure: error: no argument expected for --with-python_compile option" 1>&2; exit 1; }
++ ;;
++ esac # $with_python_compile
++else
++ with_python_compile=no
++
++fi
++else
++ with_python_compile=no
++fi
++echo "$ac_t""$with_python_compile" 1>&6
++
++
++
+ #
+ # Optionally build the Java/JDBC tools
+ #
+ echo $ac_n "checking whether to build Java/JDBC tools""... $ac_c" 1>&6
+-echo "configure:1913: checking whether to build Java/JDBC tools" >&5
++echo "configure:1972: checking whether to build Java/JDBC tools" >&5
+ # Check whether --with-java was given
+ if test x"${with_java+set}" = xset; then
+ case $with_java in
+@@ -3095,8 +3154,9 @@
+ ## Libraries
+ ##
+
+-echo $ac_n "checking for readline""... $ac_c" 1>&6
+-echo "configure:3100: checking for readline" >&5
++if test "$enable_readline" = yes; then
++echo $ac_n "checking for readline""... $ac_c" 1>&6
++echo "configure:3160: checking for readline" >&5
+
+ if eval "test \"`echo '$''{'pgac_cv_check_readline'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -3208,11 +3268,12 @@
+ else :
+
+ fi
++fi
+
+ if test "$PORTNAME" != "aix" -a "$PORTNAME" != "alpha"
+ then
+ echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6
+-echo "configure:3216: checking for main in -lbsd" >&5
++echo "configure:3277: checking for main in -lbsd" >&5
+ ac_lib_var=`echo bsd'_'main | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+@@ -8103,6 +8164,7 @@
+ s%@python_moduledir@%$python_moduledir%g
+ s%@python_extmakefile@%$python_extmakefile%g
+ s%@with_python@%$with_python%g
++s%@with_python_compile@%$with_python_compile%g
+ s%@ANT@%$ANT%g
+ s%@with_java@%$with_java%g
+ s%@with_krb4@%$with_krb4%g
diff --git a/databases/postgresql/patches/patch-ac b/databases/postgresql/patches/patch-ac
index c5357f95d32..472864c350d 100644
--- a/databases/postgresql/patches/patch-ac
+++ b/databases/postgresql/patches/patch-ac
@@ -1,15 +1,33 @@
-$NetBSD: patch-ac,v 1.8 2000/07/14 04:44:13 jlam Exp $
+$NetBSD: patch-ac,v 1.9 2001/05/14 14:52:38 jlam Exp $
---- configure.in.orig Wed May 24 18:43:59 2000
-+++ configure.in Mon Jul 10 22:20:00 2000
-@@ -675,10 +675,6 @@
- AC_SUBST(YFLAGS)
-
- AC_CHECK_LIB(sfio, main)
--for curses in ncurses curses ; do
-- AC_CHECK_LIB(${curses}, main,
-- [LIBS="-l${curses} $LIBS"; break])
--done
- AC_CHECK_LIB(termcap, main)
- AC_CHECK_LIB(readline, main)
- AC_CHECK_LIB(readline, using_history, AC_DEFINE(HAVE_HISTORY_IN_READLINE),
+--- doc/Makefile.orig Sat Jan 6 21:03:22 2001
++++ doc/Makefile
+@@ -37,7 +37,7 @@
+
+ install: all installdirs
+ ifdef found_html
+- gzip -d -c postgres.tar.gz | ( cd $(DESTDIR)$(docdir)/html && $(TAR) xf - )
++ gzip -d -c postgres.tar.gz | ( cd $(DESTDIR)$(docdir) && $(TAR) xf - )
+ endif
+ ifdef found_man
+ gzip -d -c man.tar.gz | ( cd $(DESTDIR)$(mandir) && $(TAR) xf - )
+@@ -45,12 +45,17 @@
+
+
+ installdirs:
+- $(mkinstalldirs) $(DESTDIR)$(mandir) $(DESTDIR)$(docdir)/html
++ifdef found_html
++ $(mkinstalldirs) $(DESTDIR)$(docdir)
++endif
++ifdef found_man
++ $(mkinstalldirs) $(DESTDIR)$(mandir)
++endif
+
+
+ uninstall:
+ ifdef found_html
+- -rm -f $(addprefix $(DESTDIR)$(docdir)/html/, $(shell gunzip -c $(srcdir)/postgres.tar.gz | tar tf -))
++ -rm -f $(addprefix $(DESTDIR)$(docdir)/, $(shell gunzip -c $(srcdir)/postgres.tar.gz | tar tf -))
+ endif
+ ifdef found_man
+ -rm -f $(addprefix $(DESTDIR)$(mandir)/, $(shell gunzip -c $(srcdir)/man.tar.gz | tar tf -))
diff --git a/databases/postgresql/patches/patch-ad b/databases/postgresql/patches/patch-ad
index 3cdfe38aee5..902087cf339 100644
--- a/databases/postgresql/patches/patch-ad
+++ b/databases/postgresql/patches/patch-ad
@@ -1,13 +1,23 @@
-$NetBSD: patch-ad,v 1.9 2000/07/14 04:44:13 jlam Exp $
+$NetBSD: patch-ad,v 1.10 2001/05/14 14:52:38 jlam Exp $
---- interfaces/ecpg/lib/Makefile.in.orig Wed May 17 02:03:13 2000
-+++ interfaces/ecpg/lib/Makefile.in Mon Jul 10 22:21:20 2000
-@@ -12,7 +12,7 @@
+--- src/Makefile.global.in.orig Fri Mar 16 16:50:39 2001
++++ src/Makefile.global.in
+@@ -110,6 +110,7 @@
+ with_java = @with_java@
+ with_perl = @with_perl@
+ with_python = @with_python@
++with_python_compile = @with_python_compile@
+ with_tcl = @with_tcl@
+ with_tk = @with_tk@
+ enable_odbc = @enable_odbc@
+@@ -242,6 +243,10 @@
+ libpq_srcdir = $(top_srcdir)/src/interfaces/libpq
+ libpq_builddir = $(top_builddir)/src/interfaces/libpq
+ libpq = -L$(libpq_builddir) -lpq
++
++libpgtcl_srcdir = $(top_srcdir)/src/interfaces/libpgtcl
++libpgtcl_builddir = $(top_builddir)/src/interfaces/libpgtcl
++libpgtcl = -L$(libpgtcl_builddir) -lpgtcl
- NAME= ecpg
- SO_MAJOR_VERSION= 3
--SO_MINOR_VERSION= 1.1
-+SO_MINOR_VERSION= 1
- SRCDIR= @top_srcdir@
- include $(SRCDIR)/Makefile.global
+ ##########################################################################
diff --git a/databases/postgresql/patches/patch-ae b/databases/postgresql/patches/patch-ae
index 90431794fb9..66a6216fdf3 100644
--- a/databases/postgresql/patches/patch-ae
+++ b/databases/postgresql/patches/patch-ae
@@ -1,30 +1,40 @@
-$NetBSD: patch-ae,v 1.12 2000/05/20 19:34:20 jlam Exp $
+$NetBSD: patch-ae,v 1.13 2001/05/14 14:52:38 jlam Exp $
---- interfaces/odbc/psqlodbc.c.orig Mon Dec 28 20:49:57 1998
-+++ interfaces/odbc/psqlodbc.c Sat May 20 00:14:18 2000
-@@ -33,8 +33,14 @@
+--- src/bin/pgtclsh/Makefile.orig Fri Feb 23 13:12:17 2001
++++ src/bin/pgtclsh/Makefile
+@@ -22,19 +22,17 @@
+ -include Makefile.tkdefs
+ endif
- GLOBAL_VALUES globals;
+-libpgtcl_srcdir = $(top_srcdir)/src/interfaces/libpgtcl
+-libpgtcl_builddir = $(top_builddir)/src/interfaces/libpgtcl
+-libpgtcl = -L$(libpgtcl_builddir) -lpgtcl
+-
+ override CPPFLAGS := -I$(libpgtcl_srcdir) $(CPPFLAGS) $(TK_XINCLUDES)
--BOOL _init(void);
--BOOL _fini(void);
-+#ifdef linux
-+# define STATIC
-+#else
-+# define STATIC static
-+#endif
-+
-+STATIC BOOL _init(void);
-+STATIC BOOL _fini(void);
- RETCODE SQL_API SQLDummyOrdinal(void);
- #ifdef WIN32
-@@ -98,7 +104,7 @@
- #endif
+ # If we are here then Tcl is available
+ PROGRAMS = pgtclsh
++INSTALL_TARGET = install-tcl
+
+ # Add Tk targets if Tk is available
+ ifeq ($(with_tk), yes)
+ PROGRAMS += pgtksh
++INSTALL_TARGET += install-tk
+ endif
+
+ all: submake $(PROGRAMS)
+@@ -49,8 +47,12 @@
+ submake:
+ $(MAKE) -C $(libpgtcl_builddir) all
- /* These two functions do shared library initialziation on UNIX, well at least
-- * on Linux. I don't know about other systems.
-+ * on Linux and some of the BSDs. I don't know about other systems.
- */
- BOOL
- _init(void)
+-install: all installdirs
++install: $(INSTALL_TARGET)
++
++install-tcl: installdirs pgtclsh
+ $(INSTALL_PROGRAM) pgtclsh $(DESTDIR)$(bindir)/pgtclsh
++
++install-tk: installdirs pgtksh
+ ifeq ($(with_tk), yes)
+ $(INSTALL_PROGRAM) pgtksh $(DESTDIR)$(bindir)/pgtksh
+ endif
diff --git a/databases/postgresql/patches/patch-af b/databases/postgresql/patches/patch-af
index 931be2684ff..b860340095a 100644
--- a/databases/postgresql/patches/patch-af
+++ b/databases/postgresql/patches/patch-af
@@ -1,25 +1,13 @@
-$NetBSD: patch-af,v 1.12 2000/09/03 09:51:19 wiz Exp $
---- pl/tcl/Makefile.orig Mon May 22 22:12:44 2000
-+++ pl/tcl/Makefile Fri Sep 1 09:41:04 2000
-@@ -56,10 +56,11 @@
- endif
+$NetBSD: patch-af,v 1.13 2001/05/14 14:52:38 jlam Exp $
+
+--- src/interfaces/ecpg/lib/Makefile.orig Fri Feb 23 13:12:20 2001
++++ src/interfaces/ecpg/lib/Makefile
+@@ -14,7 +14,7 @@
- %$(TCL_SHLIB_SUFFIX): %.o
-- $(TCL_SHLIB_LD) -o $@ $< $(TCL_LIB_SPEC) $(SHLIB_EXTRA_LIBS)
-+ $(TCL_SHLIB_LD) -o $@ $< -R${PREFIX}/lib -L${PREFIX}/lib -ltcl83 -lm
+ NAME= ecpg
+ SO_MAJOR_VERSION= 3
+-SO_MINOR_VERSION= 2.0
++SO_MINOR_VERSION= 2
+ override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include -I$(libpq_srcdir) $(CPPFLAGS)
- CC = $(TCL_CC)
-+LD = $(TCL_LD)
-
- # Since we are using Tcl's choice of C compiler, which might not be the
- # same one selected for Postgres, do NOT use CFLAGS from Makefile.global.
-@@ -70,7 +71,7 @@
-
- CFLAGS+= $(TCL_SHLIB_CFLAGS) $(TCL_DEFS)
-
--CFLAGS+= -I$(SRCDIR)/include -I$(SRCDIR)/backend $(PGSQL_INCLUDES)
-+CFLAGS+= -I$(SRCDIR)/include -I$(SRCDIR)/backend -I$(LIBPQDIR) $(PGSQL_INCLUDES)
-
- #
- # Uncomment the following to enable the unknown command lookup
diff --git a/databases/postgresql/patches/patch-ag b/databases/postgresql/patches/patch-ag
index 45bec02ad56..fc87f0fdcbc 100644
--- a/databases/postgresql/patches/patch-ag
+++ b/databases/postgresql/patches/patch-ag
@@ -1,20 +1,12 @@
-$NetBSD: patch-ag,v 1.7 2000/06/20 06:06:48 jlam Exp $
+$NetBSD: patch-ag,v 1.8 2001/05/14 14:52:38 jlam Exp $
---- Makefile.shlib.orig Thu Mar 9 12:07:32 2000
-+++ Makefile.shlib Tue Jun 20 00:31:34 2000
-@@ -274,6 +274,7 @@
- install-shlib: $(shlib)
- $(INSTALL) $(INSTL_SHLIB_OPTS) $(shlib) $(LIBDIR)/$(shlib)
- ifneq ($(PORTNAME), win)
-+ifdef ELF_SYSTEM
- if [ "$(shlib)" != "lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)" ]; then \
- cd $(LIBDIR); \
- rm -f lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION); \
-@@ -284,6 +285,7 @@
- rm -f lib$(NAME)$(DLSUFFIX); \
- $(LN_S) $(shlib) lib$(NAME)$(DLSUFFIX); \
- fi
-+endif
- endif
+--- src/interfaces/odbc/GNUmakefile.orig Sun Apr 1 15:17:32 2001
++++ src/interfaces/odbc/GNUmakefile
+@@ -44,7 +44,6 @@
+
+ install: all installdirs
+ for i in $(odbc_headers); do $(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(odbc_includedir)/$$i || exit 1; done
+- $(INSTALL_DATA) $(srcdir)/odbcinst.ini $(DESTDIR)$(odbcinst_ini_dir)/odbcinst.ini
+ $(INSTALL_DATA) $(srcdir)/odbc.sql $(DESTDIR)$(datadir)/odbc.sql
+ $(MAKE) install-lib
- # Rule to delete shared library during "make clean"
diff --git a/databases/postgresql/patches/patch-ah b/databases/postgresql/patches/patch-ah
index 8114e9c0081..1c978077c20 100644
--- a/databases/postgresql/patches/patch-ah
+++ b/databases/postgresql/patches/patch-ah
@@ -1,20 +1,46 @@
-$NetBSD: patch-ah,v 1.7 2000/07/14 04:44:53 jlam Exp $
+$NetBSD: patch-ah,v 1.8 2001/05/14 14:52:38 jlam Exp $
---- backend/main/main.c.orig Wed Jan 26 00:56:30 2000
-+++ backend/main/main.c Wed Jul 12 02:34:38 2000
-@@ -14,13 +14,14 @@
- */
- #include <unistd.h>
+--- src/interfaces/python/GNUmakefile.orig Sun Apr 1 15:17:33 2001
++++ src/interfaces/python/GNUmakefile
+@@ -12,9 +12,22 @@
+ top_builddir = ../../..
+ include $(top_builddir)/src/Makefile.global
--#if defined(__alpha__) && !defined(linux)
-+#if defined(__alpha__) && !defined(linux) && !defined(__NetBSD__)
- #include <sys/sysinfo.h>
- #include "machine/hal_sysinfo.h"
- #define ASSEMBLER
- #include <sys/proc.h>
- #undef ASSEMBLER
- #endif
-+#include <sys/param.h>
+-all: Makefile pgmodule.c libpq-all
++PY_SCRIPTS = pg.py pgdb.py
++ifeq ($(with_python_compile), yes)
++PY_COMPILED_SCRIPTS = $(PY_SCRIPTS:%.py=%.pyc) $(PY_SCRIPTS:%.py=%.pyo)
++else
++PY_COMPILED_SCRIPTS =
++endif
++
++all: Makefile pgmodule.c libpq-all $(PY_COMPILED_SCRIPTS)
+ $(MAKE) -f Makefile
- #include "postgres.h"
- #ifdef USE_LOCALE
++%.pyc: %.py
++ $(PYTHON) -c "import py_compile; py_compile.compile(\"$<\")"
++
++%.pyo: %.py
++ $(PYTHON) -O -c "import py_compile; py_compile.compile(\"$<\")"
++
+ .PHONY: libpq-all
+ libpq-all:
+ $(MAKE) -C $(libpq_builddir) all
+@@ -28,13 +41,16 @@
+ Setup.in: Setup.in.raw
+ sed -e 's,@libpq_srcdir@,$(libpq_srcdir),g' \
+ -e 's,@libpq_builddir@,$(libpq_builddir),g' \
++ -e 's,@libpq@,$(libpq),g' \
+ -e 's%@EXTRA_LIBS@%$(filter -L%, $(LDFLAGS)) $(LIBS)%g' \
+ -e 's%@INCLUDES@%$(filter -I%, $(CPPFLAGS))%g' \
+ $< > $@
+
+ install: all
+ @echo "Installing Python module"
+- @if ( $(INSTALL_DATA) pg.py $(python_moduledir) && \
++ @if ( ( for i in $(PY_SCRIPTS) $(PY_COMPILED_SCRIPTS); do \
++ $(INSTALL_DATA) $$i $(python_moduledir); \
++ done ) && \
+ $(MAKE) -f Makefile install ); then : ; else \
+ echo "*****" ;\
+ echo "* Skipping the installation of the Python interface module for lack"; \
diff --git a/databases/postgresql/patches/patch-ai b/databases/postgresql/patches/patch-ai
index 0e5055d4f85..e1687e7dd4f 100644
--- a/databases/postgresql/patches/patch-ai
+++ b/databases/postgresql/patches/patch-ai
@@ -1,58 +1,9 @@
-$NetBSD: patch-ai,v 1.7 2000/07/14 04:44:53 jlam Exp $
+$NetBSD: patch-ai,v 1.8 2001/05/14 14:52:38 jlam Exp $
---- include/port/netbsd.h.orig Wed Apr 12 13:16:48 2000
-+++ include/port/netbsd.h Wed Jul 12 02:31:08 2000
-@@ -3,43 +3,48 @@
- #if defined(__i386__)
- #define NEED_I386_TAS_ASM
- #define HAS_TEST_AND_SET
-+typedef unsigned char slock_t;
- #endif
+--- src/interfaces/python/Setup.in.raw.orig Sun Apr 1 15:17:33 2001
++++ src/interfaces/python/Setup.in.raw
+@@ -1,3 +1,3 @@
+ *shared*
- #if defined(__sparc__)
- #define NEED_SPARC_TAS_ASM
- #define HAS_TEST_AND_SET
-+typedef unsigned char slock_t;
- #endif
-
- #if defined(__vax__)
- #define NEED_VAX_TAS_ASM
- #define HAS_TEST_AND_SET
-+typedef unsigned char slock_t;
- #endif
-
- #if defined(__ns32k__)
- #define NEED_NS32K_TAS_ASM
- #define HAS_TEST_AND_SET
-+typedef unsigned char slock_t;
- #endif
-
- #if defined(__m68k__)
- #define HAS_TEST_AND_SET
-+typedef unsigned char slock_t;
- #endif
-
- #if defined(__arm__)
- #define HAS_TEST_AND_SET
-+typedef unsigned char slock_t;
- #endif
-
- #if defined(__mips__)
- /* # undef HAS_TEST_AND_SET */
-+typedef unsigned char slock_t;
- #endif
-
--#if defined(__powerpc__)
-+#if defined(__alpha__)
- #define HAS_TEST_AND_SET
-+typedef unsigned long slock_t;
- #endif
-
- #if defined(__powerpc__)
-+#define HAS_TEST_AND_SET
- typedef unsigned int slock_t;
--
--#else
--typedef unsigned char slock_t;
--
- #endif
+-_pg pgmodule.c -I@libpq_srcdir@ @INCLUDES@ -L@libpq_builddir@ -lpq @EXTRA_LIBS@
++_pg pgmodule.c -I@libpq_srcdir@ @INCLUDES@ @libpq@ @EXTRA_LIBS@
diff --git a/databases/postgresql/patches/patch-aj b/databases/postgresql/patches/patch-aj
index 9029a5fdeab..ddbbd3246c7 100644
--- a/databases/postgresql/patches/patch-aj
+++ b/databases/postgresql/patches/patch-aj
@@ -1,22 +1,15 @@
-$NetBSD: patch-aj,v 1.7 2000/07/14 04:44:54 jlam Exp $
+$NetBSD: patch-aj,v 1.8 2001/05/14 14:52:38 jlam Exp $
---- include/storage/s_lock.h.orig Wed Apr 12 13:16:51 2000
-+++ include/storage/s_lock.h Wed Jul 12 02:40:53 2000
-@@ -262,7 +262,17 @@
- #define TAS(lock) tas(lock)
- #define S_UNLOCK(lock) do { __asm__("mb"); *(lock) = 0; } while (0)
+--- src/makefiles/Makefile.netbsd.orig Sat Jan 6 21:03:41 2001
++++ src/makefiles/Makefile.netbsd
+@@ -3,7 +3,9 @@
+ ifdef ELF_SYSTEM
+ export_dynamic = -Wl,-E
+ rpath = -Wl,-R$(libdir)
+-shlib_symbolic = -Wl,-Bsymbolic
++shlib_symbolic = -Wl,-Bsymbolic -lc
++else
++rpath = -R$(libdir)
+ endif
-+#if defined(__GNUC__)
-+/*
-+ * GCC on the Alpha doesn't appear to handle inlining of assembly with
-+ * %0 or %1 properly. This removes the inlining of the tas (test-and-set)
-+ * function, which probably slows things down considerably, but correctness
-+ * first!
-+ */
-+static int
-+#else
- static __inline__ int
-+#endif
- tas(volatile slock_t *lock)
- {
- register slock_t _res;
+ DLSUFFIX = .so
diff --git a/databases/postgresql/patches/patch-ak b/databases/postgresql/patches/patch-ak
new file mode 100644
index 00000000000..3811babd461
--- /dev/null
+++ b/databases/postgresql/patches/patch-ak
@@ -0,0 +1,22 @@
+$NetBSD: patch-ak,v 1.4 2001/05/14 14:52:38 jlam Exp $
+
+--- src/pl/plperl/Makefile.PL.orig Sat Jun 10 14:02:12 2000
++++ src/pl/plperl/Makefile.PL
+@@ -9,7 +9,7 @@
+ # to be position-independent, but that is hard to check for and
+ # seems pretty unlikely anyway.)
+ #
+-if ($Config{'useshrplib'} ne 'true') {
++if ( ! -f $Config{archlibexp} . "/CORE/libperl." . $Config{so}) {
+ open(OUT, ">Makefile") or die "Can't write Makefile: $!\n";
+ print OUT <<'EndOfMakefile';
+ # Dummy Makefile for use when we can't build plperl
+@@ -52,7 +52,7 @@
+
+ }
+
+-my $perllib = "-L$Config{archlibexp}/CORE -lperl";
++my $perllib = "-L$Config{archlibexp}/CORE \${RPATH_LDFLAGS} -lperl";
+
+ WriteMakefile( 'NAME' => 'plperl',
+ dynamic_lib => { 'OTHERLDFLAGS' => "$opcode $perllib" } ,