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
21 USE_PARALLEL_BUILD
= yes
22 include ..
/..
/..
/make-rules
/shared-macros.mk
24 COMPONENT_NAME
= postgresql
25 COMPONENT_VERSION_MAJOR
= 16
26 COMPONENT_VERSION
= $(COMPONENT_VERSION_MAJOR
).5
27 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
28 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.bz2
29 COMPONENT_ARCHIVE_HASH
= sha256
:a6cbbb7037f98cb8afa7d3970b7c48040cf02b115e39253a0c037a8bb8e778f0
30 COMPONENT_ARCHIVE_URL
= https
://ftp.postgresql.org
/pub
/source
/v
$(COMPONENT_VERSION
)/$(COMPONENT_ARCHIVE
)
31 COMPONENT_PROJECT_URL
= https
://www.postgresql.org
32 COMPONENT_FMRI
= database
/postgres-
$(COMPONENT_VERSION_MAJOR
)
33 COMPONENT_CLASSIFICATION
= System
/Databases
34 COMPONENT_LICENSE
= Postgresql
35 COMPONENT_LICENSE_FILE
= COPYRIGHT
37 TEST_TARGET
= $(TEST_64
)
38 include $(WS_MAKE_RULES
)/common.mk
40 # Missing files in build dir for configure without this.
41 COMPONENT_PRE_CONFIGURE_ACTION
= ( $(CLONEY
) $(SOURCE_DIR
) $(@D
) )
43 CONFIGURE_SCRIPT
= $(@D
)/configure
45 CONFIGURE_OPTIONS
= --prefix=/usr
/postgres
/$(COMPONENT_VERSION_MAJOR
)
46 CONFIGURE_OPTIONS
+= --exec-prefix
=/usr
/postgres
/$(COMPONENT_VERSION_MAJOR
)
47 CONFIGURE_OPTIONS
+= --datadir=/usr
/postgres
/$(COMPONENT_VERSION_MAJOR
)/share
48 CONFIGURE_OPTIONS
+= --sysconfdir
=/etc
/postgres
/$(COMPONENT_VERSION_MAJOR
)
49 CONFIGURE_OPTIONS
+= --mandir=/usr
/postgres
/$(COMPONENT_VERSION_MAJOR
)/man
50 CONFIGURE_OPTIONS
+= --includedir=/usr
/postgres
/$(COMPONENT_VERSION_MAJOR
)/include
51 CONFIGURE_OPTIONS
+= --sharedstatedir
=/var
/postgres
/$(COMPONENT_VERSION_MAJOR
)
52 CONFIGURE_OPTIONS
+= --localstatedir
=/var
/postgres
/$(COMPONENT_VERSION_MAJOR
)
53 CONFIGURE_OPTIONS
+= --localedir
=/usr
/share
/locale
54 CONFIGURE_OPTIONS
+= --docdir
=/usr
/postgres
/$(COMPONENT_VERSION_MAJOR
)/doc
55 CONFIGURE_OPTIONS
+= --htmldir
=/usr
/postgres
/$(COMPONENT_VERSION_MAJOR
)/doc
56 CONFIGURE_OPTIONS
+= --enable-nls
57 CONFIGURE_OPTIONS
+= --with-system-tzdata
=/usr
/share
/lib
/zoneinfo
58 CONFIGURE_OPTIONS
.64 += --with-tcl
59 CONFIGURE_OPTIONS
.64 += --with-python
60 CONFIGURE_OPTIONS
.64 += --with-pam
61 CONFIGURE_OPTIONS
+= --with-ssl
=openssl
62 CONFIGURE_OPTIONS
+= --with-libedit-preferred
63 CONFIGURE_OPTIONS
+= --with-libxml
64 CONFIGURE_OPTIONS
.64 += --with-libxslt
65 CONFIGURE_OPTIONS
+= --with-lz4
66 # We don't have gss_store_cred_into() which is part of heimdal since 2018:
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_VERSION_MAJOR
)/bin
/$(MACH32
)
77 CONFIGURE_OPTIONS
.32 += --libexecdir
=/usr
/postgres
/$(COMPONENT_VERSION_MAJOR
)/bin
/$(MACH32
)
78 CONFIGURE_OPTIONS
.32 += --sbindir
=/usr
/postgres
/$(COMPONENT_VERSION_MAJOR
)/bin
/$(MACH32
)
79 CONFIGURE_OPTIONS
.32 += --libdir=/usr
/postgres
/$(COMPONENT_VERSION_MAJOR
)/lib
80 CONFIGURE_OPTIONS
.32 += LDFLAGS
=-L
$(OPENSSL_PREFIX
)/lib
82 CONFIGURE_OPTIONS
.64 += --bindir=/usr
/postgres
/$(COMPONENT_VERSION_MAJOR
)/bin
83 CONFIGURE_OPTIONS
.64 += --libexecdir
=/usr
/postgres
/$(COMPONENT_VERSION_MAJOR
)/bin
84 CONFIGURE_OPTIONS
.64 += --sbindir
=/usr
/postgres
/$(COMPONENT_VERSION_MAJOR
)/bin
85 CONFIGURE_OPTIONS
.64 += --libdir=/usr
/postgres
/$(COMPONENT_VERSION_MAJOR
)/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_VERSION_MAJOR
)/include/pg_config.h usr
/postgres
/$(COMPONENT_VERSION_MAJOR
)/include/pg_config-
$(BITS
).h
&& \
107 $(MV
) usr
/postgres
/$(COMPONENT_VERSION_MAJOR
)/include/server
/pg_config.h usr
/postgres
/$(COMPONENT_VERSION_MAJOR
)/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
+= $(ICU_LIBRARY_PKG
)
124 REQUIRED_PACKAGES
+= $(OPENSSL_PKG
)
125 REQUIRED_PACKAGES
+= SUNWcs
126 REQUIRED_PACKAGES
+= database
/postgres-common
127 REQUIRED_PACKAGES
+= library
/libedit
128 REQUIRED_PACKAGES
+= library
/libxml2
129 REQUIRED_PACKAGES
+= library
/libxslt
130 REQUIRED_PACKAGES
+= library
/lz4
131 REQUIRED_PACKAGES
+= library
/zlib
132 REQUIRED_PACKAGES
+= runtime
/tcl-8
133 REQUIRED_PACKAGES
+= shell/ksh93
134 REQUIRED_PACKAGES
+= system
/library
135 REQUIRED_PACKAGES
+= system
/library
/math