summaryrefslogtreecommitdiffstats
path: root/gis/python-mapnik/python-mapnik.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'gis/python-mapnik/python-mapnik.SlackBuild')
-rw-r--r--gis/python-mapnik/python-mapnik.SlackBuild36
1 files changed, 27 insertions, 9 deletions
diff --git a/gis/python-mapnik/python-mapnik.SlackBuild b/gis/python-mapnik/python-mapnik.SlackBuild
index 8191c5a01e..2110a030cf 100644
--- a/gis/python-mapnik/python-mapnik.SlackBuild
+++ b/gis/python-mapnik/python-mapnik.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# SlackBuild for python-mapnik
#
@@ -21,10 +21,17 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220312 bkw: Modified by SlackBuilds.org: VERSION must be constant,
+# and match VERSION in the .info file.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=python-mapnik
-VERSION=${VERSION:-3.0.16}
+GITREV=${GITREV:-7da019cf9eb12af8f8aa88b7d75789dfcd1e901b}
+VERSION=${VERSION:-git7da019c}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -34,7 +41,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -58,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 \
@@ -68,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
@@ -84,4 +102,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE