1 |
commit: d504c7f3b7fe1f51d1e84a4e59153b5c82eae727 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 20 04:40:27 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 20 04:40:32 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d504c7f3 |
7 |
|
8 |
sci-geosciences/mapserver: add 7.6.4 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/798129 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
sci-geosciences/mapserver/Manifest | 1 + |
14 |
sci-geosciences/mapserver/mapserver-7.6.4.ebuild | 286 +++++++++++++++++++++++ |
15 |
2 files changed, 287 insertions(+) |
16 |
|
17 |
diff --git a/sci-geosciences/mapserver/Manifest b/sci-geosciences/mapserver/Manifest |
18 |
index b154aff6400..5464718b756 100644 |
19 |
--- a/sci-geosciences/mapserver/Manifest |
20 |
+++ b/sci-geosciences/mapserver/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
DIST mapserver-7.6.2.tar.gz 2715806 BLAKE2B 230e4f52c526d72ac7f46cfe4ef8e547d7ae74c01d75637ad301d4e69b90d301f02ecb8fe7d838c9ee15c022ed7980aa2f9236e08a6daedafb65a2499a9473e5 SHA512 842c2cf891df6c8dc630fac5419caa31701d732a748264f7d5b6cceaf192fa420f1863fdd18cc791a417dcdc800fed5c3e5c43ac688142f32a1a6edda4c9f791 |
23 |
+DIST mapserver-7.6.4.tar.gz 2718735 BLAKE2B 4d9fc6d215a55af32e0cc125f6119e0e477ddc5a5b2dbea6df1cc7e1ffaf6319f3a855329749aa07f1bca88e79a71c67cb2e8bd62e30bd60e44ecc1b8283d4ce SHA512 ccca87b650df3c1784ba82ca4a58960585d72fb4004fcea43c0dcabf03b9617ba51870bc63dbb2238a7eeb8d4337b6ff152587150912a74eeaf4a3e3d2d584ce |
24 |
|
25 |
diff --git a/sci-geosciences/mapserver/mapserver-7.6.4.ebuild b/sci-geosciences/mapserver/mapserver-7.6.4.ebuild |
26 |
new file mode 100644 |
27 |
index 00000000000..4a23194cd84 |
28 |
--- /dev/null |
29 |
+++ b/sci-geosciences/mapserver/mapserver-7.6.4.ebuild |
30 |
@@ -0,0 +1,286 @@ |
31 |
+# Copyright 1999-2021 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=7 |
35 |
+ |
36 |
+# Variables for the miscellaneous bindings we provide |
37 |
+PHP_EXT_OPTIONAL_USE="php" |
38 |
+PHP_EXT_NAME="php_mapscriptng" |
39 |
+PHP_EXT_SKIP_PHPIZE="yes" |
40 |
+PHP_EXT_SKIP_PATCHES="yes" |
41 |
+ |
42 |
+USE_PHP="php7-3 php7-4" |
43 |
+PYTHON_COMPAT=( python3_{7,8,9} ) |
44 |
+ |
45 |
+WEBAPP_MANUAL_SLOT=yes |
46 |
+WEBAPP_OPTIONAL=yes |
47 |
+ |
48 |
+inherit cmake depend.apache perl-functions php-ext-source-r3 python-r1 webapp |
49 |
+ |
50 |
+DESCRIPTION="Development environment for building spatially enabled webapps" |
51 |
+HOMEPAGE="https://mapserver.org/" |
52 |
+SRC_URI="https://download.osgeo.org/mapserver/${P}.tar.gz" |
53 |
+ |
54 |
+LICENSE="Boost-1.0 BSD BSD-2 ISC MIT tcltk" |
55 |
+KEYWORDS="~amd64 ~x86" |
56 |
+SLOT="0" |
57 |
+ |
58 |
+# NOTE: opengl removed for now as no support for it in upstream CMake |
59 |
+IUSE="apache bidi cairo geos mysql oracle perl php postgis python" |
60 |
+ |
61 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
62 |
+ |
63 |
+# Tests: |
64 |
+# Included tests (tests/*) are seriously outdated |
65 |
+# Upstream's main test suite (msautotest/*) is not in the release tarball, |
66 |
+# and upstream sets 'export-ignore' for that directory. |
67 |
+# |
68 |
+# The eclasses used normally try to run test suites themselves, |
69 |
+# or skip if nothing was found. |
70 |
+# However, because of the php-ext-* eclass usage, this fails and would |
71 |
+# cause errors running non-existent tests, so we have to restrict here. |
72 |
+RESTRICT="test" |
73 |
+ |
74 |
+RDEPEND=" |
75 |
+ >=dev-libs/expat-2.2.8 |
76 |
+ dev-libs/libxml2:2= |
77 |
+ dev-libs/libxslt[crypt] |
78 |
+ >=dev-libs/protobuf-c-1.3.2:= |
79 |
+ >=media-libs/freetype-2.9.1-r3 |
80 |
+ >=media-libs/gd-2.0.12:=[truetype,jpeg,png,zlib] |
81 |
+ >=media-libs/giflib-5.2.1:= |
82 |
+ >=media-libs/libpng-1.6.37:= |
83 |
+ >=net-misc/curl-7.69.1 |
84 |
+ >=sci-libs/gdal-3.0.4:=[oracle?] |
85 |
+ >=sci-libs/proj-6.2.1:= |
86 |
+ virtual/jpeg |
87 |
+ virtual/libiconv |
88 |
+ >=x11-libs/agg-2.5-r3 |
89 |
+ apache? ( |
90 |
+ app-admin/webapp-config |
91 |
+ dev-libs/fcgi |
92 |
+ ) |
93 |
+ bidi? ( |
94 |
+ dev-libs/fribidi |
95 |
+ media-libs/harfbuzz:= |
96 |
+ ) |
97 |
+ cairo? ( x11-libs/cairo ) |
98 |
+ geos? ( sci-libs/geos ) |
99 |
+ mysql? ( dev-db/mysql-connector-c:= ) |
100 |
+ oracle? ( dev-db/oracle-instantclient:= ) |
101 |
+ perl? ( dev-lang/perl:= ) |
102 |
+ postgis? ( |
103 |
+ dev-db/postgis |
104 |
+ dev-db/postgresql:= |
105 |
+ ) |
106 |
+ python? ( ${PYTHON_DEPS} ) |
107 |
+" |
108 |
+DEPEND="${RDEPEND}" |
109 |
+BDEPEND=" |
110 |
+ virtual/pkgconfig |
111 |
+ perl? ( >=dev-lang/swig-4.0 ) |
112 |
+ php? ( >=dev-lang/swig-4.0 ) |
113 |
+ python? ( |
114 |
+ >=dev-lang/swig-4.0 |
115 |
+ >=dev-python/setuptools-44.1.0 |
116 |
+ ) |
117 |
+" |
118 |
+ |
119 |
+want_apache2 apache |
120 |
+ |
121 |
+pkg_setup() { |
122 |
+ use apache && webapp_pkg_setup |
123 |
+ use perl && perl_set_version |
124 |
+} |
125 |
+ |
126 |
+src_prepare() { |
127 |
+ cmake_src_prepare |
128 |
+ |
129 |
+ use php && php-ext-source-r3_src_prepare |
130 |
+ use python && python_copy_sources |
131 |
+} |
132 |
+ |
133 |
+_generate_cmake_args() { |
134 |
+ # Provides a simple, bare config for bindings to build upon |
135 |
+ # Need WITH_WMS=ON or build fails |
136 |
+ local args=( |
137 |
+ "-DCMAKE_SKIP_RPATH=ON" |
138 |
+ "-DINSTALL_LIB_DIR=/usr/$(get_libdir)" |
139 |
+ "-DWITH_CAIRO=OFF" |
140 |
+ "-DWITH_FCGI=OFF" |
141 |
+ "-DWITH_FRIBIDI=OFF" |
142 |
+ "-DWITH_GEOS=OFF" |
143 |
+ "-DWITH_GIF=OFF" |
144 |
+ "-DWITH_HARFBUZZ=OFF" |
145 |
+ "-DWITH_ICONV=OFF" |
146 |
+ "-DWITH_PROTOBUFC=OFF" |
147 |
+ "-DWITH_POSTGIS=OFF" |
148 |
+ "-DWITH_WMS=ON" |
149 |
+ "-DWITH_WCS=OFF" |
150 |
+ "-DWITH_WFS=OFF" |
151 |
+ ) |
152 |
+ |
153 |
+ echo "${args[@]}" |
154 |
+} |
155 |
+ |
156 |
+src_configure() { |
157 |
+ # NOTE: We could make this based on _generate_cmake_args, but |
158 |
+ # then we wouldn't be as-explicit about what is enabled/not, |
159 |
+ # and reliant on defaults not changing. |
160 |
+ # Readability and maintainability is better this way. |
161 |
+ local mycmakeargs=( |
162 |
+ "-DCMAKE_SKIP_RPATH=ON" |
163 |
+ "-DINSTALL_LIB_DIR=/usr/$(get_libdir)" |
164 |
+ "-DWITH_CLIENT_WMS=ON" |
165 |
+ "-DWITH_CLIENT_WFS=ON" |
166 |
+ "-DWITH_CURL=ON" |
167 |
+ "-DWITH_GIF=ON" |
168 |
+ "-DWITH_ICONV=ON" |
169 |
+ "-DWITH_KML=ON" |
170 |
+ "-DWITH_LIBXML2=ON" |
171 |
+ "-DWITH_PHPNG=OFF" |
172 |
+ "-DWITH_PROTOBUFC=ON" |
173 |
+ "-DWITH_SOS=ON" |
174 |
+ "-DWITH_WMS=ON" |
175 |
+ "-DWITH_WFS=ON" |
176 |
+ "-DWITH_WCS=ON" |
177 |
+ "-DWITH_XMLMAPFILE=ON" |
178 |
+ "-DWITH_APACHE_MODULE=$(usex apache ON OFF)" |
179 |
+ "-DWITH_CAIRO=$(usex cairo ON OFF)" |
180 |
+ "-DWITH_FCGI=$(usex apache ON OFF)" |
181 |
+ "-DWITH_GEOS=$(usex geos ON OFF)" |
182 |
+ "-DWITH_ORACLESPATIAL=$(usex oracle ON OFF)" |
183 |
+ "-DWITH_MYSQL=$(usex mysql ON OFF)" |
184 |
+ "-DWITH_FRIBIDI=$(usex bidi ON OFF)" |
185 |
+ "-DWITH_HARFBUZZ=$(usex bidi ON OFF)" |
186 |
+ "-DWITH_POSTGIS=$(usex postgis ON OFF)" |
187 |
+ "-DWITH_PERL=$(usex perl ON OFF)" |
188 |
+ ) |
189 |
+ |
190 |
+ use perl && mycmakeargs+=( "-DCUSTOM_PERL_SITE_ARCH_DIR=$(perl_get_raw_vendorlib)" ) |
191 |
+ |
192 |
+ # Configure the standard build first |
193 |
+ cmake_src_configure |
194 |
+ |
195 |
+ # Minimal build for bindings |
196 |
+ # Note that we use _generate_cmake_args to get a clean config each time, then add |
197 |
+ # in options as appropriate. Otherwise we'd get contamination between bindings. |
198 |
+ if use python ; then |
199 |
+ mycmakeargs=( |
200 |
+ $(_generate_cmake_args) |
201 |
+ "-DWITH_PYTHON=ON" |
202 |
+ ) |
203 |
+ |
204 |
+ python_foreach_impl cmake_src_configure |
205 |
+ python_foreach_impl python_optimize |
206 |
+ fi |
207 |
+ |
208 |
+ if use php ; then |
209 |
+ local slot= |
210 |
+ for slot in $(php_get_slots) ; do |
211 |
+ # Switch to the slot's build dir |
212 |
+ php_init_slot_env "${slot}" |
213 |
+ |
214 |
+ # Take a blank config each time |
215 |
+ # Add in only *this* slot's PHP includes dir, etc |
216 |
+ mycmakeargs=( |
217 |
+ $(_generate_cmake_args) |
218 |
+ "-DWITH_PHPNG=ON" |
219 |
+ "-DPHP_CONFIG_EXECUTABLE=${PHPCONFIG}" |
220 |
+ "-DPHP_INCLUDES=${PHPPREFIX}" |
221 |
+ ) |
222 |
+ |
223 |
+ BUILD_DIR="${S}/php${slot}" cmake_src_configure |
224 |
+ |
225 |
+ # Return to where we left off, in case we add more |
226 |
+ # to this phase. |
227 |
+ cd "${S}" || die |
228 |
+ done |
229 |
+ fi |
230 |
+} |
231 |
+ |
232 |
+src_compile() { |
233 |
+ cmake_src_compile |
234 |
+ |
235 |
+ if use python ; then |
236 |
+ python_foreach_impl cmake_src_compile |
237 |
+ fi |
238 |
+ |
239 |
+ if use php ; then |
240 |
+ local slot= |
241 |
+ for slot in $(php_get_slots) ; do |
242 |
+ # Switch to the slot's build dir |
243 |
+ php_init_slot_env "${slot}" |
244 |
+ |
245 |
+ # Force cmake to build in it |
246 |
+ BUILD_DIR="${S}/php${slot}" cmake_src_compile |
247 |
+ |
248 |
+ # Return to where we left off, in case we add more |
249 |
+ # to this phase. |
250 |
+ cd "${S}" || die |
251 |
+ done |
252 |
+ fi |
253 |
+} |
254 |
+ |
255 |
+src_install() { |
256 |
+ # Needs to be first |
257 |
+ use apache && webapp_src_preinst |
258 |
+ |
259 |
+ if use python ; then |
260 |
+ python_foreach_impl cmake_src_install |
261 |
+ python_foreach_impl python_optimize |
262 |
+ fi |
263 |
+ |
264 |
+ if use php ; then |
265 |
+ php-ext-source-r3_createinifiles |
266 |
+ |
267 |
+ local slot= |
268 |
+ for slot in $(php_get_slots) ; do |
269 |
+ php_init_slot_env "${slot}" |
270 |
+ |
271 |
+ BUILD_DIR="${S}/php${slot}" cmake_src_install |
272 |
+ |
273 |
+ cd "${S}" || die |
274 |
+ done |
275 |
+ fi |
276 |
+ |
277 |
+ # Install this last because this build is the most "fully-featured" |
278 |
+ cmake_src_install |
279 |
+ |
280 |
+ if use apache ; then |
281 |
+ # We need a mapserver symlink available in cgi-bin |
282 |
+ dosym ../../../../../../../usr/bin/mapserv /usr/share/webapps/${PN}/${PV}/hostroot/cgi-bin/mapserv |
283 |
+ webapp_src_install |
284 |
+ fi |
285 |
+} |
286 |
+ |
287 |
+pkg_preinst() { |
288 |
+ # We need to cache the value here of HAD_PHP because we want the |
289 |
+ # original package version, not the result of us installing a new one |
290 |
+ HAD_PHP= |
291 |
+ has_version 'sci-geosciences/mapserver[php]' && HAD_PHP=1 |
292 |
+} |
293 |
+ |
294 |
+pkg_postinst() { |
295 |
+ use apache && webapp_pkg_postinst |
296 |
+ |
297 |
+ # Let upgrading (from a pre-rewrite version) users know that the PHP module changed |
298 |
+ local replacing_version= |
299 |
+ for replacing_version in ${REPLACING_VERSIONS} ; do |
300 |
+ if ver_test "7.6.0" -gt "${replacing_version}" ; then |
301 |
+ if use php && [[ ${HAD_PHP} -eq 1 ]] ; then |
302 |
+ elog "Note that MapServer has deprecated the old PHP extension" |
303 |
+ elog "You can read more at: " |
304 |
+ elog "URL: https://mapserver.org/MIGRATION_GUIDE.html#mapserver-7-2-to-7-4-migration" |
305 |
+ elog "This may involve porting some of your PHP scripts to use the new module." |
306 |
+ fi |
307 |
+ |
308 |
+ # Only show the message once |
309 |
+ break |
310 |
+ fi |
311 |
+ done |
312 |
+} |
313 |
+ |
314 |
+pkg_prerm() { |
315 |
+ use apache && webapp_pkg_prerm |
316 |
+} |