diff options
Diffstat (limited to 'graphics/mozjpeg/mozjpeg.SlackBuild')
-rw-r--r-- | graphics/mozjpeg/mozjpeg.SlackBuild | 36 |
1 files changed, 26 insertions, 10 deletions
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 |