From 976837562c09a86cb4d6aa2f6bd8d7244a37fb3e Mon Sep 17 00:00:00 2001 From: Michael Meinertzhagen Date: Fri, 6 Jan 2017 15:33:10 +0100 Subject: [PATCH] Rebuild fixing python-gdal --- files/0001-fix-build-with-python.patch | 24 +++++++++++++++++++ package.yml | 11 +++++++-- pspec_x86_64.xml | 44 +++++++++++++++++++++++++++++----- 3 files changed, 71 insertions(+), 8 deletions(-) create mode 100644 files/0001-fix-build-with-python.patch diff --git a/files/0001-fix-build-with-python.patch b/files/0001-fix-build-with-python.patch new file mode 100644 index 0000000..629952a --- /dev/null +++ b/files/0001-fix-build-with-python.patch @@ -0,0 +1,24 @@ +diff --git a/swig/python/setup.py b/swig/python/setup.py +index e072cd1..a2468bf 100644 +--- a/swig/python/setup.py ++++ b/swig/python/setup.py +@@ -14,6 +14,19 @@ + + from glob import glob + ++# If CXX is defined in the environment, it will be used to link the .so ++# but distutils will be confused if it is made of several words like 'ccache g++' ++# and it will try to use only the first word. ++# See https://lists.osgeo.org/pipermail/gdal-dev/2016-July/044686.html ++# Note: in general when doing "make", CXX will not be defined, unless it is defined as ++# an environment variable, but in that case it is the value of GDALmake.opt that ++# will be set, not the one from the environment that started "make" ! ++# If no CXX environment variable is defined, then the value of the CXX variable ++# in GDALmake.opt will not be set as an environment variable ++if 'CXX' in os.environ and os.environ['CXX'].strip().find(' ') >= 0: ++ print('WARNING: "CXX=%s" was defined in the environment and contains more than one word. Unsetting it since that is incompatible of distutils' % os.environ['CXX']) ++ del os.environ['CXX'] ++ + # --------------------------------------------------------------------------- + # Switches + # --------------------------------------------------------------------------- diff --git a/package.yml b/package.yml index 737f6bb..3352ca2 100644 --- a/package.yml +++ b/package.yml @@ -1,6 +1,6 @@ name : gdal version : 2.1.2 -release : 2 +release : 3 source : - http://download.osgeo.org/gdal/2.1.2/gdal-2.1.2.tar.xz : b597f36bd29a2b4368998ddd32b28c8cdf3c8192237a81b99af83cc17d7fa374 license : MIT @@ -20,10 +20,17 @@ builddeps : - giflib-devel - hdf5-devel - libjpeg-turbo-devel + - numpy setup : | + %patch -p1 < $pkgfiles/0001-fix-build-with-python.patch %configure --disable-static \ --datadir=/usr/share/gdal \ - --with-liblzma=yes + --with-liblzma=yes \ + --with-geos \ + --with-python \ + --with-png \ + --with-xerces-c \ + --without-libtool build : | %make install : | diff --git a/pspec_x86_64.xml b/pspec_x86_64.xml index 75f3e9a..74e63b5 100644 --- a/pspec_x86_64.xml +++ b/pspec_x86_64.xml @@ -2,8 +2,8 @@ gdal - Bryan T. Meyers - bmeyers@datadrake.com + Michael Meinertzhagen + mmeinert@protonmail.com MIT programming @@ -20,6 +20,38 @@ programming /usr/bin + /usr/lib/python2.7/site-packages/GDAL-2.1.2-py2.7.egg-info + /usr/lib/python2.7/site-packages/gdal.py + /usr/lib/python2.7/site-packages/gdal.pyc + /usr/lib/python2.7/site-packages/gdalconst.py + /usr/lib/python2.7/site-packages/gdalconst.pyc + /usr/lib/python2.7/site-packages/gdalnumeric.py + /usr/lib/python2.7/site-packages/gdalnumeric.pyc + /usr/lib/python2.7/site-packages/ogr.py + /usr/lib/python2.7/site-packages/ogr.pyc + /usr/lib/python2.7/site-packages/osgeo/__init__.py + /usr/lib/python2.7/site-packages/osgeo/__init__.pyc + /usr/lib/python2.7/site-packages/osgeo/_gdal.so + /usr/lib/python2.7/site-packages/osgeo/_gdal_array.so + /usr/lib/python2.7/site-packages/osgeo/_gdalconst.so + /usr/lib/python2.7/site-packages/osgeo/_ogr.so + /usr/lib/python2.7/site-packages/osgeo/_osr.so + /usr/lib/python2.7/site-packages/osgeo/gdal.py + /usr/lib/python2.7/site-packages/osgeo/gdal.pyc + /usr/lib/python2.7/site-packages/osgeo/gdal_array.py + /usr/lib/python2.7/site-packages/osgeo/gdal_array.pyc + /usr/lib/python2.7/site-packages/osgeo/gdalconst.py + /usr/lib/python2.7/site-packages/osgeo/gdalconst.pyc + /usr/lib/python2.7/site-packages/osgeo/gdalnumeric.py + /usr/lib/python2.7/site-packages/osgeo/gdalnumeric.pyc + /usr/lib/python2.7/site-packages/osgeo/gnm.py + /usr/lib/python2.7/site-packages/osgeo/gnm.pyc + /usr/lib/python2.7/site-packages/osgeo/ogr.py + /usr/lib/python2.7/site-packages/osgeo/ogr.pyc + /usr/lib/python2.7/site-packages/osgeo/osr.py + /usr/lib/python2.7/site-packages/osgeo/osr.pyc + /usr/lib/python2.7/site-packages/osr.py + /usr/lib/python2.7/site-packages/osr.pyc /usr/lib64/gdalplugins /usr/lib64/lib*.so.* /usr/share/bash-completion/gdal @@ -56,7 +88,7 @@ programming.devel - gdal + gdal /usr/include/ @@ -65,12 +97,12 @@ - + 2016-11-22 2.1.2 Packaging update - Bryan T. Meyers - bmeyers@datadrake.com + Michael Meinertzhagen + mmeinert@protonmail.com \ No newline at end of file -- 2.11.0