summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/mtpaint/mtpaint.SlackBuild33
1 files changed, 15 insertions, 18 deletions
diff --git a/graphics/mtpaint/mtpaint.SlackBuild b/graphics/mtpaint/mtpaint.SlackBuild
index 6c84f2b7ab..f75d8063a6 100644
--- a/graphics/mtpaint/mtpaint.SlackBuild
+++ b/graphics/mtpaint/mtpaint.SlackBuild
@@ -6,7 +6,7 @@
PRGNAM=mtpaint
VERSION=${VERSION:-3.31}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -37,14 +37,15 @@ else
fi
if [ "$GTK1" = yes ]; then
- GTK1=gtk1
+ GTK1=gtk1
fi
if [ "$TKWIDGETS" = yes ]; then
- TKWIDGETS="gtkfilesel gtkcolsel"
+ TKWIDGETS="gtkfilesel gtkcolsel"
fi
if [ "$INTL" = yes ]; then
- INTL=intl
+ INTL=intl
fi
+HANDBOOK=${HANDBOOK:-no}
set -e
@@ -61,31 +62,25 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 \
-o -perm 400 \) -exec chmod 644 {} \;
+# bring deprecated function call into conformance with libpng14
+sed -i~ 's/png_set_gray_1_2_4_to_8/png_set_expand_gray_1_2_4_to_8/' src/png.c
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure cflags man $GTK1 $TKWIDGETS $INTL \
--prefix=/usr \
--mandir=/usr/man/man1 \
--docdir=/usr/doc/$PRGNAM-$VERSION
-# bring deprecated function call into conformance with libpng14
-sed -i~ 's/png_set_gray_1_2_4_to_8/png_set_expand_gray_1_2_4_to_8/' src/png.c
+# mtpaint autostrips the binary and autocompresses the manpage but doesn't
+# automatically create the viewer link
make
make DESTDIR=$PKG install
(cd $PKG/usr/bin && ln -s mtpaint mtv)
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-
-# go ahead and make this in case the handbook is skipped
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-
if [ "$HANDBOOK" = yes ]; then
- unzip $CWD/${PRGNAM}_handbook-$VERSION.zip
- cd ${PRGNAM}_handbook-$VERSION
+ unzip $CWD/${PRGNAM}_handbook-$VERSION.zip
+ ( cd ${PRGNAM}_handbook-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -93,8 +88,10 @@ if [ "$HANDBOOK" = yes ]; then
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 \
-o -perm 400 \) -exec chmod 644 {} \;
make DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION install
+ cp -a COPYING $PKG/usr/doc/$PRGNAM-$VERSION/COPYING.handbook )
+else
+ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
fi
-
cp -a [CNR]* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild