summaryrefslogtreecommitdiffstats
path: root/deps/LibRaw/LibRaw.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xdeps/LibRaw/LibRaw.SlackBuild (renamed from deps/sip/sip.SlackBuild)98
1 files changed, 61 insertions, 37 deletions
diff --git a/deps/sip/sip.SlackBuild b/deps/LibRaw/LibRaw.SlackBuild
index 8bf0095..bb01840 100755
--- a/deps/sip/sip.SlackBuild
+++ b/deps/LibRaw/LibRaw.SlackBuild
@@ -1,9 +1,9 @@
#!/bin/sh
-# Copyright 2008 Aleksandar Samardzic <asamardzic@gmail.com>
-# Copyright 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2013 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2013, 2015 Eric Hameleers, Eindhoven, NL
# All rights reserved.
-#
+
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
@@ -21,53 +21,66 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Modified by Robby Workman <rworkman@slackware.com>
-# Modified by Eric Hameleers <alien@slackware.com>
-
-
-PKGNAM=sip
-VERSION=${VERSION:-4.16.7}
+PKGNAM=LibRaw
+VERSION=${VERSION:-0.17.0}
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:--j7}
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
+ case "$(uname -m)" in
+ i?86) ARCH=i486 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || AR
+CH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
+ *) ARCH=$(uname -m) ;;
esac
+ export ARCH
fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
-elif [ "$ARCH" = "i686" ]; then
- SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
elif [ "$ARCH" = "armv7hl" ]; then
- SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
else
SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
fi
-PYTHONVER=$(python -V 2>&1 | cut -f 2 -d' ' | cut -f 1-2 -d.)
-PYTHONLIB=$( python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib()' )
-
-CWD=$(pwd)
-TMP=${TMP:-/tmp}
-PKG=$TMP/package-$PKGNAM
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
+mkdir -p $TMP $PKG
cd $TMP
-rm -rf $PKGNAM-$VERSION
-tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+rm -rf $PKGNAM-$VERSION-build
+mkdir $PKGNAM-$VERSION-build
+cd $PKGNAM-$VERSION-build
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+tar xvf $CWD/$PKGNAM-demosaic-pack-GPL2-$VERSION.tar.xz || exit 1
+tar xvf $CWD/$PKGNAM-demosaic-pack-GPL3-$VERSION.tar.xz || exit 1
cd $PKGNAM-$VERSION || exit 1
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -75,28 +88,39 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-python configure.py \
- -b "/usr/bin" \
- -d "$PYTHONLIB" \
- -e "/usr/include/python$PYTHONVER" \
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS"
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --disable-static \
+ --enable-demosaic-pack-gpl2=../LibRaw-demosaic-pack-GPL2-$VERSION \
+ --enable-demosaic-pack-gpl3=../LibRaw-demosaic-pack-GPL3-$VERSION \
+ --enable-jasper \
+ --enable-lcms \
+ --disable-examples \
+ --build=$TARGET \
+ || exit 1
make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG || exit 1
+make install DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a \
- LICENSE COPYING* NEWS README TODO doc/* \
+ COPYRIGHT Changelog.txt LICENSE.* README* doc \
$PKG/usr/doc/$PKGNAM-$VERSION
-chown -R root:root $PKG/usr/doc
+ mv $PKG/usr/doc/$PKGNAM-$VERSION/doc $PKG/usr/doc/$PKGNAM-$VERSION/html
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$(echo $VERSION |tr - _)-$ARCH-$BUILD.txz
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz