From 106f87c1d67a32e9d4e720c54b2ddcee72cd6b6c Mon Sep 17 00:00:00 2001 From: Mirko Lindner Date: Mon, 8 Feb 2010 15:53:18 +0100 Subject: [PATCH] add libsdl-image Signed-off-by: Mirko Lindner --- libsdl-image/Makefile | 63 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 libsdl-image/Makefile diff --git a/libsdl-image/Makefile b/libsdl-image/Makefile new file mode 100644 index 0000000..27091d8 --- /dev/null +++ b/libsdl-image/Makefile @@ -0,0 +1,63 @@ +# +# 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-image +PKG_VERSION:=1.2.10 +PKG_RELEASE:=1 + +PKG_SOURCE:=SDL_image-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.libsdl.org/projects/SDL_image/release/ +PKG_MD5SUM:=6c06584b31559e2b59f2b982d0d1f628 +PKG_BUILD_DIR:=$(BUILD_DIR)/SDL_image-$(PKG_VERSION) + +include $(INCLUDE_DIR)/package.mk + +define Package/libsdl-image + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Simple DirectMedia Layer Image + URL:=http://www.libsdl.org/projects/SDL_image/ + DEPENDS:=+libsdl +endef + +define Package/libsdl-image/description + SDL_image is an image loading library that is used with the SDL library, and almost as portable. It allows a programmer to use multiple image formats without having to code all the loading and conversion algorithms themselves. +endef + +TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/SDL + +CONFIGURE_ARGS += \ + --with-sdl-exec-prefix=$(STAGING_DIR) + +CONFIGURE_VARS += \ + LIBS="-lSDL -ldirect -ldirectfb -lfusion" + +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_image.h \ + $(1)/usr/include/SDL/ + $(CP) \ + $(PKG_INSTALL_DIR)/usr/lib/libSDL_image*.{a,so*} \ + $(1)/usr/lib/ +endef + +define Package/libsdl-image/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libSDL_image*.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libsdl-image))