aboutsummaryrefslogtreecommitdiff
path: root/python/python3-cffsubr/python3-cffsubr.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'python/python3-cffsubr/python3-cffsubr.SlackBuild')
-rw-r--r--python/python3-cffsubr/python3-cffsubr.SlackBuild24
1 files changed, 17 insertions, 7 deletions
diff --git a/python/python3-cffsubr/python3-cffsubr.SlackBuild b/python/python3-cffsubr/python3-cffsubr.SlackBuild
index 2e14ca09ffae9..53b8cd05f38a6 100644
--- a/python/python3-cffsubr/python3-cffsubr.SlackBuild
+++ b/python/python3-cffsubr/python3-cffsubr.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for python3-cffsubr
-# Copyright 2023 Vijay Marcel
+# Copyright 2023-2024 Vijay Marcel
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +25,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=python3-cffsubr
-VERSION=${VERSION:-0.2.9}
+VERSION=${VERSION:-0.3.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -69,8 +69,8 @@ rm -rvf $PKG
mkdir -vp $TMP $PKG $OUTPUT
cd $TMP
rm -rvf $PRGNAM-$VERSION
-tar xvf $CWD/$SRCNAM-$VERSION.post1.tar.gz
-cd $SRCNAM-$VERSION.post1
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
@@ -79,11 +79,21 @@ 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 {} \;
-export PIP_NO_CACHE_DIR=1
-python3 setup.py install --prefix=/usr --root=$PKG --optimize=1
+# Remove the external folder containing afdko as this will again
+# build afdko. Make sure setup.py understands it doesn't need
+# to build the tx binary
+
+rm -rvf external
+sed -i '/ext_modules=\[tx\]/d; /^ext_modules=/a ext_modules=[]' setup.py
+CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" python3 setup.py install --prefix=/usr --root=$PKG --optimize=1
+
+# Create a symlink to installed afdko's tx tool, this is neccessary as
+# cffsubr and fontmake needs this symlink to work properly
+
+ln -s /usr/bin/tx $PKG/usr/lib${LIBDIRSUFFIX}/python3.9/site-packages/cffsubr/
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
+ | cut -f 1 -d : | xargs strip --strip-unneeded --remove-section=.comment --remove-section=.note 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION