aboutsummaryrefslogtreecommitdiff
path: root/libraries/openjpeg/openjpeg.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/openjpeg/openjpeg.SlackBuild')
-rw-r--r--libraries/openjpeg/openjpeg.SlackBuild17
1 files changed, 13 insertions, 4 deletions
diff --git a/libraries/openjpeg/openjpeg.SlackBuild b/libraries/openjpeg/openjpeg.SlackBuild
index 907d49e1d444..b2e85a93dad1 100644
--- a/libraries/openjpeg/openjpeg.SlackBuild
+++ b/libraries/openjpeg/openjpeg.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for openjpeg
-# Copyright 2008 Heinz Wiesinger <hmwiesinger@gmx.at>
+# Copyright 2008-2009 Heinz Wiesinger <pprkut@liwjatan.at>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -37,10 +37,13 @@ SRC_VERSION=$(echo $VERSION | tr . _)
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
set -e
@@ -54,6 +57,9 @@ cd OpenJPEG_v$SRC_VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
+#fix correctly installing libraries in lib$LIBDIRSUFFIX
+sed -i "s/lib)/lib\${LIB_SUFFIX})/" libopenjpeg/CMakeLists.txt
+
mkdir -p build
cd build
cmake \
@@ -62,6 +68,7 @@ cd build
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_EXAMPLES:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=ON \
+ -DLIB_SUFFIX="$LIBDIRSUFFIX" \
..
make
make install DESTDIR=$PKG
@@ -71,8 +78,10 @@ mkdir -p $PKG/usr/include
mv $PKG/openjpeg $PKG/usr/include/
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
@@ -83,4 +92,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}