1SUMMARY="Simple Direct Media Layer sound library"
2DESCRIPTION="sdl_sound handles the decoding of several popular file \
3formats, such as .WAV and .MP3.  It aims to make the programmer's sound \
4playback tasks simpler."
5HOMEPAGE="http://www.icculus.org/SDL_sound"
6COPYRIGHT="2001-2009 Ryan C. Gordon"
7LICENSE="GNU LGPL v2.1"
8REVISION="10"
9SOURCE_URI="http://icculus.org/SDL_sound/downloads/SDL_sound-$portVersion.tar.gz"
10CHECKSUM_SHA256="3999fd0bbb485289a52be14b2f68b571cb84e380cc43387eadf778f64c79e6df"
11SOURCE_DIR="SDL_sound-$portVersion"
12
13ARCHITECTURES="all"
14SECONDARY_ARCHITECTURES="x86_gcc2 x86"
15
16PROVIDES="
17	sdl_sound$secondaryArchSuffix = $portVersion
18	lib:libSDL_sound_1.0$secondaryArchSuffix = 1.0.2 compat >= 1
19	"
20REQUIRES="
21	haiku$secondaryArchSuffix
22	lib:libFLAC$secondaryArchSuffix
23	lib:libmikmod$secondaryArchSuffix
24	lib:libmodplug$secondaryArchSuffix
25	lib:libogg$secondaryArchSuffix
26	lib:libSDL_1.2$secondaryArchSuffix
27	lib:libsmpeg_0.4$secondaryArchSuffix
28	lib:libspeex$secondaryArchSuffix
29	lib:libvorbis$secondaryArchSuffix
30	lib:libvorbisfile$secondaryArchSuffix
31	"
32
33PROVIDES_devel="
34	sdl_sound${secondaryArchSuffix}_devel = $portVersion compat >= 1
35	devel:libsdl_sound$secondaryArchSuffix = 1.0.2 compat >= 1
36	devel:libsdl_sound_1.0$secondaryArchSuffix = 1.0.2 compat >= 1
37	"
38REQUIRES_devel="
39	sdl_sound$secondaryArchSuffix == $portVersion base
40	"
41
42PROVIDES_tools="
43	sdl_sound${secondaryArchSuffix}_tools = $portVersion
44	cmd:playsound$secondaryArchSuffix = $portVersion compat >= 1
45	cmd:playsound_simple$secondaryArchSuffix = $portVersion compat >= 1
46	"
47REQUIRES_tools="
48	sdl_sound$secondaryArchSuffix == $portVersion base
49	haiku$secondaryArchSuffix
50	lib:libFLAC$secondaryArchSuffix
51	lib:libmikmod$secondaryArchSuffix
52	lib:libmodplug$secondaryArchSuffix
53	lib:libogg$secondaryArchSuffix
54	lib:libSDL_1.2$secondaryArchSuffix
55	lib:libsmpeg_0.4$secondaryArchSuffix
56	lib:libspeex$secondaryArchSuffix
57	lib:libvorbis$secondaryArchSuffix
58	lib:libvorbisfile$secondaryArchSuffix
59	"
60
61BUILD_REQUIRES="
62	haiku${secondaryArchSuffix}_devel
63	devel:libFLAC$secondaryArchSuffix
64	devel:libmikmod$secondaryArchSuffix
65	devel:libmodplug$secondaryArchSuffix
66	devel:libogg$secondaryArchSuffix
67	devel:libSDL_1.2$secondaryArchSuffix
68	devel:libsmpeg_0.4$secondaryArchSuffix
69	devel:libspeex$secondaryArchSuffix
70	devel:libvorbis$secondaryArchSuffix
71	"
72BUILD_PREREQUIRES="
73	cmd:aclocal
74	cmd:autoconf
75	cmd:gcc$secondaryArchSuffix
76	cmd:ld$secondaryArchSuffix
77	cmd:libtoolize$secondaryArchSuffix
78	cmd:make
79	cmd:pkg_config$secondaryArchSuffix
80	cmd:sdl_config$secondaryArchSuffix
81	cmd:smpeg_config$secondaryArchSuffix
82	"
83
84BUILD()
85{
86	sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.in
87	touch NEWS AUTHORS ChangeLog
88	autoreconf -fi
89	CPPFLAGS="$CPPFLAGS `smpeg-config${secondaryArchSuffix/_/-} --cflags`" \
90		runConfigure ./configure --disable-static
91	make
92}
93
94INSTALL()
95{
96	make install
97
98	# remove libtool library file
99	rm $libDir/libSDL_sound.la
100
101	prepareInstalledDevelLibs libSDL_sound \
102					libSDL_sound-1.0
103	fixPkgconfig
104
105	packageEntries devel \
106			$developDir
107
108	packageEntries tools \
109		$binDir
110
111}
112