summaryrefslogtreecommitdiffstats
path: root/gis
diff options
context:
space:
mode:
author Benjamin Trigona-Harany2018-03-14 03:52:50 +0100
committer Willy Sudiarto Raharjo2018-03-17 02:51:44 +0100
commitd5b11bc9683c02c8123a6548f14ffa4f9b4790f6 (patch)
tree3c32601f90a91f430f19e7ab7daa9e9536f73942 /gis
parent88a2c46eade145412d0752f99a0af72cbd657a61 (diff)
downloadold.slackbuilds-d5b11bc9683c02c8123a6548f14ffa4f9b4790f6.tar.gz
gis/Geohash: Add Python 3 support.
Diffstat (limited to 'gis')
-rw-r--r--gis/Geohash/Geohash.SlackBuild16
1 files changed, 10 insertions, 6 deletions
diff --git a/gis/Geohash/Geohash.SlackBuild b/gis/Geohash/Geohash.SlackBuild
index 0f3dc7433f..d89f1b7d4b 100644
--- a/gis/Geohash/Geohash.SlackBuild
+++ b/gis/Geohash/Geohash.SlackBuild
@@ -29,7 +29,7 @@ TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -40,8 +40,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -67,12 +67,16 @@ find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
python setup.py install --root=$PKG
+if $(python3 -c 'import sys' 2>/dev/null); then
+ sed -i "s/from geohash/from .geohash/" $PRGNAM/__init__.py
+ python3 setup.py install --root=$PKG
+fi
-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
+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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a LICENSE.txt README.rst $PKG/usr/doc/$PRGNAM-$VERSION