From f7f554502213859c9add20626cc17dcbc70aae63 Mon Sep 17 00:00:00 2001 From: kyak Date: Sat, 31 Jul 2010 21:43:12 +0400 Subject: [PATCH] worm - the growing worm game of bsd-games --- bsd-games/Makefile | 20 ++++++++++++++++++++ bsd-games/patches/003-worm.patch | 26 ++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 bsd-games/patches/003-worm.patch diff --git a/bsd-games/Makefile b/bsd-games/Makefile index ccadfb7..7ff0bcf 100644 --- a/bsd-games/Makefile +++ b/bsd-games/Makefile @@ -37,6 +37,10 @@ define Build/Compile cd $(PKG_BUILD_DIR)/primes; \ $(TARGET_CC) -c -O2 -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings pattern.c pr_tbl.c primes.c; \ $(TARGET_CC) -lm -o primes pattern.o pr_tbl.o primes.o + +#Building worm + cd $(PKG_BUILD_DIR)/worm; \ + $(TARGET_CC) -lncurses -L$(STAGING_DIR)/usr/lib -I$(STAGING_DIR)/usr/include -O2 -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -o worm worm.c endef define Package/tetris @@ -69,5 +73,21 @@ define Package/primes/install $(1)/usr/bin/primes endef +define Package/worm +$(call Package/bsd-games) + TITLE:=The growing worm game + DEPENDS:=+libncurses +endef + +define Package/worm/install + $(INSTALL_DIR) \ + $(1)/usr/bin + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/worm/worm \ + $(1)/usr/bin/worm +endef + $(eval $(call BuildPackage,tetris)) $(eval $(call BuildPackage,primes)) +$(eval $(call BuildPackage,worm)) diff --git a/bsd-games/patches/003-worm.patch b/bsd-games/patches/003-worm.patch new file mode 100644 index 0000000..9705c2e --- /dev/null +++ b/bsd-games/patches/003-worm.patch @@ -0,0 +1,26 @@ +diff -u bsd-games-2.17/worm/worm.c bsd-games-2.17-p/worm/worm.c +--- bsd-games-2.17/worm/worm.c 2004-01-27 23:52:07.000000000 +0300 ++++ bsd-games-2.17-p/worm/worm.c 2010-07-31 21:36:08.313419076 +0400 +@@ -30,18 +30,18 @@ + */ + + #include +-#ifndef lint ++/*#ifndef lint + __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\ + The Regents of the University of California. All rights reserved.\n"); +-#endif /* not lint */ ++#endif */ /* not lint */ + +-#ifndef lint ++/* #ifndef lint + #if 0 + static char sccsid[] = "@(#)worm.c 8.1 (Berkeley) 5/31/93"; + #else + __RCSID("$NetBSD: worm.c,v 1.25 2004/01/27 20:30:31 jsm Exp $"); + #endif +-#endif /* not lint */ ++#endif */ /* not lint */ + + /* + * Worm. Written by Michael Toy