Add Klystron (development-only package)

This commit is contained in:
Adrien Destugues
2015-04-05 22:57:31 +02:00
parent b7fed8588f
commit 8a8b2def99
2 changed files with 89 additions and 5 deletions

View File

@@ -0,0 +1,86 @@
HOMEPAGE="https://github.com/kometbomb/klystron/"
SUMMARY="Framework designed for remaking Thrust"
DESCRIPTION="This is a simple framework designed for remaking Thrust, the best \
game that was ever created.
So far the biggest project using the framework is klystrack, a chiptune \
tracker that uses the klystron sound engine for great success.
Some selling points:
* Sound synthesis for music and effects
* Low system requirements (the audio engine uses about 20 % CPU time on a 366 MHz Dingoo, at 22 Khz)
* Pixel-accurate sprite-sprite and sprite-background collision checking
* C99 (GNU99)
* SDL
* GUI stuff for simple mouse control
In short: the feature set is something that could be found inside an generic \
video game console circa 1991. The API is relatively simple, yet uses some \
(stupid) tricks. The main goal is to provide pixel-accurate collisions which \
is a very important feature for a thrustlike game. The synth and the music \
routine are thrown in just for fun.
"
SRC_URI="git+https://github.com/kometbomb/klystron.git#2ba7342c1a0a5af36e027bc0f9019d347040edcf"
REVISION="1"
LICENSE="MIT"
COPYRIGHT="2009-2015 Tero Lindeman (kometbomb)"
ARCHITECTURES=""
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
# x86_gcc2 is fine as primary target architecture as long as we're building
# for a different secondary architecture.
ARCHITECTURES="$ARCHITECTURES x86_gcc2"
else
ARCHITECTURES="$ARCHITECTURES !x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
klystron$secondaryArchSuffix = $portVersion
devel:libengine_gfx$secondaryArchSuffix
devel:libengine_gui$secondaryArchSuffix
devel:libengine_snd$secondaryArchSuffix
devel:libengine_util$secondaryArchSuffix
"
BUILD_REQUIRES="
devel:libsdl2$secondaryArchSuffix
devel:libsdl2_mixer$secondaryArchSuffix
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:make
"
BUILD()
{
make
}
INSTALL()
{
mkdir -p $libDir
cp bin.debug/*.a $libDir
prepareInstalledDevelLibs libengine_gfx libengine_gui libengine_snd \
libengine_util
mkdir -p $includeDir
cp src/*.h $includeDir
mkdir -p $includeDir/gfx
cp src/gfx/*.h $includeDir/gfx
mkdir -p $includeDir/gui
cp src/gui/*.h $includeDir/gui
mkdir -p $includeDir/snd
cp src/snd/*.h $includeDir/snd
mkdir -p $includeDir/util
cp src/util/*.h $includeDir/util
}

View File

@@ -24,7 +24,6 @@ PROVIDES="
REQUIRES="
haiku${secondaryArchSuffix}
lib:libSDL2_2.0${secondaryArchSuffix}
lib:libGL$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:libpng$secondaryArchSuffix
lib:libstdc++$secondaryArchSuffix
@@ -37,8 +36,7 @@ REQUIRES="
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libGL${secondaryArchSuffix}
devel:libSDL2${secondaryArchSuffix}
devel:libsdl2${secondaryArchSuffix}
devel:libjpeg$secondaryArchSuffix
devel:libpng$secondaryArchSuffix
devel:libtiff$secondaryArchSuffix
@@ -67,8 +65,8 @@ BUILD()
aclocal --install -I acinclude
autoconf
dos2unix miniz.h
runConfigure ./configure --enable-jpg-shared=false --enable-png-shared=false \
--enable-tif-shared=false --enable-webp-shared=false
runConfigure ./configure --enable-jpg-shared=no --enable-png-shared=no \
--enable-tif-shared=no --enable-webp-shared=no
make $jobArgs
}