diff options
Diffstat (limited to 'databases/postgresql95')
26 files changed, 729 insertions, 0 deletions
diff --git a/databases/postgresql95/DESCR b/databases/postgresql95/DESCR new file mode 100644 index 00000000000..9f6b5b5b0f9 --- /dev/null +++ b/databases/postgresql95/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/postgresql95/Makefile b/databases/postgresql95/Makefile new file mode 100644 index 00000000000..5b0280851c3 --- /dev/null +++ b/databases/postgresql95/Makefile @@ -0,0 +1,14 @@ +# $NetBSD: Makefile,v 1.1 2016/02/25 21:37:35 tnn Exp $ + +PKGNAME= ${DISTNAME:C/-/95-/} +COMMENT= Robust, next generation, object-relational DBMS + +DEPENDS+= postgresql95-client>=${PKGVERSION_NOREV}:../../databases/postgresql95-client +DEPENDS+= postgresql95-docs>=${PKGVERSION_NOREV}:../../databases/postgresql95-docs +DEPENDS+= postgresql95-server>=${PKGVERSION_NOREV}:../../databases/postgresql95-server + +META_PACKAGE= yes + +.include "Makefile.common" + +.include "../../mk/bsd.pkg.mk" diff --git a/databases/postgresql95/Makefile.common b/databases/postgresql95/Makefile.common new file mode 100644 index 00000000000..6d8e986dcb1 --- /dev/null +++ b/databases/postgresql95/Makefile.common @@ -0,0 +1,136 @@ +# $NetBSD: Makefile.common,v 1.1 2016/02/25 21:37:35 tnn Exp $ +# +# 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 +# +# used by databases/postgresql95-adminpack/Makefile +# used by databases/postgresql95-client/Makefile +# used by databases/postgresql95-datatypes/Makefile +# used by databases/postgresql95-dblink/Makefile +# used by databases/postgresql95-docs/Makefile +# used by databases/postgresql95-fuzzystrmatch/Makefile +# used by databases/postgresql95-monitoring/Makefile +# used by databases/postgresql95-pgcrypto/Makefile +# used by databases/postgresql95-plperl/Makefile +# used by databases/postgresql95-plpython/Makefile +# used by databases/postgresql95-pltcl/Makefile +# used by databases/postgresql95-replicationtools/Makefile +# used by databases/postgresql95-server/Makefile +# used by databases/postgresql95-upgrade/Makefile + +DISTNAME= postgresql-9.5.1 +CATEGORIES= databases +MASTER_SITES= ${MASTER_SITE_PGSQL:=source/v${PKGVERSION_NOREV}/} +EXTRACT_SUFX= .tar.bz2 + +MAINTAINER?= adam@NetBSD.org +HOMEPAGE= http://www.postgresql.org/ +LICENSE= postgresql-license + +CONFLICTS+= postgresql-[0-9]* +CONFLICTS+= postgresql[0-8][0-9]-[0-9]* +CONFLICTS+= postgresql9[012346-9]-[0-9]* + +.if !empty(PKGNAME:M*-*-*) +module= ${PKGNAME:C/-[0-9].*$//:C/^.*-//} +CONFLICTS+= postgresql[0-8][0-9]-${module}-[0-9]* +CONFLICTS+= postgresql9[012346-9]-${module}-[0-9]* +.endif + +DISTINFO_FILE?= ${.CURDIR}/../../databases/postgresql95/distinfo +COMMON_FILESDIR?= ${.CURDIR}/../../databases/postgresql95/files +PATCHDIR?= ${.CURDIR}/../../databases/postgresql95/patches + +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 +PG_TEMPLATE.MirBSD= openbsd +.if !defined(PG_TEMPLATE.${OPSYS}) +PG_TEMPLATE.${OPSYS}= ${LOWER_OPSYS} +.endif + +PG_DATA_DIR= ${PREFIX}/share/postgresql +PG_DOC_DIR= ${PREFIX}/share/doc/postgresql +PG_LOCALE_DIR= ${PREFIX}/${PKGLOCALEDIR}/locale +PG_ETC_DIR= ${PKG_SYSCONFDIR} + +GNU_CONFIGURE= yes +CONFIGURE_ARGS+= --sysconfdir=${PG_ETC_DIR} +CONFIGURE_ARGS+= --datadir=${PG_DATA_DIR} +CONFIGURE_ARGS+= --docdir=${PG_DOC_DIR} +CONFIGURE_ARGS+= --localedir=${PG_LOCALE_DIR} +CONFIGURE_ARGS+= --with-template=${PG_TEMPLATE.${OPSYS}} + +CONFIGURE_ARGS+= --enable-nls +CONFIGURE_ARGS+= --with-readline +CONFIGURE_ARGS+= --without-perl +CONFIGURE_ARGS+= --without-python +CONFIGURE_ARGS+= --without-tcl +CONFIGURE_ARGS+= --without-zlib + +# sys/ucred.h shouldn't be included on Solaris, causes conflicts between +# procfs and largefile. +.if ${OPSYS} == "SunOS" +CONFIGURE_ENV+= ac_cv_header_sys_ucred_h=no +.endif + +# configure fails on OpenBSD and MirBSD if thread safety is enabled. +.if ${OPSYS} == "OpenBSD" || ${OPSYS} == "MirBSD" +CONFIGURE_ARGS+= --disable-thread-safety +.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. Please don't change +# this value unless you know what you are doing. +BUILD_DEFS+= PGSQL_BLCKSZ +.if defined(PGSQL_BLCKSZ) +CONFIGURE_ARGS+= --with-blocksize=${PGSQL_BLCKSZ} +.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 + +.include "../../devel/gettext-lib/buildlink3.mk" +LIBS.SunOS+= -lintl +# XXX work around core dumps with the native libedit +USE_GNU_READLINE= yes +.include "../../devel/readline/buildlink3.mk" + +.if !defined(META_PACKAGE) +post-extract: +. 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 + +.include "../../databases/postgresql95/options.mk" diff --git a/databases/postgresql95/PLIST b/databases/postgresql95/PLIST new file mode 100644 index 00000000000..afae6853594 --- /dev/null +++ b/databases/postgresql95/PLIST @@ -0,0 +1,2 @@ +@comment $NetBSD: PLIST,v 1.1 2016/02/25 21:37:35 tnn Exp $ +@comment this plist intentionally left empty diff --git a/databases/postgresql95/distinfo b/databases/postgresql95/distinfo new file mode 100644 index 00000000000..28b2811ae7c --- /dev/null +++ b/databases/postgresql95/distinfo @@ -0,0 +1,24 @@ +$NetBSD: distinfo,v 1.1 2016/02/25 21:37:35 tnn Exp $ + +SHA1 (postgresql-9.5.1.tar.bz2) = 905bc31bc4d500e9498340407740a61835a2022e +RMD160 (postgresql-9.5.1.tar.bz2) = 4758bd11dea976147a6a698f9fb0e1acc4b17db3 +SHA512 (postgresql-9.5.1.tar.bz2) = fcb2b3bde51c4152b3a72764de1f9b4e607cb591571ed5bc1187b2c6938c33e21bdd512694a969a03c046e4889a129bb0e75fa676d55a1a1e77142da1e984192 +Size (postgresql-9.5.1.tar.bz2) = 18441638 bytes +SHA1 (patch-config_missing) = c2d7d742922ba6861e7660c75b7b53f09e564813 +SHA1 (patch-config_perl.m4) = e035132b1c281a75752d570ac5e29a11176c25c5 +SHA1 (patch-configure) = 59fe9a768caf8a5d308acac60c28bc6bb2c40632 +SHA1 (patch-contrib_dblink_dblink.c) = a6f87ab9f2c28a72608d70267b71bd77437b0921 +SHA1 (patch-contrib_uuid-ossp_uuid-ossp.c) = efaffec2f51de70823430ca162d499b2886a9190 +SHA1 (patch-src_Makefile.global.in) = 2ab3affedc77b202f6749964287438d6179ca23a +SHA1 (patch-src_Makefile.shlib) = 46b3a8591678f92892d3837cd31fa44e8a7e21b3 +SHA1 (patch-src_backend_Makefile) = b70b38ea23af6cdde9d2349f2441a429078cfaca +SHA1 (patch-src_backend_utils_adt_datetime.c) = d1ea70986634d3bfb663eff789425252656e1289 +SHA1 (patch-src_interfaces_ecpg_pgtypeslib_interval.c) = 614aa5dbe586b8681a3a2852d4f84860dbbd1b49 +SHA1 (patch-src_interfaces_libpq_Makefile) = 61bcf84eb69b6ec9faabab0b61913766f4b20f8c +SHA1 (patch-src_makefiles_Makefile.solaris) = 0168f5bc105ffc89d5db40907a08966d8465f5a0 +SHA1 (patch-src_pl_plperl_GNUmakefile) = 6ee3e431f46ce5c2a94df499504b2b8bd458bbef +SHA1 (patch-src_pl_plperl_plperl.h) = bd663fa80a47f7b82ce689060750fa6e631fbc61 +SHA1 (patch-src_timezone_localtime.c) = 622f57bc1d10f07ab73f86765cbf587eece57085 +SHA1 (patch-src_timezone_private.h) = 85dac95e40efc16270885087f868aeb76e1b9214 +SHA1 (patch-src_timezone_strftime.c) = 25102dce1b9b22385353af23500636fb18e3bf64 +SHA1 (patch-src_timezone_zic.c) = ed04d781845239ce5dc7c6fca406ce62c10a9605 diff --git a/databases/postgresql95/files/GNUmakefile.libpq b/databases/postgresql95/files/GNUmakefile.libpq new file mode 100644 index 00000000000..14c2b95343e --- /dev/null +++ b/databases/postgresql95/files/GNUmakefile.libpq @@ -0,0 +1,20 @@ +# $NetBSD: GNUmakefile.libpq,v 1.1 2016/02/25 21:37:35 tnn 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/postgresql95/files/dynloader-ltdl.h b/databases/postgresql95/files/dynloader-ltdl.h new file mode 100644 index 00000000000..8e54ecf64d7 --- /dev/null +++ b/databases/postgresql95/files/dynloader-ltdl.h @@ -0,0 +1,17 @@ +/* $NetBSD: dynloader-ltdl.h,v 1.1 2016/02/25 21:37:35 tnn 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/postgresql95/options.mk b/databases/postgresql95/options.mk new file mode 100644 index 00000000000..a80ce90aeb0 --- /dev/null +++ b/databases/postgresql95/options.mk @@ -0,0 +1,73 @@ +# $NetBSD: options.mk,v 1.1 2016/02/25 21:37:35 tnn Exp $ + +PKG_OPTIONS_VAR= PKG_OPTIONS.postgresql95 +PKG_SUPPORTED_OPTIONS= bonjour gssapi kerberos ldap pam xml dtrace + +.include "../../mk/bsd.options.mk" + +### +### Bonjour support. +### +.if !empty(PKG_OPTIONS:Mbonjour) +CONFIGURE_ARGS+= --with-bonjour +. if ${OPSYS} != "Darwin" +LIBS+= -ldns_sd +. endif +. include "../../net/mDNSResponder/buildlink3.mk" +.endif + +### +### 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:Mkerberos) +. include "../../mk/krb5.buildlink3.mk" +CONFIGURE_ARGS+= --with-krb5 + +CHECK_BUILTIN.${KRB5_TYPE}:= yes +.include "../../security/${KRB5_TYPE}/builtin.mk" +CHECK_BUILTIN.${KRB5_TYPE}:= no + +. if !empty(USE_BUILTIN.${KRB5_TYPE}:M[yY][eE][sS]) && \ + exists(${SH_KRB5_CONFIG}) +CFLAGS_KRB5!= ${SH_KRB5_CONFIG} --cflags +CPPFLAGS+= ${CFLAGS_KRB5} +. endif +.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 + +### +### XML support for the PostgreSQL backend. +### +.if !empty(PKG_OPTIONS:Mxml) +. include "../../textproc/libxml2/buildlink3.mk" +CONFIGURE_ARGS+= --with-libxml +.endif + +### +### Dtrace support +### +.if !empty(PKG_OPTIONS:Mdtrace) +CONFIGURE_ARGS+= --enable-dtrace +.endif diff --git a/databases/postgresql95/patches/patch-config_missing b/databases/postgresql95/patches/patch-config_missing new file mode 100644 index 00000000000..c05bb7f4ac8 --- /dev/null +++ b/databases/postgresql95/patches/patch-config_missing @@ -0,0 +1,13 @@ +$NetBSD: patch-config_missing,v 1.1 2016/02/25 21:37:35 tnn Exp $ + +--- config/missing.orig 2012-10-05 12:14:55.000000000 +0000 ++++ config/missing +@@ -40,7 +40,7 @@ pre-packaged $1 output. + ERROR: Perl is missing on your system. It is needed unless you are building + from an unmodified official distribution of PostgreSQL. + ***" >&2 +- exit 1 ++ exit 0 + ;; + + *) diff --git a/databases/postgresql95/patches/patch-config_perl.m4 b/databases/postgresql95/patches/patch-config_perl.m4 new file mode 100644 index 00000000000..a6226865895 --- /dev/null +++ b/databases/postgresql95/patches/patch-config_perl.m4 @@ -0,0 +1,15 @@ +$NetBSD: patch-config_perl.m4,v 1.1 2016/02/25 21:37:35 tnn Exp $ + +--- config/perl.m4.orig 2013-09-02 20:53:17.000000000 +0000 ++++ config/perl.m4 +@@ -62,9 +62,7 @@ if test "$PORTNAME" = "win32" ; then + perl_lib=`basename $perl_archlibexp/CORE/perl[[5-9]]*.lib .lib` + test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib" + else +-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` + fi + AC_SUBST(perl_embed_ldflags)dnl + if test -z "$perl_embed_ldflags" ; then diff --git a/databases/postgresql95/patches/patch-configure b/databases/postgresql95/patches/patch-configure new file mode 100644 index 00000000000..14bae95281c --- /dev/null +++ b/databases/postgresql95/patches/patch-configure @@ -0,0 +1,34 @@ +$NetBSD: patch-configure,v 1.1 2016/02/25 21:37:35 tnn Exp $ + +Finally, native solaris uses -lgss for gssapi on mit-krb5. + +--- configure.orig 2014-12-16 01:07:34.000000000 +0000 ++++ configure +@@ -2852,6 +2852,7 @@ case $host_os in + darwin*) template=darwin ;; + dragonfly*) template=netbsd ;; + freebsd*) template=freebsd ;; ++ dragonfly*) template=dragonfly ;; + hpux*) template=hpux ;; + linux*|gnu*|k*bsd*-gnu) + template=linux ;; +@@ -7310,9 +7311,7 @@ if test "$PORTNAME" = "win32" ; then + perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib` + test -e "$perl_archlibexp/CORE/$perl_lib.lib" && perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib" + else +-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` + fi + if test -z "$perl_embed_ldflags" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +@@ -8407,7 +8406,7 @@ return gss_init_sec_context (); + return 0; + } + _ACEOF +-for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do ++for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto' 'gss -lkrb5 lcrypto'; do + if test -z "$ac_lib"; then + ac_res="none required" + else diff --git a/databases/postgresql95/patches/patch-contrib_dblink_dblink.c b/databases/postgresql95/patches/patch-contrib_dblink_dblink.c new file mode 100644 index 00000000000..5dafdea82e3 --- /dev/null +++ b/databases/postgresql95/patches/patch-contrib_dblink_dblink.c @@ -0,0 +1,13 @@ +$NetBSD: patch-contrib_dblink_dblink.c,v 1.1 2016/02/25 21:37:35 tnn Exp $ + +--- contrib/dblink/dblink.c.orig 2013-04-01 18:20:36.000000000 +0000 ++++ contrib/dblink/dblink.c +@@ -52,7 +52,7 @@ + #include "parser/scansup.h" + #include "utils/acl.h" + #include "utils/builtins.h" +-#include "utils/fmgroids.h" ++#include "postgresql/server/utils/fmgroids.h" + #include "utils/guc.h" + #include "utils/lsyscache.h" + #include "utils/memutils.h" diff --git a/databases/postgresql95/patches/patch-contrib_uuid-ossp_uuid-ossp.c b/databases/postgresql95/patches/patch-contrib_uuid-ossp_uuid-ossp.c new file mode 100644 index 00000000000..3700fa04385 --- /dev/null +++ b/databases/postgresql95/patches/patch-contrib_uuid-ossp_uuid-ossp.c @@ -0,0 +1,22 @@ +$NetBSD: patch-contrib_uuid-ossp_uuid-ossp.c,v 1.1 2016/02/25 21:37:35 tnn Exp $ + +Explicitly define HAVE_UUID_H and HAVE_UUID_OSSP. + +--- contrib/uuid-ossp/uuid-ossp.c.orig 2015-01-14 20:54:38.000000000 +0000 ++++ contrib/uuid-ossp/uuid-ossp.c +@@ -26,6 +26,7 @@ + */ + #define uuid_hash bsd_uuid_hash + ++#define HAVE_UUID_H + #ifdef HAVE_UUID_H + #include <uuid.h> + #endif +@@ -42,6 +43,7 @@ + * Some BSD variants offer md5 and sha1 implementations but Linux does not, + * so we use a copy of the ones from pgcrypto. Not needed with OSSP, though. + */ ++#define HAVE_UUID_OSSP + #ifndef HAVE_UUID_OSSP + #include "md5.h" + #include "sha1.h" diff --git a/databases/postgresql95/patches/patch-src_Makefile.global.in b/databases/postgresql95/patches/patch-src_Makefile.global.in new file mode 100644 index 00000000000..47aeaf5ff46 --- /dev/null +++ b/databases/postgresql95/patches/patch-src_Makefile.global.in @@ -0,0 +1,16 @@ +$NetBSD: patch-src_Makefile.global.in,v 1.1 2016/02/25 21:37:35 tnn Exp $ + +--- src/Makefile.global.in.orig 2015-10-05 19:12:06.000000000 +0000 ++++ src/Makefile.global.in +@@ -570,6 +570,11 @@ ifeq ($(PORTNAME),win32) + LIBS += -lws2_32 + endif + ++# missing for link on cygwin ? ++ifeq ($(PORTNAME),cygwin) ++LIBS += $(LDAP_LIBS_BE) ++endif ++ + # Not really standard libc functions, used by the backend. + TAS = @TAS@ + diff --git a/databases/postgresql95/patches/patch-src_Makefile.shlib b/databases/postgresql95/patches/patch-src_Makefile.shlib new file mode 100644 index 00000000000..b443f5bf141 --- /dev/null +++ b/databases/postgresql95/patches/patch-src_Makefile.shlib @@ -0,0 +1,61 @@ +$NetBSD: patch-src_Makefile.shlib,v 1.1 2016/02/25 21:37:35 tnn Exp $ + +--- src/Makefile.shlib.orig 2016-02-08 21:12:28.000000000 +0000 ++++ src/Makefile.shlib +@@ -151,17 +151,11 @@ endif + + ifeq ($(PORTNAME), freebsd) + ifdef ELF_SYSTEM +- ifdef SO_MAJOR_VERSION +- shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) +- endif + LINK.shared = $(COMPILER) -shared + ifdef soname + LINK.shared += -Wl,-x,-soname,$(soname) + endif + else +- ifdef SO_MAJOR_VERSION +- shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) +- endif + LINK.shared = $(LD) -x -Bshareable -Bforcearchive + endif + endif +@@ -177,6 +171,17 @@ ifeq ($(PORTNAME), netbsd) + endif + endif + ++ifeq ($(PORTNAME), dragonfly) ++ ifdef ELF_SYSTEM ++ LINK.shared = $(COMPILER) -shared ++ ifdef soname ++ LINK.shared += -Wl,-x,-soname,$(soname) ++ endif ++ else ++ LINK.shared = $(LD) -x -Bshareable -Bforcearchive ++ endif ++endif ++ + ifeq ($(PORTNAME), hpux) + ifdef SO_MAJOR_VERSION + shlib = lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) +@@ -474,8 +479,10 @@ ifdef soname + # we don't install $(shlib) on AIX + # (see http://archives.postgresql.org/message-id/52EF20B2E3209443BC37736D00C3C1380A6E79FE@EXADV1.host.magwien.gv.at) + ifneq ($(PORTNAME), aix) ++ifeq ($(PORTNAME), cygwin) ++ $(INSTALL_SHLIB) $< '$(DESTDIR)$(bindir)/$(shlib)' ++else + $(INSTALL_SHLIB) $< '$(DESTDIR)$(libdir)/$(shlib)' +-ifneq ($(PORTNAME), cygwin) + ifneq ($(PORTNAME), win32) + ifneq ($(shlib), $(shlib_major)) + cd '$(DESTDIR)$(libdir)' && \ +@@ -488,7 +495,7 @@ ifneq ($(shlib), $(shlib_bare)) + $(LN_S) $(shlib) $(shlib_bare) + endif + endif # not win32 +-endif # not cygwin ++endif # cygwin + endif # not aix + ifneq (,$(findstring $(PORTNAME),win32 cygwin)) + $(INSTALL_SHLIB) $< '$(DESTDIR)$(bindir)/$(shlib)' diff --git a/databases/postgresql95/patches/patch-src_backend_Makefile b/databases/postgresql95/patches/patch-src_backend_Makefile new file mode 100644 index 00000000000..ca1433736aa --- /dev/null +++ b/databases/postgresql95/patches/patch-src_backend_Makefile @@ -0,0 +1,24 @@ +$NetBSD: patch-src_backend_Makefile,v 1.1 2016/02/25 21:37:35 tnn Exp $ + +--- src/backend/Makefile.orig 2014-12-16 01:07:34.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 +@@ -121,6 +125,8 @@ catalog/schemapg.h: | submake-schemapg + + $(top_builddir)/src/port/libpgport_srv.a: | submake-libpgport + ++$(top_builddir)/src/common/libpgcommon_srv.a: | submake-libpgport ++ + + # The postgres.o target is needed by the rule in Makefile.global that + # creates the exports file when MAKE_EXPORTS = true. diff --git a/databases/postgresql95/patches/patch-src_backend_utils_adt_datetime.c b/databases/postgresql95/patches/patch-src_backend_utils_adt_datetime.c new file mode 100644 index 00000000000..e796cc155fc --- /dev/null +++ b/databases/postgresql95/patches/patch-src_backend_utils_adt_datetime.c @@ -0,0 +1,14 @@ +$NetBSD: patch-src_backend_utils_adt_datetime.c,v 1.1 2016/02/25 21:37:35 tnn Exp $ + +--- src/backend/utils/adt/datetime.c.orig 2014-12-16 01:07:34.000000000 +0000 ++++ src/backend/utils/adt/datetime.c +@@ -31,6 +31,9 @@ + #include "utils/memutils.h" + #include "utils/tzparser.h" + ++#if defined(__NetBSD__) ++#define strtoi pg_strtoi ++#endif + + static int DecodeNumber(int flen, char *field, bool haveTextMonth, + int fmask, int *tmask, diff --git a/databases/postgresql95/patches/patch-src_interfaces_ecpg_pgtypeslib_interval.c b/databases/postgresql95/patches/patch-src_interfaces_ecpg_pgtypeslib_interval.c new file mode 100644 index 00000000000..2df7ed544af --- /dev/null +++ b/databases/postgresql95/patches/patch-src_interfaces_ecpg_pgtypeslib_interval.c @@ -0,0 +1,15 @@ +$NetBSD: patch-src_interfaces_ecpg_pgtypeslib_interval.c,v 1.1 2016/02/25 21:37:35 tnn Exp $ + +--- src/interfaces/ecpg/pgtypeslib/interval.c.orig 2014-12-16 01:07:34.000000000 +0000 ++++ src/interfaces/ecpg/pgtypeslib/interval.c +@@ -14,6 +14,10 @@ + #include "pgtypes_error.h" + #include "pgtypes_interval.h" + ++#if defined(__NetBSD__) ++#define strtoi pg_strtoi ++#endif ++ + /* copy&pasted from .../src/backend/utils/adt/datetime.c */ + static int + strtoi(const char *nptr, char **endptr, int base) diff --git a/databases/postgresql95/patches/patch-src_interfaces_libpq_Makefile b/databases/postgresql95/patches/patch-src_interfaces_libpq_Makefile new file mode 100644 index 00000000000..a2c7e562b01 --- /dev/null +++ b/databases/postgresql95/patches/patch-src_interfaces_libpq_Makefile @@ -0,0 +1,13 @@ +$NetBSD: patch-src_interfaces_libpq_Makefile,v 1.1 2016/02/25 21:37:35 tnn Exp $ + +--- src/interfaces/libpq/Makefile.orig 2016-02-08 21:12:28.000000000 +0000 ++++ src/interfaces/libpq/Makefile +@@ -49,7 +49,7 @@ OBJS += fe-secure-openssl.o + endif + + ifeq ($(PORTNAME), cygwin) +-override shlib = cyg$(NAME)$(DLSUFFIX) ++override shlib = cyg$(NAME)-$(SO_MAJOR_VERSION)$(DLSUFFIX) + endif + + ifeq ($(PORTNAME), win32) diff --git a/databases/postgresql95/patches/patch-src_makefiles_Makefile.solaris b/databases/postgresql95/patches/patch-src_makefiles_Makefile.solaris new file mode 100644 index 00000000000..b855cabea5f --- /dev/null +++ b/databases/postgresql95/patches/patch-src_makefiles_Makefile.solaris @@ -0,0 +1,10 @@ +$NetBSD: patch-src_makefiles_Makefile.solaris,v 1.1 2016/02/25 21:37:35 tnn Exp $ + +--- src/makefiles/Makefile.solaris.orig 2011-09-23 00:00:48.000000000 +0200 ++++ src/makefiles/Makefile.solaris 2011-10-11 11:53:51.948565783 +0200 +@@ -23,5 +23,3 @@ ifeq ($(GCC), yes) + else + $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SL) -G -o $@ $< + endif +- +-sqlmansect = 5sql diff --git a/databases/postgresql95/patches/patch-src_pl_plperl_GNUmakefile b/databases/postgresql95/patches/patch-src_pl_plperl_GNUmakefile new file mode 100644 index 00000000000..09bfe981e06 --- /dev/null +++ b/databases/postgresql95/patches/patch-src_pl_plperl_GNUmakefile @@ -0,0 +1,21 @@ +$NetBSD: patch-src_pl_plperl_GNUmakefile,v 1.1 2016/02/25 21:37:35 tnn Exp $ + +--- src/pl/plperl/GNUmakefile.orig 2013-09-02 20:53:17.000000000 +0000 ++++ src/pl/plperl/GNUmakefile +@@ -55,7 +55,6 @@ XSUBPPDIR = $(shell $(PERL) -e 'use List + + include $(top_srcdir)/src/Makefile.shlib + +-plperl.o: perlchunks.h plperl_opmask.h plperl_helpers.h + + plperl_opmask.h: plperl_opmask.pl + @if [ x"$(perl_privlibexp)" = x"" ]; then echo "configure switch --with-perl was not specified."; exit 1; fi +@@ -65,7 +64,7 @@ perlchunks.h: $(PERLCHUNKS) + @if [ x"$(perl_privlibexp)" = x"" ]; then echo "configure switch --with-perl was not specified."; exit 1; fi + $(PERL) $(srcdir)/text2macro.pl --strip='^(\#.*|\s*)$$' $^ > $@ + +-all: all-lib ++all: perlchunks.h plperl_opmask.h plperl_helpers.h all-lib + + SPI.c: SPI.xs plperl_helpers.h + @if [ x"$(perl_privlibexp)" = x"" ]; then echo "configure switch --with-perl was not specified."; exit 1; fi diff --git a/databases/postgresql95/patches/patch-src_pl_plperl_plperl.h b/databases/postgresql95/patches/patch-src_pl_plperl_plperl.h new file mode 100644 index 00000000000..c28abe5cdd3 --- /dev/null +++ b/databases/postgresql95/patches/patch-src_pl_plperl_plperl.h @@ -0,0 +1,26 @@ +$NetBSD: patch-src_pl_plperl_plperl.h,v 1.1 2016/02/25 21:37:35 tnn Exp $ + +--- src/pl/plperl/plperl.h.orig 2011-09-22 23:57:57.000000000 +0200 ++++ src/pl/plperl/plperl.h 2011-10-12 20:36:11.783264869 +0200 +@@ -44,12 +44,21 @@ + #undef vsnprintf + #endif + ++#ifdef __sun ++#define list_head sun_list_head ++#define list_tail sun_list_tail ++#endif + + /* required for perl API */ + #include "EXTERN.h" + #include "perl.h" + #include "XSUB.h" + ++#ifdef __sun ++#undef list_head ++#undef list_tail ++#endif ++ + /* put back our snprintf and vsnprintf */ + #ifdef USE_REPL_SNPRINTF + #ifdef snprintf diff --git a/databases/postgresql95/patches/patch-src_timezone_localtime.c b/databases/postgresql95/patches/patch-src_timezone_localtime.c new file mode 100644 index 00000000000..473d1c90aa0 --- /dev/null +++ b/databases/postgresql95/patches/patch-src_timezone_localtime.c @@ -0,0 +1,31 @@ +$NetBSD: patch-src_timezone_localtime.c,v 1.1 2016/02/25 21:37:35 tnn Exp $ + +--- src/timezone/localtime.c.orig 2009-06-11 16:49:15.000000000 +0200 ++++ src/timezone/localtime.c +@@ -81,20 +81,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/postgresql95/patches/patch-src_timezone_private.h b/databases/postgresql95/patches/patch-src_timezone_private.h new file mode 100644 index 00000000000..02d9bfa6144 --- /dev/null +++ b/databases/postgresql95/patches/patch-src_timezone_private.h @@ -0,0 +1,15 @@ +$NetBSD: patch-src_timezone_private.h,v 1.1 2016/02/25 21:37:35 tnn 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/postgresql95/patches/patch-src_timezone_strftime.c b/databases/postgresql95/patches/patch-src_timezone_strftime.c new file mode 100644 index 00000000000..bf87446d546 --- /dev/null +++ b/databases/postgresql95/patches/patch-src_timezone_strftime.c @@ -0,0 +1,13 @@ +$NetBSD: patch-src_timezone_strftime.c,v 1.1 2016/02/25 21:37:35 tnn 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/postgresql95/patches/patch-src_timezone_zic.c b/databases/postgresql95/patches/patch-src_timezone_zic.c new file mode 100644 index 00000000000..7c001f4cefe --- /dev/null +++ b/databases/postgresql95/patches/patch-src_timezone_zic.c @@ -0,0 +1,78 @@ +$NetBSD: patch-src_timezone_zic.c,v 1.1 2016/02/25 21:37:35 tnn Exp $ + +--- src/timezone/zic.c.orig 2010-03-16 07:17:04.000000000 +0000 ++++ src/timezone/zic.c +@@ -121,51 +121,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; |