-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
games/acidwarp: Added (eye-candy program).
- Loading branch information
1 parent
e5fe738
commit 43e6b4d
Showing
7 changed files
with
203 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
#!/bin/bash | ||
|
||
# Slackware build script for acidwarp | ||
|
||
# Written by B. Watson ([email protected]) | ||
|
||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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="[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: |