From: Michael Büsch Date: Mon, 4 Jan 2010 21:06:15 +0000 (+0000) Subject: Add SDL_mixer X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=148e9a304326020d2a6b1f614240ec8d182feb3b;ds=sidebyside Add SDL_mixer SVN-Revision: 19037 --- diff --git a/libs/libsdl_mixer/Makefile b/libs/libsdl_mixer/Makefile new file mode 100644 index 0000000000..97f1621c70 --- /dev/null +++ b/libs/libsdl_mixer/Makefile @@ -0,0 +1,66 @@ +# +# Copyright (C) 2010 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=libsdl-mixer +PKG_VERSION:=1.2.11 +PKG_RELEASE:=1 + +PKG_SOURCE:=SDL_mixer-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.libsdl.org/projects/SDL_mixer/release/ +PKG_MD5SUM:=65ada3d997fe85109191a5fb083f248c +PKG_BUILD_DIR:=$(BUILD_DIR)/SDL_mixer-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/libsdl-mixer + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Simple DirectMedia Layer Sound Mixer + URL:=http://www.libsdl.org/projects/SDL_mixer/ + DEPENDS:=+libsdl +libmikmod +endef + +define Package/libsdl-mixer/description + SDL_mixer is a sample multi-channel audio mixer library. +endef + +TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/SDL + +CONFIGURE_ARGS += \ + --with-sdl-exec-prefix=$(PKG_BUILD_DIR) + +define Build/Configure + $(INSTALL_DIR) $(PKG_BUILD_DIR)/bin + $(INSTALL_BIN) ./files/sdl-config $(PKG_BUILD_DIR)/bin/ + $(call Build/Configure/Default) +endef + +define Build/Compile + rm -rf $(PKG_INSTALL_DIR) + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include/SDL $(1)/usr/lib + $(CP) \ + $(PKG_INSTALL_DIR)/usr/include/SDL/SDL_mixer.h \ + $(1)/usr/include/SDL/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libSDL_mixer*.{a,so*} \ + $(1)/usr/lib/ +endef + +define Package/libsdl-mixer/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libSDL_mixer*.so.* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libsdl-mixer)) diff --git a/libs/libsdl_mixer/files/sdl-config b/libs/libsdl_mixer/files/sdl-config new file mode 100755 index 0000000000..e496baf66b --- /dev/null +++ b/libs/libsdl_mixer/files/sdl-config @@ -0,0 +1,3 @@ +#!/bin/sh +# Fake sdl-config +echo "-lSDL -ldirect -ldirectfb -lfusion"