diff options
Diffstat (limited to 'sci-geosciences')
6 files changed, 203 insertions, 1 deletions
diff --git a/sci-geosciences/mapnik/ChangeLog b/sci-geosciences/mapnik/ChangeLog index 39321e17249a..fa1444c7fd86 100644 --- a/sci-geosciences/mapnik/ChangeLog +++ b/sci-geosciences/mapnik/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sci-geosciences/mapnik # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/mapnik/ChangeLog,v 1.38 2013/02/16 22:38:31 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/mapnik/ChangeLog,v 1.39 2013/02/16 22:49:44 swegener Exp $ + +*mapnik-2.1.0 (16 Feb 2013) + + 16 Feb 2013; Sven Wegener <swegener@gentoo.org> +mapnik-2.1.0.ebuild, + +files/mapnik-2.1.0-configure-only-once.patch, + +files/mapnik-2.1.0-destdir.patch, + +files/mapnik-2.1.0-dont-run-ldconfig.patch, +files/mapnik-2.1.0-scons.patch: + Version bump, bug #433922, thanks to Ronan Dunklau and Todd Wright. *mapnik-2.0.2 (16 Feb 2013) diff --git a/sci-geosciences/mapnik/files/mapnik-2.1.0-configure-only-once.patch b/sci-geosciences/mapnik/files/mapnik-2.1.0-configure-only-once.patch new file mode 100644 index 000000000000..e5ca048c39d8 --- /dev/null +++ b/sci-geosciences/mapnik/files/mapnik-2.1.0-configure-only-once.patch @@ -0,0 +1,20 @@ +--- a/SConstruct ++++ b/SConstruct +@@ -481,16 +481,7 @@ + #print 'missing opt', opt + preconfigured = False + +-# if custom arguments are supplied make sure to accept them +-if opts.args: +- # since we have custom arguments update environment with all opts to +- # make sure to absorb the custom ones +- opts.Update(env) +- # now since we've got custom arguments we'll disregard any +- # pickled environment and force another configuration +- preconfigured = False +- +-elif preconfigured: ++if preconfigured: + if not HELP_REQUESTED: + color_print(4,'Using previous successful configuration...') + color_print(4,'Re-configure by running "python scons/scons.py configure".') diff --git a/sci-geosciences/mapnik/files/mapnik-2.1.0-destdir.patch b/sci-geosciences/mapnik/files/mapnik-2.1.0-destdir.patch new file mode 100644 index 000000000000..e73e2ccb727c --- /dev/null +++ b/sci-geosciences/mapnik/files/mapnik-2.1.0-destdir.patch @@ -0,0 +1,11 @@ +--- a/SConstruct ++++ b/SConstruct +@@ -1362,7 +1362,7 @@ + site_packages = '''%s -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(plat_specific=True))"''' % env['PYTHON'] + else: + site_packages = '''%s -c "from distutils.sysconfig import get_python_lib; print get_python_lib(plat_specific=True)"''' % env['PYTHON'] +- env['PYTHON_SITE_PACKAGES'] = call(site_packages) ++ env['PYTHON_SITE_PACKAGES'] = os.path.normpath(os.path.realpath(env['DESTDIR'])) + call(site_packages) + else: + env['PYTHON_SYS_PREFIX'] = os.popen('''%s -c "import sys; print sys.prefix"''' % env['PYTHON']).read().strip() + env['PYTHON_VERSION'] = os.popen('''%s -c "import sys; print sys.version"''' % env['PYTHON']).read()[0:3] diff --git a/sci-geosciences/mapnik/files/mapnik-2.1.0-dont-run-ldconfig.patch b/sci-geosciences/mapnik/files/mapnik-2.1.0-dont-run-ldconfig.patch new file mode 100644 index 000000000000..edaccb754c92 --- /dev/null +++ b/sci-geosciences/mapnik/files/mapnik-2.1.0-dont-run-ldconfig.patch @@ -0,0 +1,12 @@ +--- a/build.py ++++ b/build.py +@@ -38,7 +38,8 @@ + print stderr + + def ldconfig(*args,**kwargs): +- call('ldconfig') ++ if 0: ++ call('ldconfig') + + if env['LINKING'] == 'static': + lib_env.Append(CXXFLAGS="-fPIC") diff --git a/sci-geosciences/mapnik/files/mapnik-2.1.0-scons.patch b/sci-geosciences/mapnik/files/mapnik-2.1.0-scons.patch new file mode 100644 index 000000000000..18d9409532f5 --- /dev/null +++ b/sci-geosciences/mapnik/files/mapnik-2.1.0-scons.patch @@ -0,0 +1,15 @@ +--- a/SConstruct ++++ b/SConstruct +@@ -284,10 +284,10 @@ + ('LINK_PRIORITY','Priority list in which to sort library and include paths (default order is internal, other, frameworks, user, then system - see source of `sort_paths` function for more detail)',','.join(DEFAULT_LINK_PRIORITY)), + + # Install Variables +- ('PREFIX', 'The install path "prefix"', '/usr/local'), ++ ('PREFIX', 'The install path "prefix"', '/usr'), + ('LIBDIR_SCHEMA', 'The library sub-directory appended to the "prefix", sometimes lib64 on 64bit linux systems', LIBDIR_SCHEMA_DEFAULT), + ('PYTHON_PREFIX','Custom install path "prefix" for python bindings (default of no prefix)',''), +- ('DESTDIR', 'The root directory to install into. Useful mainly for binary package building', '/'), ++ ('DESTDIR', 'The root directory to install into. Useful mainly for binary package building', '${D}'), + ('PATH', 'A custom path (or multiple paths divided by ":") to append to the $PATH env to prioritize usage of command line programs (if multiple are present on the system)', ''), + ('PATH_REMOVE', 'A path prefix to exclude from all known command and compile paths', ''), + ('PATH_REPLACE', 'Two path prefixes (divided with a :) to search/replace from all known command and compile paths', ''), diff --git a/sci-geosciences/mapnik/mapnik-2.1.0.ebuild b/sci-geosciences/mapnik/mapnik-2.1.0.ebuild new file mode 100644 index 000000000000..13ccdc0f685a --- /dev/null +++ b/sci-geosciences/mapnik/mapnik-2.1.0.ebuild @@ -0,0 +1,136 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/mapnik/mapnik-2.1.0.ebuild,v 1.1 2013/02/16 22:49:44 swegener Exp $ + +EAPI=4 + +PYTHON_DEPEND="python? 2" +MY_P="${PN}-v${PV}" + +inherit eutils python scons-utils toolchain-funcs + +DESCRIPTION="A Free Toolkit for developing mapping applications." +HOMEPAGE="http://www.mapnik.org/" +SRC_URI="http://github.com/downloads/${PN}/${PN}/${MY_P}.tar.bz2" + +LICENSE="LGPL-3" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="bidi cairo debug doc gdal geos postgres python sqlite" + +RDEPEND=" + >=dev-libs/boost-1.48[python?] + dev-libs/icu + dev-libs/libxml2 + media-fonts/dejavu + media-libs/freetype + media-libs/libpng + media-libs/tiff + net-misc/curl + sci-libs/proj + sys-libs/zlib + virtual/jpeg + x11-libs/agg[truetype] + bidi? ( dev-libs/fribidi ) + cairo? ( + x11-libs/cairo + dev-cpp/cairomm + python? ( dev-python/pycairo ) + ) + gdal? ( sci-libs/gdal ) + geos? ( sci-libs/geos ) + postgres? ( >=dev-db/postgresql-base-8.3 ) + sqlite? ( dev-db/sqlite:3 ) +" + +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + if use python; then + python_set_active_version 2 + python_pkg_setup + fi +} + +src_prepare() { + epatch \ + "${FILESDIR}"/${PN}-2.1.0-scons.patch \ + "${FILESDIR}"/${PN}-2.1.0-configure-only-once.patch \ + "${FILESDIR}"/${PN}-2.1.0-destdir.patch \ + "${FILESDIR}"/${PN}-2.1.0-dont-run-ldconfig.patch + + # do not version epidoc data + sed -i \ + -e 's:-`mapnik-config --version`::g' \ + utils/epydoc_config/build_epydoc.sh || die +} + +src_configure() { + local PLUGINS=shape,raster,osm + use gdal && PLUGINS+=,gdal,ogr + use geos && PLUGINS+=,geos + use postgres && PLUGINS+=,postgis + use sqlite && PLUGINS+=,sqlite + + myesconsargs=( + "CC=$(tc-getCC)" + "CXX=$(tc-getCXX)" + "INPUT_PLUGINS=${PLUGINS}" + "PREFIX=/usr" + "XMLPARSER=libxml2" + "LINKING=shared" + "RUNTIME_LINK=shared" + "PROJ_INCLUDES=/usr/include" + "PROJ_LIBS=/usr/$(get_libdir)" + "SYSTEM_FONTS=/usr/share/fonts" + $(use_scons python BINDINGS all none) + $(use_scons python BOOST_PYTHON_LIB boost_python-${PYTHON_ABI}) + $(use_scons bidi BIDI) + $(use_scons cairo CAIRO) + $(use_scons debug DEBUG) + $(use_scons debug XML_DEBUG) + $(use_scons doc DEMO) + $(use_scons doc SAMPLE_INPUT_PLUGINS) + "CUSTOM_LDFLAGS=${LDFLAGS}" + "CUSTOM_LDFLAGS+=-L${ED}/usr/$(get_libdir)" + ) + + # force user flags, optimization level + sed -i -e "s:\-O%s:${CXXFLAGS}:" \ + -i -e "s:env\['OPTIMIZATION'\]\,::" \ + SConstruct || die "sed 3 failed" + escons configure +} + +src_compile() { + escons +} + +src_install() { + escons install + + # even with all the mess it still installs into $S + mv "${S}/usr" "${ED}" || die + + if use python ; then + fperms 0644 "$(python_get_sitedir)"/${PN}/paths.py + dobin utils/stats/mapdef_stats.py + fi + + dodoc AUTHORS.md README.md +} + +pkg_postinst() { + elog "" + elog "See the home page or wiki (http://trac.mapnik.org/) for more info" + elog "or the installed examples for the default mapnik ogcserver config." + elog "" + + use python && python_mod_optimize ${PN} +} + +pkg_postrm() { + use python && python_mod_cleanup ${PN} +} |