Files
haikuports/media-libs/sdl2_sound/sdl2_sound-2.0.1~06112022.recipe

99 lines
2.6 KiB
Bash

SUMMARY="Simple Direct Media Layer sound library"
DESCRIPTION="SDL_sound is a library that handles the decoding of several popular sound file \
formats, such as .WAV and .MP3.
It is meant to make the programmer's sound playback tasks simpler.
The programmer gives SDL_sound a filename, or feeds it data directly from one of many sources, \
and then reads the decoded waveform data back at her leisure.
If resource constraints are a concern, SDL_sound can process sound data in programmer-specified \
blocks.
Alternately, SDL_sound can decode a whole sound file and hand back a single pointer to the \
whole waveform.
SDL_sound can also handle sample rate, audio format, and channel conversion on-the-fly and \
behind-the-scenes, if the programmer desires."
HOMEPAGE="http://www.icculus.org/SDL_sound
https://github.com/icculus/SDL_sound"
COPYRIGHT="2022 Ryan C. Gordon"
LICENSE="Zlib"
REVISION="2"
srcGitRev="6cb07c21fab468be5f6a8b4c00c1b29697a9cc7a"
SOURCE_URI="https://github.com/icculus/SDL_sound/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="7cc58b9088023726d0b6adefc8de1775bf22b8f1e6dea788770f3a5519f49804"
SOURCE_DIR="SDL_sound-$srcGitRev"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
commandBinDir=$binDir
commandSuffix=$secondaryArchSuffix
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
libVersion="2.0.1"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
sdl2_sound$secondaryArchSuffix = $portVersion
lib:libSDL2_sound$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libSDL2_2.0$secondaryArchSuffix
"
PROVIDES_devel="
sdl2_sound${secondaryArchSuffix}_devel = $portVersion
devel:libSDL2_sound$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
sdl2_sound$secondaryArchSuffix == $portVersion base
"
PROVIDES_tools="
sdl2_sound${secondaryArchSuffix}_tools = $portVersion
cmd:playsound$commandSuffix = $portVersion compat >= 2
"
REQUIRES_tools="
sdl2_sound$secondaryArchSuffix == $portVersion base
haiku$secondaryArchSuffix
lib:libSDL2_2.0$secondaryArchSuffix
"
CONFLICTS_tools="
sdl_sound${secondaryArchSuffix}_tools
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libSDL2_2.0$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
"
BUILD()
{
cmake -Bbuild -S. -DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs \
-DCMAKE_INSTALL_BINDIR=$commandBinDir \
-DSDLSOUND_BUILD_STATIC=OFF
make -C build $jobArgs
}
INSTALL()
{
make -C build install
prepareInstalledDevelLib libSDL2_sound
fixPkgconfig
packageEntries devel \
$developDir \
$libDir/cmake
packageEntries tools \
$commandBinDir
}