summaryrefslogtreecommitdiffstats
path: root/libraries/FreeImage/FreeImage.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/FreeImage/FreeImage.SlackBuild')
-rw-r--r--libraries/FreeImage/FreeImage.SlackBuild17
1 files changed, 11 insertions, 6 deletions
diff --git a/libraries/FreeImage/FreeImage.SlackBuild b/libraries/FreeImage/FreeImage.SlackBuild
index c34940693d..eafea1183e 100644
--- a/libraries/FreeImage/FreeImage.SlackBuild
+++ b/libraries/FreeImage/FreeImage.SlackBuild
@@ -19,10 +19,13 @@ OUTPUT=${OUTPUT:-/tmp}
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
@@ -43,14 +46,16 @@ find . \
patch -p1 < $CWD/Makefile.gnu.DESTDIR.diff
patch -p1 < $CWD/Makefile.fip.DESTDIR.diff
-CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" make
-make install DESTDIR=$PKG
-CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" make -f Makefile.fip
-make -f Makefile.fip install DESTDIR=$PKG
+CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" make INSTALLDIR=/usr/lib${LIBDIRSUFFIX}
+make install INSTALLDIR=/usr/lib${LIBDIRSUFFIX} DESTDIR=$PKG
+CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLKCFLAGS" make -f Makefile.fip INSTALLDIR=/usr/lib${LIBDIRSUFFIX}
+make -f Makefile.fip install INSTALLDIR=/usr/lib${LIBDIRSUFFIX} DESTDIR=$PKG
( 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