2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"). You may
4 # only use this file in accordance with the terms of the CDDL.
6 # A full copy of the text of the CDDL should have accompanied this
7 # source. A copy of the CDDL is also available via the Internet at
8 # http://www.illumos.org/license/CDDL.
12 # Copyright 2012-2013, EveryCity Ltd. All rights reserved.
13 # Copyright 2019 Alexander Pyhalov
14 # Copyright 2019 Michal Nowak
15 # Copyright 2021 Gary Mills
16 # Copyright 2022 Marco van Wieringen
17 # Copyright 2023 Andreas Wacknitz
22 include ..
/..
/..
/make-rules
/shared-macros.mk
24 COMPONENT_NAME
= postgresql
25 COMPONENT_MJR_VERSION
= 15
26 COMPONENT_MNR_VERSION
= 8
27 COMPONENT_VERSION
= $(COMPONENT_MJR_VERSION
).
$(COMPONENT_MNR_VERSION
)
28 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
29 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.bz2
30 COMPONENT_ARCHIVE_HASH
= sha256
:4403515f9a69eeb3efebc98f30b8c696122bfdf895e92b3b23f5b8e769edcb6a
31 COMPONENT_ARCHIVE_URL
= https
://ftp.postgresql.org
/pub
/source
/v
$(COMPONENT_VERSION
)/$(COMPONENT_ARCHIVE
)
32 COMPONENT_PROJECT_URL
= https
://www.postgresql.org
33 COMPONENT_FMRI
= database
/postgres-
$(COMPONENT_MJR_VERSION
)
34 COMPONENT_CLASSIFICATION
= System
/Databases
35 COMPONENT_LICENSE
= Postgresql
36 COMPONENT_LICENSE_FILE
= COPYRIGHT
38 TEST_TARGET
= $(TEST_64
)
39 include $(WS_MAKE_RULES
)/common.mk
41 # Missing files in build dir for configure without this.
42 COMPONENT_PRE_CONFIGURE_ACTION
= ( $(CLONEY
) $(SOURCE_DIR
) $(@D
) )
44 CONFIGURE_SCRIPT
= $(@D
)/configure
46 CONFIGURE_OPTIONS
= --prefix=/usr
/postgres
/$(COMPONENT_MJR_VERSION
)
47 CONFIGURE_OPTIONS
+= --exec-prefix
=/usr
/postgres
/$(COMPONENT_MJR_VERSION
)
48 CONFIGURE_OPTIONS
+= --datadir=/usr
/postgres
/$(COMPONENT_MJR_VERSION
)/share
49 CONFIGURE_OPTIONS
+= --sysconfdir
=/etc
/postgres
/$(COMPONENT_MJR_VERSION
)
50 CONFIGURE_OPTIONS
+= --mandir=/usr
/postgres
/$(COMPONENT_MJR_VERSION
)/man
51 CONFIGURE_OPTIONS
+= --includedir=/usr
/postgres
/$(COMPONENT_MJR_VERSION
)/include
52 CONFIGURE_OPTIONS
+= --sharedstatedir
=/var
/postgres
/$(COMPONENT_MJR_VERSION
)
53 CONFIGURE_OPTIONS
+= --localstatedir
=/var
/postgres
/$(COMPONENT_MJR_VERSION
)
54 CONFIGURE_OPTIONS
+= --localedir
=/usr
/share
/locale
55 CONFIGURE_OPTIONS
+= --docdir
=/usr
/postgres
/$(COMPONENT_MJR_VERSION
)/doc
56 CONFIGURE_OPTIONS
+= --htmldir
=/usr
/postgres
/$(COMPONENT_MJR_VERSION
)/doc
57 CONFIGURE_OPTIONS
+= --enable-nls
58 CONFIGURE_OPTIONS
+= --with-system-tzdata
=/usr
/share
/lib
/zoneinfo
59 CONFIGURE_OPTIONS
.64 += --with-tcl
60 CONFIGURE_OPTIONS
.64 += --with-python
61 CONFIGURE_OPTIONS
.64 += --with-pam
62 CONFIGURE_OPTIONS
+= --with-ssl
=openssl
63 CONFIGURE_OPTIONS
+= --with-libedit-preferred
64 CONFIGURE_OPTIONS
+= --with-libxml
65 CONFIGURE_OPTIONS
.64 += --with-libxslt
66 CONFIGURE_OPTIONS
+= --with-lz4
67 CONFIGURE_OPTIONS
+= --with-gssapi
68 CONFIGURE_OPTIONS
+= --enable-thread-safety
69 CONFIGURE_OPTIONS
+= --enable-dtrace
70 CONFIGURE_OPTIONS
+= --enable-integer-datetimes
71 CONFIGURE_OPTIONS
+= --with-includes
=/usr
/include
72 CONFIGURE_OPTIONS
+= --with-tclconfig
=/usr
/lib
73 CONFIGURE_OPTIONS
.64 += --with-perl
74 CONFIGURE_OPTIONS
+= --with-uuid
=e2fs
76 CONFIGURE_OPTIONS
.32 += --bindir=/usr
/postgres
/$(COMPONENT_MJR_VERSION
)/bin
/$(MACH32
)
77 CONFIGURE_OPTIONS
.32 += --libexecdir
=/usr
/postgres
/$(COMPONENT_MJR_VERSION
)/bin
/$(MACH32
)
78 CONFIGURE_OPTIONS
.32 += --sbindir
=/usr
/postgres
/$(COMPONENT_MJR_VERSION
)/bin
/$(MACH32
)
79 CONFIGURE_OPTIONS
.32 += --libdir=/usr
/postgres
/$(COMPONENT_MJR_VERSION
)/lib
80 CONFIGURE_OPTIONS
.32 += LDFLAGS
=-L
$(OPENSSL_PREFIX
)/lib
82 CONFIGURE_OPTIONS
.64 += --bindir=/usr
/postgres
/$(COMPONENT_MJR_VERSION
)/bin
83 CONFIGURE_OPTIONS
.64 += --libexecdir
=/usr
/postgres
/$(COMPONENT_MJR_VERSION
)/bin
84 CONFIGURE_OPTIONS
.64 += --sbindir
=/usr
/postgres
/$(COMPONENT_MJR_VERSION
)/bin
85 CONFIGURE_OPTIONS
.64 += --libdir=/usr
/postgres
/$(COMPONENT_MJR_VERSION
)/lib
/$(MACH64
)
86 CONFIGURE_OPTIONS
.64 += LDFLAGS
=-L
$(OPENSSL_PREFIX
)/lib
/$(MACH64
)
88 CONFIGURE_OPTIONS
+= CPPFLAGS
=-I
$(OPENSSL_PREFIX
)/include
90 CONFIGURE_OPTIONS
+= $(CONFIGURE_OPTIONS.
$(BITS
))
92 CONFIGURE_ENV
+= PYTHON
=$(PYTHON
)
93 CONFIGURE_ENV
+= PERL
=$(PERL
)
95 COMPONENT_BUILD_ENV
+= MAKELEVEL
=0
96 COMPONENT_BUILD_ENV
+= PATH
=$(PATH
)
97 COMPONENT_INSTALL_ENV
+= PATH
=$(PATH
)
99 COMPONENT_BUILD_TARGETS
= world
100 COMPONENT_INSTALL_TARGETS
= install-world
102 COMPONENT_POST_INSTALL_ACTION
.64= cd
$(BUILD_DIR_
$(BITS
))/src
/test/regress
; env
$(COMPONENT_INSTALL_ENV
) gmake
$(COMPONENT_INSTALL_ARGS
) install-lib install-tests
;
104 COMPONENT_POST_INSTALL_ACTION
+= $(COMPONENT_POST_INSTALL_ACTION.
$(BITS
))
105 COMPONENT_POST_INSTALL_ACTION
+= cd
$(PROTO_DIR
) && \
106 $(MV
) usr
/postgres
/$(COMPONENT_MJR_VERSION
)/include/pg_config.h usr
/postgres
/$(COMPONENT_MJR_VERSION
)/include/pg_config-
$(BITS
).h
&& \
107 $(MV
) usr
/postgres
/$(COMPONENT_MJR_VERSION
)/include/server
/pg_config.h usr
/postgres
/$(COMPONENT_MJR_VERSION
)/include/server
/pg_config-
$(BITS
).h
111 COMPONENT_TEST_ENV
+= PATH
=$(PATH
)
113 COMPONENT_TEST_TRANSFORMS
= \
115 '-e "s:[ \t]*[0-9]* ms::"' \
120 # Auto-generated dependencies
121 PERL_REQUIRED_PACKAGES
+= runtime
/perl
122 PYTHON_REQUIRED_PACKAGES
+= runtime
/python
123 REQUIRED_PACKAGES
+= $(OPENSSL_PKG
)
124 REQUIRED_PACKAGES
+= SUNWcs
125 REQUIRED_PACKAGES
+= database
/postgres-common
126 REQUIRED_PACKAGES
+= library
/libedit
127 REQUIRED_PACKAGES
+= library
/libxml2
128 REQUIRED_PACKAGES
+= library
/libxslt
129 REQUIRED_PACKAGES
+= library
/lz4
130 REQUIRED_PACKAGES
+= library
/zlib
131 REQUIRED_PACKAGES
+= runtime
/tcl-8
132 REQUIRED_PACKAGES
+= shell/ksh93
133 REQUIRED_PACKAGES
+= system
/library
134 REQUIRED_PACKAGES
+= system
/library
/math
135 REQUIRED_PACKAGES
+= system
/library
/security
/gss