1 |
commit: f28e994beb1d33a1d576e2c01df1f29cf076f2b7 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jan 28 21:48:00 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jan 28 22:12:50 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f28e994b |
7 |
|
8 |
dev-db/postgis: Sync with 9999, fix dependencies |
9 |
|
10 |
Reported-by: Daniel M. Weeks <dan <AT> danweeks.net> |
11 |
Thanks-to: Chris Mayo <aklhfex <AT> gmail.com> |
12 |
Closes: https://bugs.gentoo.org/698146 |
13 |
Closes: https://bugs.gentoo.org/691036 |
14 |
Package-Manager: Portage-2.3.86, Repoman-2.3.20 |
15 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
16 |
|
17 |
dev-db/postgis/postgis-3.0.0-r1.ebuild | 135 +++++++++++++++++++++++++++++++++ |
18 |
1 file changed, 135 insertions(+) |
19 |
|
20 |
diff --git a/dev-db/postgis/postgis-3.0.0-r1.ebuild b/dev-db/postgis/postgis-3.0.0-r1.ebuild |
21 |
new file mode 100644 |
22 |
index 00000000000..2235d63f8dd |
23 |
--- /dev/null |
24 |
+++ b/dev-db/postgis/postgis-3.0.0-r1.ebuild |
25 |
@@ -0,0 +1,135 @@ |
26 |
+# Copyright 1999-2020 Gentoo Authors |
27 |
+# Distributed under the terms of the GNU General Public License v2 |
28 |
+ |
29 |
+EAPI=6 |
30 |
+ |
31 |
+POSTGRES_COMPAT=( 9.{5..6} {10..12} ) |
32 |
+POSTGRES_USEDEP="server" |
33 |
+inherit autotools eapi7-ver postgres-multi |
34 |
+ |
35 |
+MY_P="${PN}-$(ver_rs 3 '')" |
36 |
+ |
37 |
+if [[ ${PV} = *9999* ]] ; then |
38 |
+ inherit git-r3 |
39 |
+ EGIT_REPO_URI="https://git.osgeo.org/gitea/postgis/postgis.git" |
40 |
+else |
41 |
+ PGIS="$(ver_cut 1-2)" |
42 |
+ SRC_URI="https://download.osgeo.org/postgis/source/${MY_P}.tar.gz" |
43 |
+ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
44 |
+fi |
45 |
+ |
46 |
+DESCRIPTION="Geographic Objects for PostgreSQL" |
47 |
+HOMEPAGE="https://postgis.net" |
48 |
+ |
49 |
+S="${WORKDIR}/${MY_P}" |
50 |
+ |
51 |
+LICENSE="GPL-2" |
52 |
+SLOT="0" |
53 |
+IUSE="address-standardizer doc gtk static-libs test topology" |
54 |
+ |
55 |
+REQUIRED_USE="test? ( doc ) ${POSTGRES_REQ_USE}" |
56 |
+ |
57 |
+# Needs a running psql instance, doesn't work out of the box |
58 |
+RESTRICT="test" |
59 |
+ |
60 |
+RDEPEND="${POSTGRES_DEP} |
61 |
+ dev-libs/json-c:= |
62 |
+ dev-libs/libxml2:2 |
63 |
+ dev-libs/protobuf-c:= |
64 |
+ >=sci-libs/geos-3.6.0 |
65 |
+ >=sci-libs/proj-4.9.0:= |
66 |
+ >=sci-libs/gdal-1.10.0 |
67 |
+ address-standardizer? ( dev-libs/libpcre ) |
68 |
+ gtk? ( x11-libs/gtk+:2 ) |
69 |
+" |
70 |
+DEPEND="${RDEPEND} |
71 |
+ virtual/pkgconfig |
72 |
+ doc? ( |
73 |
+ app-text/docbook-xsl-stylesheets |
74 |
+ app-text/docbook-xml-dtd:4.5 |
75 |
+ dev-libs/libxslt |
76 |
+ virtual/imagemagick-tools[png] |
77 |
+ ) |
78 |
+ test? ( dev-util/cunit ) |
79 |
+" |
80 |
+ |
81 |
+PATCHES=( "${FILESDIR}/${PN}-2.2.0-arflags.patch" ) |
82 |
+ |
83 |
+src_prepare() { |
84 |
+ default |
85 |
+ |
86 |
+ if [[ ${PV} = *9999* ]] ; then |
87 |
+ source "${S}"/Version.config |
88 |
+ PGIS="${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}" |
89 |
+ fi |
90 |
+ |
91 |
+ # These modules are built using the same *FLAGS that were used to build |
92 |
+ # dev-db/postgresql. The right thing to do is to ignore the current |
93 |
+ # *FLAGS settings. |
94 |
+ QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so" |
95 |
+ |
96 |
+ local AT_M4DIR="macros" |
97 |
+ eautoreconf |
98 |
+ |
99 |
+ postgres-multi_src_prepare |
100 |
+} |
101 |
+ |
102 |
+src_configure() { |
103 |
+ local myeconfargs=( |
104 |
+ --with-protobuf # funky misdetection if enabled but --without-protobuf |
105 |
+ $(use_with address-standardizer) |
106 |
+ $(use_with gtk gui) |
107 |
+ $(use_with topology) |
108 |
+ ) |
109 |
+ postgres-multi_foreach econf "${myeconfargs[@]}" |
110 |
+} |
111 |
+ |
112 |
+src_compile() { |
113 |
+ postgres-multi_foreach emake |
114 |
+ postgres-multi_foreach emake -C topology |
115 |
+ |
116 |
+ if use doc ; then |
117 |
+ postgres-multi_foreach emake comments |
118 |
+ postgres-multi_foreach emake cheatsheets |
119 |
+ postgres-multi_forbest emake -C doc html |
120 |
+ fi |
121 |
+} |
122 |
+ |
123 |
+src_install() { |
124 |
+ postgres-multi_foreach emake DESTDIR="${D}" install |
125 |
+ postgres-multi_foreach emake -C topology DESTDIR="${D}" install |
126 |
+ postgres-multi_forbest dobin ./utils/postgis_restore.pl |
127 |
+ |
128 |
+ dodoc CREDITS TODO loader/README.* doc/*txt |
129 |
+ |
130 |
+ docinto topology |
131 |
+ dodoc topology/{TODO,README} |
132 |
+ |
133 |
+ if use doc ; then |
134 |
+ postgres-multi_foreach emake DESTDIR="${D}" comments-install |
135 |
+ |
136 |
+ docinto html |
137 |
+ postgres-multi_forbest dodoc doc/html/{postgis.html,style.css} |
138 |
+ |
139 |
+ docinto html/images |
140 |
+ postgres-multi_forbest dodoc doc/html/images/* |
141 |
+ fi |
142 |
+ |
143 |
+ use static-libs || find "${ED}" -name '*.a' -delete |
144 |
+} |
145 |
+ |
146 |
+pkg_postinst() { |
147 |
+ ebegin "Refreshing PostgreSQL symlinks" |
148 |
+ postgresql-config update |
149 |
+ eend $? |
150 |
+ |
151 |
+ local base_uri="https://postgis.net/docs/manual-" |
152 |
+ if [[ ${PV} = *9999* ]] ; then |
153 |
+ base_uri+="dev" |
154 |
+ else |
155 |
+ base_uri+="${PGIS}" |
156 |
+ fi |
157 |
+ |
158 |
+ elog "To finish installing PostGIS, follow the directions detailed at:" |
159 |
+ elog "${base_uri}/postgis_installation.html#create_new_db_extensions" |
160 |
+} |