aboutsummaryrefslogtreecommitdiff
path: root/libraries/DevIL/DevIL.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/DevIL/DevIL.SlackBuild')
-rw-r--r--libraries/DevIL/DevIL.SlackBuild56
1 files changed, 22 insertions, 34 deletions
diff --git a/libraries/DevIL/DevIL.SlackBuild b/libraries/DevIL/DevIL.SlackBuild
index 3cf47dc1eab59..c01bc4a74ccbb 100644
--- a/libraries/DevIL/DevIL.SlackBuild
+++ b/libraries/DevIL/DevIL.SlackBuild
@@ -6,14 +6,13 @@
# Currently maintained by Dugan Chen
PRGNAM=DevIL
-SRCNAM=devil
-VERSION=${VERSION:-1.7.8}
+VERSION=${VERSION:-1.8.0}
BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -24,8 +23,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -43,9 +42,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $SRCNAM-$VERSION
+rm -rf $PRGNAM
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
-cd $SRCNAM-$VERSION
+cd $PRGNAM
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -53,39 +52,28 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Fix build with gcc5
-patch -p0 < $CWD/patch-include_IL_il.h
-
-# Build against libpng14, not libpng12.
-sed -i 's/png12/png14/g' configure
-
-# Fix further linking issues with libpng. This patch is taken
-# from Ubuntu. Without this patch, DevIL will compile, but attempts
-# to link against it will break.
-patch -p1 < $CWD/04_png_set_expand_gray.diff
+if [ "$LIBDIRSUFFIX" = "64" ]; then
+ patch -p1 < $CWD/lib64.diff
+fi
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --datarootdir=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --enable-static=no \
- --enable-ILU=yes \
- --enable-ILUT=yes \
- --build=$ARCH-slackware-linux
-make
-make install DESTDIR=$PKG
+mkdir -p DevIL/build
+cd DevIL/build
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make
+ make install DESTDIR=$PKG
+cd ../..
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-rm -f $PKG/usr/info/dir
-gzip -9 $PKG/usr/info/*.info*
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING CREDITS ChangeLog INSTALL Libraries.txt \
- NEWS README README.unix TODO examples/ $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a LICENSE README.md DevIL-docs/ DevIL/CREDITS DevIL/INSTALL DevIL/NEWS \
+ DevIL/Libraries.txt DevIL/README.cmake \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install