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