games/gtklife: Build with gtk+2.

Signed-off-by: B. Watson <yalhcru@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2021-10-08 17:42:05 -04:00 committed by Willy Sudiarto Raharjo
parent 7e3231a059
commit f32fbf5737
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
4 changed files with 30 additions and 12 deletions

View File

@ -1,2 +1,4 @@
gtklife (Conway's Life program)
GtkLife is a fast, featureful, open-source Conway's Life program for
*nix.

View File

@ -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

View File

@ -6,11 +6,16 @@
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
# 20211008 bkw: BUILD=3
# - new-style icons.
# - build with gtk+2, not gtk+1. nicer UI.
# - binary in /usr/games, not /usr/bin.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=gtklife
VERSION=${VERSION:-5.2}
BUILD=${BUILD:-2}
BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -22,9 +27,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
@ -57,11 +59,8 @@ rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
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 {} \+
CFLAGS="$SLKCFLAGS -std=gnu89" \
CXXFLAGS="$SLKCFLAGS" \
@ -69,13 +68,24 @@ CXXFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--with-docdir=/usr/doc/$PRGNAM-$VERSION/html \
--with-gtk2 \
--build=$ARCH-slackware-linux
make
make install-strip prefix=$PKG/usr docdir=$PKG/usr/doc/$PRGNAM-$VERSION/html
make install-strip \
prefix=$PKG/usr \
docdir=$PKG/usr/doc/$PRGNAM-$VERSION/html \
bindir=$PKG/usr/games
for i in icon_*.png; do
size="$( echo $i | cut -d_ -f2 | cut -d. -f1 )"
dir=$PKG/usr/share/icons/hicolor/$size/apps
mkdir -p $dir
cat $i > $dir/$PRGNAM.png
done
mkdir -p $PKG/usr/share/pixmaps
cat icon_48x48.png > $PKG/usr/share/pixmaps/$PRGNAM.png
ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png
mkdir -p $PKG/usr/share/applications
cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop

View File

@ -3,7 +3,7 @@ Version=1.0
Name=GtkLife
GenericName=GtkLife Conway Life Simulation
Type=Application
Exec=gtklife
Exec=/usr/games/gtklife
Icon=gtklife
Terminal=false
StartupNotify=false