diff options
author | B. Watson <urchlay@slackware.uk> | 2023-04-21 03:44:37 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-04-22 11:38:37 +0700 |
commit | 5ecf312dc7dd3c73213696780088399238742b52 (patch) | |
tree | 905c987f7d55478bdce480dc11d64e31473e59c4 | |
parent | 9c6506284aaf807015b7e874e97da12c330b4d21 (diff) |
graphics/grafx2: Updated for version 2.8.3091.
Signed-off-by: B. Watson <urchlay@slackware.uk>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | graphics/grafx2/README | 5 | ||||
-rw-r--r-- | graphics/grafx2/doinst.sh | 6 | ||||
-rw-r--r-- | graphics/grafx2/grafx2.SlackBuild | 85 | ||||
-rw-r--r-- | graphics/grafx2/grafx2.info | 6 | ||||
-rw-r--r-- | graphics/grafx2/slack-desc | 4 |
5 files changed, 76 insertions, 30 deletions
diff --git a/graphics/grafx2/README b/graphics/grafx2/README index fda64c8c5dee..3bdf6385514d 100644 --- a/graphics/grafx2/README +++ b/graphics/grafx2/README @@ -4,5 +4,6 @@ GrafX2 is a drawing program dedicated to pixelart and low-color graphics. Its layout is not very different from the famous Deluxe Paint or Brilliance. -If you want LUA scripting support, pass LUA=yes to the -SlackBuild. This requires "lua". +If you want Lua scripting support, install lua before building +this and it will be auto-detected. You can also pass LUA=no in the +environment to disable Lua, if it's installed. diff --git a/graphics/grafx2/doinst.sh b/graphics/grafx2/doinst.sh index 5fb28930db0b..3e5691a052b5 100644 --- a/graphics/grafx2/doinst.sh +++ b/graphics/grafx2/doinst.sh @@ -1,3 +1,9 @@ if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/graphics/grafx2/grafx2.SlackBuild b/graphics/grafx2/grafx2.SlackBuild index 9c5b4f1a4106..961cf9f91140 100644 --- a/graphics/grafx2/grafx2.SlackBuild +++ b/graphics/grafx2/grafx2.SlackBuild @@ -22,15 +22,29 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Modified by B. Watson, 20230421. I'm not taking over this build; +# I'm updating it at the request of the maintainer. +# - updated for v2.8.3091. +# - add gtk-update-icon-cache to doinst.sh. +# - autodetect lua (allow LUA=no to override). +# - make the slack-desc show whether or not lua scripting is built in. +# - don't include the sample lua scripts if lua is disabled. +# - move 32x32 bitmap icon to correct dir, install 48x48 icon. +# - install man pages. +# - make the .desktop file actually work (name executable 'grafx2'). + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=grafx2 -VERSION=${VERSION:-2.5.1960} +VERSION=${VERSION:-2.8.3091} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} -SRC=30 +# 20230421 bkw: depending on whether content-disposition is respected +# or not, the file gets saved with one or the other of these 2 names. +SRC1=65 +SRC2=$PRGNAM-$VERSION-HEAD-src.tgz if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -40,9 +54,6 @@ if [ -z "$ARCH" ]; then 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 @@ -66,10 +77,14 @@ else LIBDIRSUFFIX="" fi -if [ "$LUA" = yes ]; then +# 20230421 bkw: Assume the user wants lua scripting if lua is +# installed... unless he says LUA=no. +if [ -x /usr/bin/lua ] && [ "${LUA:-yes}" = "yes" ]; then LUA="" + WITHLUA="WITH" else LUA="NOLUA=1" + WITHLUA="WITHOUT" fi set -e @@ -80,29 +95,53 @@ cd $TMP rm -rf $PRGNAM-$VERSION mkdir -p $PRGNAM-$VERSION cd $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION-src.tgz || tar xvzf $CWD/$SRC +tar xvf $CWD/$SRC1 || tar xvf $CWD/$SRC2 cd $PRGNAM 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 \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ -cd src CFLAGS="$SLKCFLAGS" \ -make install prefix=/usr DESTDIR=$PKG $LUA -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 - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a doc/*.txt $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + make -C src install V=1 PREFIX=/usr DESTDIR=$PKG $LUA + +# 20230421 bkw: shut sbopkglint up. +echo "Placeholder; ignore me." > $PKG/usr/share/grafx2/scripts/libs/.emptydir.ok + +# 20230421 bkw: if we built the package without lua, don't include the +# directory full of (now-useless) lua scripts. +[ "$WITHLUA" = "WITHOUT" ] && rm -rf $PKG/usr/share/$PRGNAM/scripts + +# 20230421 bkw: The Makefile installs it as "grafx2-sdl", but the +# .desktop file and man pages call it plain "grafx2". Symlink it so +# either name is correct. +strip $PKG/usr/bin/$PRGNAM-sdl +ln -s $PRGNAM-sdl $PKG/usr/bin/$PRGNAM + +# 20230421 bkw: The 32x32 icon gets installed in the wrong place. +# There's also a 48x48 icon hidden away, might as well install it, too. +# Also link it to pixmap dir, for old-style WMs. +HICOLOR=$PKG/usr/share/icons/hicolor +mkdir -p $HICOLOR/{32x32,48x48}/apps +mv $HICOLOR/scalable/apps/*.xpm $HICOLOR/32x32/apps +cat misc/morphos/$PRGNAM.info > $HICOLOR/48x48/apps/$PRGNAM.png +mkdir -p $PKG/usr/share/pixmaps +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png + +# 20230421 bkw: 'make install' doesn't install the man pages. Looks +# like we have English and French ones. The .fr page is actually in +# ASCII (not ISO-8859-1 nor UTF-8), so it goes in /usr/man/fr. +mkdir -p $PKG/usr/man/man1 $PKG/usr/man/fr/man1 +gzip -9c < misc/unix/grafx2.1 > $PKG/usr/man/man1/grafx2.1.gz +gzip -9c < misc/unix/grafx2.fr.1 > $PKG/usr/man/fr/man1/grafx2.1.gz + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +rm -f doc/COMPILING.txt # don't need in package +cp -a doc/*.txt $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc +sed "s,@WITHLUA@,$WITHLUA," < $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG diff --git a/graphics/grafx2/grafx2.info b/graphics/grafx2/grafx2.info index a46824cbdf6c..4e3284bb062c 100644 --- a/graphics/grafx2/grafx2.info +++ b/graphics/grafx2/grafx2.info @@ -1,8 +1,8 @@ PRGNAM="grafx2" -VERSION="2.5.1960" +VERSION="2.8.3091" HOMEPAGE="http://pulkomandy.tk/projects/GrafX2" -DOWNLOAD="http://pulkomandy.tk/projects/GrafX2/downloads/30" -MD5SUM="80b0bc1dd66a87a62b1621b963b28fc1" +DOWNLOAD="http://pulkomandy.tk/projects/GrafX2/downloads/65" +MD5SUM="9a0a61d59019d409475bbca0f472607b" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" diff --git a/graphics/grafx2/slack-desc b/graphics/grafx2/slack-desc index 75933bd380b5..a400011e4ab0 100644 --- a/graphics/grafx2/slack-desc +++ b/graphics/grafx2/slack-desc @@ -12,8 +12,8 @@ grafx2: GrafX2 is a drawing program dedicated to pixelart and low-color grafx2: graphics. Its layout is not very different from the famous Deluxe grafx2: Paint or Brilliance. grafx2: -grafx2: Homepage: http://pulkomandy.tk/projects/GrafX2 -grafx2: +grafx2: This package was built @WITHLUA@ lua scripting support. grafx2: +grafx2: Homepage: http://pulkomandy.tk/projects/GrafX2 grafx2: grafx2: |