diff options
author | adam <adam@pkgsrc.org> | 2010-09-21 07:50:46 +0000 |
---|---|---|
committer | adam <adam@pkgsrc.org> | 2010-09-21 07:50:46 +0000 |
commit | d46e5d2c7b793bbf28dedca4777dbd74627f6b25 (patch) | |
tree | 2a323a1ea4c22dc1a1f0edc90da03a9c7e5794d3 /databases/postgresql90 | |
parent | 211243911f23bb6156d277d4ae47e2d39b5994e7 (diff) | |
download | pkgsrc-d46e5d2c7b793bbf28dedca4777dbd74627f6b25.tar.gz |
Changes 9.0:
9.0 includes more major features than any release before it, including:
* Hot standby
* Streaming replication
* In-place upgrades
* 64-bit Windows builds
* Easy mass permissions management
* Anonymous blocks and named parameter calls for stored procedures
* New windowing functions and ordered aggregates
... and many more. For details on the over 200 additions and improvements in
this version, developed by over a hundred contributors, please see the release
notes.
Diffstat (limited to 'databases/postgresql90')
21 files changed, 788 insertions, 0 deletions
diff --git a/databases/postgresql90/DESCR b/databases/postgresql90/DESCR new file mode 100644 index 00000000000..9f6b5b5b0f9 --- /dev/null +++ b/databases/postgresql90/DESCR @@ -0,0 +1,9 @@ +PostgreSQL is a robust, next-generation, Object-Relational DBMS (ORDBMS), +derived from the Berkeley Postgres database management system. While +PostgreSQL retains the powerful object-relational data model, rich data types +and easy extensibility of Postgres, it replaces the PostQuel query language +with an extended subset of SQL. + +PostgreSQL is free and the complete source is available. + +This is the meta-package for the PostgreSQL database system. diff --git a/databases/postgresql90/Makefile b/databases/postgresql90/Makefile new file mode 100644 index 00000000000..c4b01a000a3 --- /dev/null +++ b/databases/postgresql90/Makefile @@ -0,0 +1,14 @@ +# $NetBSD: Makefile,v 1.1.1.1 2010/09/21 07:50:46 adam Exp $ + +PKGNAME= postgresql90-${BASE_VERS} +COMMENT= Robust, next generation, object-relational DBMS + +DEPENDS+= postgresql90-client>=${BASE_VERS}:../../databases/postgresql90-client +DEPENDS+= postgresql90-docs>=${BASE_VERS}:../../databases/postgresql90-docs +DEPENDS+= postgresql90-server>=${BASE_VERS}:../../databases/postgresql90-server + +META_PACKAGE= yes + +.include "Makefile.common" + +.include "../../mk/bsd.pkg.mk" diff --git a/databases/postgresql90/Makefile.common b/databases/postgresql90/Makefile.common new file mode 100644 index 00000000000..f060ba3835f --- /dev/null +++ b/databases/postgresql90/Makefile.common @@ -0,0 +1,151 @@ +# $NetBSD: Makefile.common,v 1.1.1.1 2010/09/21 07:50:46 adam Exp $ +# +# used by databases/postgresql90-adminpack/Makefile +# used by databases/postgresql90-client/Makefile +# used by databases/postgresql90-dblink/Makefile +# used by databases/postgresql90-docs/Makefile +# used by databases/postgresql90-pgcrypto/Makefile +# used by databases/postgresql90-plperl/Makefile +# used by databases/postgresql90-plpython/Makefile +# used by databases/postgresql90-pltcl/Makefile +# used by databases/postgresql90-server/Makefile +# +# This Makefile fragment is included by all PostgreSQL packages built from +# the main sources of the PostgreSQL distribution except jdbc-postgresql. +# +# The PostgreSQL package naming scheme, aside from the obvious piecewise +# packages, is as follows: +# +# <lang>-postgresql client-side interface to PostgreSQL +# postgresql-<lang> server-side module for PostgreSQL backend + +.include "../../databases/postgresql90/Makefile.mirrors" + +DISTNAME?= postgresql-${DIST_VERS} +CATEGORIES+= databases +MASTER_SITES?= ${PGSQL_MIRRORS:=source/v${DIST_VERS}/} +EXTRACT_SUFX= .tar.bz2 + +MAINTAINER?= adam@NetBSD.org +HOMEPAGE?= http://www.postgresql.org/ + +CONFLICTS+= postgresql-[0-9]* +CONFLICTS+= postgresql73-* +CONFLICTS+= postgresql74-* +CONFLICTS+= postgresql80-* +CONFLICTS+= postgresql81-* +CONFLICTS+= postgresql82-* +CONFLICTS+= postgresql83-* +CONFLICTS+= postgresql84-* + +DISTINFO_FILE?= ${.CURDIR}/../postgresql90/distinfo +COMMON_FILESDIR?= ${.CURDIR}/../postgresql90/files +PATCHDIR?= ${.CURDIR}/../postgresql90/patches + +# Version numbering scheme: +# DIST_VERS version number on the postgresql distfile +# BASE_VERS pkgsrc-mangled version number (convert pl -> .) +# Note: Do not forget jdbc-postgresql90 when updating version +DIST_VERS?= 9.0.0 +BASE_VERS?= ${DIST_VERS} + +BUILDLINK_API_DEPENDS.postgresql90-client+= postgresql90-client>=${BASE_VERS} + +USE_PKGLOCALEDIR= yes +USE_TOOLS+= bison gmake lex msgfmt +PKG_SYSCONFSUBDIR= postgresql + +.include "../../mk/bsd.prefs.mk" + +PG_TEMPLATE.SunOS= solaris +PG_TEMPLATE.IRIX= irix5 +.if !defined(PG_TEMPLATE.${OPSYS}) +PG_TEMPLATE.${OPSYS}= ${LOWER_OPSYS} +.endif + +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}\//} + +GNU_CONFIGURE= yes +GNU_CONFIGURE_PREFIX= ${PG_PREFIX} +CONFIGURE_ARGS+= --sysconfdir=${PG_ETC_DIR} +CONFIGURE_ARGS+= --datadir=${PG_DATA_DIR} +CONFIGURE_ARGS+= --localedir=${PG_LOCALE_DIR} +CONFIGURE_ARGS+= --with-docdir=${PG_DOC_DIR} +CONFIGURE_ARGS+= --with-template=${PG_TEMPLATE.${OPSYS}} +CONFIGURE_ARGS+= --without-readline +CONFIGURE_ARGS+= --without-zlib +CONFIGURE_ARGS+= --enable-nls + +CONFIGURE_ARGS+= --without-perl +CONFIGURE_ARGS+= --without-python +CONFIGURE_ARGS+= --without-tcl + +# Enable Bonjour on Mac OS X +.if ${OPSYS} == "Darwin" +CONFIGURE_ARGS+= --with-bonjour +.endif + +# PostgreSQL explicitly forbids any use of -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" + +.if !defined(META_PACKAGE) +post-extract: + cp -f ${COMMON_FILESDIR}/Makefile.custom ${WRKSRC}/src/Makefile.custom + cp -f ${COMMON_FILESDIR}/Makefile.libtool ${WRKSRC}/src/Makefile.shlib +. if !empty(USE_LIBLTDL:M[yY][eE][sS]) + cp -f ${COMMON_FILESDIR}/dynloader-ltdl.h \ + ${WRKSRC}/src/backend/port/dynloader/${PG_TEMPLATE.${OPSYS}:Q}.h + ${ECHO} "static int dummy = 0;" \ + > ${WRKSRC}/src/backend/port/dynloader/${PG_TEMPLATE.${OPSYS}:Q}.c +. endif + touch ${WRKSRC}/src/template/dragonfly + cp ${WRKSRC}/src/backend/port/dynloader/freebsd.c \ + ${WRKSRC}/src/backend/port/dynloader/dragonfly.c + cp ${WRKSRC}/src/backend/port/dynloader/freebsd.h \ + ${WRKSRC}/src/backend/port/dynloader/dragonfly.h + cp ${WRKSRC}/src/include/port/freebsd.h \ + ${WRKSRC}/src/include/port/dragonfly.h + cp ${WRKSRC}/src/makefiles/Makefile.freebsd \ + ${WRKSRC}/src/makefiles/Makefile.dragonfly +.endif + +# PGSQL_BLCKSZ is the size in bytes of a PostgreSQL disk page or block. +# This also limits the size of a tuple. The valid values are powers +# of 2 up to 32768, and the default size is 8196 (hardcoded in the +# PostgreSQL sources). Please don't change this value unless you know +# what you are doing. +BUILD_DEFS+= PGSQL_BLCKSZ + +.if defined(PGSQL_BLCKSZ) +.PHONY: pgsql-blcksz +pre-configure: pgsql-blcksz +pgsql-blcksz: + for file in ${WRKSRC}/src/include/pg_config_manual.h; do \ + ${SED} -e "/^#define[ ]*BLCKSZ[ ]*/s/^\(#define[ ]*BLCKSZ\).*/\1 ${PGSQL_BLCKSZ}/" $$file > $$file.new; \ + ${MV} -f $$file.new $$file; \ + done +.endif diff --git a/databases/postgresql90/Makefile.mirrors b/databases/postgresql90/Makefile.mirrors new file mode 100644 index 00000000000..f7734b8f5c4 --- /dev/null +++ b/databases/postgresql90/Makefile.mirrors @@ -0,0 +1,101 @@ +# $NetBSD: Makefile.mirrors,v 1.1.1.1 2010/09/21 07:50:46 adam Exp $ +# +# This Makefile fragment contains the mirror sites for fetching PostgreSQL. +# +# To fetch from the nearest mirror, you may need to set +# PGSQL_MIRRORS_SORT appropriately, e.g.: +# +# PGSQL_MIRRORS_SORT= .at .de +# + +### +### This list was last updated on 20050801. +### +PGSQL_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. +# +PGSQL_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+= ${PGSQL_MIRRORS_SORT:S/./\\./g:C/.*/:\/\/[^[\/]*&\/ :\/\/[^\/]*&\\./} diff --git a/databases/postgresql90/PLIST b/databases/postgresql90/PLIST new file mode 100644 index 00000000000..0f07ca55fcd --- /dev/null +++ b/databases/postgresql90/PLIST @@ -0,0 +1,2 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2010/09/21 07:50:46 adam Exp $ +@comment this plist intentionally left empty diff --git a/databases/postgresql90/distinfo b/databases/postgresql90/distinfo new file mode 100644 index 00000000000..2c33b3a53d2 --- /dev/null +++ b/databases/postgresql90/distinfo @@ -0,0 +1,15 @@ +$NetBSD: distinfo,v 1.1.1.1 2010/09/21 07:50:46 adam Exp $ + +SHA1 (postgresql-9.0.0.tar.bz2) = ed2f83cd1a83c40dcbe0ba19ee3ba2a7faa0de3d +RMD160 (postgresql-9.0.0.tar.bz2) = a6c25636254277029977768be2a73496fc87848a +Size (postgresql-9.0.0.tar.bz2) = 13753207 bytes +SHA1 (patch-aa) = c7e5aaff1c47d2e33df7692a412ef984c77ffcc0 +SHA1 (patch-ab) = 6adfc53e325abe69582f1c7971f56144c697e9c1 +SHA1 (patch-ac) = 76ddd3015d93b19cdd6000eaffc4f53cbd4965b5 +SHA1 (patch-ad) = 64b24d389470ddb980b7a2bdb95e59a599812dfd +SHA1 (patch-af) = a73769cf05223d2ee06249c9e69c85038c2cd936 +SHA1 (patch-ag) = 85dac95e40efc16270885087f868aeb76e1b9214 +SHA1 (patch-ah) = 25102dce1b9b22385353af23500636fb18e3bf64 +SHA1 (patch-ai) = 0d6f536f7593e362ec216eafa73c718ad6bed8fc +SHA1 (patch-an) = 787689c3b35ce94c5186eec47240c2b9545f72a1 +SHA1 (patch-ao) = 4d7c40d107d4c13c63ef2908d9a02be319863657 diff --git a/databases/postgresql90/files/GNUmakefile.libpq b/databases/postgresql90/files/GNUmakefile.libpq new file mode 100644 index 00000000000..f75a94faaf0 --- /dev/null +++ b/databases/postgresql90/files/GNUmakefile.libpq @@ -0,0 +1,20 @@ +# $NetBSD: GNUmakefile.libpq,v 1.1.1.1 2010/09/21 07:50:46 adam Exp $ +# +# This GNUmakefile overrides the `all' target of $(libpq_srcdir)/Makefile +# to be empty if INSTALLED_LIBPQ is defined. This handles the submake +# targets sprinkled throughout the PostgreSQL Makefiles that execute +# +# @$(MAKE) -C $(libpq_builddir) all +# +# to ensure that the libpq libraries are built first. If INSTALLED_LIBPQ +# is defined, then have the `all' target simple return success. + +ifdef INSTALLED_LIBPQ +all: + @test -f libpq.a || touch libpq.a +endif + +%: force + @$(MAKE) -f Makefile $@ + +force: ; diff --git a/databases/postgresql90/files/Makefile.custom b/databases/postgresql90/files/Makefile.custom new file mode 100644 index 00000000000..d2ee4223714 --- /dev/null +++ b/databases/postgresql90/files/Makefile.custom @@ -0,0 +1,42 @@ +# $NetBSD: Makefile.custom,v 1.1.1.1 2010/09/21 07:50:46 adam Exp $ +# +# 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 + +# 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 = $(libpq_builddir)/libpq.la +endif +ifdef PGFILEDESC +libpq = -L$(libpq_builddir)/.libs -lpq +endif +endif + +# In pkgsrc, libpython is always present as a shared library. +shared_libpython = yes + +# $(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/postgresql90/files/Makefile.libtool b/databases/postgresql90/files/Makefile.libtool new file mode 100644 index 00000000000..bf3f6d6e7df --- /dev/null +++ b/databases/postgresql90/files/Makefile.libtool @@ -0,0 +1,144 @@ +#------------------------------------------------------------------------- +# +# Makefile.libtool +# Common rules for buildling libtool archives +# +# IDENTIFICATION +# $NetBSD: Makefile.libtool,v 1.1.1.1 2010/09/21 07:50:46 adam 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/backend/snowball,$(subdir))) +shmodule = yes +else +ifneq (,$(findstring src/pl/,$(subdir))) +shmodule = yes +else +ifneq (,$(findstring contrib/adminpack,$(subdir))) +shmodule = yes +else +ifneq (,$(findstring contrib/pgcrypto,$(subdir))) +shmodule = yes +else +ifneq (,$(findstring contrib/dblink,$(subdir))) +shmodule = yes +else +shmodule = no +endif +endif +endif +endif +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 + + +## +## 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 +SO_MAJOR_VERSION?=0 +SO_MINOR_VERSION?=0 + +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 installdirs-lib install-lib-la +install-lib install-static-lib install-shared-lib: install-lib-la + +install-lib-la: $(ltlib) +ifeq ($(shmodule),yes) + $(INSTALL_LTLIB) $< $(DESTDIR)$(pkglibdir)/$(shlib) +else + $(INSTALL_LTLIB) $< $(DESTDIR)$(libdir)/$(ltlib) +endif + +installdirs-lib: +ifeq ($(shmodule),yes) + $(MKDIR_P) '$(DESTDIR)$(pkglibdir)' +else + $(MKDIR_P) '$(DESTDIR)$(libdir)' +endif + + +## +## 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/postgresql90/files/dynloader-ltdl.h b/databases/postgresql90/files/dynloader-ltdl.h new file mode 100644 index 00000000000..570bb916621 --- /dev/null +++ b/databases/postgresql90/files/dynloader-ltdl.h @@ -0,0 +1,17 @@ +/* $NetBSD: dynloader-ltdl.h,v 1.1.1.1 2010/09/21 07:50:46 adam 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/postgresql90/options.mk b/databases/postgresql90/options.mk new file mode 100644 index 00000000000..e5625508fb4 --- /dev/null +++ b/databases/postgresql90/options.mk @@ -0,0 +1,36 @@ +# $NetBSD: options.mk,v 1.1.1.1 2010/09/21 07:50:46 adam Exp $ + +PKG_SUPPORTED_OPTIONS+= # empty + +.include "../../mk/bsd.options.mk" + +### +### GSSAPI authentication for the PostgreSQL backend. +### +.if !empty(PKG_OPTIONS:Mgssapi) +CONFIGURE_ARGS+= --with-gssapi +.endif + +### +### Kerberos5 authentication for the PostgreSQL backend. +### +.if !empty(PKG_OPTIONS:Mkrb5) +. include "../../mk/krb5.buildlink3.mk" +CONFIGURE_ARGS+= --with-krb5 +.endif + +### +### LDAP authentication for the PostgreSQL backend. +### +.if !empty(PKG_OPTIONS:Mldap) +. include "../../databases/openldap-client/buildlink3.mk" +CONFIGURE_ARGS+= --with-ldap +.endif + +### +### PAM authentication for the PostgreSQL backend. +### +.if !empty(PKG_OPTIONS:Mpam) +. include "../../mk/pam.buildlink3.mk" +CONFIGURE_ARGS+= --with-pam +.endif diff --git a/databases/postgresql90/patches/patch-aa b/databases/postgresql90/patches/patch-aa new file mode 100644 index 00000000000..407788bca45 --- /dev/null +++ b/databases/postgresql90/patches/patch-aa @@ -0,0 +1,15 @@ +$NetBSD: patch-aa,v 1.1.1.1 2010/09/21 07:50:46 adam Exp $ + +--- config/perl.m4.orig 2010-02-23 18:35:06.000000000 +0000 ++++ config/perl.m4 +@@ -57,9 +57,7 @@ AC_DEFUN([PGAC_CHECK_PERL_CONFIGS], + AC_DEFUN([PGAC_CHECK_PERL_EMBED_LDFLAGS], + [AC_REQUIRE([PGAC_PATH_PERL]) + AC_MSG_CHECKING(for flags to link embedded Perl) +-pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts` +-pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'` +-perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e ["s/ -arch [-a-zA-Z0-9_]*//g"]` ++perl_embed_ldflags=`$PERL -MExtUtils::Embed -e ldopts` + AC_SUBST(perl_embed_ldflags)dnl + if test -z "$perl_embed_ldflags" ; then + AC_MSG_RESULT(no) diff --git a/databases/postgresql90/patches/patch-ab b/databases/postgresql90/patches/patch-ab new file mode 100644 index 00000000000..daef8f5f644 --- /dev/null +++ b/databases/postgresql90/patches/patch-ab @@ -0,0 +1,23 @@ +$NetBSD: patch-ab,v 1.1.1.1 2010/09/21 07:50:46 adam Exp $ + +--- configure.orig 2010-08-27 03:04:37.000000000 +0000 ++++ configure +@@ -2192,6 +2192,7 @@ case $host_os in + darwin*) template=darwin ;; + dgux*) template=dgux ;; + freebsd*) template=freebsd ;; ++ dragonfly*) template=dragonfly ;; + hpux*) template=hpux ;; + irix*) template=irix ;; + linux*|gnu*|k*bsd*-gnu) +@@ -6925,9 +6926,7 @@ $as_echo "$perl_useshrplib" >&6; } + + { $as_echo "$as_me:$LINENO: checking for flags to link embedded Perl" >&5 + $as_echo_n "checking for flags to link embedded Perl... " >&6; } +-pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts` +-pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'` +-perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"` ++perl_embed_ldflags=`$PERL -MExtUtils::Embed -e ldopts` + if test -z "$perl_embed_ldflags" ; then + { $as_echo "$as_me:$LINENO: result: no" >&5 + $as_echo "no" >&6; } diff --git a/databases/postgresql90/patches/patch-ac b/databases/postgresql90/patches/patch-ac new file mode 100644 index 00000000000..d5b19907bfe --- /dev/null +++ b/databases/postgresql90/patches/patch-ac @@ -0,0 +1,15 @@ +$NetBSD: patch-ac,v 1.1.1.1 2010/09/21 07:50:46 adam Exp $ + +--- src/backend/Makefile.orig 2010-07-05 18:54:37.000000000 +0000 ++++ src/backend/Makefile +@@ -17,6 +17,10 @@ subdir = src/backend + top_builddir = ../.. + include $(top_builddir)/src/Makefile.global + ++CFLAGS+= $(DL_CFLAGS) ++LDFLAGS+= $(DL_LDFLAGS) ++LIBS+= $(DL_LIBS) ++ + SUBDIRS = access bootstrap catalog parser commands executor foreign lib libpq \ + main nodes optimizer port postmaster regex replication rewrite \ + storage tcop tsearch utils $(top_builddir)/src/timezone diff --git a/databases/postgresql90/patches/patch-ad b/databases/postgresql90/patches/patch-ad new file mode 100644 index 00000000000..fd6ebf67a56 --- /dev/null +++ b/databases/postgresql90/patches/patch-ad @@ -0,0 +1,21 @@ +$NetBSD: patch-ad,v 1.1.1.1 2010/09/21 07:50:46 adam Exp $ + +--- src/pl/plperl/GNUmakefile.orig 2010-09-21 07:39:30.000000000 +0000 ++++ src/pl/plperl/GNUmakefile +@@ -54,7 +54,6 @@ PSQLDIR = $(bindir) + + include $(top_srcdir)/src/Makefile.shlib + +-plperl.o: perlchunks.h plperl_opmask.h + + plperl_opmask.h: plperl_opmask.pl + $(PERL) $< $@ +@@ -62,7 +61,7 @@ plperl_opmask.h: plperl_opmask.pl + perlchunks.h: $(PERLCHUNKS) + $(PERL) $(srcdir)/text2macro.pl --strip='^(\#.*|\s*)$$' $^ > $@ + +-all: all-lib ++all: perlchunks.h plperl_opmask.h all-lib + + SPI.c: SPI.xs + $(PERL) $(perl_privlibexp)/ExtUtils/xsubpp -typemap $(perl_privlibexp)/ExtUtils/typemap $< >$@ diff --git a/databases/postgresql90/patches/patch-af b/databases/postgresql90/patches/patch-af new file mode 100644 index 00000000000..a5e87e12d8b --- /dev/null +++ b/databases/postgresql90/patches/patch-af @@ -0,0 +1,31 @@ +$NetBSD: patch-af,v 1.1.1.1 2010/09/21 07:50:46 adam Exp $ + +--- src/timezone/localtime.c.orig 2009-06-11 16:49:15.000000000 +0200 ++++ src/timezone/localtime.c +@@ -80,20 +80,20 @@ static pg_time_t detzcode64(const char * + static int differ_by_repeat(pg_time_t t1, pg_time_t t0); + static const char *getzname(const char *strp); + static const char *getqzname(const char *strp, int delim); +-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 struct pg_tm *gmtsub(const pg_time_t *timep, long offset, ++static struct pg_tm *gmtsub(const pg_time_t *timep, const long offset, + struct pg_tm * tmp); +-static struct pg_tm *localsub(const pg_time_t *timep, long offset, ++static struct pg_tm *localsub(const pg_time_t *timep, const long offset, + struct pg_tm * tmp, const pg_tz *tz); + static int increment_overflow(int *number, int delta); +-static pg_time_t transtime(pg_time_t janfirst, int year, +- const struct rule * rulep, long offset); ++static pg_time_t transtime(pg_time_t janfirst, const int year, ++ const struct rule * rulep, const long offset); + static int typesequiv(const struct state * sp, int a, int b); +-static struct pg_tm *timesub(const pg_time_t *timep, long offset, ++static struct pg_tm *timesub(const pg_time_t *timep, const long offset, + const struct state * sp, struct pg_tm * tmp); + + /* GMT timezone */ diff --git a/databases/postgresql90/patches/patch-ag b/databases/postgresql90/patches/patch-ag new file mode 100644 index 00000000000..61edf481ecc --- /dev/null +++ b/databases/postgresql90/patches/patch-ag @@ -0,0 +1,15 @@ +$NetBSD: patch-ag,v 1.1.1.1 2010/09/21 07:50:46 adam Exp $ + +--- src/timezone/private.h.orig 2009-06-11 16:49:15.000000000 +0200 ++++ src/timezone/private.h +@@ -51,8 +51,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 const char *scheck(const char *string, const char *format); diff --git a/databases/postgresql90/patches/patch-ah b/databases/postgresql90/patches/patch-ah new file mode 100644 index 00000000000..78fd6c4069a --- /dev/null +++ b/databases/postgresql90/patches/patch-ah @@ -0,0 +1,13 @@ +$NetBSD: patch-ah,v 1.1.1.1 2010/09/21 07:50:46 adam Exp $ + +--- src/timezone/strftime.c.orig 2009-06-11 16:49:15.000000000 +0200 ++++ src/timezone/strftime.c +@@ -89,7 +89,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 *); + static char *_yconv(const int, const int, const int, const int, diff --git a/databases/postgresql90/patches/patch-ai b/databases/postgresql90/patches/patch-ai new file mode 100644 index 00000000000..93b08f191c9 --- /dev/null +++ b/databases/postgresql90/patches/patch-ai @@ -0,0 +1,78 @@ +$NetBSD: patch-ai,v 1.1.1.1 2010/09/21 07:50:46 adam Exp $ + +--- src/timezone/zic.c.orig 2010-03-16 07:17:04.000000000 +0000 ++++ src/timezone/zic.c +@@ -120,51 +120,51 @@ struct zone + + extern int link(const char *fromname, const char *toname); + static void addtt(const pg_time_t starttime, int type); +-static int addtype(long gmtoff, const char *abbr, int isdst, +- int ttisstd, int ttisgmt); +-static void leapadd(const pg_time_t t, int positive, int rolling, int count); ++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, int doquotes); +-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, int doquotes); ++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(const pg_time_t t1, long t2); ++static pg_time_t tadd(const pg_time_t t1, const long t2); + static void usage(FILE *stream, int status); + static void writezone(const char *name, const char *string); +-static int yearistype(int year, const char *type); ++static int yearistype(const int year, const char *type); + + static int charcnt; + static int errors; diff --git a/databases/postgresql90/patches/patch-an b/databases/postgresql90/patches/patch-an new file mode 100644 index 00000000000..82b09d223f1 --- /dev/null +++ b/databases/postgresql90/patches/patch-an @@ -0,0 +1,13 @@ +$NetBSD: patch-an,v 1.1.1.1 2010/09/21 07:50:46 adam Exp $ + +--- src/interfaces/ecpg/test/Makefile.regress.orig 2010-07-05 18:54:38.000000000 +0000 ++++ src/interfaces/ecpg/test/Makefile.regress +@@ -8,7 +8,7 @@ override LIBS := -lecpg -lpgtypes $(filt + ECPG = ../../preproc/ecpg --regression -I$(srcdir)/../../include + + %: %.c +- $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@ ++ ${LIBTOOL} --mode=link $(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@ + + %.c: %.pgc ../regression.h + $(ECPG) -o $@ -I$(srcdir) $< diff --git a/databases/postgresql90/patches/patch-ao b/databases/postgresql90/patches/patch-ao new file mode 100644 index 00000000000..ee686c80cff --- /dev/null +++ b/databases/postgresql90/patches/patch-ao @@ -0,0 +1,13 @@ +$NetBSD: patch-ao,v 1.1.1.1 2010/09/21 07:50:46 adam Exp $ + +--- contrib/dblink/dblink.c.orig 2010-07-06 19:18:54.000000000 +0000 ++++ contrib/dblink/dblink.c +@@ -59,7 +59,7 @@ + #include "utils/array.h" + #include "utils/builtins.h" + #include "utils/dynahash.h" +-#include "utils/fmgroids.h" ++#include "postgresql/server/utils/fmgroids.h" + #include "utils/hsearch.h" + #include "utils/lsyscache.h" + #include "utils/memutils.h" |