diff options
author | Marco Genasci <fedeliallalinea@gmail.com> | 2019-05-16 11:57:43 +0200 |
---|---|---|
committer | Amy Liffey <amynka@gentoo.org> | 2019-05-26 10:54:04 +0200 |
commit | 738cb929ab90549b8def4e7ac04ae99df141a298 (patch) | |
tree | a4c9b3b03cb145d83cef188787c04d14bfb9e066 /sci-geosciences/mapserver | |
parent | sys-boot/yaboot: disable ld.gold, bug #678710 (diff) | |
download | gentoo-738cb929ab90549b8def4e7ac04ae99df141a298.tar.gz gentoo-738cb929ab90549b8def4e7ac04ae99df141a298.tar.bz2 gentoo-738cb929ab90549b8def4e7ac04ae99df141a298.zip |
sci-geosciences/mapserver: bump to version 7.0.7
- apache support not mandatory
- add oracle support
- fix compilation with proj-6.0.0
Bug: https://bugs.gentoo.org/674480
Signed-off-by: Marco Genasci <fedeliallalinea@gmail.com>
Signed-off-by: Amy Liffey <amynka@gentoo.org>
Package-Manager: Portage-2.3.62, Repoman-2.3.11
Diffstat (limited to 'sci-geosciences/mapserver')
5 files changed, 251 insertions, 0 deletions
diff --git a/sci-geosciences/mapserver/Manifest b/sci-geosciences/mapserver/Manifest index 47f5601db650..3a462cc37764 100644 --- a/sci-geosciences/mapserver/Manifest +++ b/sci-geosciences/mapserver/Manifest @@ -1 +1,2 @@ DIST mapserver-7.0.5.tar.gz 2631454 BLAKE2B 88467d7d8ae90be73d6629619410f114081588d214eea3cd1752f0f97a5d934aa8e39bc2ce6a59ab969a4ac5eb2df15b60bd78f34c18356befb490a211de830f SHA512 18485ace6e3b198e19acc3dda2ba44b136c55c4a783e472cb4c8f7a0615ed676b9bcdcaedc348227a7929d0ccf6199c90aead572bf8243e7902a5a2051a20753 +DIST mapserver-7.0.7.tar.gz 2634698 BLAKE2B fadde68803d7f74b116aa23c05c25f9c52c67e0a8ea69eace2c865843d7f223c24d8c42cbed54578f2eb631cb58bae3652075872f76e9b88238d76e044d4314b SHA512 94225dbe64edf6623bb5e92649d505809f70f86c24ca06675f6277ac4a161c40c369fd1973db649e6c864fa5e2e4a8a93cbd36d1524297a0e47b96ab59c0941c diff --git a/sci-geosciences/mapserver/files/mapserver-7.0.0-missing-nzz18.patch b/sci-geosciences/mapserver/files/mapserver-7.0.0-missing-nzz18.patch new file mode 100644 index 000000000000..a22fcf4de6aa --- /dev/null +++ b/sci-geosciences/mapserver/files/mapserver-7.0.0-missing-nzz18.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/FindOracle.cmake b/cmake/FindOracle.cmake +index 18055f7..2568b5e 100644 +--- a/cmake/FindOracle.cmake ++++ b/cmake/FindOracle.cmake +@@ -37,7 +37,7 @@ if(DEFINED ENV{ORACLE_HOME}) + ${ORACLE_HOME}/OCI/include) # Oracle XE on Windows + + set(ORACLE_OCI_NAMES clntsh libclntsh oci) +- set(ORACLE_NNZ_NAMES nnz10 libnnz10 nnz11 libnnz11 nnz12 libnnz12 ociw32) ++ set(ORACLE_NNZ_NAMES nnz10 libnnz10 nnz11 libnnz11 nnz12 libnnz12 nnz18 libnnz18 ociw32) + set(ORACLE_OCCI_NAMES libocci occi oraocci10 oraocci11 oraocci12) + + set(ORACLE_LIB_DIR diff --git a/sci-geosciences/mapserver/files/mapserver-7.0.7-missing-macro.patch b/sci-geosciences/mapserver/files/mapserver-7.0.7-missing-macro.patch new file mode 100644 index 000000000000..daf5ab1ebc7c --- /dev/null +++ b/sci-geosciences/mapserver/files/mapserver-7.0.7-missing-macro.patch @@ -0,0 +1,19 @@ +diff --git a/mapserver.h b/mapserver.h +index df7eeb9..9516a6c 100644 +--- a/mapserver.h ++++ b/mapserver.h +@@ -55,6 +55,14 @@ + #include <unistd.h> + #endif + ++#ifndef TRUE ++#define TRUE 1 ++#endif ++ ++#ifndef FALSE ++#define FALSE 0 ++#endif ++ + #if defined(_WIN32) && !defined(__CYGWIN__) + # define MS_DLL_EXPORT __declspec(dllexport) + #define USE_MSFREE diff --git a/sci-geosciences/mapserver/mapserver-7.0.7.ebuild b/sci-geosciences/mapserver/mapserver-7.0.7.ebuild new file mode 100644 index 000000000000..3d9b414957ef --- /dev/null +++ b/sci-geosciences/mapserver/mapserver-7.0.7.ebuild @@ -0,0 +1,217 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +MY_P="${PN}-${PV/_/-}" + +PHP_EXT_OPTIONAL_USE="php" +PHP_EXT_NAME="php_mapscript" +PHP_EXT_S="${WORKDIR}/${MY_P}/mapscript/php/" +PHP_EXT_SKIP_PHPIZE="no" +USE_PHP="php5-6" + +PYTHON_COMPAT=( python2_7 ) + +#USE_RUBY="ruby18 ruby19" +#RUBY_OPTIONAL="yes" + +WEBAPP_MANUAL_SLOT=yes +WEBAPP_OPTIONAL=yes + +inherit cmake-utils depend.apache distutils-r1 eutils flag-o-matic multilib perl-module php-ext-source-r3 webapp # ruby-ng + +DESCRIPTION="Development environment for building spatially enabled webapps" +HOMEPAGE="https://mapserver.org/" +SRC_URI="https://download.osgeo.org/mapserver/${MY_P}.tar.gz" + +LICENSE="MIT" +KEYWORDS="~amd64 ~x86" +SLOT="0" +IUSE="apache bidi cairo gdal geos mysql opengl oracle perl php postgis proj python threads tiff xml xslt" # ruby php tcl + +REQUIRED_USE=" + php? ( php_targets_php5-6 ) + xslt? ( xml )" + +RDEPEND=" + dev-libs/expat + >=media-libs/gd-2.0.12[truetype,jpeg,png,zlib] + media-libs/giflib + net-misc/curl + virtual/jpeg:= + virtual/libiconv + x11-libs/agg + apache? ( + dev-libs/fcgi + app-admin/webapp-config + ) + bidi? ( dev-libs/fribidi + media-libs/harfbuzz ) + cairo? ( x11-libs/cairo ) + gdal? ( sci-libs/gdal:=[oracle?] ) + geos? ( sci-libs/geos ) + mysql? ( virtual/mysql ) + opengl? ( + media-libs/ftgl + media-libs/mesa + ) + oracle? ( + dev-db/oracle-instantclient:= + ) + perl? ( dev-lang/perl:= ) + postgis? ( dev-db/postgis ) + proj? ( sci-libs/proj net-misc/curl ) + tiff? ( + media-libs/tiff:= + sci-libs/libgeotiff + ) + xml? ( dev-libs/libxml2:2 ) + xslt? ( dev-libs/libxslt[crypt] ) +" +DEPEND="${RDEPEND} + perl? ( >=dev-lang/swig-2.0 ) + python? ( >=dev-lang/swig-2.0 )" + +want_apache2 apache + +PATCHES=( + "${FILESDIR}/${PN}-7.0.0-sec-format.patch" # see https://github.com/mapserver/mapserver/pull/5248 + "${FILESDIR}/${PN}-7.0.0-no-applicable-code.patch" + "${FILESDIR}/${PN}-7.0.0-missing-nzz18.patch" + "${FILESDIR}/${P}-missing-macro.patch" +) + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + if use apache ; then + webapp_pkg_setup + fi + use perl && perl_set_version + #use ruby && ruby-ng_pkg_setup +} + +src_unpack() { + default + # HACK: Make symlinks for php targets + local slot + for slot in $(php_get_slots); do + ln -s "${PHP_EXT_S}" "${WORKDIR}/${slot}" || die + done +} + +src_prepare() { + local glibdir="${EPREFIX}/usr/include/glib-2.0" + local usrglibdir="${EPREFIX}/usr/$(get_libdir)/glib-2.0/include" + + sed -e "s:^include_directories(:&${glibdir})\ninclude_directories(:" \ + -i "${S}/CMakeLists.txt" || die + sed -e "s:include_directories(:&${usrglibdir})\ninclude_directories(:" \ + -i "${S}/CMakeLists.txt" || die + + # For enable compilation with proj-6 + if use proj ; then + append-cppflags -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1 + fi + + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + "-DCMAKE_SKIP_RPATH=ON" + "-DWITH_SDE=OFF" + "-DWITH_ICONV=ON" + "-DWITH_GD=ON" + "-DWITH_GIF=ON" + "-DWITH_CURL=ON" + "-DINSTALL_LIB_DIR=${ROOT}usr/$(get_libdir)" + "-DWITH_APACHE_MODULE=$(usex apache ON OFF)" + "-DWITH_PROJ=$(usex proj ON OFF)" + "-DWITH_WMS=$(usex proj ON OFF)" + "-DWITH_KML=$(usex xml ON OFF)" + "-DWITH_FCGI=$(usex apache ON OFF)" + "-DWITH_GEOS=$(usex geos ON OFF)" + "-DWITH_GDAL=$(usex gdal ON OFF)" + "-DWITH_OGR=$(usex gdal ON OFF)" + "-DWITH_ORACLESPATIAL=$(usex oracle ON OFF)" + "-DWITH_POSTGIS=$(usex postgis ON OFF)" + "-DWITH_MYSQL=$(usex mysql ON OFF)" + "-DWITH_LIBXML2=$(usex xml ON OFF)" + "-DWITH_XMLMAPFILE=$(usex xslt ON OFF)" + "-DWITH_FRIBIDI=$(usex bidi ON OFF)" + "-DWITH_HARFBUZZ=$(usex bidi ON OFF)" + "-DWITH_CAIRO=$(usex cairo ON OFF)" + "-DWITH_PHP=$(usex php ON OFF)" + "-DWITH_PYTHON=$(usex python ON OFF)" + "-DWITH_PERL=$(usex perl ON OFF)" + ) + + if use gdal && use proj ; then + mycmakeargs+=( "-DWITH_WFS=ON" + "-DWITH_WCS=ON" + "-DWITH_CLIENT_WMS=ON" + "-DWITH_CLIENT_WFS=ON" + "-DWITH_SOS=$(usex xml ON OFF)" + ) + else + mycmakeargs+=( "-DWITH_WFS=OFF" + "-DWITH_WCS=OFF" + "-DWITH_CLIENT_WMS=OFF" + "-DWITH_CLIENT_WFS=OFF" + "-DWITH_SOS=OFF" + ) + fi + + if use php ; then + local slot + for slot in $(php_get_slots); do + local php_config="${EPREFIX}/usr/$(get_libdir)/${slot}/bin/php-config" + [[ -x ${php_config} ]] \ + || die "php-config '${php_config}' not valid or not executable" + + local php_include_dir=$(${php_config} --include-dir) + [[ -d ${php_include_dir} ]] || die "PHP Include dir not found or not valid" + + mycmakeargs+=( + -DPHP5_CONFIG_EXECUTABLE="${php_config}" + -DPHP5_INCLUDES="${php_include_dir}" + ) + done + fi + + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile +} + +src_install() { + if use apache ; then + webapp_src_preinst + fi + + cmake-utils_src_install + + if use php ; then + php-ext-source-r3_createinifiles + fi + + if use apache ; then + webapp_src_install + fi +} + +pkg_postinst() { + if use apache ; then + webapp_pkg_postinst + fi +} + +pkg_prerm() { + if use apache ; then + webapp_pkg_prerm + fi +} diff --git a/sci-geosciences/mapserver/metadata.xml b/sci-geosciences/mapserver/metadata.xml index c7d7490388ea..bc9652c1add9 100644 --- a/sci-geosciences/mapserver/metadata.xml +++ b/sci-geosciences/mapserver/metadata.xml @@ -6,6 +6,7 @@ <name>Gentoo Geosciences Project</name> </maintainer> <use> + <flag name="apache">Enable mapserver to run under apache</flag> <flag name="gdal">Enable <pkg>sci-libs/gdal</pkg> library support</flag> <flag name="geos">Enable <pkg>sci-libs/geos</pkg> library support</flag> <flag name="postgis">Enable <pkg>dev-db/postgis</pkg> support</flag> |