| @@ -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 | |
19 | DISTNAME= postgresql-11.5 | | 19 | DISTNAME= postgresql-11.5 |
20 | CATEGORIES= databases | | 20 | CATEGORIES= databases |
21 | MASTER_SITES= ${MASTER_SITE_PGSQL:=source/v${PKGVERSION_NOREV}/} | | 21 | MASTER_SITES= ${MASTER_SITE_PGSQL:=source/v${PKGVERSION_NOREV}/} |
22 | EXTRACT_SUFX= .tar.bz2 | | 22 | EXTRACT_SUFX= .tar.bz2 |
23 | | | 23 | |
24 | MAINTAINER?= adam@NetBSD.org | | 24 | MAINTAINER?= adam@NetBSD.org |
25 | HOMEPAGE= https://www.postgresql.org/ | | 25 | HOMEPAGE= https://www.postgresql.org/ |
26 | LICENSE= postgresql-license | | 26 | LICENSE= postgresql-license |
27 | | | 27 | |
28 | CONFLICTS+= postgresql-[0-9]* | | 28 | CONFLICTS+= postgresql-[0-9]* |
29 | CONFLICTS+= postgresql[2-9][0-9]-[0-9]* | | 29 | CONFLICTS+= postgresql[2-9][0-9]-[0-9]* |
30 | | | 30 | |
31 | .if !empty(PKGNAME:M*-*-*) | | 31 | .if !empty(PKGNAME:M*-*-*) |
32 | module= ${PKGNAME:C/-[0-9].*$//:C/^.*-//} | | 32 | module= ${PKGNAME:C/-[0-9].*$//:C/^.*-//} |
33 | CONFLICTS+= postgresql[2-9][0-9]-${module}-[0-9]* | | 33 | CONFLICTS+= postgresql[2-9][0-9]-${module}-[0-9]* |
34 | .endif | | 34 | .endif |
35 | | | 35 | |
36 | DISTINFO_FILE?= ${.CURDIR}/../../databases/postgresql11/distinfo | | 36 | DISTINFO_FILE?= ${.CURDIR}/../../databases/postgresql11/distinfo |
37 | COMMON_FILESDIR?= ${.CURDIR}/../../databases/postgresql11/files | | 37 | COMMON_FILESDIR?= ${.CURDIR}/../../databases/postgresql11/files |
38 | PATCHDIR?= ${.CURDIR}/../../databases/postgresql11/patches | | 38 | PATCHDIR?= ${.CURDIR}/../../databases/postgresql11/patches |
39 | | | 39 | |
40 | USE_PKGLOCALEDIR= yes | | | |
41 | USE_TOOLS+= bison gmake lex | | 40 | USE_TOOLS+= bison gmake lex |
42 | PKG_SYSCONFSUBDIR= postgresql | | 41 | PKG_SYSCONFSUBDIR= postgresql |
43 | | | 42 | |
44 | .include "../../mk/bsd.prefs.mk" | | 43 | .include "../../mk/bsd.prefs.mk" |
45 | | | 44 | |
46 | PG_TEMPLATE.SunOS= solaris | | 45 | PG_TEMPLATE.SunOS= solaris |
47 | PG_TEMPLATE.IRIX= irix5 | | 46 | PG_TEMPLATE.IRIX= irix5 |
48 | PG_TEMPLATE.MirBSD= openbsd | | 47 | PG_TEMPLATE.MirBSD= openbsd |
49 | .if !defined(PG_TEMPLATE.${OPSYS}) | | 48 | .if !defined(PG_TEMPLATE.${OPSYS}) |
50 | PG_TEMPLATE.${OPSYS}= ${LOWER_OPSYS} | | 49 | PG_TEMPLATE.${OPSYS}= ${LOWER_OPSYS} |
51 | .endif | | 50 | .endif |
52 | | | 51 | |
53 | PG_DATA_DIR= ${PREFIX}/share/postgresql | | 52 | PG_DATA_DIR= ${PREFIX}/share/postgresql |
54 | PG_DOC_DIR= ${PREFIX}/share/doc/postgresql | | 53 | PG_DOC_DIR= ${PREFIX}/share/doc/postgresql |
55 | PG_LOCALE_DIR= ${PREFIX}/${PKGLOCALEDIR}/locale | | 54 | PG_LOCALE_DIR= ${PREFIX}/${PKGLOCALEDIR}/locale |
56 | PG_ETC_DIR= ${PKG_SYSCONFDIR} | | 55 | PG_ETC_DIR= ${PKG_SYSCONFDIR} |
57 | | | 56 | |
58 | GNU_CONFIGURE= yes | | 57 | GNU_CONFIGURE= yes |
59 | CONFIGURE_ARGS+= --sysconfdir=${PG_ETC_DIR} | | 58 | CONFIGURE_ARGS+= --sysconfdir=${PG_ETC_DIR} |
60 | CONFIGURE_ARGS+= --datadir=${PG_DATA_DIR} | | 59 | CONFIGURE_ARGS+= --datadir=${PG_DATA_DIR} |
61 | CONFIGURE_ARGS+= --docdir=${PG_DOC_DIR} | | 60 | CONFIGURE_ARGS+= --docdir=${PG_DOC_DIR} |
62 | CONFIGURE_ARGS+= --localedir=${PG_LOCALE_DIR} | | 61 | CONFIGURE_ARGS+= --localedir=${PG_LOCALE_DIR} |
63 | CONFIGURE_ARGS+= --with-template=${PG_TEMPLATE.${OPSYS}} | | 62 | CONFIGURE_ARGS+= --with-template=${PG_TEMPLATE.${OPSYS}} |
64 | | | 63 | |
65 | CONFIGURE_ARGS+= --with-libxml | | 64 | CONFIGURE_ARGS+= --with-libxml |
66 | CONFIGURE_ARGS+= --with-readline | | 65 | CONFIGURE_ARGS+= --with-readline |
67 | CONFIGURE_ARGS+= --without-perl | | 66 | CONFIGURE_ARGS+= --without-perl |
68 | CONFIGURE_ARGS+= --without-python | | 67 | CONFIGURE_ARGS+= --without-python |
69 | CONFIGURE_ARGS+= --without-tcl | | 68 | CONFIGURE_ARGS+= --without-tcl |
70 | | | 69 | |
71 | # avoid pointing to a wrapper | | | |
72 | CONFIGURE_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. |
76 | CONFIGURE_ENV.SunOS+= ac_cv_header_sys_ucred_h=no | | 72 | CONFIGURE_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" |
83 | CONFIGURE_ENV+= pgac_cv_prog_cc_ldflags__Wl___as_needed=no | | 79 | CONFIGURE_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. |
87 | CONFIGURE_ARGS.MirBSD+= --disable-thread-safety | | 83 | CONFIGURE_ARGS.MirBSD+= --disable-thread-safety |
88 | CONFIGURE_ARGS.OpenBSD+=--disable-thread-safety | | 84 | CONFIGURE_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. |
94 | BUILD_DEFS+= PGSQL_BLCKSZ | | 90 | BUILD_DEFS+= PGSQL_BLCKSZ |
95 | .if defined(PGSQL_BLCKSZ) | | 91 | .if defined(PGSQL_BLCKSZ) |
96 | CONFIGURE_ARGS+= --with-blocksize=${PGSQL_BLCKSZ} | | 92 | CONFIGURE_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 |
100 | BUILDLINK_TRANSFORM+= rm:-ffast-math | | 96 | BUILDLINK_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" |
105 | USE_LIBLTDL?= yes | | 101 | USE_LIBLTDL?= yes |
106 | .endif | | 102 | .endif |
107 | USE_LIBLTDL?= no | | 103 | USE_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" |
114 | CONFIGURE_ARGS+= --with-libedit-preferred | | 110 | CONFIGURE_ARGS+= --with-libedit-preferred |
115 | .endif | | 111 | .endif |
116 | | | 112 | |
117 | .if !defined(META_PACKAGE) | | 113 | .if !defined(META_PACKAGE) |
118 | post-extract: | | 114 | post-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" |