diff options
Diffstat (limited to 'graphics/gmic/gmic.SlackBuild')
-rw-r--r-- | graphics/gmic/gmic.SlackBuild | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/graphics/gmic/gmic.SlackBuild b/graphics/gmic/gmic.SlackBuild index 1659dd2143..0184332d47 100644 --- a/graphics/gmic/gmic.SlackBuild +++ b/graphics/gmic/gmic.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2016 Giorgio Peron <giorgio.peron@gmail.com>, Belluno, Italy +# Copyright 2018 Giorgio Peron <giorgio.peron@gmail.com>, Belluno, Italy # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -21,8 +21,8 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=gmic -VERSION=${VERSION:-2.0.0} -SRCVER=8419067dfc17963aad27303ecacc5a3b1f5c0644 +VERSION=${VERSION:-2.4.2} +COMMUNITYVERSION=${COMMUNITYVERSION:-b43000765fee484a9156d180e891d7a0e1bf8d0b} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -40,16 +40,16 @@ PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" + SLKCFLAGS="-O0 -march=i586 -mtune=i686 -fno-fast-math" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" + SLKCFLAGS="-O0 -march=i686 -mtune=i686 -fno-fast-math" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" + SLKCFLAGS="-O0 -fPIC -fno-fast-math" LIBDIRSUFFIX="64" else - SLKCFLAGS="-O2" + SLKCFLAGS="-O0 -fno-fast-math" LIBDIRSUFFIX="" fi @@ -60,10 +60,11 @@ mkdir -p $TMP $PKG cd $TMP rm -rf $PRGNAM rm -rf $PRGNAM-community +rm -rf $PRGNAM-qt tar xvf $CWD/$PRGNAM\_$VERSION.tar.gz --warning=no-unknown-keyword mv $PRGNAM-$VERSION $PRGNAM -unzip $CWD/$PRGNAM-community-$SRCVER.zip || unzip $CWD/$SRCVER -mv $PRGNAM-community-$SRCVER $PRGNAM-community +unzip $CWD/$PRGNAM-community-$COMMUNITYVERSION.zip || unzip $CWD/$COMMUNITYVERSION +mv $PRGNAM-community-$COMMUNITYVERSION $PRGNAM-community cd $PRGNAM chown -R root:root . find -L . \ @@ -72,14 +73,16 @@ 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 {} \; -cd src - sed -i "s/LIB = lib/LIB = lib$LIBDIRSUFFIX/" Makefile - sed -i "s:/share/man/:/man/:g" Makefile - # freshen gmic_stdlib.h to stop the Makefile downloading it - touch gmic_stdlib.h - make - make install DESTDIR=$PKG -cd - +sed -i -e "s|LIB = lib|LIB = lib$LIBDIRSUFFIX|g" \ + -e "s|/share/man/|/man/|g" \ + -e "s|/etc/bash_completion.d|/usr/share/bash-completion/completions|g" \ + -e "s|qmake|qmake-qt5|g" \ + src/Makefile +sed -i -e "s|-Ofast|-O2 -fno-fast-math --std=c++11|g" \ + gmic-qt/gmic_qt.pro + +make -C src LIB=lib$LIBDIRSUFFIX OPT_CFLAGS="$SLKCFLAGS" all WGET=/bin/true +make -C src install LIB=lib$LIBDIRSUFFIX DESTDIR="$PKG" USR="/usr" rmdir $PKG/usr/share || true |