diff options
Diffstat (limited to 'gis/python-mapnik/python-mapnik.SlackBuild')
-rw-r--r-- | gis/python-mapnik/python-mapnik.SlackBuild | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/gis/python-mapnik/python-mapnik.SlackBuild b/gis/python-mapnik/python-mapnik.SlackBuild index 772cb0f010..0da411b95e 100644 --- a/gis/python-mapnik/python-mapnik.SlackBuild +++ b/gis/python-mapnik/python-mapnik.SlackBuild @@ -24,7 +24,8 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=python-mapnik -VERSION=${VERSION:-3.0.16} +GITREV=${GITREV:-7da019cf9eb12af8f8aa88b7d75789dfcd1e901b} +VERSION=${VERSION:-git$(echo "$GITREV" | sed 's/^\(.\{7\}\).*$/\1/')} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -68,9 +69,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -tar xzvf $CWD/$PRGNAM-$VERSION.tar.gz -cd $PRGNAM-$VERSION +rm -rf $PRGNAM-$GITREV +tar xvf $CWD/$PRGNAM-$GITREV.tar.gz +cd $PRGNAM-$GITREV chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -78,8 +79,15 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -python2 setup.py install --root=$PKG -#python3 setup.py install --root=$PKG # only works on -current, where boost has libboost_python3x.so +BOOST_PYTHON_LIB="boost_python$(python -c 'import sys; print("{}{}".format(sys.version_info.major, sys.version_info.minor))')" +export BOOST_PYTHON_LIB +export BOOST_THREAD_LIB="boost_thread" +export BOOST_SYSTEM_LIB="boost_system" +python setup.py install --root=$PKG + +BOOST_PYTHON_LIB="boost_python$(python3 -c 'import sys; print("{}{}".format(sys.version_info.major, sys.version_info.minor))')" +export BOOST_PYTHON_LIB +python3 setup.py install --root=$PKG find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true |