gis/pyproj: Add Python 3 support.

Signed-off-by: Benjamin Trigona-Harany <bosth@alumni.sfu.ca>
This commit is contained in:
Benjamin Trigona-Harany 2018-03-16 23:12:02 -07:00 committed by Willy Sudiarto Raharjo
parent 1e0ce2dbe2
commit 252a01dff2
2 changed files with 17 additions and 12 deletions

View File

@ -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"
@ -60,22 +60,27 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-${VERSION}rel
tar xvf $CWD/$PRGNAM-${VERSION}rel.tar.gz || tar xvf $CWD/v${VERSION}rel.tar.gz
tar xvf $CWD/$PRGNAM-${VERSION}rel.tar.gz
cd $PRGNAM-${VERSION}rel
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
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 {} \;
python setup.py install --root=$PKG
if $(python3 -c 'import sys' 2>/dev/null); then
python3 setup.py install --root=$PKG
fi
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
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 Changelog LICENSE_proj4 LICENSE_proj4 README.md $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
Changelog LICENSE_proj4 LICENSE_proj4 README.md \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install

View File

@ -1,7 +1,7 @@
PRGNAM="pyproj"
VERSION="1.9.5.1"
HOMEPAGE="https://github.com/jswhit/pyproj"
DOWNLOAD="https://github.com/jswhit/pyproj/archive/v1.9.5.1rel.tar.gz"
DOWNLOAD="https://github.com/jswhit/pyproj/archive/v1.9.5.1rel/pyproj-1.9.5.1rel.tar.gz"
MD5SUM="38126f5b25a09ec2b6ee488613c717d8"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""