mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-18 22:06:04 +01:00
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>
This commit is contained in:
parent
d0b89d08b4
commit
5a1e261ce3
2 changed files with 28 additions and 22 deletions
|
@ -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
|
||||
|
||||
# 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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
|
|
|
@ -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=""
|
||||
|
|
Loading…
Reference in a new issue