1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2024-12-22 12:11:09 +02:00

ascii-paint: update to 0.3.1, compile fine now.

when running in nanonote. have one error: SDL cannot create window
This commit is contained in:
Xiangfu Liu 2011-04-22 13:30:51 +08:00
parent d938d67000
commit ba3ac45158
2 changed files with 16 additions and 46 deletions

View File

@ -1,15 +1,15 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ascii-paint
PKG_VERSION:=0.3
PKG_VERSION:=0.3.1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.zip
PKG_SOURCE_URL:=
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-src
UNPACK_CMD=unzip -d $(1)/../ $(DL_DIR)/$(PKG_SOURCE)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://ascii-paint.googlecode.com/files/
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/ascii-paint
MAINTAINER:="Xiangfu Liu" <xiangfu@sharism.cc>
@ -17,7 +17,7 @@ define Package/ascii-paint
CATEGORY:=Libraries
TITLE:=Ascii-Paint
URL:=http://code.google.com/p/ascii-paint/
DEPENDS:=@BROKEN +libtcod
DEPENDS:=+libtcod
endef
define Package/ascii-paint/description
@ -27,11 +27,18 @@ endef
TARGET_CFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-L$(STAGING_DIR)/usr/lib
MAKE_VARS+=TEMP=$(PKG_BUILD_DIR)/obj \
INCDIR=$(PKG_BUILD_DIR)/tcod
CMAKE_OPTIONS+= -DCMAKE_C_COMPILER=$(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CC) \
-DCMAKE_CXX_COMPILER=$(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CXX) \
-DQT_QMAKE_EXECUTABLE=$(STAGING_DIR_HOST)/bin/qmake \
-DQT_MOC_EXECUTABLE=$(STAGING_DIR_HOST)/bin/moc \
-DQT_UIC_EXECUTABLE=$(STAGING_DIR_HOST)/bin/uic \
-DQT_RCC_EXECUTABLE=$(STAGING_DIR_HOST)/bin/rcc
define Package/ascii-paint/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/ascii-paint
$(CP) $(PKG_BUILD_DIR)/ascii-paint $(1)/usr/lib/ascii-paint
$(CP) $(PKG_BUILD_DIR)/ascii-paint.cfg $(1)/usr/lib/ascii-paint
$(CP) $(PKG_BUILD_DIR)/terminal.png $(1)/usr/lib/ascii-paint
endef
$(eval $(call BuildPackage,ascii-paint))

View File

@ -1,37 +0,0 @@
diff --git a/Makefile b/Makefile
index 1ca688d..fbf1d8e 100644
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,24 @@
SRCDIR=.
-INCDIR=/home/shafqat/code/ascii-paint/tcod
-CFLAGS=$(FLAGS) -I$(SRCDIR) -I$(INCDIR) -Wall -g
-CC=gcc
-CPP=g++
+INCDIR?=/home/shafqat/code/ascii-paint/tcod
+CFLAGS:=$(CFLAGS) $(FLAGS) -I$(SRCDIR) -I$(INCDIR) -Wall -g
+CC?=gcc
+CPP?=g++
.SUFFIXES: .o .h .c .hpp .cpp
+CPP_FILES := $(wildcard ./*.cpp)
+CPP_OBJS := $(addprefix $(TEMP)/,$(notdir $(CPP_FILES:.cpp=.o)))
+
$(TEMP)/%.o : $(SRCDIR)/%.cpp
- $(CPP) $(CFLAGS) -o $@ -c $<
+ mkdir -p $(TEMP)
+ $(CXX) $(CFLAGS) -o $@ -c $<
$(TEMP)/%.o : $(SRCDIR)/%.c
+ mkdir -p $(TEMP)
$(CC) $(CFLAGS) -o $@ -c $<
-CPP_OBJS=$(TEMP)main.o
-
all : ascii-paint
ascii-paint : $(CPP_OBJS)
- $(CPP) $(CPP_OBJS) -o $@ -L. -ltcod -ltcod++
+ $(CXX) $(CFLAGS) $(CPP_OBJS) -o $@ -ltcod -ltcodxx
clean :
\rm -f $(CPP_OBJS) ascii-paint