aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2017-05-03 14:22:27 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-05-27 07:28:59 +0700
commitbd598cb15f7bbaff0b17dcc2f8859e245b8d8e58 (patch)
tree4bc79dcd9c35cf959d6a9d091e2e7708a3f94cbc
parent440e47959af816026ae14410b1e4263c08b92cbd (diff)
graphics/mozjpeg: Updated for version 3.2.
Signed-off-by: B. Watson <yalhcru@gmail.com>
-rw-r--r--graphics/mozjpeg/README9
-rw-r--r--graphics/mozjpeg/mozjpeg.SlackBuild36
-rw-r--r--graphics/mozjpeg/mozjpeg.info6
3 files changed, 36 insertions, 15 deletions
diff --git a/graphics/mozjpeg/README b/graphics/mozjpeg/README
index 7853d2ec800aa..00b151318f373 100644
--- a/graphics/mozjpeg/README
+++ b/graphics/mozjpeg/README
@@ -28,8 +28,13 @@ export PATH=/opt/mozjpeg/bin:$PATH
export MANPATH=/opt/mozjpeg/man:$MANPATH
To compile & link with the mozjpeg libraries, use -I/opt/mozjpeg/include
-and -L/opt/mozjpeg/lib (or lib64). You might also want -static, or else
--Wl,-rpath,/opt/mozjpeg/lib (or lib64).
+and -L/opt/mozjpeg/lib (or lib64). You might also want -static, or
+else -Wl,-rpath,/opt/mozjpeg/lib (or lib64). Starting with version 3.2,
+there's also pkg-config support for mozjpeg. In ~/.bash_profile:
+
+export PKG_CONFIG_PATH=/opt/mozjpeg/lib64/pkgconfig:$PKG_CONFIG_PATH
+
+(chage lib64 to lib, for 32-bit Slackware)
If you built with JAVA=yes, the java library will be installed
as /opt/mozjpeg/classes/turbojpeg.jar, and the docs will be in
diff --git a/graphics/mozjpeg/mozjpeg.SlackBuild b/graphics/mozjpeg/mozjpeg.SlackBuild
index 4ab2efb0d224b..d82a954009df9 100644
--- a/graphics/mozjpeg/mozjpeg.SlackBuild
+++ b/graphics/mozjpeg/mozjpeg.SlackBuild
@@ -3,7 +3,7 @@
# Slackware build script for mozjpeg
# Originally written by:
-# Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org
+# Ryan P.C. McQuen | Everett, WA | <email removed>
# Now maintained by B. Watson (yalhcru@gmail.com)
@@ -25,6 +25,13 @@
# with this program (most likely, a file named COPYING). If not, see
# <http://www.gnu.org/licenses/>.
+# 20170502 bkw:
+# - update for v3.2. script tested with v3.1 and still works, in case
+# upstream's updated libjpegturbo API causes a problem (just get the
+# old source, run with VERSION=3.1 in the env).
+# - Note: ignore the 'error: ignoring unknown tag NASM' messages, per
+# https://sourceforge.net/p/libjpeg-turbo/mailman/message/34381375/
+
# 20170310 bkw:
# - take over maintenance
# - i486 => i586
@@ -35,8 +42,8 @@
# - BUILD=2
PRGNAM=mozjpeg
-VERSION=${VERSION:-3.1}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-3.2}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -108,13 +115,15 @@ if [ "$JAVA" = "yes" ]; then
sed -i "s,/usr/java,$JAVA_HOME,g" configure.ac
fi
-
autoreconf -fiv
-# TODO: really, there should be a way to build multiple API versions, with
-# file paths that don't clash: /opt/mozjpeg/jpeg$API/(bin|lib|include).
-# I'll save this for the 3.2 release. Had a look at 3.2-pre, it has
-# pkg-config support, which would make this job easier I think.
+# Maybe TODO: really, there should be a way to build multiple API versions,
+# with file paths that don't clash: /opt/mozjpeg/jpeg$API/(bin|lib|include).
+# However, I'd be inventing my own directory layout for this (upstream
+# doesn't support it), which is kinda outside the scope of what a SlackBuild
+# should do. If you *really* need this feature, email me and convince me to
+# implement it (it's a lot of error-prone work, not going to do it unless
+# someone actually needs it).
API="${API:-6b}"
case "$API" in
6b) ;; # do nothing, this is the default
@@ -128,7 +137,10 @@ esac
# I did it this way.
# Leaving off all the --prefix and related options below, since the
-# default prefix is already /opt/mozjpeg.
+# default prefix is already /opt/mozjpeg... though starting with 3.2,
+# the man pages and docs are in $PREFIX/share/(man|doc), so use
+# --mandir and --docdir. Also, to make 3.2 match the 3.1 package, need
+# --datarootdir=$PREFIX to make the java classes go to $PREFIX/classes.
# Ryan's version of this script had --disable-static, but I'm leaving
# that off, because sometimes static libs are easier to deal with when
@@ -139,11 +151,15 @@ esac
# system libjpeg in /usr/lib(64) which partly defeats the purpose of
# having optimized jpeg libs...
+
LDFLAGS="-Wl,-rpath,/opt/$PRGNAM/lib$LIBDIRSUFFIX" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
$EXTRAOPTS \
+ --datarootdir=/opt/$PRGNAM \
+ --mandir=/opt/$PRGNAM/man \
+ --docdir=/opt/$PRGNAM/doc \
--build=$ARCH-slackware-linux
# the java stuff chokes without -j1, everything else is OK.
@@ -159,7 +175,7 @@ gzip $PKG/opt/$PRGNAM/man/man?/*.?
mkdir -p $PKG/usr/doc
mv $PKG/opt/$PRGNAM/doc $PKG/usr/doc/$PRGNAM-$VERSION
ln -s ../../../usr/doc/$PRGNAM-$VERSION $PKG/opt/$PRGNAM/doc
-cp -a LICENSE.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a LICENSE.* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
[ "$JAVA" = "yes" ] && cp -a java/doc $PKG/usr/doc/$PRGNAM-$VERSION/javadoc
diff --git a/graphics/mozjpeg/mozjpeg.info b/graphics/mozjpeg/mozjpeg.info
index 8e78bc0f0bb20..af332b3a09d14 100644
--- a/graphics/mozjpeg/mozjpeg.info
+++ b/graphics/mozjpeg/mozjpeg.info
@@ -1,8 +1,8 @@
PRGNAM="mozjpeg"
-VERSION="3.1"
+VERSION="3.2"
HOMEPAGE="https://github.com/mozilla/mozjpeg"
-DOWNLOAD="https://github.com/mozilla/mozjpeg/archive/v3.1/mozjpeg-3.1.tar.gz"
-MD5SUM="c61d693a16d529fa92be7544a5c2e7f9"
+DOWNLOAD="https://github.com/mozilla/mozjpeg/archive/v3.2/mozjpeg-3.2.tar.gz"
+MD5SUM="5279e9e66f605f394af7dbe1368c42d7"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""