From f24a54415ba052a846c7113286880f3b2ba93408 Mon Sep 17 00:00:00 2001 From: Tomas Chvatal Date: Mon, 2 May 2011 10:16:17 +0000 Subject: Version bump to 5.6.6 and 6.0.0_rc1 releases. (did not test all options so some might fail) (Portage version: 2.2.0_alpha30/cvs/Linux x86_64) --- sci-geosciences/mapserver/ChangeLog | 11 +- .../mapserver/files/6.0.0_rc1-ldflags.patch | 89 ++++++ .../mapserver/mapserver-5.4.2-r1.ebuild | 300 -------------------- sci-geosciences/mapserver/mapserver-5.6.6.ebuild | 300 ++++++++++++++++++++ .../mapserver/mapserver-6.0.0_rc1.ebuild | 303 +++++++++++++++++++++ 5 files changed, 702 insertions(+), 301 deletions(-) create mode 100644 sci-geosciences/mapserver/files/6.0.0_rc1-ldflags.patch delete mode 100644 sci-geosciences/mapserver/mapserver-5.4.2-r1.ebuild create mode 100644 sci-geosciences/mapserver/mapserver-5.6.6.ebuild create mode 100644 sci-geosciences/mapserver/mapserver-6.0.0_rc1.ebuild (limited to 'sci-geosciences') diff --git a/sci-geosciences/mapserver/ChangeLog b/sci-geosciences/mapserver/ChangeLog index 04aef19f3458..016517271782 100644 --- a/sci-geosciences/mapserver/ChangeLog +++ b/sci-geosciences/mapserver/ChangeLog @@ -1,6 +1,15 @@ # 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.27 2011/03/02 20:36:03 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/mapserver/ChangeLog,v 1.28 2011/05/02 10:16:17 scarabeus Exp $ + +*mapserver-6.0.0_rc1 (02 May 2011) +*mapserver-5.6.6 (02 May 2011) + + 02 May 2011; Tomáš Chvátal + +files/6.0.0_rc1-ldflags.patch, -mapserver-5.4.2-r1.ebuild, + +mapserver-5.6.6.ebuild, +mapserver-6.0.0_rc1.ebuild: + Version bump to 5.6.6 and 6.0.0_rc1 releases. (did not test all options so + some might fail) 02 Mar 2011; Justin Lecher mapserver-5.4.2.ebuild, mapserver-5.4.2-r1.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 new file mode 100644 index 000000000000..ec0d904b9ee7 --- /dev/null +++ b/sci-geosciences/mapserver/files/6.0.0_rc1-ldflags.patch @@ -0,0 +1,89 @@ +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 +@@ -264,7 +264,7 @@ + # STATIC_LIBS is full filename with path of libs that will be statically linked + STATIC_LIBS= $(GD_STATIC) + +-EXE_LDFLAGS = $(RUNPATHS) -L. -lmapserver $(SUP_LIBS) $(STATIC_LIBS) ++EXE_LIBS = $(RUNPATHS) -L. -lmapserver $(SUP_LIBS) $(STATIC_LIBS) + + RM= /bin/rm -f + +@@ -351,59 +351,59 @@ + && ln -f -s $(LIBMAP_SH_VER) $(LIBMAP_SHARED) + + shp2pdf: $(LIBMAP_STATIC) shp2pdf.o mapserver.h +- $(LD) $(CFLAGS) shp2pdf.o $(EXE_LDFLAGS) -o shp2pdf ++ $(LD) $(CFLAGS) shp2pdf.o $(LDFLAGS) -o shp2pdf $(EXE_LIBS) + + shp2img: $(LIBMAP_STATIC) shp2img.o mapserver.h +- $(LD) $(CFLAGS) shp2img.o $(EXE_LDFLAGS) -o shp2img ++ $(LD) $(CFLAGS) shp2img.o $(LDFLAGS) -o shp2img $(EXE_LIBS) + + sym2img: $(LIBMAP_STATIC) sym2img.o mapserver.h +- $(LD) $(CFLAGS) sym2img.o $(EXE_LDFLAGS) -o sym2img ++ $(LD) $(CFLAGS) sym2img.o $(LDFLAGS) -o sym2img $(EXE_LIBS) + + legend: $(LIBMAP_STATIC) legend.o mapserver.h +- $(LD) $(CFLAGS) legend.o $(EXE_LDFLAGS) -o legend ++ $(LD) $(CFLAGS) legend.o $(LDFLAGS) -o legend $(EXE_LIBS) + + scalebar: $(LIBMAP_STATIC) scalebar.o mapserver.h +- $(LD) $(CFLAGS) scalebar.o $(EXE_LDFLAGS) -o scalebar ++ $(LD) $(CFLAGS) scalebar.o $(LDFLAGS) -o scalebar $(EXE_LIBS) + + mapserv: mapserv.h maptile.h $(LIBMAP_STATIC) mapserv.o cgiutil.o maptile.o mapserver.h +- $(LD) $(CFLAGS) mapserv.o cgiutil.o maptile.o $(EXE_LDFLAGS) -o mapserv ++ $(LD) $(CFLAGS) mapserv.o cgiutil.o maptile.o $(LDFLAGS) -o mapserv $(EXE_LIBS) + + shpindex: $(LIBMAP_STATIC) shpindex.o mapserver.h +- $(LD) $(CFLAGS) shpindex.o $(EXE_LDFLAGS) -o shpindex ++ $(LD) $(CFLAGS) shpindex.o $(LDFLAGS) -o shpindex $(EXE_LIBS) + + shptree: $(LIBMAP_STATIC) shptree.o mapserver.h +- $(LD) $(CFLAGS) shptree.o $(EXE_LDFLAGS) -o shptree ++ $(LD) $(CFLAGS) shptree.o $(LDFLAGS) -o shptree $(EXE_LIBS) + + shptreevis: $(LIBMAP_STATIC) shptreevis.o mapserver.h +- $(LD) $(CFLAGS) shptreevis.o $(EXE_LDFLAGS) -o shptreevis ++ $(LD) $(CFLAGS) shptreevis.o $(LDFLAGS) -o shptreevis $(EXE_LIBS) + + shptreetst: $(LIBMAP_STATIC) shptreetst.o mapserver.h +- $(LD) $(CFLAGS) shptreetst.o $(EXE_LDFLAGS) -o shptreetst ++ $(LD) $(CFLAGS) shptreetst.o $(LDFLAGS) -o shptreetst $(EXE_LIBS) + + sortshp: $(LIBMAP_STATIC) sortshp.o mapserver.h +- $(LD) $(CFLAGS) sortshp.o $(EXE_LDFLAGS) -o sortshp ++ $(LD) $(CFLAGS) sortshp.o $(LDFLAGS) -o sortshp $(EXE_LIBS) + + tile4ms: $(LIBMAP_STATIC) tile4ms.o mapserver.h +- $(LD) $(CFLAGS) tile4ms.o $(EXE_LDFLAGS) -o tile4ms ++ $(LD) $(CFLAGS) tile4ms.o $(LDFLAGS) -o tile4ms $(EXE_LIBS) + + msencrypt: $(LIBMAP_STATIC) msencrypt.o mapserver.h +- $(LD) $(CFLAGS) msencrypt.o $(EXE_LDFLAGS) -o msencrypt ++ $(LD) $(CFLAGS) msencrypt.o $(LDFLAGS) -o msencrypt $(EXE_LIBS) + + testexpr: $(LIBMAP_STATIC) testexpr.o mapparser.o maplexer.o mapserver.h +- $(LD) $(CFLAGS) testexpr.o $(EXE_LDFLAGS) -o testexpr ++ $(LD) $(CFLAGS) testexpr.o $(LDFLAGS) -o testexpr $(EXE_LIBS) + + testcopy: $(LIBMAP_STATIC) testcopy.o mapcopy.o mapserver.h +- $(LD) $(CFLAGS) testcopy.o $(EXE_LDFLAGS) -o testcopy ++ $(LD) $(CFLAGS) testcopy.o $(LDFLAGS) -o testcopy $(EXE_LIBS) + + test_mapcrypto: $(LIBMAP_STATIC) mapcrypto.c mapserver.h +- $(CC) $(CFLAGS) mapcrypto.c -DTEST_MAPCRYPTO $(EXE_LDFLAGS) -o test_mapcrypto ++ $(CC) $(CFLAGS) mapcrypto.c -DTEST_MAPCRYPTO $(LDFLAGS) -o test_mapcrypto $(EXE_LIBS) + + mapscriptvars: Makefile + touch mapscriptvars + pwd > mapscriptvars + 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 $(STATIC_LIBS) >> mapscriptvars + grep '#define MS_VERSION ' mapserver.h >> mapscriptvars + diff --git a/sci-geosciences/mapserver/mapserver-5.4.2-r1.ebuild b/sci-geosciences/mapserver/mapserver-5.4.2-r1.ebuild deleted file mode 100644 index 93a54630360b..000000000000 --- a/sci-geosciences/mapserver/mapserver-5.4.2-r1.ebuild +++ /dev/null @@ -1,300 +0,0 @@ -# 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-5.4.2-r1.ebuild,v 1.7 2011/04/12 18:20:57 arfrever Exp $ - -EAPI="2" - -PHP_EXT_NAME="php_mapscript php_proj" -RUBY_OPTIONAL="yes" - -PYTHON_DEPEND="2" -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 java-pkg-opt-2 - -WEBAPP_MANUAL_SLOT=yes - -DESCRIPTION="OpenSource development environment for constructing spatially enabled Internet-web applications." -HOMEPAGE="http://mapserver.org" -SRC_URI="http://download.osgeo.org/mapserver/${P}.tar.gz" - -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 - -# compilation fails with jdk > 1.4 on some native part probably -RDEPEND=" - media-libs/libpng - 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 ) - geos? ( sci-libs/geos ) - java? ( >=virtual/jdk-1.4 ) - perl? ( dev-perl/DBI ) - php? ( dev-lang/php ) - postgis? ( dev-db/postgis ) - proj? ( sci-libs/proj net-misc/curl ) - ruby? ( dev-lang/ruby ) - tcl? ( dev-lang/tcl ) - tiff? ( media-libs/tiff sci-libs/libgeotiff ) - unicode? ( virtual/libiconv ) - 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 - -cd_script() { - einfo "$2 the mapserver $1-mapscript" - cd "${S}"/mapscript/$1 || die "Unable to go into $1 mapscript dir" -} - -pkg_setup() { - webapp_pkg_setup - use java && java-pkg-opt-2_pkg_setup - use perl && perl-module_pkg_setup - use php && has_php - use python && python_pkg_setup - - confutils_use_conflict gdal tiff - confutils_use_depend_all java threads -} - -src_prepare() { - epatch "${FILESDIR}"/${PV}-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 - eautoreconf -} - -src_configure() { - local step="Configuration" - - 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" - 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 - - cd "${S}" - econf \ - --without-pdf \ - $(use_with gdal) \ - $(use_with agg) \ - $(use_with perl) \ - $(use_with python) \ - $(use_with ruby) \ - $(use_with tcl) \ - $(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_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 -} - -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_emake - 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" -} - -src_install() { - local step="Installing" - - 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_einstall - 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" - - dodoc INSTALL README HISTORY.TXT || die "Unable to setup documentation" - - for i in ${extra_dir}; do - insinto /usr/share/doc/${PF}/${i} - doins ${i}/* || die "Unable to add extra_dir to document tree" - done - - if use doc; then - insinto /usr/share/doc/${PF}/rfc - doins rfc/* - fi - - webapp_src_preinst - chmod +x "${S}"/mapserv || die "Unable to find mapserv" - cp "${S}"/mapserv "${D}"/${MY_CGIBINDIR} || die "Unable to install mapserv" - webapp_src_install -} - -pkg_postinst() { - webapp_pkg_postinst - use python && distutils_pkg_postinst -} - -pkg_prerm() { - webapp_pkg_prerm -} - -pkg_postrm() { - use python && distutils_pkg_postrm -} diff --git a/sci-geosciences/mapserver/mapserver-5.6.6.ebuild b/sci-geosciences/mapserver/mapserver-5.6.6.ebuild new file mode 100644 index 000000000000..16b39a25f1b1 --- /dev/null +++ b/sci-geosciences/mapserver/mapserver-5.6.6.ebuild @@ -0,0 +1,300 @@ +# 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-5.6.6.ebuild,v 1.1 2011/05/02 10:16:17 scarabeus Exp $ + +EAPI=3 + +PHP_EXT_NAME="php_mapscript php_proj" +RUBY_OPTIONAL="yes" + +PYTHON_DEPEND="2" +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 java-pkg-opt-2 + +WEBAPP_MANUAL_SLOT=yes + +DESCRIPTION="OpenSource development environment for constructing spatially enabled Internet-web applications." +HOMEPAGE="http://mapserver.org" +SRC_URI="http://download.osgeo.org/mapserver/${P}.tar.gz" + +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 + +# compilation fails with jdk > 1.4 on some native part probably +RDEPEND=" + media-libs/libpng + 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 ) + geos? ( sci-libs/geos ) + java? ( >=virtual/jdk-1.4 ) + perl? ( dev-perl/DBI ) + php? ( dev-lang/php ) + postgis? ( dev-db/postgis ) + proj? ( sci-libs/proj net-misc/curl ) + ruby? ( dev-lang/ruby ) + tcl? ( dev-lang/tcl ) + tiff? ( media-libs/tiff sci-libs/libgeotiff ) + unicode? ( virtual/libiconv ) + 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 + +cd_script() { + einfo "$2 the mapserver $1-mapscript" + cd "${S}"/mapscript/$1 || die "Unable to go into $1 mapscript dir" +} + +pkg_setup() { + #webapp_pkg_setup + use java && java-pkg-opt-2_pkg_setup + use perl && perl-module_pkg_setup + use php && has_php + use python && python_pkg_setup + + confutils_use_conflict gdal tiff + confutils_use_depend_all java threads +} + +src_prepare() { + epatch "${FILESDIR}"/5.4.2-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 + eautoreconf +} + +src_configure() { + local step="Configuration" + + 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" + 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 + + cd "${S}" + econf \ + --without-pdf \ + $(use_with gdal) \ + $(use_with agg) \ + $(use_with perl) \ + $(use_with python) \ + $(use_with ruby) \ + $(use_with tcl) \ + $(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_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 +} + +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_emake + 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" +} + +src_install() { + local step="Installing" + + 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_einstall + 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" + + dodoc INSTALL README HISTORY.TXT || die "Unable to setup documentation" + + for i in ${extra_dir}; do + insinto /usr/share/doc/${PF}/${i} + doins ${i}/* || die "Unable to add extra_dir to document tree" + done + + if use doc; then + insinto /usr/share/doc/${PF}/rfc + doins rfc/* + fi + + webapp_src_preinst + chmod +x "${S}"/mapserv || die "Unable to find mapserv" + cp "${S}"/mapserv "${D}"/${MY_CGIBINDIR} || die "Unable to install mapserv" + webapp_src_install +} + +pkg_postinst() { + webapp_pkg_postinst + use python && distutils_pkg_postinst +} + +pkg_prerm() { + webapp_pkg_prerm +} + +pkg_postrm() { + use python && distutils_pkg_postrm +} diff --git a/sci-geosciences/mapserver/mapserver-6.0.0_rc1.ebuild b/sci-geosciences/mapserver/mapserver-6.0.0_rc1.ebuild new file mode 100644 index 000000000000..df3a114f8a85 --- /dev/null +++ b/sci-geosciences/mapserver/mapserver-6.0.0_rc1.ebuild @@ -0,0 +1,303 @@ +# 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.1 2011/05/02 10:16:17 scarabeus Exp $ + +EAPI=3 + +PHP_EXT_NAME="php_mapscript php_proj" +RUBY_OPTIONAL="yes" + +PYTHON_DEPEND="2" +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 java-pkg-opt-2 + +MY_P="${PN}-${PV/_/-}" + +WEBAPP_MANUAL_SLOT=yes + +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" + +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 + +# compilation fails with jdk > 1.4 on some native part probably +RDEPEND=" + media-libs/libpng + 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 ) + geos? ( sci-libs/geos ) + java? ( >=virtual/jdk-1.4 ) + perl? ( dev-perl/DBI ) + php? ( dev-lang/php ) + postgis? ( dev-db/postgis ) + proj? ( sci-libs/proj net-misc/curl ) + ruby? ( dev-lang/ruby ) + tcl? ( dev-lang/tcl ) + tiff? ( media-libs/tiff sci-libs/libgeotiff ) + unicode? ( virtual/libiconv ) + 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" +} + +pkg_setup() { + #webapp_pkg_setup + use java && java-pkg-opt-2_pkg_setup + use perl && perl-module_pkg_setup + use php && has_php + use python && python_pkg_setup + + confutils_use_conflict gdal tiff + confutils_use_depend_all java threads +} + +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 + eautoreconf +} + +src_configure() { + local step="Configuration" + + 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" + 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 + + cd "${S}" + econf \ + --without-pdf \ + $(use_with gdal) \ + $(use_with agg) \ + $(use_with perl) \ + $(use_with python) \ + $(use_with ruby) \ + $(use_with tcl) \ + $(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_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 +} + +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_emake + 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" +} + +src_install() { + local step="Installing" + + 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_einstall + 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" + + dodoc INSTALL README HISTORY.TXT || die "Unable to setup documentation" + + for i in ${extra_dir}; do + insinto /usr/share/doc/${PF}/${i} + doins ${i}/* || die "Unable to add extra_dir to document tree" + done + + if use doc; then + insinto /usr/share/doc/${PF}/rfc + doins rfc/* + fi + + webapp_src_preinst + chmod +x "${S}"/mapserv || die "Unable to find mapserv" + cp "${S}"/mapserv "${D}"/${MY_CGIBINDIR} || die "Unable to install mapserv" + webapp_src_install +} + +pkg_postinst() { + webapp_pkg_postinst + use python && distutils_pkg_postinst +} + +pkg_prerm() { + webapp_pkg_prerm +} + +pkg_postrm() { + use python && distutils_pkg_postrm +} -- cgit v1.2.3-65-gdbad