diff options
author | B. Watson <yalhcru@gmail.com> | 2022-02-25 15:21:22 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-02-27 01:09:47 +0700 |
commit | 5a1e261ce365802fb4d38bfecab15327431dbd00 (patch) | |
tree | 39d83c7a5853396d42131839f553a52da6c853fb /graphics | |
parent | d0b89d08b427025a7a03eca3c3f6f5f0fcb1d5de (diff) |
graphics/wavelet-denoise: Fix build on 15.0, do not spam /usr.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/wavelet-denoise/wavelet-denoise.SlackBuild | 48 | ||||
-rw-r--r-- | graphics/wavelet-denoise/wavelet-denoise.info | 2 |
2 files changed, 28 insertions, 22 deletions
diff --git a/graphics/wavelet-denoise/wavelet-denoise.SlackBuild b/graphics/wavelet-denoise/wavelet-denoise.SlackBuild index 3207467ec60dc..4e35f0557395d 100644 --- a/graphics/wavelet-denoise/wavelet-denoise.SlackBuild +++ b/graphics/wavelet-denoise/wavelet-denoise.SlackBuild @@ -4,26 +4,31 @@ # Originally written by klaatu for separate+ # Adapted to wavelet-denoise by Stefano Guidoni +# 20220222 bkw: Modified by SlackBuilds.org, BUILD=2: +# - fix build on 15.0. +# - actually install files to $PKG/usr instead of the real /usr! +# - actually use SLKCFLAGS. +# - i486 => i586. +# - don't install useless INSTALL doc. +# - use a download URL that exists. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=wavelet-denoise VERSION=${VERSION:-0.3.1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; x86_64) ARCH=x86_64 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 @@ -33,8 +38,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" @@ -59,28 +64,29 @@ cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ + -o -perm 511 \) -exec chmod 755 {} \+ -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ -# it won't compile otherwise -sed -e 's#$(LIBS)#$(LIBS) $(LDFLAGS)#' < src/Makefile > /tmp/Makefile && mv /tmp/Makefile src/Makefile +SLKCFLAGS+=" -fcommon" +sed -i -e "s,-O3,$SLKCFLAGS," \ + -e '/^LIBS/s,$, -lm,' \ + src/Makefile -LDFLAGS="-lm" \ -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -make all -make install DESTDIR=$PKG +make -mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/gimp/2.0/plug-ins -cp -a src/wavelet-denoise $PKG/usr/lib$LIBDIRSUFFIX/gimp/2.0/plug-ins +# 20220225 bkw: do not use 'make install'! It ignores DESTDIR and spams +# your /usr. However, it's safe to install the translations... but +# the stupid thing won't create the required directories by itself. +mkdir -p $PKG/usr/share/locale/{de,ru,it,et,pl}/LC_MESSAGES +make -C po install LOCALEDIR=$PKG/usr/share/locale -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 +mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/gimp/2.0/plug-ins +install -s src/wavelet-denoise $PKG/usr/lib$LIBDIRSUFFIX/gimp/2.0/plug-ins mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a \ - AUTHORS README ChangeLog INSTALL COPYING THANKS TRANSLATIONS \ + AUTHORS README ChangeLog COPYING THANKS TRANSLATIONS \ $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild diff --git a/graphics/wavelet-denoise/wavelet-denoise.info b/graphics/wavelet-denoise/wavelet-denoise.info index 54d6d57b5d8ea..0c14df711210b 100644 --- a/graphics/wavelet-denoise/wavelet-denoise.info +++ b/graphics/wavelet-denoise/wavelet-denoise.info @@ -1,7 +1,7 @@ PRGNAM="wavelet-denoise" VERSION="0.3.1" HOMEPAGE="http://registry.gimp.org/node/4235" -DOWNLOAD="http://registry.gimp.org/files/wavelet-denoise-0.3.1.tar.gz" +DOWNLOAD="http://distcache.FreeBSD.org/ports-distfiles/wavelet-denoise-0.3.1.tar.gz" MD5SUM="a02862026857575cdf81b24477e42f4b" DOWNLOAD_x86_64="" MD5SUM_x86_64="" |