summaryrefslogtreecommitdiffstats
path: root/libraries/libbpg/libbpg.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libbpg/libbpg.SlackBuild')
-rw-r--r--libraries/libbpg/libbpg.SlackBuild21
1 files changed, 9 insertions, 12 deletions
diff --git a/libraries/libbpg/libbpg.SlackBuild b/libraries/libbpg/libbpg.SlackBuild
index 7278baacc7..9b33550520 100644
--- a/libraries/libbpg/libbpg.SlackBuild
+++ b/libraries/libbpg/libbpg.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for libbpg
-# Copyright 2022 Vijay Marcel
+# Copyright 2022-2024 Vijay Marcel
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,11 +25,11 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=libbpg
-VERSION=${VERSION:-0e2aadb_20180428}
+VERSION=${VERSION:-0.9.8}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-COMMIT=${COMMIT:-0e2aadbe40fd8b962440caa51a52c558ccdbc791}
+
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -39,9 +39,6 @@ case "$( uname -m )" in
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
@@ -52,13 +49,13 @@ PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ SLKCFLAGS="-march=i586 -mtune=i686 -pipe -O2 -fPIC"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ SLKCFLAGS="-march=i686 -mtune=i686 -pipe -O2 -fPIC"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
+ SLKCFLAGS="-march=x86-64 -mtune=generic -pipe -O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
@@ -72,8 +69,8 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
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 . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -87,7 +84,7 @@ CXXFLAGS="$SLKCFLAGS" \
sed -i 's/$(CMAKE_OPTS)/$(CMAKE_OPTS) -DENABLE_LIBNUMA=OFF/' "Makefile"
sed -i 's/^CFLAGS+=-I.$/CFLAGS+=-I. -fPIC/' "Makefile"
-make USE_JCTVC=y USE_JCTVC_HIGH_BIT_DEPTH=y USE_X265=y USE_BPGVIEW=y prefix=/usr
+CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" make USE_JCTVC=y USE_JCTVC_HIGH_BIT_DEPTH=y USE_X265=y USE_BPGVIEW=y prefix=/usr
install -Dm755 bpgdec "$PKG/usr/bin/bpgdec"
install -Dm755 bpgenc "$PKG/usr/bin/bpgenc"