aboutsummaryrefslogtreecommitdiff
path: root/multimedia/pocketsphinx/pocketsphinx.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/pocketsphinx/pocketsphinx.SlackBuild')
-rw-r--r--multimedia/pocketsphinx/pocketsphinx.SlackBuild26
1 files changed, 11 insertions, 15 deletions
diff --git a/multimedia/pocketsphinx/pocketsphinx.SlackBuild b/multimedia/pocketsphinx/pocketsphinx.SlackBuild
index 46ad074b12b0a..226c47e5802de 100644
--- a/multimedia/pocketsphinx/pocketsphinx.SlackBuild
+++ b/multimedia/pocketsphinx/pocketsphinx.SlackBuild
@@ -1,7 +1,9 @@
#!/bin/bash
+
# Slackware build script for pocketsphinx
-# Copyright 2022 Vijay Marcel
+# Copyright 2022-2024 Vijay Marcel
+
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,8 +26,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=pocketsphinx
-VERSION=${VERSION:-20230516_8221706}
-COMMIT=${COMMIT:-82217064bf9abbfe021bc107829701934afdb248}
+VERSION=${VERSION:-5.0.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -38,9 +39,6 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -70,10 +68,9 @@ trap 'echo "$0 FAILED at line $LINENO!" | tee -a $OUTPUT/error-${PRGNAM}.log' ER
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$COMMIT
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$COMMIT.tar.gz
-cd $PRGNAM-$COMMIT
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
@@ -82,7 +79,7 @@ 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 {} \;
-cmake -B build -S $TMP/$PRGNAM-$COMMIT \
+cmake -B build -S $TMP/$PRGNAM-$VERSION \
-DCMAKE_C_FLAGS="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
@@ -92,18 +89,17 @@ cmake -B build -S $TMP/$PRGNAM-$COMMIT \
-DCMAKE_INSTALL_LIBDIR=/usr/lib${LIBDIRSUFFIX} \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS:BOOL=ON \
- -DCMAKE_INSTALL_MANDIR=/usr/man
+ -DCMAKE_INSTALL_MANDIR=/usr/man \
+ -DFIXED_POINT:BOOL=ON \
+ -DBUILD_GSTREAMER:BOOL=ON
cmake --build build
DESTDIR=$PKG cmake --install build
-python3 setup.py install --prefix=/usr --root=$PKG --optimize=1
-mkdir -pv $PKG/usr/include/sphinxbase
cp $PKG/usr/include/pocketsphinx.h $PKG/usr/include/pocketsphinx
-cp build/include/pocketsphinx/sphinx_config.h $PKG/usr/include/sphinxbase
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
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done