summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2011-05-02 18:28:44 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2011-05-02 18:28:44 +0000
commit2b10943c5be3c8fbe2b76eafbc8f73d7dedaf8e9 (patch)
treecc34debdb0bedf20ab04d0f8f4f899c034189709 /sci-geosciences/mapserver
parent[bump] dev-perl/Devel-Declare-0.6.4 (diff)
downloadgentoo-2-2b10943c5be3c8fbe2b76eafbc8f73d7dedaf8e9.tar.gz
gentoo-2-2b10943c5be3c8fbe2b76eafbc8f73d7dedaf8e9.tar.bz2
gentoo-2-2b10943c5be3c8fbe2b76eafbc8f73d7dedaf8e9.zip
Update the mapserver 6.0.1 php, ruby, tcl not ported as i didn't figure it out, open bugs with working patches only.
(Portage version: 2.2.0_alpha30/cvs/Linux x86_64)
Diffstat (limited to 'sci-geosciences/mapserver')
-rw-r--r--sci-geosciences/mapserver/ChangeLog7
-rw-r--r--sci-geosciences/mapserver/files/6.0.0_rc1-ldflags.patch8
-rw-r--r--sci-geosciences/mapserver/mapserver-6.0.0_rc1.ebuild340
-rw-r--r--sci-geosciences/mapserver/metadata.xml3
4 files changed, 128 insertions, 230 deletions
diff --git a/sci-geosciences/mapserver/ChangeLog b/sci-geosciences/mapserver/ChangeLog
index ac6dcb3be001..c949b52eca15 100644
--- a/sci-geosciences/mapserver/ChangeLog
+++ b/sci-geosciences/mapserver/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sci-geosciences/mapserver
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/mapserver/ChangeLog,v 1.29 2011/05/02 10:20:58 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/mapserver/ChangeLog,v 1.30 2011/05/02 18:28:44 scarabeus Exp $
+
+ 02 May 2011; Tomáš Chvátal <scarabeus@gentoo.org>
+ files/6.0.0_rc1-ldflags.patch, mapserver-6.0.0_rc1.ebuild, metadata.xml:
+ Update the mapserver 6.0.1 php, ruby, tcl not ported as i didn't figure it
+ out, open bugs with working patches only.
02 May 2011; Tomáš Chvátal <scarabeus@gentoo.org>
mapserver-6.0.0_rc1.ebuild:
diff --git a/sci-geosciences/mapserver/files/6.0.0_rc1-ldflags.patch b/sci-geosciences/mapserver/files/6.0.0_rc1-ldflags.patch
index ec0d904b9ee7..336fb2eff4f7 100644
--- a/sci-geosciences/mapserver/files/6.0.0_rc1-ldflags.patch
+++ b/sci-geosciences/mapserver/files/6.0.0_rc1-ldflags.patch
@@ -1,6 +1,6 @@
-diff -urN mapserver-6.0.0-rc1.old//Makefile.in mapserver-6.0.0-rc1/Makefile.in
---- mapserver-6.0.0-rc1.old//Makefile.in 2011-05-02 12:10:03.000000000 +0200
-+++ mapserver-6.0.0-rc1/Makefile.in 2011-05-02 12:12:46.000000000 +0200
+diff -urN mapserver-6.0.0-rc1.old/Makefile.in mapserver-6.0.0-rc1/Makefile.in
+--- mapserver-6.0.0-rc1.old/Makefile.in 2011-05-02 12:10:03.000000000 +0200
++++ mapserver-6.0.0-rc1/Makefile.in 2011-05-02 16:29:31.000000000 +0200
@@ -264,7 +264,7 @@
# STATIC_LIBS is full filename with path of libs that will be statically linked
STATIC_LIBS= $(GD_STATIC)
@@ -83,7 +83,7 @@ diff -urN mapserver-6.0.0-rc1.old//Makefile.in mapserver-6.0.0-rc1/Makefile.in
echo $(IGNORE_MISSING_DATA) $(USE_POINT_Z_M) $(STRINGS) @ALL_ENABLED@ >> mapscriptvars
echo -I. $(PROJ_INC) $(GD_INC) $(TTF_INC) $(JPEG_INC) $(SDE_INC) $(OGR_INC) $(GDAL_INC) $(GEOS_INC) >> mapscriptvars
- echo $(EXE_LDFLAGS) >> mapscriptvars
-+ echo $(LDFLAGS) >> mapscriptvars
++ echo $(EXE_LIBS) >> mapscriptvars
echo $(STATIC_LIBS) >> mapscriptvars
grep '#define MS_VERSION ' mapserver.h >> mapscriptvars
diff --git a/sci-geosciences/mapserver/mapserver-6.0.0_rc1.ebuild b/sci-geosciences/mapserver/mapserver-6.0.0_rc1.ebuild
index d609cf15f472..b7391b9c9bad 100644
--- a/sci-geosciences/mapserver/mapserver-6.0.0_rc1.ebuild
+++ b/sci-geosciences/mapserver/mapserver-6.0.0_rc1.ebuild
@@ -1,25 +1,22 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/mapserver/mapserver-6.0.0_rc1.ebuild,v 1.2 2011/05/02 10:20:58 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/mapserver/mapserver-6.0.0_rc1.ebuild,v 1.3 2011/05/02 18:28:44 scarabeus Exp $
EAPI=3
-PHP_EXT_NAME="php_mapscript php_proj"
-
-USE_RUBY="ruby18 ruby19"
-RUBY_OPTIONAL="yes"
+MY_P="${PN}-${PV/_/-}"
-PYTHON_DEPEND="2"
+PYTHON_DEPEND="python? *"
SUPPORT_PYTHON_ABIS="1"
-RESTRICT_PYTHON_ABIS="3.*"
PYTHON_MODNAME="mapscript.py"
-inherit eutils autotools confutils multilib distutils depend.php perl-module php-ext-source-r1 depend.apache webapp ruby-ng java-pkg-opt-2
-
-MY_P="${PN}-${PV/_/-}"
+#USE_RUBY="ruby18 ruby19"
+#RUBY_OPTIONAL="yes"
WEBAPP_MANUAL_SLOT=yes
+inherit eutils autotools depend.apache webapp distutils perl-module # ruby-ng
+
DESCRIPTION="OpenSource development environment for constructing spatially enabled Internet-web applications."
HOMEPAGE="http://mapserver.org"
SRC_URI="http://download.osgeo.org/mapserver/${MY_P}.tar.gz"
@@ -28,190 +25,130 @@ LICENSE="MIT"
KEYWORDS="~amd64 ~x86"
# I must check for mygis use flag availability
-IUSE="agg doc flash gdal geos java perl php postgis proj python ruby tcl threads tiff unicode xml xpm" # mono
+IUSE="bidi cairo gdal geos gif mysql opengl perl postgis proj python threads tiff xml xslt" # ruby php tcl
-# compilation fails with jdk > 1.4 on some native part probably
RDEPEND="
- media-libs/libpng
+ dev-libs/expat
+ dev-libs/fcgi
+ >=media-libs/gd-2.0.12[truetype,jpeg,png,zlib]
+ net-misc/curl
virtual/jpeg
- media-libs/freetype
- >=media-libs/gd-2.0.12[truetype,jpeg,png]
- sys-libs/zlib
- agg? ( x11-libs/agg )
- flash? ( media-libs/ming )
- gdal? ( >sci-libs/gdal-1.2.6 )
+ virtual/libiconv
+ x11-libs/agg
+ bidi? ( dev-libs/fribidi )
+ cairo? ( x11-libs/cairo )
+ gdal? ( >=sci-libs/gdal-1.8.0 )
geos? ( sci-libs/geos )
- java? ( >=virtual/jdk-1.4 )
- perl? ( dev-perl/DBI )
- php? ( dev-lang/php )
+ gif? ( media-libs/giflib )
+ 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 )
- tcl? ( dev-lang/tcl )
- tiff? ( media-libs/tiff sci-libs/libgeotiff )
- unicode? ( virtual/libiconv )
+ tiff? (
+ media-libs/tiff
+ sci-libs/libgeotiff
+ )
xml? ( dev-libs/libxml2:2 )
- xpm? ( x11-libs/libXpm )"
-
-DEPEND="${RDEPEND}
- java? ( dev-lang/swig )
- perl? ( dev-lang/swig )
- ruby? ( dev-lang/swig )
- python? ( dev-lang/swig )
- php? ( dev-lang/swig )
- tcl? ( dev-lang/swig )"
-want_apache2
-
-S="${WORKDIR}/${MY_P}"
-
-cd_script() {
- einfo "$2 the mapserver $1-mapscript"
- cd "${S}"/mapscript/$1 || die "Unable to go into $1 mapscript dir"
+ xslt? ( dev-libs/libxslt[crypt] )
+"
+
+DEPEND="${RDEPEND}"
+need_apache2
+
+S=${WORKDIR}/${MY_P}
+
+_enter_build_dir() {
+ [[ -z ${1} ]] && die "Missing path argument"
+ local workdir=${1}
+ shift
+ [[ -z ${1} ]] && die "missing command argument"
+
+ echo ">>> Running \"${@}\" in work directory \"${workdir}\""
+ pushd "${workdir}" > /dev/null || die "Failed to enter directory"
+ ${@} || die
+ popd > /dev/null
}
+each_ruby_configure() { ${RUBY} extconf.rb || die ; }
+
pkg_setup() {
- #webapp_pkg_setup
- use java && java-pkg-opt-2_pkg_setup
+ webapp_pkg_setup
use perl && perl-module_pkg_setup
- use php && has_php
use python && python_pkg_setup
- use ruby && ruby-ng_pkg_setup
+ #use ruby && ruby-ng_pkg_setup
+}
- confutils_use_conflict gdal tiff
- confutils_use_depend_all java threads
+src_unpack() {
+ default
}
src_prepare() {
epatch "${FILESDIR}/6.0.0_rc1-ldflags.patch"
- if use tcl ; then
- epatch "${FILESDIR}"/${PN}_tcl.patch-r1
- sed -i -e "s:@libdir@:$(get_libdir):g" mapscript/tcl/Makefile.in \
- || die "failed to fix libdir in Makefile.in"
- fi
- use ruby && ruby-ng_src_prepare
eautoreconf
}
src_configure() {
- local step="Configuration"
+ local myopts
- local myconf="--with-png --with-jpeg --with-zlib --with-freetype"
- use apache2 && myconf="${myconf} --with-httpd=${APACHE_BIN}"
- use geos && myconf="${myconf} --with-geos=$(type -P geos-config)"
-
- local MYGPUSE="wfs wcs wfsclient"
if use gdal && use proj ; then
- myconf="--with-ogr ${myconf}";
- for i in ${MYGPUSE}; do
- myconf="${myconf} --with-${i}"
- done
- use xml && myconf="${myconf} --with-sos"
+ myopts+="
+ --with-wfs
+ --with-wcs
+ --with-wfsclient
+ --with-wmsclient
+ "
+ use xml && myopts+=" --with-sos"
fi
- use proj && myconf="${myconf} --with-wmsclient"
- use php && myconf="${myconf} --with-php=${PHPPREFIX}/include/php"
-
- if use perl || use python || use ruby || use tcl || use php ; then
- myconf="${myconf} --with-mapscript"
- fi
+ # some scripts require configure time options so place it here
+ #use php && myopts+=" --with-php=$(${PHPCONFIG} --include-dir)"
- cd "${S}"
+ # sde is ESRI package that you have to buy first
+ # oraclespatial needs oracle server for testing/usage
+ # note that some options accept just path, they are not on/off switches!
econf \
- --without-pdf \
- $(use_with gdal) \
- $(use_with agg) \
- $(use_with perl) \
- $(use_with python) \
- $(use_with ruby) \
- $(use_with tcl) \
+ --without-oraclespatial \
+ --without-sde \
+ --with-libiconv \
+ --with-jpeg \
+ --with-gd \
+ --with-wms \
+ --with-kml \
+ --with-curl-config \
+ --with-agg-svg-symbols \
+ --with-httpd="${APACHE_BIN}" \
+ --with-fastcgi \
+ $(use_with opengl ogl) \
+ $(use_with opengl ftgl) \
+ $(use_with gif gif "${EPREFIX}/usr/") \
$(use_with proj) \
- $(use_with postgis) \
- $(use_with tiff) \
- $(use_with flash ming) \
- $(use_with java) \
- $(use_with unicode iconv) \
$(use_with threads) \
- ${myconf}
-
- if use ruby; then
- cd_script ruby ${step}
- RUBY_ECONF="-I${D}"
- ruby-ng_econf
- cp ../mapscript.i . || die "Unable to find mapscript.i"
- sed -e "s:ruby.h defines.h::g" -i ./Makefile
- fi
-
- if use tcl; then
- cd_script tcl ${step}
- sed "s:perlvars:mapscriptvars:" -i configure
- sed -e "s:tail -:tail -n :g" -e "s:head -:head -n :g" -i configure ||\
- die "Unable to modify the configure file"
- econf --with-tcl=/usr
- touch tclmodule.i
- # do not comment this sed out again because it will plain break build otherwise
- # thanks in advance
- sed -e "s:-DTCL_WIDE_INT_TYPE=long long:-DTCL_WIDE_INT_TYPE=long\\\ long:g" \
- -i Makefile || die "Unable to modify Makefile"
- fi
+ $(use_with geos) \
+ $(use_with gdal) \
+ $(use_with gdal ogr) \
+ $(use_with postgis) \
+ $(use_with mysql) \
+ $(use_with xml xml2-config) \
+ $(use_with xslt) \
+ $(use_with xslt xml-mapfile) \
+ $(use_with bidi fribidi-config) \
+ $(use_with cairo) \
+ ${myopts}
+
+ #use ruby && _enter_build_dir "${S}/mapscript/ruby" "ln -s ../mapscript.i ./"
+ #use ruby && _enter_build_dir "${S}/mapscript/ruby" "ruby-ng_src_configure"
}
src_compile() {
- local step="Building"
-
- # bug #279627
- emake -j1 || die "make failed"
-
- if use perl; then
- cd_script perl ${step}
- perl-module_src_compile
- fi
-
- if use php && use proj; then
- cd_script php3 ${step}
- emake php_proj.so || die "unable to built php_proj.so"
- fi
-
- if use python; then
- cd_script python ${step}
- distutils_src_compile
- fi
-
- if use ruby; then
- cd_script ruby ${step}
- ruby-ng_src_compile
- fi
-
- if use tcl; then
- cd_script tcl ${step}
- emake || die "Unable to build tcl mapscript"
- fi
-
- if use java; then
- cd_script java ${step}
- emake interface || die "Unable to build java mapscript"
- emake all || die "Unable to build java mapscript"
- fi
-
-}
-
-src_test(){
- local step="Testing"
-
- if use java ; then
- cd_script java test
- emake test || die "Test failed"
- # We need to fix the tests to make them pass
- sed -i -e "s:setTransparency:setOpacity:g" \
- "${S}"/mapscript/java/tests/threadtest/MapThread.java \
- || die "fixing of tests failed"
- emake threadtests || die "Threadtests failed"
- fi
-}
-
-mapscript_install_examples() {
- elog "$1-mapscript examples could be found in the following directory"
- elog "/usr/share/doc/${PF}/mapscript/examples/$1"
- insinto /usr/share/doc/${PF}/mapscript/examples/$1/
- doins examples/* || die "Unable to install specified sample data"
+ default
+ use python && _enter_build_dir "${S}/mapscript/python" "distutils_src_compile"
+ use perl && _enter_build_dir "${S}/mapscript/perl" "perl-module_src_prep"
+ use perl && _enter_build_dir "${S}/mapscript/perl" "perl-module_src_compile"
+ #use ruby && _enter_build_dir "${S}/mapscript/ruby" "ruby-ng_src_compile"
}
src_install() {
@@ -219,88 +156,43 @@ src_install() {
local extra_dir="fonts tests tests/vera symbols"
- dodir /usr /usr/bin
-
- into /usr
-
- if use php ; then
- cd_script php3 ${step}
- for i in *.so ; do
- cp ${i} "${WORKDIR}"/${i/.so}-default.so || die "failed to copy php extension"
- PHP_EXT_NAME="${i/.so}"
- php-ext-source-r1_src_install
- done
-
- mapscript_install_examples php
- fi
-
- if use ruby ; then
- cd_script ruby ${step}
- ruby-ng_src_install
- mapscript_install_examples ruby
- fi
-
- if use perl ; then
- cd_script perl ${step}
- perl-module_src_install
- mapscript_install_examples perl
- fi
-
- if use tcl ; then
- cd_script tcl ${step}
- sed "s:\$(TCL_EXEC_PREFIX):\$(DESTDIR)\$(TCL_EXEC_PREFIX):g" -i Makefile
- emake -j1 DESTDIR="${D}" install || \
- die "Unable to setup tcl mapscript support"
- mapscript_install_examples tcl
- fi
-
- if use python ; then
- cd_script python ${step}
- distutils_src_install
- mapscript_install_examples python
- fi
-
- if use java ; then
- cd_script java ${step}
- java-pkg_dojar mapscript.jar
- java-pkg_doso libmapscript.so
- mapscript_install_examples java
- fi
-
- cd "${S}"
- into /usr
-
dobin shp2img legend shptree shptreevis shp2img legend shptreetst scalebar \
- sortshp tile4ms msencrypt mapserver-config \
- || die "Unable to setup mapserver tools"
+ sortshp tile4ms msencrypt mapserver-config
- dodoc INSTALL README HISTORY.TXT || die "Unable to setup documentation"
+ dodoc INSTALL README HISTORY.TXT
for i in ${extra_dir}; do
- insinto /usr/share/doc/${PF}/${i}
- doins ${i}/* || die "Unable to add extra_dir to document tree"
+ docinto /usr/share/doc/${PF}/${i}
+ dodoc ${i}/* || die
done
- if use doc; then
- insinto /usr/share/doc/${PF}/rfc
- doins rfc/*
- fi
+ use python && _enter_build_dir "${S}/mapscript/python" "distutils_src_install"
+ use perl && _enter_build_dir "${S}/mapscript/perl" "perl-module_src_install"
+ use perl && _enter_build_dir "${S}/mapscript/perl" "fixlocalpod"
+ #use ruby && _enter_build_dir "${S}/mapscript/ruby" "ruby-ng_src_install"
webapp_src_preinst
- chmod +x "${S}"/mapserv || die "Unable to find mapserv"
- cp "${S}"/mapserv "${D}"/${MY_CGIBINDIR} || die "Unable to install mapserv"
+ exeinto "${MY_CGIBINDIR}"
+ doexe "${S}/mapserv"
webapp_src_install
}
+pkg_preinst() {
+ use perl && perl-module_pkg_preinst
+}
+
pkg_postinst() {
webapp_pkg_postinst
use python && distutils_pkg_postinst
+ use perl && perl-module_pkg_postinst
}
pkg_prerm() {
webapp_pkg_prerm
+ use perl && perl-module_pkg_prerm
}
pkg_postrm() {
use python && distutils_pkg_postrm
+ use perl && perl-module_pkg_postrm
}
diff --git a/sci-geosciences/mapserver/metadata.xml b/sci-geosciences/mapserver/metadata.xml
index 121027b573bd..f9626e421e49 100644
--- a/sci-geosciences/mapserver/metadata.xml
+++ b/sci-geosciences/mapserver/metadata.xml
@@ -10,6 +10,7 @@
<flag name='geos'>Enable <pkg>sci-libs/geos</pkg> library support</flag>
<flag name='postgis'>Enable <pkg>dev-db/postgis</pkg> support</flag>
<flag name='proj'>Enable <pkg>sci-libs/proj</pkg> library support
- (geographic projections)</flag>
+(geographic projections)</flag>
+ <flag name='xslt'>Enable xslt and exslt support xml-mapfile support</flag>
</use>
</pkgmetadata>