From 3a40dc04f7ae89e49c2dd1b36ccebd5f8faef71e Mon Sep 17 00:00:00 2001 From: Xiangfu Liu Date: Wed, 20 Apr 2011 21:06:39 +0800 Subject: [PATCH] new package: ascii-paint, uses ASCII characters instead of pixels to draw images --- ascii-paint/Makefile | 37 +++++++++++++++++++ .../patches/001-pass-openwrt-CFLAGS.patch | 37 +++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 ascii-paint/Makefile create mode 100644 ascii-paint/patches/001-pass-openwrt-CFLAGS.patch diff --git a/ascii-paint/Makefile b/ascii-paint/Makefile new file mode 100644 index 0000000..9814119 --- /dev/null +++ b/ascii-paint/Makefile @@ -0,0 +1,37 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=ascii-paint +PKG_VERSION:=0.3 +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) + +include $(INCLUDE_DIR)/package.mk + +define Package/ascii-paint + MAINTAINER:="Xiangfu Liu" + SECTION:=libs + CATEGORY:=Libraries + TITLE:=Ascii-Paint + URL:=http://code.google.com/p/ascii-paint/ + DEPENDS:=@BROKEN +libtcod +endef + +define Package/ascii-paint/description +ASCII-Paint is a simple, open source painting program which uses ASCII characters instead of pixels to draw images. It was made to help rogue-like developers, though it can be used by anyone. +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 + +define Package/ascii-paint/install + $(INSTALL_DIR) $(1)/usr/lib +endef + +$(eval $(call BuildPackage,ascii-paint)) diff --git a/ascii-paint/patches/001-pass-openwrt-CFLAGS.patch b/ascii-paint/patches/001-pass-openwrt-CFLAGS.patch new file mode 100644 index 0000000..19a3896 --- /dev/null +++ b/ascii-paint/patches/001-pass-openwrt-CFLAGS.patch @@ -0,0 +1,37 @@ +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