1 |
commit: 0fa80295af29bf426677f4f7fbdb7dc1f0fc1f4e |
2 |
Author: Aaron W. Swenson <titanofold <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 24 03:42:36 2020 +0000 |
4 |
Commit: Aaron W. Swenson <titanofold <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 24 03:42:36 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fa80295 |
7 |
|
8 |
dev-db/postgis: Version Bump and Fix |
9 |
|
10 |
Bump to 3.1.0. |
11 |
|
12 |
No longer auto-magically depend on libcxx, and tries more names for a compatible |
13 |
CPP interface. |
14 |
|
15 |
Bug: https://bugs.gentoo.org/731104 |
16 |
Bug: https://bugs.gentoo.org/747544 |
17 |
Signed-off-by: Aaron W. Swenson <titanofold <AT> gentoo.org> |
18 |
|
19 |
dev-db/postgis/Manifest | 1 + |
20 |
.../files/postgis-3.0.3-detect-only-stdc.patch | 17 +++ |
21 |
.../files/postgis-3.0.3-try-other-cpp-names.patch | 12 ++ |
22 |
dev-db/postgis/postgis-3.0.3-r2.ebuild | 139 ++++++++++++++++++++ |
23 |
dev-db/postgis/postgis-3.1.0.ebuild | 140 +++++++++++++++++++++ |
24 |
5 files changed, 309 insertions(+) |
25 |
|
26 |
diff --git a/dev-db/postgis/Manifest b/dev-db/postgis/Manifest |
27 |
index 705f54c7fd9..7d45c2f6ebb 100644 |
28 |
--- a/dev-db/postgis/Manifest |
29 |
+++ b/dev-db/postgis/Manifest |
30 |
@@ -5,4 +5,5 @@ DIST postgis-3.0.0.tar.gz 17359802 BLAKE2B aa83bdc2d1950c517f99cbdd877eb7261f6c2 |
31 |
DIST postgis-3.0.1.tar.gz 16839923 BLAKE2B 6888fa49562ab71929e92007de305fd6610c74988faaf08fbeabbf1d13029ebbb5da788826dc63d03ae5c873fbe408ae6c0f108b2975755d2b13bc69bed53558 SHA512 5ebce2303d672bb342f7fae6cade08140c8a687fc38e82e5b41eebb8465cdf3dc7bdbeae53b1179df8112a01842dd65f362fc107b381e2a1fa6e161b77a50227 |
32 |
DIST postgis-3.0.2.tar.gz 16855299 BLAKE2B 99ee872abf52651ab53e4dd6203d99d428d366f60b949fabcae938980f5c17809872e9b23f7ab1f3480a60242e735c926e54122492e1b8966ed8c748eb7c4fe6 SHA512 763d7818d195eca0b07d94a864b13da68e5734ae57b7c93c285dc2d0fa4a155715745e5da67e1a3bca49d8d4f89dc495ed3912c079722290ce9f220afca33f4d |
33 |
DIST postgis-3.0.3.tar.gz 16871696 BLAKE2B 891f814271de9193cd17013d6d971a752d2e984cb0f68b05510450adef97fc96827e3d1a1c7e4fa4cf79a5d15eb3f74b32e6e9a8db1947f7bad7c2b23656bc8f SHA512 478f0971e18c2a1bd651c9bf7b995236aad32fda037762505cf8ac9e67a4e40917436248c1e62827a1a6da96c15c4ae8d0b606d548fa080cdff453642b897115 |
34 |
+DIST postgis-3.1.0.tar.gz 17262134 BLAKE2B dbc6edde826328b84ca7d6cc9329d648c7874d51528252759499131d7ad5dbc1a7a4ef881054f2fa1fc255810157270dc1c0ae0e2ea24ec702f06b9fd5f6dfed SHA512 c5b063ff7cbe855ab6ce4104d170b27eea04ae632fd6fcb8de38b14699296a8e0c9ce06bfb48ab14cba51b7a1b3f7e0a3996d9377a954dfc39fd68fe3f839e8f |
35 |
DIST postgis-3.1.0alpha3.tar.gz 17197128 BLAKE2B f3b777efa8542b82db6031fa77a5728be94689542b45e4515887306cd0ae42cd9d802eae94b07e5a70f308e82fe6afc49a29f43ad2c302d9913f00797118764c SHA512 758b688aa01babc5ac9cc703d3d64fd751639425df7e1a2aa5bb72f1707a8279f87e7b3d84e23f465a51d08787858e0eb54e0afc38039d69ddfe7668e2dce256 |
36 |
|
37 |
diff --git a/dev-db/postgis/files/postgis-3.0.3-detect-only-stdc.patch b/dev-db/postgis/files/postgis-3.0.3-detect-only-stdc.patch |
38 |
new file mode 100644 |
39 |
index 00000000000..5b97102bb23 |
40 |
--- /dev/null |
41 |
+++ b/dev-db/postgis/files/postgis-3.0.3-detect-only-stdc.patch |
42 |
@@ -0,0 +1,17 @@ |
43 |
+diff -Naruw postgis-3.1.0.orig/configure.ac postgis-3.1.0/configure.ac |
44 |
+--- postgis-3.1.0.orig/configure.ac 2020-12-18 14:39:26.000000000 -0500 |
45 |
++++ postgis-3.1.0/configure.ac 2020-12-19 07:35:13.232167083 -0500 |
46 |
+@@ -1501,12 +1501,9 @@ |
47 |
+ dnl ============================================================ |
48 |
+ CC="$WAGYU_CXX" |
49 |
+ |
50 |
+- AC_CHECK_LIB(c++, main, [HAVE_CPP=yes], [HAVE_CPP=no]) |
51 |
+ AC_CHECK_LIB(stdc++, main, [HAVE_STDCPP=yes], [HAVE_STDCPP=no]) |
52 |
+ |
53 |
+- if test "x$HAVE_CPP" = "xyes"; then |
54 |
+- WAGYU_LDFLAGS="-lc++" |
55 |
+- elif test "x$HAVE_STDCPP" = "xyes"; then |
56 |
++ if test "x$HAVE_STDCPP" = "xyes"; then |
57 |
+ WAGYU_LDFLAGS="-lstdc++" |
58 |
+ else |
59 |
+ AC_MSG_WARN("Could not find a C++ standard library") |
60 |
|
61 |
diff --git a/dev-db/postgis/files/postgis-3.0.3-try-other-cpp-names.patch b/dev-db/postgis/files/postgis-3.0.3-try-other-cpp-names.patch |
62 |
new file mode 100644 |
63 |
index 00000000000..691cf8d1936 |
64 |
--- /dev/null |
65 |
+++ b/dev-db/postgis/files/postgis-3.0.3-try-other-cpp-names.patch |
66 |
@@ -0,0 +1,12 @@ |
67 |
+diff -Naruw postgis-3.1.0.orig/configure.ac postgis-3.1.0/configure.ac |
68 |
+--- postgis-3.1.0.orig/configure.ac 2020-12-18 14:39:26.000000000 -0500 |
69 |
++++ postgis-3.1.0/configure.ac 2020-12-23 21:44:09.223273050 -0500 |
70 |
+@@ -31,7 +31,7 @@ |
71 |
+ dnl |
72 |
+ dnl SQL Preprocessor |
73 |
+ dnl |
74 |
+-AC_PATH_PROG([CPPBIN], [cpp], []) |
75 |
++AC_PATH_PROGS([CPPBIN], [cpp x86_64-pc-linux-gnu-cpp x86-pc-linux-gnu-cpp], []) |
76 |
+ if test "x$CPPBIN" != "x"; then |
77 |
+ SQLPP="${CPPBIN} -traditional-cpp -w -P" |
78 |
+ else |
79 |
|
80 |
diff --git a/dev-db/postgis/postgis-3.0.3-r2.ebuild b/dev-db/postgis/postgis-3.0.3-r2.ebuild |
81 |
new file mode 100644 |
82 |
index 00000000000..407f889068d |
83 |
--- /dev/null |
84 |
+++ b/dev-db/postgis/postgis-3.0.3-r2.ebuild |
85 |
@@ -0,0 +1,139 @@ |
86 |
+# Copyright 1999-2020 Gentoo Authors |
87 |
+# Distributed under the terms of the GNU General Public License v2 |
88 |
+ |
89 |
+EAPI=7 |
90 |
+ |
91 |
+POSTGRES_COMPAT=( 9.{5..6} {10..13} ) |
92 |
+POSTGRES_USEDEP="server" |
93 |
+inherit autotools postgres-multi |
94 |
+ |
95 |
+MY_P="${PN}-$(ver_rs 3 '')" |
96 |
+ |
97 |
+if [[ ${PV} = *9999* ]] ; then |
98 |
+ inherit git-r3 |
99 |
+ EGIT_REPO_URI="https://git.osgeo.org/gitea/postgis/postgis.git" |
100 |
+else |
101 |
+ PGIS="$(ver_cut 1-2)" |
102 |
+ SRC_URI="https://download.osgeo.org/postgis/source/${MY_P}.tar.gz" |
103 |
+ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
104 |
+fi |
105 |
+ |
106 |
+DESCRIPTION="Geographic Objects for PostgreSQL" |
107 |
+HOMEPAGE="https://postgis.net" |
108 |
+ |
109 |
+S="${WORKDIR}/${MY_P}" |
110 |
+ |
111 |
+LICENSE="GPL-2" |
112 |
+SLOT="0" |
113 |
+IUSE="address-standardizer doc gtk static-libs test topology" |
114 |
+ |
115 |
+REQUIRED_USE="test? ( doc ) ${POSTGRES_REQ_USE}" |
116 |
+ |
117 |
+# Needs a running psql instance, doesn't work out of the box |
118 |
+RESTRICT="test" |
119 |
+ |
120 |
+RDEPEND="${POSTGRES_DEP} |
121 |
+ dev-libs/json-c:= |
122 |
+ dev-libs/libxml2:2 |
123 |
+ dev-libs/protobuf-c:= |
124 |
+ >=sci-libs/geos-3.6.0 |
125 |
+ >=sci-libs/proj-4.9.0:= |
126 |
+ >=sci-libs/gdal-1.10.0:= |
127 |
+ address-standardizer? ( dev-libs/libpcre ) |
128 |
+ gtk? ( x11-libs/gtk+:2 ) |
129 |
+" |
130 |
+DEPEND="${RDEPEND} |
131 |
+ virtual/pkgconfig |
132 |
+ doc? ( |
133 |
+ app-text/docbook-xsl-stylesheets |
134 |
+ app-text/docbook-xml-dtd:4.5 |
135 |
+ dev-libs/libxslt |
136 |
+ virtual/imagemagick-tools[png] |
137 |
+ ) |
138 |
+ test? ( dev-util/cunit ) |
139 |
+" |
140 |
+ |
141 |
+PATCHES=( |
142 |
+ "${FILESDIR}/${PN}-2.2.0-arflags.patch" |
143 |
+ "${FILESDIR}/${P}-avoid-calling-ar-directly.patch" |
144 |
+ "${FILESDIR}/${PN}-3.0.3-detect-only-stdc.patch" |
145 |
+ "${FILESDIR}/${PN}-3.0.3-try-other-cpp-names.patch" |
146 |
+) |
147 |
+ |
148 |
+src_prepare() { |
149 |
+ default |
150 |
+ |
151 |
+ if [[ ${PV} = *9999* ]] ; then |
152 |
+ source "${S}"/Version.config |
153 |
+ PGIS="${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}" |
154 |
+ fi |
155 |
+ |
156 |
+ # These modules are built using the same *FLAGS that were used to build |
157 |
+ # dev-db/postgresql. The right thing to do is to ignore the current |
158 |
+ # *FLAGS settings. |
159 |
+ QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so" |
160 |
+ |
161 |
+ local AT_M4DIR="macros" |
162 |
+ eautoreconf |
163 |
+ |
164 |
+ postgres-multi_src_prepare |
165 |
+} |
166 |
+ |
167 |
+src_configure() { |
168 |
+ local myeconfargs=( |
169 |
+ $(use_with address-standardizer) |
170 |
+ $(use_with gtk gui) |
171 |
+ $(use_with topology) |
172 |
+ ) |
173 |
+ postgres-multi_foreach econf "${myeconfargs[@]}" |
174 |
+} |
175 |
+ |
176 |
+src_compile() { |
177 |
+ postgres-multi_foreach emake |
178 |
+ postgres-multi_foreach emake -C topology |
179 |
+ |
180 |
+ if use doc ; then |
181 |
+ postgres-multi_foreach emake comments |
182 |
+ postgres-multi_foreach emake cheatsheets |
183 |
+ postgres-multi_forbest emake -C doc html |
184 |
+ fi |
185 |
+} |
186 |
+ |
187 |
+src_install() { |
188 |
+ postgres-multi_foreach emake DESTDIR="${D}" install |
189 |
+ postgres-multi_foreach emake -C topology DESTDIR="${D}" install |
190 |
+ postgres-multi_forbest dobin ./utils/postgis_restore.pl |
191 |
+ |
192 |
+ dodoc CREDITS TODO loader/README.* doc/*txt |
193 |
+ |
194 |
+ docinto topology |
195 |
+ dodoc topology/{TODO,README} |
196 |
+ |
197 |
+ if use doc ; then |
198 |
+ postgres-multi_foreach emake DESTDIR="${D}" comments-install |
199 |
+ |
200 |
+ docinto html |
201 |
+ postgres-multi_forbest dodoc doc/html/{postgis.html,style.css} |
202 |
+ |
203 |
+ docinto html/images |
204 |
+ postgres-multi_forbest dodoc doc/html/images/* |
205 |
+ fi |
206 |
+ |
207 |
+ use static-libs || find "${ED}" -name '*.a' -delete |
208 |
+} |
209 |
+ |
210 |
+pkg_postinst() { |
211 |
+ ebegin "Refreshing PostgreSQL symlinks" |
212 |
+ postgresql-config update |
213 |
+ eend $? |
214 |
+ |
215 |
+ local base_uri="https://postgis.net/docs/manual-" |
216 |
+ if [[ ${PV} = *9999* ]] ; then |
217 |
+ base_uri+="dev" |
218 |
+ else |
219 |
+ base_uri+="${PGIS}" |
220 |
+ fi |
221 |
+ |
222 |
+ elog "To finish installing PostGIS, follow the directions detailed at:" |
223 |
+ elog "${base_uri}/postgis_installation.html#create_new_db_extensions" |
224 |
+} |
225 |
|
226 |
diff --git a/dev-db/postgis/postgis-3.1.0.ebuild b/dev-db/postgis/postgis-3.1.0.ebuild |
227 |
new file mode 100644 |
228 |
index 00000000000..b7ace852615 |
229 |
--- /dev/null |
230 |
+++ b/dev-db/postgis/postgis-3.1.0.ebuild |
231 |
@@ -0,0 +1,140 @@ |
232 |
+# Copyright 1999-2020 Gentoo Authors |
233 |
+# Distributed under the terms of the GNU General Public License v2 |
234 |
+ |
235 |
+EAPI=7 |
236 |
+ |
237 |
+POSTGRES_COMPAT=( 9.6 {10..13} ) |
238 |
+POSTGRES_USEDEP="server" |
239 |
+inherit autotools postgres-multi toolchain-funcs |
240 |
+ |
241 |
+MY_P="${PN}-$(ver_rs 3 '')" |
242 |
+ |
243 |
+if [[ ${PV} = *9999* ]] ; then |
244 |
+ inherit git-r3 |
245 |
+ EGIT_REPO_URI="https://git.osgeo.org/gitea/postgis/postgis.git" |
246 |
+else |
247 |
+ PGIS="$(ver_cut 1-2)" |
248 |
+ SRC_URI="https://download.osgeo.org/postgis/source/${MY_P}.tar.gz" |
249 |
+ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
250 |
+fi |
251 |
+ |
252 |
+DESCRIPTION="Geographic Objects for PostgreSQL" |
253 |
+HOMEPAGE="https://postgis.net" |
254 |
+ |
255 |
+S="${WORKDIR}/${MY_P}" |
256 |
+ |
257 |
+LICENSE="GPL-2" |
258 |
+SLOT="0" |
259 |
+IUSE="address-standardizer doc gtk static-libs topology" |
260 |
+ |
261 |
+REQUIRED_USE="${POSTGRES_REQ_USE}" |
262 |
+ |
263 |
+# Needs a running psql instance, doesn't work out of the box |
264 |
+RESTRICT="test" |
265 |
+ |
266 |
+RDEPEND="${POSTGRES_DEP} |
267 |
+ dev-libs/json-c:= |
268 |
+ dev-libs/libxml2:2 |
269 |
+ dev-libs/protobuf-c:= |
270 |
+ >=sci-libs/geos-3.9.0 |
271 |
+ >=sci-libs/proj-4.9.0:= |
272 |
+ >=sci-libs/gdal-1.10.0:= |
273 |
+ address-standardizer? ( dev-libs/libpcre ) |
274 |
+ gtk? ( x11-libs/gtk+:2 ) |
275 |
+" |
276 |
+DEPEND="${RDEPEND} |
277 |
+ virtual/pkgconfig |
278 |
+ doc? ( |
279 |
+ app-text/docbook-xsl-stylesheets |
280 |
+ app-text/docbook-xml-dtd:4.5 |
281 |
+ dev-libs/libxslt |
282 |
+ virtual/imagemagick-tools[png] |
283 |
+ ) |
284 |
+" |
285 |
+ |
286 |
+PATCHES=( |
287 |
+ "${FILESDIR}/${PN}-2.2.0-arflags.patch" |
288 |
+ "${FILESDIR}/${PN}-3.0.3-avoid-calling-ar-directly.patch" |
289 |
+ "${FILESDIR}/${PN}-3.0.3-detect-only-stdc.patch" |
290 |
+ "${FILESDIR}/${PN}-3.0.3-try-other-cpp-names.patch" |
291 |
+) |
292 |
+ |
293 |
+src_prepare() { |
294 |
+ default |
295 |
+ |
296 |
+ if [[ ${PV} = *9999* ]] ; then |
297 |
+ source "${S}"/Version.config |
298 |
+ PGIS="${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}" |
299 |
+ fi |
300 |
+ |
301 |
+ # These modules are built using the same *FLAGS that were used to build |
302 |
+ # dev-db/postgresql. The right thing to do is to ignore the current |
303 |
+ # *FLAGS settings. |
304 |
+ QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so" |
305 |
+ |
306 |
+ local AT_M4DIR="macros" |
307 |
+ eautoreconf |
308 |
+ |
309 |
+ postgres-multi_src_prepare |
310 |
+} |
311 |
+ |
312 |
+src_configure() { |
313 |
+ export CPP=$(tc-getCPP) |
314 |
+ |
315 |
+ local myeconfargs=( |
316 |
+ $(use_with address-standardizer) |
317 |
+ $(use_with gtk gui) |
318 |
+ $(use_with topology) |
319 |
+ ) |
320 |
+ postgres-multi_foreach econf "${myeconfargs[@]}" |
321 |
+} |
322 |
+ |
323 |
+src_compile() { |
324 |
+ postgres-multi_foreach emake |
325 |
+ postgres-multi_foreach emake -C topology |
326 |
+ |
327 |
+ if use doc ; then |
328 |
+ postgres-multi_foreach emake comments |
329 |
+ postgres-multi_foreach emake cheatsheets |
330 |
+ postgres-multi_forbest emake -C doc html |
331 |
+ fi |
332 |
+} |
333 |
+ |
334 |
+src_install() { |
335 |
+ postgres-multi_foreach emake DESTDIR="${D}" install |
336 |
+ postgres-multi_foreach emake -C topology DESTDIR="${D}" install |
337 |
+ postgres-multi_forbest dobin ./utils/postgis_restore.pl |
338 |
+ |
339 |
+ dodoc CREDITS TODO loader/README.* doc/*txt |
340 |
+ |
341 |
+ docinto topology |
342 |
+ dodoc topology/{TODO,README} |
343 |
+ |
344 |
+ if use doc ; then |
345 |
+ postgres-multi_foreach emake DESTDIR="${D}" comments-install |
346 |
+ |
347 |
+ docinto html |
348 |
+ postgres-multi_forbest dodoc doc/html/{postgis.html,style.css} |
349 |
+ |
350 |
+ docinto html/images |
351 |
+ postgres-multi_forbest dodoc doc/html/images/* |
352 |
+ fi |
353 |
+ |
354 |
+ use static-libs || find "${ED}" -name '*.a' -delete |
355 |
+} |
356 |
+ |
357 |
+pkg_postinst() { |
358 |
+ ebegin "Refreshing PostgreSQL symlinks" |
359 |
+ postgresql-config update |
360 |
+ eend $? |
361 |
+ |
362 |
+ local base_uri="https://postgis.net/docs/manual-" |
363 |
+ if [[ ${PV} = *9999* ]] ; then |
364 |
+ base_uri+="dev" |
365 |
+ else |
366 |
+ base_uri+="${PGIS}" |
367 |
+ fi |
368 |
+ |
369 |
+ elog "To finish installing PostGIS, follow the directions detailed at:" |
370 |
+ elog "${base_uri}/postgis_installation.html#create_new_db_extensions" |
371 |
+} |