diff options
author | Ettore Di Giacinto <mudler@gentoo.org> | 2017-05-23 20:22:11 +0200 |
---|---|---|
committer | Ettore Di Giacinto <mudler@gentoo.org> | 2017-05-23 20:33:10 +0200 |
commit | 1296bb9468cea2befca32731a8ca1fe831951252 (patch) | |
tree | 7f56428a6292d9558b7336f7e5ff61871d08a918 /sci-geosciences | |
parent | app-accessibility/at-spi2-atk: Fix tests running (diff) | |
download | gentoo-1296bb9468cea2befca32731a8ca1fe831951252.tar.gz gentoo-1296bb9468cea2befca32731a8ca1fe831951252.tar.bz2 gentoo-1296bb9468cea2befca32731a8ca1fe831951252.zip |
sci-geosciences/mapserver: Bump version to 7.0.5 bug #606612
- Bump to EAPI 6
- migrated to php-ext-source-r3
- Add patch to address compilation bug
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=606612
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'sci-geosciences')
-rw-r--r-- | sci-geosciences/mapserver/Manifest | 1 | ||||
-rw-r--r-- | sci-geosciences/mapserver/files/mapserver-7.0.5-missing-macro.patch | 21 | ||||
-rw-r--r-- | sci-geosciences/mapserver/mapserver-7.0.5.ebuild | 196 |
3 files changed, 218 insertions, 0 deletions
diff --git a/sci-geosciences/mapserver/Manifest b/sci-geosciences/mapserver/Manifest index c93b27c62cfd..32fdf22fca90 100644 --- a/sci-geosciences/mapserver/Manifest +++ b/sci-geosciences/mapserver/Manifest @@ -1 +1,2 @@ DIST mapserver-7.0.3.tar.gz 2621285 SHA256 dbec8f0ccdf506e7117cec5b704e8f9692451f72a07d9f4879d508ed96c55550 SHA512 7630461948e7b371c6d4d6d49cc596ad8fc6b076a8bbfdc88358fc076fa0d4ebaaab10663ec9c3c64e246b5735a07cef5cc28eba88b00dd09259048a49d2b81b WHIRLPOOL 4306a29758ae2b8f6acaf5f8c9157f0851a028f25fba4cd130022d37b5f31e35f486be49b4393351123f5e9923ab2c342430d33dc15e4b07c0904c3bcad7e259 +DIST mapserver-7.0.5.tar.gz 2631454 SHA256 47f0015dda18a414e2174757ebc19543241c3ed17daf516c84b0a976e7f722c2 SHA512 18485ace6e3b198e19acc3dda2ba44b136c55c4a783e472cb4c8f7a0615ed676b9bcdcaedc348227a7929d0ccf6199c90aead572bf8243e7902a5a2051a20753 WHIRLPOOL cf3819258cc90d77b740c8b76fe9b4358ecca6f55ff7b82c9837f0dcc9e839513311e51b7163d44852f7477db30d854006ca0fd9829647e888dc97ebac54a547 diff --git a/sci-geosciences/mapserver/files/mapserver-7.0.5-missing-macro.patch b/sci-geosciences/mapserver/files/mapserver-7.0.5-missing-macro.patch new file mode 100644 index 000000000000..ee8da6ca1fe0 --- /dev/null +++ b/sci-geosciences/mapserver/files/mapserver-7.0.5-missing-macro.patch @@ -0,0 +1,21 @@ +commit 7e4be3d354053bca65838c2c481a61d4d5c24a3b +Author: Ettore Di Giacinto <mudler@gentoo.org> +Date: Tue May 23 20:12:20 2017 +0200 + + Fix mapserver to build when TRUE macro is not defined + +diff --git a/mapserver.h b/mapserver.h +index 32182fa0..19b1075c 100644 +--- a/mapserver.h ++++ b/mapserver.h +@@ -78,6 +78,10 @@ + #include <stdint.h> + #endif + ++#ifndef TRUE ++#define TRUE 1 ++#endif ++ + #ifdef _WIN32 + #ifndef SIZE_MAX + #ifdef _WIN64 diff --git a/sci-geosciences/mapserver/mapserver-7.0.5.ebuild b/sci-geosciences/mapserver/mapserver-7.0.5.ebuild new file mode 100644 index 000000000000..69fae655f2c7 --- /dev/null +++ b/sci-geosciences/mapserver/mapserver-7.0.5.ebuild @@ -0,0 +1,196 @@ +# Copyright 1999-2017 Gentoo Foundation +# 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 + +inherit eutils depend.apache webapp distutils-r1 flag-o-matic perl-module php-ext-source-r3 multilib cmake-utils # ruby-ng + +DESCRIPTION="Development environment for building spatially enabled webapps" +HOMEPAGE="http://mapserver.org/" +SRC_URI="http://download.osgeo.org/mapserver/${MY_P}.tar.gz" + +LICENSE="MIT" +KEYWORDS="~amd64 ~x86" +SLOT="0" +IUSE="bidi cairo gdal geos mysql opengl 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 + dev-libs/fcgi + >=media-libs/gd-2.0.12[truetype,jpeg,png,zlib] + media-libs/giflib + net-misc/curl + virtual/jpeg:= + virtual/libiconv + x11-libs/agg + bidi? ( dev-libs/fribidi + media-libs/harfbuzz ) + cairo? ( x11-libs/cairo ) + gdal? ( >=sci-libs/gdal-1.8.0 ) + geos? ( sci-libs/geos ) + mysql? ( virtual/mysql ) + opengl? ( + media-libs/ftgl + media-libs/mesa + ) + 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 )" + +need_apache2 + +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}/${P}-missing-macro.patch" +) + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + webapp_pkg_setup + use perl && perl_set_version + #use ruby && ruby-ng_pkg_setup +} + +src_unpack() { + # unpack A and then copy the php thingies into workdir/php-slot + php-ext-source-r3_src_unpack + # HACK: and then remove it and replace by symlink + local slot + for slot in $(php_get_slots); do + rm -rf "${WORKDIR}/${slot}" || die + 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 + + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + "-DCMAKE_SKIP_RPATH=ON" + "-DWITH_ORACLESPATIAL=OFF" + "-DWITH_SDE=OFF" + "-DWITH_APACHE_MODULE=ON" + "-DWITH_ICONV=ON" + "-DWITH_GD=ON" + "-DWITH_GIF=ON" + "-DWITH_CURL=ON" + "-DWITH_FCGI=ON" + "-DINSTALL_LIB_DIR=${ROOT}usr/$(get_libdir)" + "-DWITH_PROJ=$(usex proj ON OFF)" + "-DWITH_WMS=$(usex proj ON OFF)" + "-DWITH_KML=$(usex xml ON OFF)" + "-DWITH_GEOS=$(usex geos ON OFF)" + "-DWITH_GDAL=$(usex gdal ON OFF)" + "-DWITH_OGR=$(usex gdal 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() { + cmake-utils_src_install + + if use php ; then + php-ext-source-r3_createinifiles + fi + webapp_src_preinst + exeinto "${MY_CGIBINDIR}" + doexe "${S}_build/mapserv" + webapp_src_install +} + +pkg_postinst() { + webapp_pkg_postinst +} + +pkg_prerm() { + webapp_pkg_prerm +} |