summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Grabsch <vog@notjusthosting.com>2010-02-14 18:59:37 (GMT)
committerVolker Grabsch <vog@notjusthosting.com>2010-02-14 18:59:37 (GMT)
commit862598bd53e2ca19e08d222d85196294904ff0bd (patch)
tree72fef3416f166f44ec76bc1f47a2fd4fa81ee02b
parentfbd9ed2ae26c8a661db568cc441defea834a07f9 (diff)
downloadmxe-862598bd53e2ca19e08d222d85196294904ff0bd.zip
mxe-862598bd53e2ca19e08d222d85196294904ff0bd.tar.gz
mxe-862598bd53e2ca19e08d222d85196294904ff0bd.tar.bz2
bugfix and test program for package sdl_mixer
-rw-r--r--src/sdl_mixer-test.c16
-rw-r--r--src/sdl_mixer.mk13
2 files changed, 29 insertions, 0 deletions
diff --git a/src/sdl_mixer-test.c b/src/sdl_mixer-test.c
new file mode 100644
index 0000000..7972eb1
--- /dev/null
+++ b/src/sdl_mixer-test.c
@@ -0,0 +1,16 @@
+/* This file is part of mingw-cross-env. */
+/* See doc/index.html for further information. */
+
+#include <SDL_mixer.h>
+
+int main(int argc, char* argv[])
+{
+ int initted;
+
+ (void)argc;
+ (void)argv;
+
+ initted = Mix_Init(MIX_INIT_FLAC | MIX_INIT_OGG | MIX_INIT_MOD);
+ Mix_Quit();
+ return 0;
+}
diff --git a/src/sdl_mixer.mk b/src/sdl_mixer.mk
index 25f4ad1..2fd7248 100644
--- a/src/sdl_mixer.mk
+++ b/src/sdl_mixer.mk
@@ -20,6 +20,12 @@ define $(PKG)_UPDATE
endef
define $(PKG)_BUILD
+ $(SED) 's,^\(Requires:.*\),\1 vorbisfile,' -i '$(1)/SDL_mixer.pc.in'
+ echo \
+ 'Libs.private:' \
+ "`$(PREFIX)/$(TARGET)/bin/libmikmod-config --libs`" \
+ "`$(PREFIX)/$(TARGET)/bin/smpeg-config --libs`" \
+ >> '$(1)/SDL_mixer.pc.in'
$(SED) 's,for path in /usr/local; do,for path in; do,' -i '$(1)/configure'
cd '$(1)' && ./configure \
--host='$(TARGET)' \
@@ -40,4 +46,11 @@ define $(PKG)_BUILD
LIBMIKMOD_CONFIG='$(PREFIX)/$(TARGET)/bin/libmikmod-config' \
LIBS='-lvorbis -logg'
$(MAKE) -C '$(1)' -j '$(JOBS)' install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
+
+ '$(TARGET)-gcc' \
+ -W -Wall -Werror -ansi -pedantic \
+ `'$(TARGET)-pkg-config' SDL_mixer --cflags` \
+ '$(2).c' \
+ `'$(TARGET)-pkg-config' SDL_mixer --libs` \
+ -o '$(PREFIX)/$(TARGET)/bin/test-sdl_mixer.exe'
endef