diff options
author | Justin Lecher <jlec@gentoo.org> | 2010-12-23 09:28:02 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2010-12-23 09:28:02 +0000 |
commit | c828a96cb54fb64dbf0f61573efe4d5aa2c39436 (patch) | |
tree | f604129f6b6c768e6fe5811a78c306c77b988ae9 /sci-geosciences | |
parent | Verify and potentially improve Python-related code, #316193 (diff) | |
download | historical-c828a96cb54fb64dbf0f61573efe4d5aa2c39436.tar.gz historical-c828a96cb54fb64dbf0f61573efe4d5aa2c39436.tar.bz2 historical-c828a96cb54fb64dbf0f61573efe4d5aa2c39436.zip |
Verify and potentially improve Python-related code, #316213; respect LDFLAGS, #333081
Package-Manager: portage-2.2.0_alpha6/cvs/Linux x86_64
Diffstat (limited to 'sci-geosciences')
-rw-r--r-- | sci-geosciences/mapserver/ChangeLog | 9 | ||||
-rw-r--r-- | sci-geosciences/mapserver/Manifest | 12 | ||||
-rw-r--r-- | sci-geosciences/mapserver/files/5.4.2-ldflags.patch | 90 | ||||
-rw-r--r-- | sci-geosciences/mapserver/mapserver-5.4.2-r1.ebuild | 299 |
4 files changed, 403 insertions, 7 deletions
diff --git a/sci-geosciences/mapserver/ChangeLog b/sci-geosciences/mapserver/ChangeLog index f9be9feb373e..6a6129f47083 100644 --- a/sci-geosciences/mapserver/ChangeLog +++ b/sci-geosciences/mapserver/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sci-geosciences/mapserver # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/mapserver/ChangeLog,v 1.22 2010/11/08 17:31:45 xarthisius Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/mapserver/ChangeLog,v 1.23 2010/12/23 09:28:02 jlec Exp $ + +*mapserver-5.4.2-r1 (23 Dec 2010) + + 23 Dec 2010; Justin Lecher <jlec@gentoo.org> +files/5.4.2-ldflags.patch, + +mapserver-5.4.2-r1.ebuild: + Verify and potentially improve Python-related code, #316213; respect LDFLAGS, + #333081 08 Nov 2010; Kacper Kowalik <xarthisius@gentoo.org> mapserver-5.4.2.ebuild: diff --git a/sci-geosciences/mapserver/Manifest b/sci-geosciences/mapserver/Manifest index df136ddec413..3d8655b9a714 100644 --- a/sci-geosciences/mapserver/Manifest +++ b/sci-geosciences/mapserver/Manifest @@ -1,17 +1,17 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 +AUX 5.4.2-ldflags.patch 3851 RMD160 db486a2c5611b3bc9102ded21c3aa03f47f0dfe6 SHA1 7cef034f6d3a176934bbb9df957057309fe409be SHA256 518ebe8e12b590001571110d521939a44a1fc74d82cdc04d76f81943c99a5463 AUX mapserver_tcl.patch-r1 1985 RMD160 bb4d766526f7c29535915bb87c0c5199251a2c3a SHA1 2415b6b792be100f2e5a6a936ef77260352f718b SHA256 725c7e5dd9dc6ae6372d9c4a334ce13fc8ea2ab6afbf569a6db786f2caa7a31f DIST mapserver-5.4.2.tar.gz 1877995 RMD160 05634355e1a74b87ffa3fba0741911b34550321e SHA1 4afe4719ad37c77aeeed83f33059e4ba053dcfa1 SHA256 a7005a809c7494cf2ca1648350eab601cc1af34709b127587679bce349e5e185 +EBUILD mapserver-5.4.2-r1.ebuild 7364 RMD160 35f0c35a3de7227068a135a7b2179f79b72828a6 SHA1 4c52c6faa41585c95113edacb13bb86955f13fdf SHA256 bee3bb2e99f44433d5b15afb6e7013429ff8d68da58b48038c2ddf4cc750628e EBUILD mapserver-5.4.2.ebuild 7460 RMD160 758c0689f7dcb52b81e5295515b7a0cf2168734f SHA1 54b1e302836e14a226b3b6fd56e7f05e33a20306 SHA256 639e0a93eba0621a6be58fa2bd5becaa09c6291494930baa475ebb9c04a175e5 -MISC ChangeLog 4687 RMD160 4175045b37ddf2eadc4f5a3bfc26957076433707 SHA1 5b10ead7ee4ece73f79fc76864ec50f554c2f186 SHA256 d15428efc01f3e0ca870cdc8bad70377662575aecccc06ec282d2d4b15e6f45f +MISC ChangeLog 4912 RMD160 47582550486c94b13fb707d07db864f3f4c45874 SHA1 ab692da0749da81a94e1fe8f6c9fe9dbf3b4a29b SHA256 9127a093c5b409ad97d67a64d5a92a21efeab968dd65c6e31696b94b34716784 MISC metadata.xml 679 RMD160 55082f40f29cfb34e0b2ea2aea585f762dadd275 SHA1 1d9f0482ad577e1a48e738a252abfea71273899b SHA256 0e01b0d981e8a2ebcc0f10566d6f9c94d44c081b0c1bbfa4704ba2580df9f697 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) -iJwEAQECAAYFAkzYNAsACgkQIiMqcbOVdxSc7QP/Vh6a5dXb8A5eBPwT4nO3rtT1 -KxvohUarmQYrDS0VpbPgkrBYti7wWGTUj7XRnDoHSynapnwA0ZEbMsbb7gfxE66O -EplhE72hRYB/eIS9QgUYPU69sG4YYGeSKJJW6/WDVV94thJUGIqCbqR1PpAXNk3d -REgVHR6OQzC97D1Sx+Y= -=WBc0 +iEYEARECAAYFAk0TFisACgkQgAnW8HDreRbkjgCgr0EkXnC4iSJ5gUP3u9c1IYt2 +i0wAnjUbxeoYnR2kq32PWldSE8l1U8iT +=Ttxb -----END PGP SIGNATURE----- diff --git a/sci-geosciences/mapserver/files/5.4.2-ldflags.patch b/sci-geosciences/mapserver/files/5.4.2-ldflags.patch new file mode 100644 index 000000000000..d202b8d4692f --- /dev/null +++ b/sci-geosciences/mapserver/files/5.4.2-ldflags.patch @@ -0,0 +1,90 @@ +diff --git a/Makefile.in b/Makefile.in +index 56cb209..46a8a4c 100755 +--- a/Makefile.in ++++ b/Makefile.in +@@ -252,7 +252,7 @@ SUP_LIBS = $(GD_LIB) $(AGG_LIB) $(PDF_LIB) $(TIFF_LIB) $(PROJ_LIBS) \ + # 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 + +@@ -316,59 +316,59 @@ $(LIBMAP_SHARED): $(LIBMAP_STATIC) + && 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: sortshp.o +- $(LD) $(CFLAGS) sortshp.o $(EXE_LDFLAGS) -o sortshp ++ $(LD) $(CFLAGS) sortshp.o $(LDFLAGS) -o sortshp $(EXE_LIBS) + + tile4ms: tile4ms.o +- $(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: testexpr.o mapparser.o maplexer.o +- $(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 +- $(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) $(TIFF_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 new file mode 100644 index 000000000000..00ad2fe21428 --- /dev/null +++ b/sci-geosciences/mapserver/mapserver-5.4.2-r1.ebuild @@ -0,0 +1,299 @@ +# Copyright 1999-2010 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.1 2010/12/23 09:28:02 jlec 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 pdf 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 ) + pdf? ( media-libs/pdflib ) + 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 ) + 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 + + 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 $(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 pdf) \ + $(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 || die "Unable to build python mapscript" + 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 + + if use pdf ; then + dobin shp2pdf || die "Unable to setup shp2pdf" + fi + + 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 + distutils_pkg_postinst +} + +pkg_prerm() { + webapp_pkg_prerm +} |