aboutsummaryrefslogtreecommitdiff
path: root/games/openyahtzee
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-10-21 02:53:52 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-29 17:07:21 +0700
commit10d922d1345adc801616b4d2c046da1ab92a5db3 (patch)
treea69cd7e04f82120b516aa0b0a41b92552eb24059 /games/openyahtzee
parentc8ef264878c22a46bef00b22f3c2b137a341b79f (diff)
games/openyahtzee: New-style icons.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/openyahtzee')
-rw-r--r--games/openyahtzee/doinst.sh6
-rw-r--r--games/openyahtzee/openyahtzee.SlackBuild32
-rw-r--r--games/openyahtzee/openyahtzee.info4
3 files changed, 28 insertions, 14 deletions
diff --git a/games/openyahtzee/doinst.sh b/games/openyahtzee/doinst.sh
index 5fb28930db0b9..3e5691a052b5b 100644
--- a/games/openyahtzee/doinst.sh
+++ b/games/openyahtzee/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/games/openyahtzee/openyahtzee.SlackBuild b/games/openyahtzee/openyahtzee.SlackBuild
index 24a8421b29a2e..f6d7b88bedf2f 100644
--- a/games/openyahtzee/openyahtzee.SlackBuild
+++ b/games/openyahtzee/openyahtzee.SlackBuild
@@ -6,6 +6,10 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20211021 bkw: BUILD=2
+# - actually use the WXCONFIG variable.
+# - new-style icons.
+
# 20140909 bkw: if wx(Widgets|Python) 2.x and wxGTK 3.x are installed, in that
# order, the symlink at /usr/bin/wx-config will point to the 3.x config script.
# openyahtzee won't build against wx 3, so this script now uses the 2.x script
@@ -15,7 +19,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=openyahtzee
VERSION=${VERSION:-1.9.3}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -27,9 +31,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
@@ -70,15 +71,15 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
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 \
- \( -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 {} \+
+
+sed -i 's,Exec=,&/usr/games/,' $PRGNAM.desktop
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
+ --with-wx-config="$WXCONFIG" \
--bindir=/usr/games \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -90,9 +91,16 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install-strip DESTDIR=$PKG
-
-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
+gzip $PKG/usr/man/man?/*
+
+for px in 16 32 48 64 128; do
+ size=${px}x${px}
+ dir=$PKG/usr/share/icons/hicolor/$size/apps
+ mkdir -p $dir
+ convert -resize $size \
+ icons/$PRGNAM.png \
+ $PKG/usr/share/icons/hicolor/$size/apps/$PRGNAM.png
+done
# README and NEWS are 0-byte placeholder in 1.9.1
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
diff --git a/games/openyahtzee/openyahtzee.info b/games/openyahtzee/openyahtzee.info
index f41703e8c94b4..d8dc01deb515d 100644
--- a/games/openyahtzee/openyahtzee.info
+++ b/games/openyahtzee/openyahtzee.info
@@ -1,7 +1,7 @@
PRGNAM="openyahtzee"
VERSION="1.9.3"
-HOMEPAGE="http://www.openyahtzee.org/"
-DOWNLOAD="http://downloads.sourceforge.net/project/openyahtzee/Open%20Yahtzee/Open%20Yahtzee%201.9.3/openyahtzee-1.9.3.tar.xz"
+HOMEPAGE="https://www.openyahtzee.org/"
+DOWNLOAD="https://downloads.sourceforge.net/project/openyahtzee/Open%20Yahtzee/Open%20Yahtzee%201.9.3/openyahtzee-1.9.3.tar.xz"
MD5SUM="9bccc2477047c29cb33b8cb23e21ef3c"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""