Hash: SHA256
AUX gdal-1.10.0-ruby-makefile.patch 1468 SHA256 a07a8df543bc65dbb6871689287ef1bc831399a1090064a97c2e0f71c9f27a88 SHA512 ae2bd2c051f851533efd16efafd4fbf41906cdb64401e327220a09dd879e124e6483122ef618bec4fd6e9f9c8a5b0d7dd8362938d0a5ea788d77887e9a54de7b WHIRLPOOL 563004ce1a9920965c2b59aeca036fc04ba2df3e61685e7427879481591387eb6780d7a50d0a4c631df149beb4751d807462c0802a86a998cebc7116a3275875
+AUX gdal-1.11.1-poppler-0.31.0-support.patch 4994 SHA256 a27a1f9f024d890b35a771ba4150468d488c0e39757ebe48d9e3903f29700d79 SHA512 ad0c685d1fbf34543966d097ef235db5b84b827d4e56e6910b788baacf11f0af1550e6214c402ed08abc5bef9b7c34f188869c2a6ccf1eb7c298b8918db34e54 WHIRLPOOL 7cb9ae09dac6bf0acc7c98d0263c7f22799060aa77213f20103d58dacc29f3d516f61e22cac1d1a84933097c032065448c3fc9f76cf4ced338e40e574c5b5a80
AUX gdal-1.11.1-swig-3.0.3.patch 4345 SHA256 972fe3f5893243e37a7e7a2ffe679d8187ce11f42d0119d1863fbdf0a22feb57 SHA512 843f99b3c62a8cefd87d49d53933646a9039f80d4be907317c36bba79f8f411ecf87b0269a22b9c787d51f6b0d6c1fcba5fa29b075362946c39ea840f86060b0 WHIRLPOOL 914f88e789dafe1366c49de8032a0ca0a1663952f3805bdf748f848d1fb3f0a82b4786a6ffb1f32ec5ce3f2cac36945e412cfc5cd0c1fc915099c5554ab47ce4
AUX gdal-1.5.0-install_name.patch 1731 SHA256 da631282e7ee42b3f9c46a4ce76d7b4905caa4a056c8109fce0f661b9aa58abd SHA512 fa5ecc9e14cbfc282a41d0c55e328c2f56bd92d8fac1897d8e921d59c9705b1291eff66e7f6cf8a1305b2c5f044e0813d28affb398b715d9d207c31af341318e WHIRLPOOL f67a2f307c16d664af34fe26993e74c2a0d1a2b52d43176eb1f03fbd9523533906d1a7df34a0745927f46febdb60e6efe7291bf0e520e0d6c904bcbfe5be928f
AUX gdal-1.5.0-soname.patch 483 SHA256 212f6f4cb1ef6051bdd1306cedd2236eada53a9ab650158c3b37577f7cd566e7 SHA512 c7c022524fd11de2137e15ec8dc31106887a2d23d583f61f1f9bab1d41a01e558faccc162166150c43903dbcaad14af65afd8ddc090670ebbd15dc57f05f228e WHIRLPOOL 7e2f17ea2c804fa7aded2fc8225091e84c44483c69cbb34818af3b38a7d580adf41daff250006778c6d3aea9175b2162e9add3956594b81eefd23689aed0de68
EBUILD gdal-1.10.0-r1.ebuild 7459 SHA256 49b93cba43a37d0df1cbadbd13c40c0cad5f99f67a194ed8a41dea8d0bbd9b63 SHA512 d7306cbb19627ad8261ce7d2c85bdf4c51482f6da35490779ea7a6a28f10a157a72f1257cd66592b1b4cba710094ff0643fe5bba52e49228bed608e7a5de275b WHIRLPOOL d313bf4a5f280fdc926b67f451dda6de228396300fabeb5320d52ea841890c5867d176a11457bf65915588ba1870e7751ebd2f288da8615cf7564e790d98ca25
EBUILD gdal-1.10.1.ebuild 8593 SHA256 64e24415357329ab046861bce437b5ff12d568e42c20caeb9bca3c3bf037f4d7 SHA512 640e9e73464311d8e77c896c468b25443ece3fb8f2c14851d9a6a6f8f8b1b4bef3a8d9a09d0cf7478806923375ec88a16b6a31a606391ecc4adbbd0c196b26d7 WHIRLPOOL 62318e511c695d9024dce2701f9e1ecc22e15f537eb63dd6dd3eec66e2804e8cbe166f9bbf350e77b46816872b3925f25431407e2afdb6dbd214f6cacfebccc0
EBUILD gdal-1.11.1-r1.ebuild 8758 SHA256 2bb5159fff177d0fa17370cd91d4999c3b79f9c383476f6bc041fcd4ebc6c9dc SHA512 11ec4dcf4480951238526c308cb14d1d8cd809416573a34fc156d70031412a48c40ebfe04941b456258848132a807d62ae3ef3bb9facb20c17e89534b486ad64 WHIRLPOOL ce22e5bd274d400ca32f8663da165cded8c33a5ae334040195a947d07af1148eb6624f5a5e562acf2e8d763af7205503b3f18311961576466afeb1fe5cd99c34
+EBUILD gdal-1.11.1-r2.ebuild 8834 SHA256 02bb156112f495caf856c916234e86a68ad4bead5dfa64d4bec44fc8ea872d2e SHA512 2d98f405fc1dc0a5b3240c12a6eab72d7dc8a9347a50172f84df79b63c48d8369343cab53a6fa5038fa6a3ade5b08784f661bde3a0ae709ff6334865367c029b WHIRLPOOL 64827d4db87039a8893a2c8832f96b3fb04d314a936018e960c669fd51af6f3748f6b3b057d9ebf0ca51524ac2e4b07a5cf4ce5c18e8a8ae61e195490d2964d5
EBUILD gdal-1.9.2.ebuild 7443 SHA256 37315ef6aa36506bebac766463910db62bfa3974d0fcb072a1db98bc2742c669 SHA512 9eb2a170a9651d42728d1162e73e18a40fafe57d8ed8e7d61a726cf80afecbeb361c80f99044803fff976f841f9c70baea1c7c943b70513133296a9b5efd4f37 WHIRLPOOL 32ee3435b15e3caa830e49eba52fe36bbd2c5ffded86cc1c22670242c0ae5780663ae867d37677ba0b44ba1d4bdb0c11b6a6ae7315483b046b6e7c6b371d1cf4
-MISC ChangeLog 29567 SHA256 1056b0de4296ea76ac0fa7d0e9ab4b818cb6b018797a39c0a8610a91be806738 SHA512 bb26ff665e84421b1b3e022a8bf2d00f5937a66e874887542e8fd96eca0800c6a3531c9a17dec533752e6844df07fa88b194f0df219afb8d67723e6f4a9270b1 WHIRLPOOL 5dc3dcb6c354527ed7b00db3cb265a1a9ffc8726c23721d449ca88f3f4c7879d025986dcf34f0ea7041ee8b6cde38563d97e7014717ee9db064de6a4a5cf6124
+MISC ChangeLog 29758 SHA256 7e28807e18a67d00acf06b7309d85a62516c36c8297c5ecce1f3c87b3b127fd8 SHA512 feba0ca3817d44ee09f9cb90eae4e9c4af8b5d4689ffdd738f7bd3189851a41ef3b465985ecc1252251d88b60bcb9774adc336edd33f4c78c576dfb63bd41a56 WHIRLPOOL dfce66d33b11a1e8ad42fc51c0932305573f5051f23c7e5318bf3ff8dfb54ee1112f5d30f2e30cbf547eb24b642d9db0cf0a64da21bb9c09a7d7423b9a2c4b8c
MISC metadata.xml 1358 SHA256 25a3063ee14c6c99706a045b00ca2c93ab49b2f595759be6d85c0eb5ee20bc53 SHA512 82f014319806fa20e404244780bedf0fdcb5bf8c070d3758095c23d62a1fbb0bb712222cbaaea1101940b06c8ea6b1a588dc3a9815f5f8e2d7342fa08243a9cc WHIRLPOOL 5e964a8c85ab7ce5820a35043d13e7c6535f5cd13d16c95d635fc7c735a9366994ce9b843f72db801777b689562e94183227c57504ddc33d0afc6e182e15ec96
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0
+Version: GnuPG v2
-iQJ8BAEBCABmBQJUtFuQXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
-ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQwOEM0RURGNjY5QzVBNjMwRkU3REVCOTQz
-QUZGQ0U5NzREMzRCRDhDAAoJEDr/zpdNNL2M2BcP/2aXDpUHwLEE+DJKm2H1FiiP
-WPvxrHWqzpl9SfNjU5Ng3q9pXvIgP32FbXjyb1KZ87ImGl+1zFuyq+qPm5smZxNV
-WW1L7c3hlQO61moHM2K8j6/p5nQ1shX0BdxgqqiEpSiET9f3zMy4Y5+VB01bw1FT
-U3zTIqVBORaTJabYaxJ1tuWSlTsb5OGc7dfubyBPQOr9p7jTTAS8r0PHpZrc4iBv
-IgpzpeamkVFi5COCSyf9E1pFVyRkRMmYYXCr06GJOl2q8rvcodJiSHaogNri3VuA
-p4/wqG8PzCfIaq9s43mY31x/LOvfNOw7uSLPBkCsqxyA1yB6uNoF1aulzyIg94YQ
-7zkyvI5JQLstuBGTATP0Tm9xY65GVr0W/KcRiv1s5brOtiNa75wVlrKJel548KXB
-W5ejva6jASizGHnUl9py+sCv5Cybf1Ij6K4+VYtlMAQHKUGthcwJSmIl/0/vW+tr
-u5QlMChGnzUz7piTNuj0CWPbWYyXUYQtJ6KeUqxODZUjtCYvMJs5JKOLkbcPG7RR
-JTjhTz0BIWcB9r9i31iZYpW32WU9Fyw32IChlsko55ZWkNmbqwv9qeg3ZnRlHcFg
-pysk7sZg1pW3MAfCEC4DwW6zNgdDtRYAExSjpUVU6Soo5qhmmuyvhrauiu4uWrzL
-TZQiYlJe044YKCuaY8kY
-=l2Xl
+iL4EAREIAGYFAlTrwEVfFIAAAAAALgAoaXNzdWVyLWZwckBub3RhdGlvbnMub3Bl
+bnBncC5maWZ0aGhvcnNlbWFuLm5ldDY3QjA4MzdGODg1NUMxMjIzNUQ0MDgxNzky
+N0FERDBDNjJFRUYwOTAACgkQknrdDGLu8JB6wgEAlX7f337xxetw7mzdazsna/cQ
+qbDTgOTCRyGDewhB53YA/2mkUsHhFrQP2KbZHhGK6gtMu2mj7vIXRX3RhRI1P9G5
+=sfT1
-----END PGP SIGNATURE-----
--- /dev/null
+diff -urpN gdal-1.11.1.orig/frmts/pdf/pdfdataset.cpp gdal-1.11.1/frmts/pdf/pdfdataset.cpp
+--- gdal-1.11.1.orig/frmts/pdf/pdfdataset.cpp 2014-09-24 06:47:43.000000000 -0700
++++ gdal-1.11.1/frmts/pdf/pdfdataset.cpp 2015-02-19 13:55:58.714589328 -0800
+@@ -108,12 +108,9 @@ class GDALPDFOutputDev : public SplashOu
+
+ public:
+ GDALPDFOutputDev(SplashColorMode colorModeA, int bitmapRowPadA,
+- GBool reverseVideoA, SplashColorPtr paperColorA,
+- GBool bitmapTopDownA = gTrue,
+- GBool allowAntialiasA = gTrue) :
++ GBool reverseVideoA, SplashColorPtr paperColorA) :
+ SplashOutputDev(colorModeA, bitmapRowPadA,
+- reverseVideoA, paperColorA,
+- bitmapTopDownA, allowAntialiasA),
++ reverseVideoA, paperColorA),
+ bEnableVector(TRUE),
+ bEnableText(TRUE),
+ bEnableBitmap(TRUE) {}
+diff -urpN gdal-1.11.1.orig/frmts/pdf/pdfio.cpp gdal-1.11.1/frmts/pdf/pdfio.cpp
+--- gdal-1.11.1.orig/frmts/pdf/pdfio.cpp 2014-09-24 06:47:43.000000000 -0700
++++ gdal-1.11.1/frmts/pdf/pdfio.cpp 2015-02-19 13:55:58.715589318 -0800
+@@ -39,13 +39,25 @@
+
+ CPL_CVSID("$Id: gdal-1.11.1-poppler-0.31.0-support.patch,v 1.1 2015/02/24 00:05:14 xmw Exp $");
+
++
++#ifdef POPPLER_BASE_STREAM_HAS_TWO_ARGS
++/* Poppler 0.31.0 is the first one that needs to know the file size */
++static vsi_l_offset VSIPDFFileStreamGetSize(VSILFILE* f)
++{
++ VSIFSeekL(f, 0, SEEK_END);
++ vsi_l_offset nSize = VSIFTellL(f);
++ VSIFSeekL(f, 0, SEEK_SET);
++ return nSize;
++}
++#endif
++
+ /************************************************************************/
+ /* VSIPDFFileStream() */
+ /************************************************************************/
+
+ VSIPDFFileStream::VSIPDFFileStream(VSILFILE* f, const char* pszFilename, Object *dictA):
+ #ifdef POPPLER_BASE_STREAM_HAS_TWO_ARGS
+- BaseStream(dictA, 0)
++ BaseStream(dictA, (setPos_offset_type)VSIPDFFileStreamGetSize(f))
+ #else
+ BaseStream(dictA)
+ #endif
+@@ -195,7 +207,7 @@ int VSIPDFFileStream::FillBuffer()
+ /* getChar() */
+ /************************************************************************/
+
+-/* The unoptimized version performs a bit well since we must go through */
++/* The unoptimized version performs a bit less since we must go through */
+ /* the whole virtual I/O chain for each character reading. We save a few */
+ /* percent with this extra internal caching */
+
+@@ -326,4 +338,47 @@ void VSIPDFFileStream::moveStart(moveSta
+ nPosInBuffer = nBufferLength = -1;
+ }
+
++/************************************************************************/
++/* hasGetChars() */
++/************************************************************************/
++
++GBool VSIPDFFileStream::hasGetChars()
++{
++ return true;
++}
++
++/************************************************************************/
++/* getChars() */
++/************************************************************************/
++
++int VSIPDFFileStream::getChars(int nChars, Guchar *buffer)
++{
++ int nRead = 0;
++ while (nRead < nChars)
++ {
++ int nToRead = nChars - nRead;
++ if (nPosInBuffer == nBufferLength)
++ {
++ if (!bLimited && nToRead > BUFFER_SIZE)
++ {
++ int nJustRead = (int) VSIFReadL(buffer + nRead, 1, nToRead, f);
++ nPosInBuffer = nBufferLength = -1;
++ nCurrentPos += nJustRead;
++ nRead += nJustRead;
++ break;
++ }
++ else if (!FillBuffer() || nPosInBuffer >= nBufferLength)
++ break;
++ }
++ if( nToRead > nBufferLength - nPosInBuffer )
++ nToRead = nBufferLength - nPosInBuffer;
++
++ memcpy( buffer + nRead, abyBuffer + nPosInBuffer, nToRead );
++ nPosInBuffer += nToRead;
++ nCurrentPos += nToRead;
++ nRead += nToRead;
++ }
++ return nRead;
++}
++
+ #endif
+diff -urpN gdal-1.11.1.orig/frmts/pdf/pdfio.h gdal-1.11.1/frmts/pdf/pdfio.h
+--- gdal-1.11.1.orig/frmts/pdf/pdfio.h 2014-09-24 06:47:43.000000000 -0700
++++ gdal-1.11.1/frmts/pdf/pdfio.h 2015-02-19 13:55:58.715589318 -0800
+@@ -93,6 +93,10 @@ class VSIPDFFileStream: public BaseStrea
+ virtual void close();
+
+ private:
++ /* Added in poppler 0.15.0 */
++ virtual GBool hasGetChars();
++ virtual int getChars(int nChars, Guchar *buffer);
++
+ VSIPDFFileStream *poParent;
+ GooString *poFilename;
+ VSILFILE *f;
--- /dev/null
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/gdal/gdal-1.11.1-r2.ebuild,v 1.1 2015/02/24 00:05:14 xmw Exp $
+
+EAPI=5
+
+WANT_AUTOCONF="2.5"
+
+GENTOO_DEPEND_ON_PERL="no"
+PYTHON_COMPAT=( python2_{5..7} python3_{1..4} )
+DISTUTILS_OPTIONAL=1
+
+inherit autotools eutils libtool perl-module distutils-r1 python-r1 toolchain-funcs java-pkg-opt-2
+
+DESCRIPTION="Translator library for raster geospatial data formats (includes OGR support)"
+HOMEPAGE="http://www.gdal.org/"
+SRC_URI="http://download.osgeo.org/${PN}/${PV}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="MIT"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
+IUSE="armadillo +aux_xml curl debug doc fits geos gif gml hdf5 java jpeg jpeg2k mdb mysql netcdf odbc ogdi opencl pdf perl png postgres python ruby spatialite sqlite threads xls"
+
+RDEPEND="
+ dev-libs/expat
+ dev-libs/json-c
+ dev-libs/libpcre
+ dev-libs/libxml2
+ media-libs/tiff
+ sci-libs/libgeotiff
+ sys-libs/zlib[minizip(+)]
+ armadillo? ( sci-libs/armadillo[lapack] )
+ curl? ( net-misc/curl )
+ fits? ( sci-libs/cfitsio )
+ geos? ( >=sci-libs/geos-2.2.1 )
+ gif? ( media-libs/giflib )
+ gml? ( >=dev-libs/xerces-c-3 )
+ hdf5? ( >=sci-libs/hdf5-1.6.4[szip] )
+ java? ( >=virtual/jre-1.6 )
+ jpeg? ( virtual/jpeg )
+ jpeg2k? ( media-libs/jasper )
+ mysql? ( virtual/mysql )
+ netcdf? ( sci-libs/netcdf )
+ odbc? ( dev-db/unixODBC )
+ ogdi? ( sci-libs/ogdi )
+ opencl? ( virtual/opencl )
+ pdf? ( >=app-text/poppler-0.24.3:= )
+ perl? ( dev-lang/perl:= )
+ png? ( media-libs/libpng )
+ postgres? ( >=dev-db/postgresql-8.4 )
+ python? (
+ ${PYTHON_DEPS}
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ )
+ ruby? ( dev-lang/ruby:1.9 )
+ sqlite? ( dev-db/sqlite:3 )
+ spatialite? ( dev-db/spatialite )
+ xls? ( dev-libs/freexl )
+"
+
+SWIG_DEP=">=dev-lang/swig-2.0.2"
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen )
+ java? ( >=virtual/jdk-1.6 )
+ perl? ( ${SWIG_DEP} )
+ python? ( ${SWIG_DEP} )
+ ruby? ( ${SWIG_DEP} )"
+
+AT_M4DIR="${S}/m4"
+MAKEOPTS+=" -j1"
+
+REQUIRED_USE="
+ spatialite? ( sqlite )
+ mdb? ( java )
+"
+
+pkg_setup() {
+ java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+ java-pkg-opt-2_src_prepare
+
+ # fix datadir and docdir placement
+ sed -i \
+ -e "s:@datadir@:@datadir@/gdal:" \
+ -e "s:@exec_prefix@/doc:@exec_prefix@/share/doc/${PF}/html:g" \
+ "${S}"/GDALmake.opt.in || die
+
+ # the second sed expression should fix bug 371075
+ sed -i \
+ -e "s:setup.py install:setup.py install --root=\$(DESTDIR):" \
+ -e "s:--prefix=\$(DESTDIR):--prefix=:" \
+ "${S}"/swig/python/GNUmakefile || die
+
+ epatch "${FILESDIR}"/${PN}-1.10.0-ruby-makefile.patch
+
+ # -soname is only accepted by GNU ld/ELF
+ [[ ${CHOST} == *-darwin* ]] \
+ && epatch "${FILESDIR}"/${PN}-1.5.0-install_name.patch \
+ || epatch "${FILESDIR}"/${PN}-1.5.0-soname.patch
+
+ # Fix spatialite/sqlite include issue
+ sed -i \
+ -e 's:spatialite/sqlite3.h:sqlite3.h:g' \
+ ogr/ogrsf_frmts/sqlite/ogr_sqlite.h || die
+
+ # Fix freexl configure check
+ sed -i \
+ -e 's:FREEXL_LIBS=missing):FREEXL_LIBS=missing,-lm):g' \
+ configure.in || die
+
+ sed \
+ -e "s: /usr/: \"${EPREFIX}\"/usr/:g" \
+ -i configure.in || die
+
+ sed \
+ -e 's:^ar:$(AR):g' \
+ -i ogr/ogrsf_frmts/sdts/install-libs.sh || die
+
+ # Fix swig-3.0.3 problem (bug #534168)
+ epatch "${FILESDIR}"/${PN}-1.11.1-swig-3.0.3.patch
+
+ # bug 540132
+ epatch "${FILESDIR}"/${PN}-1.11.1-poppler-0.31.0-support.patch
+
+ tc-export AR RANLIB
+
+ eautoreconf
+
+ prepare_python() {
+ mkdir -p "${BUILD_DIR}" || die
+ find "${S}" -type d -maxdepth 1 -exec ln -s {} "${BUILD_DIR}"/ \; ||die
+ find "${S}" -type f -maxdepth 1 -exec cp --target="${BUILD_DIR}"/ {} + ||die
+# mkdir -p "${BUILD_DIR}"/swig/python || die
+# mkdir -p "${BUILD_DIR}"/apps || die
+# cp -dpR --target="${BUILD_DIR}"/swig/ \
+# "${S}"/swig/{python,SWIGmake.base,GNUmakefile} || die
+# ln -s "${S}"/swig/include "${BUILD_DIR}"/swig/ || die
+# ln -s "${S}"/apps/gdal-config "${BUILD_DIR}"/apps/ || die
+# ln -s "${S}"/port "${BUILD_DIR}"/ || die
+ }
+ if use python; then
+ python_foreach_impl prepare_python
+ fi
+}
+
+gdal_src_configure() {
+ local myopts=""
+
+ if use ruby; then
+ RUBY_MOD_DIR="$(ruby19 -r rbconfig -e 'print RbConfig::CONFIG["sitearchdir"]')"
+ echo "Ruby module dir is: $RUBY_MOD_DIR"
+ fi
+
+ if use java; then
+ myopts+="
+ --with-java=$(java-config --jdk-home 2>/dev/null)
+ $(use_with mdb)"
+ else
+ myopts+=" --without-java --without-mdb"
+ use mdb && ewarn "mdb requires java use enabled. disabling"
+ fi
+
+ if use sqlite; then
+ myopts+=" LIBS=-lsqlite3"
+ fi
+
+ # pcidsk is internal, because there is no such library yet released
+ # also that thing is developed by the gdal people
+ # kakadu, mrsid jp2mrsid - another jpeg2k stuff, ignore
+ # bsb - legal issues
+ # oracle - disabled, i dont have and can't test
+ # ingres - same story as oracle oci
+ # podofo - we use poppler instead they are exclusive for each other
+ # tiff is a hard dep
+ ECONF_SOURCE="${S}" econf \
+ --includedir="${EPREFIX}/usr/include/${PN}" \
+ --disable-static \
+ --enable-shared \
+ --with-expat \
+ --with-geotiff \
+ --with-grib \
+ --with-libtiff \
+ --with-libz="${EPREFIX}/usr/" \
+ --with-ogr \
+ --without-bsb \
+ --without-dods-root \
+ --without-dwgdirect \
+ --without-epsilon \
+ --without-fme \
+ --without-grass \
+ --without-hdf4 \
+ --without-idb \
+ --without-ingres \
+ --without-jp2mrsid \
+ --without-kakadu \
+ --without-libtool \
+ --without-mrsid \
+ --without-msg \
+ --without-oci \
+ --without-pcraster \
+ --without-podofo \
+ --without-sde \
+ $(use_enable debug) \
+ $(use_with armadillo) \
+ $(use_with aux_xml pam) \
+ $(use_with curl) \
+ --without-ecw \
+ $(use_with fits cfitsio) \
+ $(use_with geos) \
+ $(use_with gif) \
+ $(use_with gml xerces) \
+ $(use_with hdf5) \
+ $(use_with jpeg pcidsk) \
+ $(use_with jpeg) \
+ $(use_with jpeg2k jasper) \
+ $(use_with mysql mysql "${EPREFIX}"/usr/bin/mysql_config) \
+ $(use_with netcdf) \
+ $(use_with odbc) \
+ $(use_with ogdi ogdi "${EPREFIX}"/usr) \
+ $(use_with opencl) \
+ $(use_with pdf poppler) \
+ $(use_with perl) \
+ $(use_with png) \
+ $(use_with postgres pg) \
+ $(use_with python) \
+ $(use_with ruby) \
+ $(use_with spatialite) \
+ $(use_with sqlite sqlite3 "${EPREFIX}"/usr) \
+ $(use_with threads) \
+ $(use_with xls freexl) \
+ ${myopts}
+
+ # mysql-config puts this in (and boy is it a PITA to get it out)
+ if use mysql; then
+ sed -i \
+ -e "s: -rdynamic : :" \
+ GDALmake.opt || die "sed LIBS failed"
+ fi
+
+ if [[ -n $use_python ]]; then
+ # updated for newer swig (must specify the path to input files)
+ sed -i \
+ -e "s: gdal_array.i: ../include/gdal_array.i:" \
+ -e "s:\$(DESTDIR)\$(prefix):\$(DESTDIR)\$(INST_PREFIX):g" \
+ swig/python/GNUmakefile || die "sed python makefile failed"
+ sed -i \
+ -e "s:library_dirs = :library_dirs = /usr/$(get_libdir):g" \
+ swig/python/setup.cfg || die "sed python setup.cfg failed"
+# -e "s:gdal_config=.*$:gdal_config=../../../apps/gdal-config:g" \
+ fi
+}
+
+src_configure() {
+ local use_python=""
+
+ gdal_src_configure
+
+ if use python; then
+ use_python="yes"
+ python_foreach_impl run_in_build_dir gdal_src_configure
+ fi
+}
+
+src_compile() {
+ local i
+ for i in perl ruby; do
+ if use $i; then
+ rm "${S}"/swig/$i/*_wrap.cpp
+ emake -C "${S}"/swig/$i generate
+ fi
+ done
+
+ default
+
+ if use perl ; then
+ pushd "${S}"/swig/perl > /dev/null
+ perl-module_src_configure
+ perl-module_src_compile
+ popd > /dev/null
+ fi
+
+ use doc && emake docs
+
+ compile_python() {
+ rm -f swig/python/*_wrap.cpp
+ emake -C swig/python generate
+ emake -C swig/python build
+ }
+ if use python; then
+ python_foreach_impl run_in_build_dir compile_python
+ fi
+}
+
+src_install() {
+ if use perl ; then
+ pushd "${S}"/swig/perl > /dev/null
+ perl-module_src_install
+ popd > /dev/null
+ sed -i \
+ -e "s:BINDINGS = python ruby perl:BINDINGS = python ruby:g" \
+ GDALmake.opt || die
+ fi
+
+ default
+
+ if use ruby ; then
+ # weird reinstall collision; needs manual intervention...
+ pushd "${S}"/swig/ruby > /dev/null
+ rm -rf "${D}"${RUBY_MOD_DIR}/gdal
+ exeinto ${RUBY_MOD_DIR}/gdal
+ doexe *.so || die "doins ruby modules failed"
+ popd > /dev/null
+ fi
+
+ use perl && perl_delete_localpod
+
+ dodoc Doxyfile HOWTO-RELEASE NEWS
+
+ if use doc ; then
+ dohtml html/*
+ docinto ogr
+ dohtml ogr/html/*
+ fi
+
+ install_python() {
+ emake -C swig/python DESTDIR="${D}" install
+ }
+ if use python; then
+ python_foreach_impl run_in_build_dir install_python
+ newdoc swig/python/README.txt README-python.txt
+ insinto /usr/share/${PN}/samples
+ doins swig/python/samples/*
+ fi
+
+ pushd man/man1 > /dev/null
+ for i in * ; do
+ newman ${i} ${i}
+ done
+ popd > /dev/null
+}
+
+pkg_postinst() {
+ elog "Check available image and data formats after building with"
+ elog "gdalinfo and ogrinfo (using the --formats switch)."
+}