mirror of
git://projects.qi-hardware.com/openwrt-packages.git
synced 2024-11-29 13:09:43 +02:00
new package: libtcod for ascii-paint
This commit is contained in:
parent
815369ee91
commit
7ec9e95809
56
libtcod/Makefile
Normal file
56
libtcod/Makefile
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=libtcod
|
||||||
|
PKG_REV:=522
|
||||||
|
PKG_VERSION:=r$(PKG_REV)
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE_PROTO:=svn
|
||||||
|
PKG_SOURCE_VERSION:=$(PKG_REV)
|
||||||
|
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=http://doryen.eptalys.net/svn-libtcod/branches/1.5.0/
|
||||||
|
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/libtcod
|
||||||
|
MAINTAINER:="Xiangfu Liu" <xiangfu@sharism.cc>
|
||||||
|
SECTION:=libs
|
||||||
|
CATEGORY:=Libraries
|
||||||
|
TITLE:=Libtcod
|
||||||
|
URL:=http://www.autistici.org/bakunin/libtcod/doc/
|
||||||
|
DEPENDS:=+libpng +zlib +libsdl
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/libtcod/description
|
||||||
|
libtcod, a.k.a. “The Doryen Library”, is a free, fast, portable and uncomplicated API for roguelike developpers providing an advanced true color console, input, and lots of other utilities frequently used in roguelikes.
|
||||||
|
endef
|
||||||
|
|
||||||
|
TARGET_CFLAGS+=-fPIC
|
||||||
|
TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
|
||||||
|
|
||||||
|
MAKE_VARS+=TEMP=$(PKG_BUILD_DIR)/obj
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
$(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) \
|
||||||
|
$(MAKE_FLAGS) \
|
||||||
|
-f makefiles/makefile-linux \
|
||||||
|
release
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/InstallDev
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
|
$(CP) $(PKG_BUILD_DIR)/libtcod.so* $(1)/usr/lib/
|
||||||
|
$(CP) $(PKG_BUILD_DIR)/libtcodxx.so* $(1)/usr/lib/
|
||||||
|
$(CP) $(PKG_BUILD_DIR)/libtcodgui.so* $(1)/usr/lib/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/libtcod/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
|
$(CP) $(PKG_BUILD_DIR)/libtcod.so* $(1)/usr/lib/
|
||||||
|
$(CP) $(PKG_BUILD_DIR)/libtcodxx.so* $(1)/usr/lib/
|
||||||
|
$(CP) $(PKG_BUILD_DIR)/libtcodgui.so* $(1)/usr/lib/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,libtcod))
|
84
libtcod/patches/001-pass-openwrt-CFLAGS.patch
Normal file
84
libtcod/patches/001-pass-openwrt-CFLAGS.patch
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
diff -Naur libtcod-r522/makefiles/makefile-linux libtcod-r522.mod/makefiles/makefile-linux
|
||||||
|
--- libtcod-r522/makefiles/makefile-linux 2010-02-12 03:54:10.000000000 +0800
|
||||||
|
+++ libtcod-r522.mod/makefiles/makefile-linux 2011-04-20 19:20:36.595075461 +0800
|
||||||
|
@@ -6,8 +6,8 @@
|
||||||
|
|
||||||
|
#dependencies
|
||||||
|
# SDL
|
||||||
|
-SDL_FLAGS=`sdl-config --cflags`
|
||||||
|
-SDL_LIBS=`sdl-config --libs`
|
||||||
|
+SDL_FLAGS?=`sdl-config --cflags`
|
||||||
|
+SDL_LIBS?=`sdl-config --libs`
|
||||||
|
|
||||||
|
# ZLIB
|
||||||
|
ZLIB_FLAGS=
|
||||||
|
@@ -16,24 +16,24 @@
|
||||||
|
# PNG
|
||||||
|
PNG_LIBS=-lpng
|
||||||
|
|
||||||
|
-CFLAGS=$(FLAGS) -I$(INCDIR) -I$(INCDIR)/gui -Wall $(SDL_FLAGS) $(ZLIB_FLAGS) $(PNG_FLAGS) -fno-strict-aliasing
|
||||||
|
-TEMP=/tmp
|
||||||
|
-CC=gcc
|
||||||
|
-CPP=g++
|
||||||
|
+CFLAGS:=$(CFLAGS) $(FLAGS) -I$(INCDIR) -I$(INCDIR)/gui -Wall $(SDL_FLAGS) $(ZLIB_FLAGS) $(PNG_FLAGS) -fno-strict-aliasing
|
||||||
|
+TEMP?=/tmp
|
||||||
|
+CC?=gcc
|
||||||
|
+CXX?=g++
|
||||||
|
.SUFFIXES: a .o .h .c
|
||||||
|
|
||||||
|
$(TEMP)/libtcod/release/%.o : $(SRCDIR)/%.c
|
||||||
|
$(CC) $(CFLAGS) -O2 -s -o $@ -c $<
|
||||||
|
$(TEMP)/libtcod/release/%.o : $(SRCDIR)/%.cpp
|
||||||
|
- $(CPP) $(CFLAGS) -O2 -s -o $@ -c $<
|
||||||
|
+ $(CXX) $(CFLAGS) -O2 -s -o $@ -c $<
|
||||||
|
$(TEMP)/libtcod/release/gui/%.o : $(SRCDIR)/gui/%.cpp
|
||||||
|
- $(CPP) $(CFLAGS) -O2 -s -o $@ -c $<
|
||||||
|
+ $(CXX) $(CFLAGS) -O2 -s -o $@ -c $<
|
||||||
|
$(TEMP)/libtcod/debug/%.o : $(SRCDIR)/%.c
|
||||||
|
$(CC) $(CFLAGS) -g -o $@ -c $<
|
||||||
|
$(TEMP)/libtcod/debug/%.o : $(SRCDIR)/%.cpp
|
||||||
|
- $(CPP) $(CFLAGS) -g -o $@ -c $<
|
||||||
|
+ $(CXX) $(CFLAGS) -g -o $@ -c $<
|
||||||
|
$(TEMP)/libtcod/debug/gui/%.o : $(SRCDIR)/gui/%.cpp
|
||||||
|
- $(CPP) $(CFLAGS) -g -o $@ -c $<
|
||||||
|
+ $(CXX) $(CFLAGS) -g -o $@ -c $<
|
||||||
|
|
||||||
|
LIBOBJS_C_DEBUG= \
|
||||||
|
$(TEMP)/libtcod/debug/bresenham_c.o \
|
||||||
|
@@ -181,28 +181,28 @@
|
||||||
|
mkdir -p $@
|
||||||
|
|
||||||
|
libtcod.a : $(LIBOBJS_C_DEBUG)
|
||||||
|
- ar r $@ $(LIBOBJS_C_DEBUG)
|
||||||
|
+ $(AR) r $@ $(LIBOBJS_C_DEBUG)
|
||||||
|
|
||||||
|
libtcodxx.a : $(LIBOBJS_CPP_DEBUG)
|
||||||
|
- ar r $@ $(LIBOBJS_CPP_DEBUG)
|
||||||
|
+ $(AR) r $@ $(LIBOBJS_CPP_DEBUG)
|
||||||
|
|
||||||
|
libtcod.so : $(TEMP)/libtcod/release $(LIBOBJS_C_RELEASE)
|
||||||
|
- gcc -shared -Wl,-soname,$@ -o $@ $(LIBOBJS_C_RELEASE) $(ZLIB_LIBS) $(PNG_LIBS) $(SDL_LIBS) $(CFLAGS) $(OPENGL_LIB)
|
||||||
|
+ $(CC) -shared -Wl,-soname,$@ -o $@ $(LIBOBJS_C_RELEASE) $(CFLAGS) $(OPENGL_LIB) $(PNG_LIBS) $(SDL_LIBS) $(ZLIB_LIBS)
|
||||||
|
|
||||||
|
libtcodxx.so : $(TEMP)/libtcod/release $(LIBOBJS_CPP_RELEASE)
|
||||||
|
- gcc -shared -Wl,-soname,$@ -o $@ $(LIBOBJS_CPP_RELEASE) -L. -ltcod $(CFLAGS)
|
||||||
|
+ $(CC) -shared -Wl,-soname,$@ -o $@ $(LIBOBJS_CPP_RELEASE) -L. -ltcod $(CFLAGS)
|
||||||
|
|
||||||
|
libtcodgui.so : $(TEMP)/libtcod/release/gui $(GUIOBJS_RELEASE)
|
||||||
|
- gcc -shared -Wl,-soname,$@ -o $@ $(GUIOBJS_RELEASE) -L. -ltcod -ltcodxx $(CFLAGS)
|
||||||
|
+ $(CC) -shared -Wl,-soname,$@ -o $@ $(GUIOBJS_RELEASE) -L. -ltcod -ltcodxx $(CFLAGS)
|
||||||
|
|
||||||
|
libtcod_debug.so : $(TEMP)/libtcod/debug $(LIBOBJS_C_DEBUG)
|
||||||
|
- gcc -shared -Wl,-soname,$@ -o $@ $(LIBOBJS_C_DEBUG) $(ZLIB_LIBS) $(PNG_LIBS) $(SDL_LIBS) $(CFLAGS) $(OPENGL_LIB)
|
||||||
|
+ $(CC) -shared -Wl,-soname,$@ -o $@ $(LIBOBJS_C_DEBUG) $(ZLIB_LIBS) $(PNG_LIBS) $(SDL_LIBS) $(CFLAGS) $(OPENGL_LIB)
|
||||||
|
|
||||||
|
libtcodxx_debug.so : $(TEMP)/libtcod/debug $(LIBOBJS_CPP_DEBUG)
|
||||||
|
- gcc -shared -Wl,-soname,$@ -o $@ $(LIBOBJS_CPP_DEBUG) -L. -ltcod_debug $(CFLAGS)
|
||||||
|
+ $(CC) -shared -Wl,-soname,$@ -o $@ $(LIBOBJS_CPP_DEBUG) -L. -ltcod_debug $(CFLAGS)
|
||||||
|
|
||||||
|
libtcodgui_debug.so : $(TEMP)/libtcod/debug/gui $(GUIOBJS_DEBUG)
|
||||||
|
- gcc -shared -Wl,-soname,$@ -o $@ $(GUIOBJS_DEBUG) -L. -ltcod_debug -ltcodxx_debug $(CFLAGS)
|
||||||
|
+ $(CC) -shared -Wl,-soname,$@ -o $@ $(GUIOBJS_DEBUG) -L. -ltcod_debug -ltcodxx_debug $(CFLAGS)
|
||||||
|
|
||||||
|
clean :
|
||||||
|
\rm -f $(LIBOBJS_C_RELEASE) $(LIBOBJS_CPP_RELEASE) $(GUIOBJS_RELEASE) $(LIBOBJS_C_DEBUG) $(LIBOBJS_CPP_DEBUG) $(GUIOBJS_DEBUG) libtcod.a libtcodxx.a libtcod.so libtcodxx.so libtcodgui.so libtcod_debug.so libtcodxx_debug.so libtcodgui_debug.so libtcodpy.pyc
|
Loading…
Reference in New Issue
Block a user