Gentoo Archives: gentoo-commits

From: Marek Szuba <marecki@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/postgresql/
Date: Sun, 11 Jul 2021 22:02:35
Message-Id: 1626040930.cbc076540f6fc01308819a1cb21cd10df53c484b.marecki@gentoo
1 commit: cbc076540f6fc01308819a1cb21cd10df53c484b
2 Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 11 20:09:25 2021 +0000
4 Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 11 22:02:10 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbc07654
7
8 dev-db/postgresql: disable spinlocks on riscv
9
10 No native spinlock support for this arch yet, not even in Git head.
11
12 Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
13
14 dev-db/postgresql/postgresql-13.3.ebuild | 12 +++++++++---
15 dev-db/postgresql/postgresql-14_beta2.ebuild | 12 +++++++++---
16 dev-db/postgresql/postgresql-9999.ebuild | 12 +++++++++---
17 3 files changed, 27 insertions(+), 9 deletions(-)
18
19 diff --git a/dev-db/postgresql/postgresql-13.3.ebuild b/dev-db/postgresql/postgresql-13.3.ebuild
20 index d71750a1cb7..2e2bf1e36a3 100644
21 --- a/dev-db/postgresql/postgresql-13.3.ebuild
22 +++ b/dev-db/postgresql/postgresql-13.3.ebuild
23 @@ -134,14 +134,13 @@ src_configure() {
24 [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
25 fi
26
27 - econf \
28 + local myconf="\
29 --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
30 --datadir="${PO}/usr/share/postgresql-${SLOT}" \
31 --includedir="${PO}/usr/include/postgresql-${SLOT}" \
32 --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
33 --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
34 --with-system-tzdata="${PO}/usr/share/zoneinfo" \
35 - $(use_enable !alpha spinlocks) \
36 $(use_enable debug) \
37 $(use_enable threads thread-safety) \
38 $(use_with icu) \
39 @@ -159,7 +158,14 @@ src_configure() {
40 $(use_with xml libxml) \
41 $(use_with xml libxslt) \
42 $(use_with zlib) \
43 - $(use_enable nls)
44 + $(use_enable nls)"
45 + if use alpha || use riscv; then
46 + myconf+=" --disable-spinlocks"
47 + else
48 + # Should be the default but just in case
49 + myconf+=" --enable-spinlocks"
50 + fi
51 + econf ${myconf}
52 }
53
54 src_compile() {
55
56 diff --git a/dev-db/postgresql/postgresql-14_beta2.ebuild b/dev-db/postgresql/postgresql-14_beta2.ebuild
57 index a9630c760e8..e6463312ebc 100644
58 --- a/dev-db/postgresql/postgresql-14_beta2.ebuild
59 +++ b/dev-db/postgresql/postgresql-14_beta2.ebuild
60 @@ -135,14 +135,13 @@ src_configure() {
61 [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
62 fi
63
64 - econf \
65 + local myconf="\
66 --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
67 --datadir="${PO}/usr/share/postgresql-${SLOT}" \
68 --includedir="${PO}/usr/include/postgresql-${SLOT}" \
69 --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
70 --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
71 --with-system-tzdata="${PO}/usr/share/zoneinfo" \
72 - $(use_enable !alpha spinlocks) \
73 $(use_enable debug) \
74 $(use_enable threads thread-safety) \
75 $(use_with icu) \
76 @@ -161,7 +160,14 @@ src_configure() {
77 $(use_with xml libxml) \
78 $(use_with xml libxslt) \
79 $(use_with zlib) \
80 - $(use_enable nls)
81 + $(use_enable nls)"
82 + if use alpha || use riscv; then
83 + myconf+=" --disable-spinlocks"
84 + else
85 + # Should be the default but just in case
86 + myconf+=" --enable-spinlocks"
87 + fi
88 + econf ${myconf}
89 }
90
91 src_compile() {
92
93 diff --git a/dev-db/postgresql/postgresql-9999.ebuild b/dev-db/postgresql/postgresql-9999.ebuild
94 index 106cb9fb88f..8bdc4467a14 100644
95 --- a/dev-db/postgresql/postgresql-9999.ebuild
96 +++ b/dev-db/postgresql/postgresql-9999.ebuild
97 @@ -151,14 +151,13 @@ src_configure() {
98 [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp"
99 fi
100
101 - econf \
102 + local myconf="\
103 --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
104 --datadir="${PO}/usr/share/postgresql-${SLOT}" \
105 --includedir="${PO}/usr/include/postgresql-${SLOT}" \
106 --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
107 --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
108 --with-system-tzdata="${PO}/usr/share/zoneinfo" \
109 - $(use_enable !alpha spinlocks) \
110 $(use_enable debug) \
111 $(use_enable nls) \
112 $(use_enable threads thread-safety) \
113 @@ -177,7 +176,14 @@ src_configure() {
114 $(use_with xml libxslt) \
115 $(use_with zlib) \
116 $(use_with systemd) \
117 - ${uuid_config}
118 + ${uuid_config}"
119 + if use alpha || use riscv; then
120 + myconf+=" --disable-spinlocks"
121 + else
122 + # Should be the default but just in case
123 + myconf+=" --enable-spinlocks"
124 + fi
125 + econf ${myconf}
126 }
127
128 src_compile() {