8 |
8 |
|
9 |
9 |
inherit flag-o-matic linux-info llvm pam python-single-r1 systemd tmpfiles
|
10 |
10 |
|
11 |
|
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
|
|
11 |
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
|
12 |
12 |
|
13 |
13 |
SLOT=$(ver_cut 1)
|
14 |
14 |
|
... | ... | |
91 |
91 |
}
|
92 |
92 |
|
93 |
93 |
src_prepare() {
|
|
94 |
eapply "${FILESDIR}"/${PN}-13.3-riscv-spinlocks.patch
|
|
95 |
|
94 |
96 |
# Set proper run directory
|
95 |
97 |
sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \
|
96 |
98 |
-i src/include/pg_config_manual.h || die
|
... | ... | |
100 |
102 |
# hardened and non-hardened environments. (Bug #528786)
|
101 |
103 |
sed 's/@install_bin@/install -c/' -i src/Makefile.global.in || die
|
102 |
104 |
|
103 |
|
use server || eapply "${FILESDIR}/${PN}-12.1-no-server.patch"
|
|
105 |
use server || eapply "${FILESDIR}/${PN}-13.8-no-server.patch"
|
104 |
106 |
|
105 |
107 |
if use pam ; then
|
106 |
108 |
sed "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \
|
... | ... | |
131 |
133 |
[[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
|
132 |
134 |
fi
|
133 |
135 |
|
134 |
|
econf \
|
|
136 |
local myconf="\
|
135 |
137 |
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
136 |
138 |
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
137 |
139 |
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
138 |
140 |
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
139 |
141 |
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
140 |
142 |
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
141 |
|
$(use_enable !alpha spinlocks) \
|
142 |
143 |
$(use_enable debug) \
|
143 |
144 |
$(use_with icu) \
|
144 |
145 |
$(use_with kerberos gssapi) \
|
... | ... | |
155 |
156 |
$(use_with xml libxml) \
|
156 |
157 |
$(use_with xml libxslt) \
|
157 |
158 |
$(use_with zlib) \
|
158 |
|
$(use_enable nls)
|
|
159 |
$(use_enable nls)"
|
|
160 |
if use alpha; then
|
|
161 |
myconf+=" --disable-spinlocks"
|
|
162 |
else
|
|
163 |
# Should be the default but just in case
|
|
164 |
myconf+=" --enable-spinlocks"
|
|
165 |
fi
|
|
166 |
econf ${myconf}
|
159 |
167 |
}
|
160 |
168 |
|
161 |
169 |
src_compile() {
|
... | ... | |
436 |
444 |
|
437 |
445 |
src_test() {
|
438 |
446 |
if use server && [[ ${UID} -ne 0 ]] ; then
|
|
447 |
# Some ICU tests fail if LC_CTYPE and LC_COLLATE aren't the same. We set
|
|
448 |
# LC_CTYPE to be equal to LC_COLLATE since LC_COLLATE is set by Portage.
|
|
449 |
local old_ctype=${LC_CTYPE}
|
|
450 |
export LC_CTYPE=${LC_COLLATE}
|
439 |
451 |
emake check
|
440 |
|
|
|
452 |
export LC_CTYPE=${old_ctype}
|
441 |
453 |
einfo "If you think other tests besides the regression tests are necessary, please"
|
442 |
454 |
einfo "submit a bug including a patch for this ebuild to enable them."
|
443 |
455 |
else
|