Fri Oct 25 08:00:47 2019 UTC ()
postgresql11: fix nls option support


(triaxx)
diff -r1.8 -r1.9 pkgsrc/databases/postgresql11/Makefile.common
diff -r1.4 -r1.5 pkgsrc/databases/postgresql11/options.mk

cvs diff -r1.8 -r1.9 pkgsrc/databases/postgresql11/Makefile.common (switch to unified diff)

--- pkgsrc/databases/postgresql11/Makefile.common 2019/10/25 04:39:18 1.8
+++ pkgsrc/databases/postgresql11/Makefile.common 2019/10/25 08:00:46 1.9
@@ -1,136 +1,132 @@ @@ -1,136 +1,132 @@
1# $NetBSD: Makefile.common,v 1.8 2019/10/25 04:39:18 triaxx Exp $ 1# $NetBSD: Makefile.common,v 1.9 2019/10/25 08:00:46 triaxx Exp $
2# 2#
3# This Makefile fragment is included by all PostgreSQL packages built from 3# This Makefile fragment is included by all PostgreSQL packages built from
4# the main sources of the PostgreSQL distribution except jdbc-postgresql. 4# the main sources of the PostgreSQL distribution except jdbc-postgresql.
5# 5#
6# The PostgreSQL package naming scheme, aside from the obvious piecewise 6# The PostgreSQL package naming scheme, aside from the obvious piecewise
7# packages, is as follows: 7# packages, is as follows:
8# <lang>-postgresql client-side interface to PostgreSQL 8# <lang>-postgresql client-side interface to PostgreSQL
9# postgresql-<lang> server-side module for PostgreSQL backend 9# postgresql-<lang> server-side module for PostgreSQL backend
10# 10#
11# used by databases/postgresql11-client/Makefile 11# used by databases/postgresql11-client/Makefile
12# used by databases/postgresql11-contrib/Makefile 12# used by databases/postgresql11-contrib/Makefile
13# used by databases/postgresql11-docs/Makefile 13# used by databases/postgresql11-docs/Makefile
14# used by databases/postgresql11-plperl/Makefile 14# used by databases/postgresql11-plperl/Makefile
15# used by databases/postgresql11-plpython/Makefile 15# used by databases/postgresql11-plpython/Makefile
16# used by databases/postgresql11-pltcl/Makefile 16# used by databases/postgresql11-pltcl/Makefile
17# used by databases/postgresql11-server/Makefile 17# used by databases/postgresql11-server/Makefile
18 18
19DISTNAME= postgresql-11.5 19DISTNAME= postgresql-11.5
20CATEGORIES= databases 20CATEGORIES= databases
21MASTER_SITES= ${MASTER_SITE_PGSQL:=source/v${PKGVERSION_NOREV}/} 21MASTER_SITES= ${MASTER_SITE_PGSQL:=source/v${PKGVERSION_NOREV}/}
22EXTRACT_SUFX= .tar.bz2 22EXTRACT_SUFX= .tar.bz2
23 23
24MAINTAINER?= adam@NetBSD.org 24MAINTAINER?= adam@NetBSD.org
25HOMEPAGE= https://www.postgresql.org/ 25HOMEPAGE= https://www.postgresql.org/
26LICENSE= postgresql-license 26LICENSE= postgresql-license
27 27
28CONFLICTS+= postgresql-[0-9]* 28CONFLICTS+= postgresql-[0-9]*
29CONFLICTS+= postgresql[2-9][0-9]-[0-9]* 29CONFLICTS+= postgresql[2-9][0-9]-[0-9]*
30 30
31.if !empty(PKGNAME:M*-*-*) 31.if !empty(PKGNAME:M*-*-*)
32module= ${PKGNAME:C/-[0-9].*$//:C/^.*-//} 32module= ${PKGNAME:C/-[0-9].*$//:C/^.*-//}
33CONFLICTS+= postgresql[2-9][0-9]-${module}-[0-9]* 33CONFLICTS+= postgresql[2-9][0-9]-${module}-[0-9]*
34.endif 34.endif
35 35
36DISTINFO_FILE?= ${.CURDIR}/../../databases/postgresql11/distinfo 36DISTINFO_FILE?= ${.CURDIR}/../../databases/postgresql11/distinfo
37COMMON_FILESDIR?= ${.CURDIR}/../../databases/postgresql11/files 37COMMON_FILESDIR?= ${.CURDIR}/../../databases/postgresql11/files
38PATCHDIR?= ${.CURDIR}/../../databases/postgresql11/patches 38PATCHDIR?= ${.CURDIR}/../../databases/postgresql11/patches
39 39
40USE_PKGLOCALEDIR= yes 
41USE_TOOLS+= bison gmake lex 40USE_TOOLS+= bison gmake lex
42PKG_SYSCONFSUBDIR= postgresql 41PKG_SYSCONFSUBDIR= postgresql
43 42
44.include "../../mk/bsd.prefs.mk" 43.include "../../mk/bsd.prefs.mk"
45 44
46PG_TEMPLATE.SunOS= solaris 45PG_TEMPLATE.SunOS= solaris
47PG_TEMPLATE.IRIX= irix5 46PG_TEMPLATE.IRIX= irix5
48PG_TEMPLATE.MirBSD= openbsd 47PG_TEMPLATE.MirBSD= openbsd
49.if !defined(PG_TEMPLATE.${OPSYS}) 48.if !defined(PG_TEMPLATE.${OPSYS})
50PG_TEMPLATE.${OPSYS}= ${LOWER_OPSYS} 49PG_TEMPLATE.${OPSYS}= ${LOWER_OPSYS}
51.endif 50.endif
52 51
53PG_DATA_DIR= ${PREFIX}/share/postgresql 52PG_DATA_DIR= ${PREFIX}/share/postgresql
54PG_DOC_DIR= ${PREFIX}/share/doc/postgresql 53PG_DOC_DIR= ${PREFIX}/share/doc/postgresql
55PG_LOCALE_DIR= ${PREFIX}/${PKGLOCALEDIR}/locale 54PG_LOCALE_DIR= ${PREFIX}/${PKGLOCALEDIR}/locale
56PG_ETC_DIR= ${PKG_SYSCONFDIR} 55PG_ETC_DIR= ${PKG_SYSCONFDIR}
57 56
58GNU_CONFIGURE= yes 57GNU_CONFIGURE= yes
59CONFIGURE_ARGS+= --sysconfdir=${PG_ETC_DIR} 58CONFIGURE_ARGS+= --sysconfdir=${PG_ETC_DIR}
60CONFIGURE_ARGS+= --datadir=${PG_DATA_DIR} 59CONFIGURE_ARGS+= --datadir=${PG_DATA_DIR}
61CONFIGURE_ARGS+= --docdir=${PG_DOC_DIR} 60CONFIGURE_ARGS+= --docdir=${PG_DOC_DIR}
62CONFIGURE_ARGS+= --localedir=${PG_LOCALE_DIR} 61CONFIGURE_ARGS+= --localedir=${PG_LOCALE_DIR}
63CONFIGURE_ARGS+= --with-template=${PG_TEMPLATE.${OPSYS}} 62CONFIGURE_ARGS+= --with-template=${PG_TEMPLATE.${OPSYS}}
64 63
65CONFIGURE_ARGS+= --with-libxml 64CONFIGURE_ARGS+= --with-libxml
66CONFIGURE_ARGS+= --with-readline 65CONFIGURE_ARGS+= --with-readline
67CONFIGURE_ARGS+= --without-perl 66CONFIGURE_ARGS+= --without-perl
68CONFIGURE_ARGS+= --without-python 67CONFIGURE_ARGS+= --without-python
69CONFIGURE_ARGS+= --without-tcl 68CONFIGURE_ARGS+= --without-tcl
70 69
71# avoid pointing to a wrapper 
72CONFIGURE_ENV+= MSGFMT=${TOOLS_PATH.msgfmt} 
73 
74# sys/ucred.h shouldn't be included on Solaris, causes conflicts between 70# sys/ucred.h shouldn't be included on Solaris, causes conflicts between
75# procfs and largefile. 71# procfs and largefile.
76CONFIGURE_ENV.SunOS+= ac_cv_header_sys_ucred_h=no 72CONFIGURE_ENV.SunOS+= ac_cv_header_sys_ucred_h=no
77 73
78# pkgsrc silently filters the --as-needed linker arg, but that makes 74# pkgsrc silently filters the --as-needed linker arg, but that makes
79# it leak into the pgxs Makefiles and compromises manual building 75# it leak into the pgxs Makefiles and compromises manual building
80# against PostgreSQL files installed. Disable it here to prevent 76# against PostgreSQL files installed. Disable it here to prevent
81# that from happening. 77# that from happening.
82.if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin" 78.if ${OPSYS} == "SunOS" || ${OPSYS} == "Darwin"
83CONFIGURE_ENV+= pgac_cv_prog_cc_ldflags__Wl___as_needed=no 79CONFIGURE_ENV+= pgac_cv_prog_cc_ldflags__Wl___as_needed=no
84.endif 80.endif
85 81
86# configure fails on OpenBSD and MirBSD if thread safety is enabled. 82# configure fails on OpenBSD and MirBSD if thread safety is enabled.
87CONFIGURE_ARGS.MirBSD+= --disable-thread-safety 83CONFIGURE_ARGS.MirBSD+= --disable-thread-safety
88CONFIGURE_ARGS.OpenBSD+=--disable-thread-safety 84CONFIGURE_ARGS.OpenBSD+=--disable-thread-safety
89 85
90# PGSQL_BLCKSZ is the size in bytes of a PostgreSQL disk page or block. 86# PGSQL_BLCKSZ is the size in bytes of a PostgreSQL disk page or block.
91# This also limits the size of a tuple. The valid values are powers 87# This also limits the size of a tuple. The valid values are powers
92# of 2 up to 32768, and the default size is 8196. Please don't change 88# of 2 up to 32768, and the default size is 8196. Please don't change
93# this value unless you know what you are doing. 89# this value unless you know what you are doing.
94BUILD_DEFS+= PGSQL_BLCKSZ 90BUILD_DEFS+= PGSQL_BLCKSZ
95.if defined(PGSQL_BLCKSZ) 91.if defined(PGSQL_BLCKSZ)
96CONFIGURE_ARGS+= --with-blocksize=${PGSQL_BLCKSZ} 92CONFIGURE_ARGS+= --with-blocksize=${PGSQL_BLCKSZ}
97.endif 93.endif
98 94
99# PostgreSQL explicitly forbids any use of -ffast-math 95# PostgreSQL explicitly forbids any use of -ffast-math
100BUILDLINK_TRANSFORM+= rm:-ffast-math 96BUILDLINK_TRANSFORM+= rm:-ffast-math
101 97
102# USE_LIBLTDL is "yes" or "no" depending on whether we're using libltdl 98# USE_LIBLTDL is "yes" or "no" depending on whether we're using libltdl
103# to provide "dlopen" functionality for the PostgreSQL backend. 99# to provide "dlopen" functionality for the PostgreSQL backend.
104.if ${OPSYS} == "Interix" 100.if ${OPSYS} == "Interix"
105USE_LIBLTDL?= yes 101USE_LIBLTDL?= yes
106.endif 102.endif
107USE_LIBLTDL?= no 103USE_LIBLTDL?= no
108 104
109.include "../../devel/zlib/buildlink3.mk" 105.include "../../devel/zlib/buildlink3.mk"
110.include "../../textproc/libxml2/buildlink3.mk" 106.include "../../textproc/libxml2/buildlink3.mk"
111 107
112.include "../../mk/readline.buildlink3.mk" 108.include "../../mk/readline.buildlink3.mk"
113.if ${READLINE_TYPE} == "editline" 109.if ${READLINE_TYPE} == "editline"
114CONFIGURE_ARGS+= --with-libedit-preferred 110CONFIGURE_ARGS+= --with-libedit-preferred
115.endif 111.endif
116 112
117.if !defined(META_PACKAGE) 113.if !defined(META_PACKAGE)
118post-extract: 114post-extract:
119. if !empty(USE_LIBLTDL:M[yY][eE][sS]) 115. if !empty(USE_LIBLTDL:M[yY][eE][sS])
120 ${CP} -f ${COMMON_FILESDIR}/dynloader-ltdl.h \ 116 ${CP} -f ${COMMON_FILESDIR}/dynloader-ltdl.h \
121 ${WRKSRC}/src/backend/port/dynloader/${PG_TEMPLATE.${OPSYS}:Q}.h 117 ${WRKSRC}/src/backend/port/dynloader/${PG_TEMPLATE.${OPSYS}:Q}.h
122 ${ECHO} "static int dummy = 0;" \ 118 ${ECHO} "static int dummy = 0;" \
123 > ${WRKSRC}/src/backend/port/dynloader/${PG_TEMPLATE.${OPSYS}:Q}.c 119 > ${WRKSRC}/src/backend/port/dynloader/${PG_TEMPLATE.${OPSYS}:Q}.c
124. endif 120. endif
125 ${TOUCH} ${WRKSRC}/src/template/dragonfly 121 ${TOUCH} ${WRKSRC}/src/template/dragonfly
126 ${CP} ${WRKSRC}/src/backend/port/dynloader/freebsd.c \ 122 ${CP} ${WRKSRC}/src/backend/port/dynloader/freebsd.c \
127 ${WRKSRC}/src/backend/port/dynloader/dragonfly.c 123 ${WRKSRC}/src/backend/port/dynloader/dragonfly.c
128 ${CP} ${WRKSRC}/src/backend/port/dynloader/freebsd.h \ 124 ${CP} ${WRKSRC}/src/backend/port/dynloader/freebsd.h \
129 ${WRKSRC}/src/backend/port/dynloader/dragonfly.h 125 ${WRKSRC}/src/backend/port/dynloader/dragonfly.h
130 ${CP} ${WRKSRC}/src/include/port/freebsd.h \ 126 ${CP} ${WRKSRC}/src/include/port/freebsd.h \
131 ${WRKSRC}/src/include/port/dragonfly.h 127 ${WRKSRC}/src/include/port/dragonfly.h
132 ${CP} ${WRKSRC}/src/makefiles/Makefile.freebsd \ 128 ${CP} ${WRKSRC}/src/makefiles/Makefile.freebsd \
133 ${WRKSRC}/src/makefiles/Makefile.dragonfly 129 ${WRKSRC}/src/makefiles/Makefile.dragonfly
134.endif 130.endif
135 131
136.include "../../databases/postgresql11/options.mk" 132.include "../../databases/postgresql11/options.mk"

cvs diff -r1.4 -r1.5 pkgsrc/databases/postgresql11/options.mk (switch to unified diff)

--- pkgsrc/databases/postgresql11/options.mk 2019/10/25 07:15:40 1.4
+++ pkgsrc/databases/postgresql11/options.mk 2019/10/25 08:00:46 1.5
@@ -1,71 +1,71 @@ @@ -1,71 +1,71 @@
1# $NetBSD: options.mk,v 1.4 2019/10/25 07:15:40 triaxx Exp $ 1# $NetBSD: options.mk,v 1.5 2019/10/25 08:00:46 triaxx Exp $
2 2
3PKG_OPTIONS_VAR= PKG_OPTIONS.postgresql11 3PKG_OPTIONS_VAR= PKG_OPTIONS.postgresql11
4PKG_SUPPORTED_OPTIONS= bonjour dtrace icu llvm gssapi ldap pam 4PKG_SUPPORTED_OPTIONS= bonjour dtrace icu llvm gssapi ldap nls pam
5PKG_SUGGESTED_OPTIONS= gssapi nls 5PKG_SUGGESTED_OPTIONS= gssapi nls
6 6
7PLIST_VARS+= llvm nls 7PLIST_VARS+= llvm nls
8 8
9.include "../../mk/bsd.options.mk" 9.include "../../mk/bsd.options.mk"
10 10
11# Bonjour support 11# Bonjour support
12.if !empty(PKG_OPTIONS:Mbonjour) 12.if !empty(PKG_OPTIONS:Mbonjour)
13CONFIGURE_ARGS+= --with-bonjour 13CONFIGURE_ARGS+= --with-bonjour
14. if ${OPSYS} != "Darwin" 14. if ${OPSYS} != "Darwin"
15LIBS+= -ldns_sd 15LIBS+= -ldns_sd
16. endif 16. endif
17. include "../../net/mDNSResponder/buildlink3.mk" 17. include "../../net/mDNSResponder/buildlink3.mk"
18.endif 18.endif
19 19
20# Dtrace support 20# Dtrace support
21.if !empty(PKG_OPTIONS:Mdtrace) 21.if !empty(PKG_OPTIONS:Mdtrace)
22CONFIGURE_ARGS+= --enable-dtrace 22CONFIGURE_ARGS+= --enable-dtrace
23.endif 23.endif
24 24
25# ICU collatium support 25# ICU collatium support
26.if !empty(PKG_OPTIONS:Micu) 26.if !empty(PKG_OPTIONS:Micu)
27USE_TOOLS+= pkg-config 27USE_TOOLS+= pkg-config
28CONFIGURE_ARGS+= --with-icu 28CONFIGURE_ARGS+= --with-icu
29. include "../../textproc/icu/buildlink3.mk" 29. include "../../textproc/icu/buildlink3.mk"
30.endif 30.endif
31 31
32# GSSAPI (Kerberos5) authentication for the PostgreSQL backend 32# GSSAPI (Kerberos5) authentication for the PostgreSQL backend
33.if !empty(PKG_OPTIONS:Mgssapi) 33.if !empty(PKG_OPTIONS:Mgssapi)
34. include "../../mk/krb5.buildlink3.mk" 34. include "../../mk/krb5.buildlink3.mk"
35CONFIGURE_ARGS+= --with-gssapi 35CONFIGURE_ARGS+= --with-gssapi
36.else 36.else
37CONFIGURE_ARGS+= --without-gssapi 37CONFIGURE_ARGS+= --without-gssapi
38.endif 38.endif
39 39
40# LDAP authentication for the PostgreSQL backend 40# LDAP authentication for the PostgreSQL backend
41.if !empty(PKG_OPTIONS:Mldap) 41.if !empty(PKG_OPTIONS:Mldap)
42. include "../../databases/openldap-client/buildlink3.mk" 42. include "../../databases/openldap-client/buildlink3.mk"
43CONFIGURE_ARGS+= --with-ldap 43CONFIGURE_ARGS+= --with-ldap
44.endif 44.endif
45 45
46# LLVM based JIT support 46# LLVM based JIT support
47.if !empty(PKG_OPTIONS:Mllvm) 47.if !empty(PKG_OPTIONS:Mllvm)
48. include "../../lang/llvm/buildlink3.mk" 48. include "../../lang/llvm/buildlink3.mk"
49CONFIGURE_ARGS+= --with-llvm 49CONFIGURE_ARGS+= --with-llvm
50CONFIGURE_ENV+= CLANG=${CC} # XXX: make it be better 50CONFIGURE_ENV+= CLANG=${CC} # XXX: make it be better
51PLIST.llvm= yes 51PLIST.llvm= yes
52.endif 52.endif
53 53
54# NLS support 54# NLS support
55.if !empty(PKG_OPTIONS:Mnls) 55.if !empty(PKG_OPTIONS:Mnls)
56USE_PKGLOCALEDIR= yes 56USE_PKGLOCALEDIR= yes
57USE_TOOLS+= msgfmt 57USE_TOOLS+= msgfmt
58CONFIGURE_ARGS+= --enable-nls 58CONFIGURE_ARGS+= --enable-nls
59PLIST.nls= yes 59PLIST.nls= yes
60. include "../../devel/gettext-lib/buildlink3.mk" 60. include "../../devel/gettext-lib/buildlink3.mk"
61LIBS.SunOS+= -lintl 61LIBS.SunOS+= -lintl
62.else 62.else
63CONFIGURE_ARGS+= --disable-nls 63CONFIGURE_ARGS+= --disable-nls
64.endif 64.endif
65 65
66 66
67# PAM authentication for the PostgreSQL backend 67# PAM authentication for the PostgreSQL backend
68.if !empty(PKG_OPTIONS:Mpam) 68.if !empty(PKG_OPTIONS:Mpam)
69. include "../../mk/pam.buildlink3.mk" 69. include "../../mk/pam.buildlink3.mk"
70CONFIGURE_ARGS+= --with-pam 70CONFIGURE_ARGS+= --with-pam
71.endif 71.endif