aboutsummaryrefslogtreecommitdiff
path: root/audio/sdl2_sound
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2022-03-31 14:45:59 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2022-03-31 18:36:12 +0000
commit7059a13adc92a19a89653671e065e9d2dd968a4c (patch)
tree1b0605eb6ac348b7717ebfca2fecf687e926a339 /audio/sdl2_sound
parent332714f7d6c9666b4ff9eb4aee5ccda2e8bdae69 (diff)
downloadports-7059a13adc92a19a89653671e065e9d2dd968a4c.tar.gz
ports-7059a13adc92a19a89653671e065e9d2dd968a4c.zip
audio/sdl2_sound: add port: Abstract SDL soundfile decoder
- Add the latest version of sdl_sound with support for USE_SDL=sound2. - Note that this is sdl2-only library, so audio/sdl_sound, which is sdl1-only library, remains in the tree and is not affected. I've had to rename playsound binary this port also installs to avoid the conflict. - The library now contains all the decoder code, so no external depends and options are needed any longer. I've added MIDI option though, since upstream has it disabled by default due to different license.
Diffstat (limited to 'audio/sdl2_sound')
-rw-r--r--audio/sdl2_sound/Makefile43
-rw-r--r--audio/sdl2_sound/distinfo3
-rw-r--r--audio/sdl2_sound/pkg-descr14
-rw-r--r--audio/sdl2_sound/pkg-plist6
4 files changed, 66 insertions, 0 deletions
diff --git a/audio/sdl2_sound/Makefile b/audio/sdl2_sound/Makefile
new file mode 100644
index 000000000000..07e901e76e04
--- /dev/null
+++ b/audio/sdl2_sound/Makefile
@@ -0,0 +1,43 @@
+PORTNAME= sdl2_sound
+DISTVERSIONPREFIX= v
+DISTVERSION= 2.0.1
+CATEGORIES= audio
+
+MAINTAINER= amdmi3@FreeBSD.org
+COMMENT= Abstract SDL soundfile decoder
+
+LICENSE= ZLIB
+LICENSE_FILE_ZLIB=${WRKSRC}/LICENSE.txt
+
+USES= cmake sdl
+USE_SDL= sdl2
+USE_GITHUB= yes
+GH_ACCOUNT= icculus
+GH_PROJECT= SDL_sound
+USE_LDCONFIG= yes
+
+PORTDOCS= *
+PORTEXAMPLES= *
+
+OPTIONS_DEFINE= MIDI DOCS EXAMPLES
+OPTIONS_DEFAULT=MIDI
+
+MIDI_DESC= MIDI support
+MIDI_CMAKE_BOOL=SDLSOUND_DECODER_MIDI
+MIDI_VARS= LICENSE+=ART10 \
+ LICENSE_COMB=multi \
+ LICENSE_FILE_ART10=${WRKSRC}/src/timidity/COPYING
+
+post-install:
+ @cd ${STAGEDIR}${PREFIX}/bin && ${MV} playsound playsound2
+
+post-install-DOCS-on:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ cd ${WRKSRC}/docs && ${INSTALL_DATA} CHANGELOG.txt \
+ CREDITS.txt README.txt ${STAGEDIR}${DOCSDIR}
+
+post-install-EXAMPLES-on:
+ @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ ${INSTALL_DATA} ${WRKSRC}/examples/*.c ${STAGEDIR}${EXAMPLESDIR}
+
+.include <bsd.port.mk>
diff --git a/audio/sdl2_sound/distinfo b/audio/sdl2_sound/distinfo
new file mode 100644
index 000000000000..fe9a77ff4686
--- /dev/null
+++ b/audio/sdl2_sound/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1648728983
+SHA256 (icculus-SDL_sound-v2.0.1_GH0.tar.gz) = 3527f05b7a3f00d8523cf25671598c85568b4e8b615ce7570113b44cbb7d555c
+SIZE (icculus-SDL_sound-v2.0.1_GH0.tar.gz) = 443682
diff --git a/audio/sdl2_sound/pkg-descr b/audio/sdl2_sound/pkg-descr
new file mode 100644
index 000000000000..5126766ed9f4
--- /dev/null
+++ b/audio/sdl2_sound/pkg-descr
@@ -0,0 +1,14 @@
+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.
+
+WWW: https://icculus.org/SDL_sound/
+WWW: https://github.com/icculus/SDL_sound
diff --git a/audio/sdl2_sound/pkg-plist b/audio/sdl2_sound/pkg-plist
new file mode 100644
index 000000000000..51db3494f23c
--- /dev/null
+++ b/audio/sdl2_sound/pkg-plist
@@ -0,0 +1,6 @@
+bin/playsound2
+include/SDL2/SDL_sound.h
+lib/libSDL2_sound.a
+lib/libSDL2_sound.so
+lib/libSDL2_sound.so.2
+lib/libSDL2_sound.so.2.0.1