# HG changeset patch # User Volker Grabsch # Date 1266173977 -3600 # Node ID 9232c79dac70c5a0c75ddde6270cda248e4fe2b1 # Parent 0967c751db7aaf4b659ada2c0bfbe438fbddbe7b bugfix and test program for package sdl_mixer diff -r 0967c751db7a -r 9232c79dac70 src/sdl_mixer-test.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/sdl_mixer-test.c Sun Feb 14 19:59:37 2010 +0100 @@ -0,0 +1,16 @@ +/* This file is part of mingw-cross-env. */ +/* See doc/index.html for further information. */ + +#include + +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 -r 0967c751db7a -r 9232c79dac70 src/sdl_mixer.mk --- a/src/sdl_mixer.mk Sun Feb 14 19:59:01 2010 +0100 +++ b/src/sdl_mixer.mk Sun Feb 14 19:59:37 2010 +0100 @@ -20,6 +20,12 @@ 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 @@ 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