aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-12-03 23:27:23 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2024-12-03 23:32:20 +0700
commit58fcbe9b6cb701fb635669b7c80938231f091d2f (patch)
tree85e765a87b14e308e76ffbe7fad89f1bdfb8c671
parent5c61cc5002bd25675e057e6fb9d4f3435b4094d2 (diff)
games/acidwarp: Added (eye-candy program).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--games/acidwarp/README22
-rw-r--r--games/acidwarp/acidwarp-fs.desktop9
-rw-r--r--games/acidwarp/acidwarp.SlackBuild125
-rw-r--r--games/acidwarp/acidwarp.desktop9
-rw-r--r--games/acidwarp/acidwarp.info10
-rw-r--r--games/acidwarp/doinst.sh9
-rw-r--r--games/acidwarp/slack-desc19
7 files changed, 203 insertions, 0 deletions
diff --git a/games/acidwarp/README b/games/acidwarp/README
new file mode 100644
index 0000000000..660a26e0ea
--- /dev/null
+++ b/games/acidwarp/README
@@ -0,0 +1,22 @@
+acidwarp (display geometric images and rotate the palette)
+
+Acid Warp is an eye-candy program. Run it and watch the pretty
+colors. Each picture is the graphic representation of a mathematical
+function.
+
+There is no man page. Run 'acidwarp -h' for a list of command-line
+options, and see the docs in /usr/doc/acidwarp-$VERSION for a list
+of keyboard commands. It's worth mentioning here that the keystroke
+to exit is Control-Break, and that double-clicking in the window will
+toggle windowed vs. fullscreen.
+
+Build options:
+
+By default, acidwarp is built with SDL-2.0 and OpenGL. To disable
+OpenGL, set GL=no in the script's environment.
+
+To build with SDL-1.2, set SDL2=no. This will also disable OpenGL,
+since acidwarp doesn't support building with SDL-1.2 and OpenGL.
+Building with SDL-1.2 actually has a use-case: it will allow "acidwarp
+-f -k" to span multiple screens, if you have them (the SDL-2.0 build
+only runs fullscreen on one monitor).
diff --git a/games/acidwarp/acidwarp-fs.desktop b/games/acidwarp/acidwarp-fs.desktop
new file mode 100644
index 0000000000..ed45937cbd
--- /dev/null
+++ b/games/acidwarp/acidwarp-fs.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Acidwarp (Full Screen)
+GenericName=View color cycling patterns
+Icon=acidwarp
+Exec=/usr/games/acidwarp -f -k -n
+Terminal=false
+Type=Application
+Categories=Graphics;
+StartupNotify=false
diff --git a/games/acidwarp/acidwarp.SlackBuild b/games/acidwarp/acidwarp.SlackBuild
new file mode 100644
index 0000000000..521d96cdd2
--- /dev/null
+++ b/games/acidwarp/acidwarp.SlackBuild
@@ -0,0 +1,125 @@
+#!/bin/bash
+
+# Slackware build script for acidwarp
+
+# Written by B. Watson (urchlay@slackware.uk)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=acidwarp
+VERSION=${VERSION:-4.10+20221127_cf5e52f}
+COMMIT=${COMMIT:-cf5e52ff7793df1cb2dffaf693b672b66cca3049}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$COMMIT
+tar xvf $CWD/$PRGNAM-$COMMIT.tar.gz
+cd $PRGNAM-$COMMIT
+chown -R root:root .
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod -h 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod -h 644 {} +
+
+# Build with SDL2 and OpenGL by default. OpenGL builds are only possible
+# with SDL2.
+if [ "${SDL2:-yes}" = "no" ]; then
+ SDLOPT="-DSDL2=OFF"
+ GL="${GL:-no}"
+else
+ SDLOPT="-DSDL2=ON"
+fi
+
+if [ "${GL:-yes}" = "no" ]; then
+ GLOPT="-DGL=OFF"
+else
+ GLOPT="-DGL=ON -DCMAKE_EXE_LINKER_FLAGS=-lGL"
+fi
+
+echo "===> SDLOPT: $SDLOPT"
+echo "===> GLOPT: $GLOPT"
+
+mkdir -p build
+cd build
+ cmake \
+ $SDLOPT $GLOPT \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=Release ..
+ make VERBOSE=1
+cd ..
+
+# no make install target, do it the hard way.
+install -D -m755 -s bin/$PRGNAM $PKG/usr/games/$PRGNAM
+
+mkdir -p $PKG/usr/share/{applications,pixmaps}
+
+# acidwarp.desktop is slightly modified from upstream.
+# acidwarp-fs.desktop makes it run fullscreen, since the window size
+# comes out smaller than a pack of smokes on a modern-ish display (or
+# postage-stamp-sized, on 4k).
+for i in acidwarp acidwarp-fs; do
+ cat $CWD/$i.desktop > $PKG/usr/share/applications/$i.desktop
+done
+
+for px in 32 48 64 256; do
+ sz=${px}x${px}
+ dir=$PKG/usr/share/icons/hicolor/$sz/apps
+ mkdir -p $dir
+ convert -resize $sz $PRGNAM.png $dir/$PRGNAM.png
+done
+
+ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png \
+ $PKG/usr/share/pixmaps/$PRGNAM.png
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a README* TODO $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
+
+objdump -p bin/$PRGNAM | grep NEEDED > tmp
+SDLVER=1.2; RENDER=software
+grep -q libSDL2 tmp && SDLVER=2.0
+grep -q libGL tmp && RENDER=OpenGL
+
+mkdir -p $PKG/install
+sed -e "s,@SDLVER@,$SDLVER," -e "s,@RENDER@,$RENDER," \
+ < $CWD/slack-desc \
+ > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/games/acidwarp/acidwarp.desktop b/games/acidwarp/acidwarp.desktop
new file mode 100644
index 0000000000..7e944076c0
--- /dev/null
+++ b/games/acidwarp/acidwarp.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Acidwarp (Windowed)
+GenericName=View color cycling patterns
+Icon=acidwarp
+Exec=/usr/games/acidwarp
+Terminal=false
+Type=Application
+Categories=Graphics;
+StartupNotify=false
diff --git a/games/acidwarp/acidwarp.info b/games/acidwarp/acidwarp.info
new file mode 100644
index 0000000000..f607a05058
--- /dev/null
+++ b/games/acidwarp/acidwarp.info
@@ -0,0 +1,10 @@
+PRGNAM="acidwarp"
+VERSION="4.10+20221127_cf5e52f"
+HOMEPAGE="https://github.com/spkane/acidwarp"
+DOWNLOAD="https://github.com/spkane/acidwarp/archive/cf5e52ff7793df1cb2dffaf693b672b66cca3049/acidwarp-cf5e52ff7793df1cb2dffaf693b672b66cca3049.tar.gz"
+MD5SUM="0a3907c776e2a0280788efd7b00ca004"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="urchlay@slackware.uk"
diff --git a/games/acidwarp/doinst.sh b/games/acidwarp/doinst.sh
new file mode 100644
index 0000000000..65c7e2eeb9
--- /dev/null
+++ b/games/acidwarp/doinst.sh
@@ -0,0 +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 -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/games/acidwarp/slack-desc b/games/acidwarp/slack-desc
new file mode 100644
index 0000000000..80d06f1e7d
--- /dev/null
+++ b/games/acidwarp/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+acidwarp: acidwarp (display geometric images and rotate the palette)
+acidwarp:
+acidwarp: Acid Warp is an eye-candy program. Run it and watch the pretty
+acidwarp: colors. Each picture is the graphic representation of a mathematical
+acidwarp: function.
+acidwarp:
+acidwarp: Package build options: SDL @SDLVER@, @RENDER@ rendering.
+acidwarp:
+acidwarp:
+acidwarp:
+acidwarp: