summaryrefslogtreecommitdiffstats
path: root/gis
diff options
context:
space:
mode:
author David Spencer2018-02-24 16:01:55 +0100
committer Willy Sudiarto Raharjo2018-03-03 02:42:06 +0100
commitd2a226889cf503ba8e053d6a9e05130fb30ad48b (patch)
treeaf7fe795edfdeef84807b178ca953394dc8b9990 /gis
parent928684cf785a680787f4687d35d45f0f0e323202 (diff)
downloadold.slackbuilds-d2a226889cf503ba8e053d6a9e05130fb30ad48b.tar.gz
gis/gdal: Add python3 support.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'gis')
-rw-r--r--gis/gdal/README2
-rw-r--r--gis/gdal/gdal.SlackBuild8
2 files changed, 9 insertions, 1 deletions
diff --git a/gis/gdal/README b/gis/gdal/README
index 064469fb17..c959862f44 100644
--- a/gis/gdal/README
+++ b/gis/gdal/README
@@ -11,7 +11,7 @@ provides a similar capability for simple features vector data.
The following optional requirements are detected automatically:
cfitsio, freexl, hdf, hdf5, libkml, libwebp, netcdf,
- postgresql, xerces-c
+ postgresql, python3, xerces-c
To enable OpenCL GPU-accelerated performance, specify the option
OPENCL=yes (requires opencl-headers to build, and either nvidia-driver
diff --git a/gis/gdal/gdal.SlackBuild b/gis/gdal/gdal.SlackBuild
index 3e16baad69..be5ff762f8 100644
--- a/gis/gdal/gdal.SlackBuild
+++ b/gis/gdal/gdal.SlackBuild
@@ -143,6 +143,14 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
+if $(python3 -c 'import sys' 2>/dev/null); then
+ cd swig/python
+ rm -rf build
+ python3 setup.py build
+ python3 setup.py install --root=$PKG --prefix=/usr
+ cd - >/dev/null
+fi
+
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true