graphics/mozjpeg: Updated for version 4.1.3.

Signed-off-by: B. Watson <urchlay@slackware.uk>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2023-07-10 16:54:39 -04:00 committed by Willy Sudiarto Raharjo
parent 98289deced
commit 99ab1c263e
No known key found for this signature in database
GPG key ID: 3F617144D7238786
2 changed files with 38 additions and 21 deletions

View file

@ -7,10 +7,14 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20230710 bkw:
# - update for v4.1.3.
# - fail if API in env is bad (not blank, 6b, 7, or 8).
# - add zulu-openjdk11 and 17 to JDK search.
# - fail if JAVA=yes but we can't find a JDK.
# 20230105 bkw: update for v4.1.1, fix doc symlink.
# 20220318 bkw: fix 32-bit lib vs. lib32 install path mess.
# 20210909 bkw: relicense as WTFPL, w/permission from original author.
# 20210310 bkw: update for v4.0.3.
@ -47,7 +51,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=mozjpeg
VERSION=${VERSION:-4.1.1}
VERSION=${VERSION:-4.1.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -85,23 +89,24 @@ fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
ARGS=""
# 20230710 bkw: sanity-check the API environment variable.
API="${API:-6b}"
case "$API" in
6b) ARGS="" ;; # this is the default.
7) ARGS="-DWITH_JPEG7=TRUE " ;;
8) ARGS="-DWITH_JPEG8=TRUE " ;;
*) echo "*** $0: invalid API. must be one of: 6b (default), 7, 8."
exit 1 ;;
esac
# JAVA=yes only tested with openjdk8. We source the profile.d script
# here in case someone's *just* installed jdk|openjdk, so they won't
# have to log out & back in to get this built. This mostly helps out
# sbopkg users.
JAVA="${JAVA:-no}"
javafound=no
if [ "$JAVA" = "yes" ]; then
ARGS+="-DWITH_JAVA=TRUE "
@ -111,17 +116,29 @@ if [ "$JAVA" = "yes" ]; then
# sure it actually matters that much ("write once, run anywhere" should
# mean a .jar built with openjdk will run with Oracle's jdk, right? But
# there's JNI (native code) involved...)
for i in jdk openjdk8 openjdk7 openjdk6 zulu-openjdk6 zulu-openjdk7 zulu-openjdk8 ; do
for i in jdk openjdk8 openjdk7 openjdk6 zulu-openjdk{6,8,11,17}; do
if [ -x /etc/profile.d/$i.sh ]; then
javafound="$i"
source /etc/profile.d/$i.sh
break
fi
done
if [ "$javafound" = "no" ]; then
echo "*** $0: you set JAVA=yes, but I can't find a JDK to build with"
exit 1
fi
javafound="yes ($javafound)"
fi
API="${API:-6b}"
[ "$API" = "7" ] && ARGS+="-DWITH_JPEG7=TRUE "
[ "$API" = "8" ] && ARGS+="-DWITH_JPEG8=TRUE "
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
mkdir -p build
cd build
@ -170,7 +187,7 @@ sed -i '/^Libs:/s|$| -lm -Wl,-rpath,${libdir}|' \
$PKG/opt/$PRGNAM/lib$LIBDIRSUFFIX/pkgconfig/*.pc
mkdir -p $PKG/install
sed -e "s,@API@,$API," -e "s,@JAVA@,$JAVA," \
sed -e "s,@API@,$API," -e "s,@JAVA@,$javafound," \
$CWD/slack-desc > \
$PKG/install/slack-desc

View file

@ -1,8 +1,8 @@
PRGNAM="mozjpeg"
VERSION="4.1.1"
VERSION="4.1.3"
HOMEPAGE="https://github.com/mozilla/mozjpeg"
DOWNLOAD="https://github.com/mozilla/mozjpeg/archive/v4.1.1/mozjpeg-4.1.1.tar.gz"
MD5SUM="0eae98d47302cb6f29d1e5aecbae9d52"
DOWNLOAD="https://github.com/mozilla/mozjpeg/archive/v4.1.3/mozjpeg-4.1.3.tar.gz"
MD5SUM="490e143a9d75d2a2e9073573aa83693d"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""