summaryrefslogtreecommitdiff
path: root/package/sdl_mixer
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2008-03-07 13:31:33 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2008-03-07 13:31:33 +0000
commit6be5cb76b98091bc5623eb33776da94ce4715313 (patch)
treed5cbaffebfc4bfac2c3ab148037819ca38fc9213 /package/sdl_mixer
parent5f6726bdfdb141c1a5a750bc4180568601bd07c1 (diff)
buildroot: SDL_mixer package
Based on patch from Hebbar.
Diffstat (limited to 'package/sdl_mixer')
-rw-r--r--package/sdl_mixer/Config.in12
-rw-r--r--package/sdl_mixer/sdl_mixer.mk68
2 files changed, 80 insertions, 0 deletions
diff --git a/package/sdl_mixer/Config.in b/package/sdl_mixer/Config.in
new file mode 100644
index 000000000..2cc1457a7
--- /dev/null
+++ b/package/sdl_mixer/Config.in
@@ -0,0 +1,12 @@
+config BR2_PACKAGE_SDL_MIXER
+ bool "SDL_mixer"
+ default n
+ help
+
+ SDL_mixer is a sample multi-channel audio mixer library.
+ It supports any number of simultaneously playing channels of
+ 16 bit stereo audio, plus a single channel of music, mixed
+ by the popular MikMod MOD, Timidity MIDI, Ogg Vorbis, and
+ SMPEG MP3 libraries.
+
+ http://www.libsdl.org/projects/SDL_mixer/
diff --git a/package/sdl_mixer/sdl_mixer.mk b/package/sdl_mixer/sdl_mixer.mk
new file mode 100644
index 000000000..f6a8d4394
--- /dev/null
+++ b/package/sdl_mixer/sdl_mixer.mk
@@ -0,0 +1,68 @@
+#############################################################
+#
+# SDL_mixer
+#
+#############################################################
+SDL_MIXER_VERSION:=1.2.8
+SDL_MIXER_SOURCE:=SDL_mixer-$(SDL_MIXER_VERSION).tar.gz
+SDL_MIXER_SITE:=http://www.libsdl.org/projects/SDL_mixer/release/
+SDL_MIXER_CAT:=$(ZCAT)
+SDL_MIXER_DIR:=$(BUILD_DIR)/SDL_mixer-$(SDL_MIXER_VERSION)
+
+$(DL_DIR)/$(SDL_MIXER_SOURCE):
+ $(WGET) -P $(DL_DIR) $(SDL_MIXER_SITE)/$(SDL_MIXER_SOURCE)
+
+sdl_mixer-source: $(DL_DIR)/$(SDL_MIXER_SOURCE)
+
+$(SDL_MIXER_DIR)/.unpacked: $(DL_DIR)/$(SDL_MIXER_SOURCE)
+ $(SDL_MIXER_CAT) $(DL_DIR)/$(SDL_MIXER_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ $(CONFIG_UPDATE) $(SDL_MIXER_DIR)
+ touch $@
+
+$(SDL_MIXER_DIR)/.configured: $(SDL_MIXER_DIR)/.unpacked $(STAGING_DIR)/usr/lib/libSDL.so
+ (cd $(SDL_MIXER_DIR); rm -rf config.cache; \
+ $(TARGET_CONFIGURE_OPTS) \
+ $(TARGET_CONFIGURE_ARGS) \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --without-x \
+ --with-freetype-prefix=$(STAGING_DIR)/usr \
+ --with-sdl-prefix=$(STAGING_DIR)/usr \
+ )
+ touch $@
+
+$(SDL_MIXER_DIR)/.compiled: $(SDL_MIXER_DIR)/.configured
+ $(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(SDL_MIXER_DIR)
+ touch $@
+
+$(STAGING_DIR)/usr/lib/libSDL_mixer.so: $(SDL_MIXER_DIR)/.compiled
+ $(MAKE) DESTDIR=$(STAGING_DIR) -C $(SDL_MIXER_DIR) install
+ touch -c $@
+
+$(TARGET_DIR)/usr/lib/libSDL_mixer.so: $(STAGING_DIR)/usr/lib/libSDL_mixer.so
+ cp -dpf $(STAGING_DIR)/usr/lib/libSDL_mixer*.so* $(TARGET_DIR)/usr/lib/
+ -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libSDL_mixer*.so*
+
+sdl_mixer: uclibc $(TARGET_DIR)/usr/lib/libSDL_mixer.so
+
+sdl_mixer-clean:
+ rm -f $(TARGET_DIR)/usr/lib/libSDL_mixer*.so*
+ -$(MAKE) DESTDIR=$(STAGING_DIR) -C $(SDL_MIXER_DIR) uninstall
+ -$(MAKE) -C $(SDL_MIXER_DIR) clean
+
+sdl_mixer-dirclean:
+ rm -rf $(SDL_MIXER_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_SDL_MIXER)),y)
+TARGETS+=sdl_mixer
+endif