aboutsummaryrefslogtreecommitdiff
path: root/graphics/dcraw/dcraw.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/dcraw/dcraw.SlackBuild')
-rw-r--r--graphics/dcraw/dcraw.SlackBuild33
1 files changed, 23 insertions, 10 deletions
diff --git a/graphics/dcraw/dcraw.SlackBuild b/graphics/dcraw/dcraw.SlackBuild
index 2a8a0c811933c..f5e8f3c275e6a 100644
--- a/graphics/dcraw/dcraw.SlackBuild
+++ b/graphics/dcraw/dcraw.SlackBuild
@@ -3,8 +3,7 @@
# Slackware Package Build Script for dcraw
# Home Page http://cybercom.net/~dcoffin/dcraw
-# Copyright (c) 2008-2011, Nishant Limbachia, Hoffman Estates, IL, USA <nishant _AT_ mnspace _DOT_ net>
-# Copyright (c) 2007, Robby Workman <rworkman@slackbuilds.org>
+# Copyright (c) 2008-2012, Nishant Limbachia, Hoffman Estates, IL, USA <nishant _AT_ mnspace _DOT_ net>
# All rights reserved.
# Redistribution and use of this script, with or without modification, is
@@ -30,7 +29,7 @@
# RAWPHOTO=yes ./dcraw.SlackBuild
PRGNAM=dcraw
-VERSION=${VERSION:-9.08}
+VERSION=${VERSION:-9.12}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -63,19 +62,32 @@ else
LIBDIRSUFFIX=""
fi
+# build with rawphoto gimp plugin, default is no
+RAWPHOTO=${RAWPHOTO:-no}
+# build with jasper support, default is no
+JASPER=${JASPER:-no}
+
+if [ "${JASPER}" = "yes" ]; then
+ JASPER_BUILD_FLAG="-ljasper"
+ JASPER_GCC_FLAG="-DJASPER"
+else
+ JASPER_BUILD_FLAG=""
+ JASPER_GCC_FLAG="-DNO_JASPER"
+fi
+
+
# DCRaw build flags as suggested on the author's page.
-# builds with support for jpeg, png, lcms and tiff
-DCRAW_BUILD_FLAGS="-lm -ljpeg -llcms -lpng -ltiff"
+# builds with support for jpeg, png, lcms and tiff and optionally, jasper
+DCRAW_BUILD_FLAGS="-lm -ljpeg -llcms -lpng -ltiff $JASPER_BUILD_FLAG"
set -e # Exit on most errors
-RAWPHOTO=${RAWPHOTO:-no}
-
-rm -fr $TMP/$PRGNAM $PKG
+rm -fr $TMP/$PRGNAM-$VERSION $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $TMP/$PRGNAM
+mv $TMP/$PRGNAM $TMP/$PRGNAM-$VERSION
+cd $TMP/$PRGNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -87,7 +99,8 @@ gcc \
$SLKCFLAGS -Wall -v \
-o dcraw dcraw.c \
$DCRAW_BUILD_FLAGS \
- -DLOCALEDIR=\"/usr/share/locale/\"
+ -DLOCALEDIR=\"/usr/share/locale/\" \
+ $JASPER_GCC_FLAG
install -D -m 0755 dcraw $PKG/usr/bin/dcraw
strip --strip-unneeded $PKG/usr/bin/dcraw