libraries/vmaf: Updated for version 3.0.0.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Vijay Marcel 2024-02-22 21:38:20 +07:00 committed by Willy Sudiarto Raharjo
parent bc4909d99a
commit ba54945600
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
2 changed files with 9 additions and 24 deletions

View File

@ -2,7 +2,7 @@
# Slackware build script for vmaf
# Copyright 2022 Vijay Marcel
# Copyright 2022-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=vmaf
VERSION=${VERSION:-2.3.1}
VERSION=${VERSION:-3.0.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -43,22 +43,19 @@ 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"
LIBDIRSUFFIX=""
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
@ -82,34 +79,22 @@ find -L . \
mkdir -pv $TMP/$PRGNAM-$VERSION/libvmaf/build
cd third_party/libsvm && make lib
cd $TMP/$PRGNAM-$VERSION/
meson setup libvmaf/build libvmaf --buildtype release --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} -Denable_float=true && \
ninja -v -C libvmaf/build
ninja -v -C libvmaf/build test
cd $TMP/$PRGNAM-$VERSION/python && python3 setup.py build_ext --build-lib .
DESTDIR=$PKG ninja -v -C $TMP/$PRGNAM-$VERSION/libvmaf/build install
install -D -m755 $TMP/$PRGNAM-$VERSION/libvmaf/build/tools/vmafossexec -t "$PKG/usr/bin/"
mkdir -pv $PKG/usr/share/$PRGNAM-$VERSION
cp -dr --no-preserve='ownership' $TMP/$PRGNAM-$VERSION/model "$PKG/usr/share/$PRGNAM-$VERSION/"
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
grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded --remove-section=.comment --remove-section=.note 2> /dev/null || true
# Don't ship .la files:
rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
cd $TMP/$PRGNAM-$VERSION
mkdir -pv $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CHANGELOG.md LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

View File

@ -1,8 +1,8 @@
PRGNAM="vmaf"
VERSION="2.3.1"
VERSION="3.0.0"
HOMEPAGE="https://github.com/Netflix/vmaf/"
DOWNLOAD="https://github.com/Netflix/vmaf/archive/v2.3.1/vmaf-2.3.1.tar.gz"
MD5SUM="be40a256a3b739ffc2119b45f919d6bf"
DOWNLOAD="https://github.com/Netflix/vmaf/archive/v3.0.0/vmaf-3.0.0.tar.gz"
MD5SUM="dfd67ebfbfcb66ce76abc56fde0df06f"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="OpenBLAS python3-numpy"