summaryrefslogtreecommitdiff
path: root/games/AitDoB
diff options
context:
space:
mode:
authorroy <roy@pkgsrc.org>2018-10-04 15:46:48 +0000
committerroy <roy@pkgsrc.org>2018-10-04 15:46:48 +0000
commit71cf36b1e0446fa6dc3d83cdea69ada7997e9462 (patch)
treeddfdb87fb367e07b8aed6b9ac0cd0edd2551f62c /games/AitDoB
parentbe2b47494d3a181d310a1513755068e5c7870070 (diff)
downloadpkgsrc-71cf36b1e0446fa6dc3d83cdea69ada7997e9462.tar.gz
Import Ascent into the Depths of Beyond -- A roguelike game
No release, so used a commit ref from github. Patches added to allow NetBSD curses to be used although it will not display entirely correctly unless you use NetBSD-8.1 or ncurses.
Diffstat (limited to 'games/AitDoB')
-rw-r--r--games/AitDoB/DESCR1
-rw-r--r--games/AitDoB/Makefile24
-rw-r--r--games/AitDoB/PLIST2
-rw-r--r--games/AitDoB/distinfo8
-rw-r--r--games/AitDoB/patches/patch-Makefile32
-rw-r--r--games/AitDoB/patches/patch-ui.cc44
6 files changed, 111 insertions, 0 deletions
diff --git a/games/AitDoB/DESCR b/games/AitDoB/DESCR
new file mode 100644
index 00000000000..d9deddde0c6
--- /dev/null
+++ b/games/AitDoB/DESCR
@@ -0,0 +1 @@
+Ascent into the Depths of Beyond -- A roguelike game
diff --git a/games/AitDoB/Makefile b/games/AitDoB/Makefile
new file mode 100644
index 00000000000..d718a5d6f3e
--- /dev/null
+++ b/games/AitDoB/Makefile
@@ -0,0 +1,24 @@
+# $NetBSD: Makefile,v 1.1 2018/10/04 15:46:48 roy Exp $
+#
+
+DISTNAME= AitDoB-0.0.20120330
+CATEGORIES= games
+MASTER_SITES= ${MASTER_SITE_GITHUB:=jaldhar/}
+GITHUB_TAG= facbecc3cd621efabfcfe5a910cb2da70745fe46
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= https://github.com/jaldhar/AitDoB
+COMMENT= Ascent into the Depths of Beyond -- A roguelike game
+LICENSE= public-domain
+
+USE_CURSES= ripoffline
+USE_LANGUAGES= c++
+
+BUILD_TARGET= aitdob
+LDFLAGS+= -l${BUILDLINK_LIBNAME.curses}
+
+# Install to /usr/pkg/bin
+MAKE_ENV+= GAMESDIR=/bin
+
+.include "../../mk/curses.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/games/AitDoB/PLIST b/games/AitDoB/PLIST
new file mode 100644
index 00000000000..5f4223a0cde
--- /dev/null
+++ b/games/AitDoB/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2018/10/04 15:46:48 roy Exp $
+bin/aitdob
diff --git a/games/AitDoB/distinfo b/games/AitDoB/distinfo
new file mode 100644
index 00000000000..09a41d9d47b
--- /dev/null
+++ b/games/AitDoB/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.1 2018/10/04 15:46:48 roy Exp $
+
+SHA1 (AitDoB-0.0.20120330-facbecc3cd621efabfcfe5a910cb2da70745fe46.tar.gz) = ad0dd5ad349c43b0a0aef5d62c2957c7820bbee3
+RMD160 (AitDoB-0.0.20120330-facbecc3cd621efabfcfe5a910cb2da70745fe46.tar.gz) = 35390709a2970d98c710cebc1b3c285acfc6c0a8
+SHA512 (AitDoB-0.0.20120330-facbecc3cd621efabfcfe5a910cb2da70745fe46.tar.gz) = 531454d225564a9100c777c80e2800dd7cbd665bdaa9c00c1b6f81dab048ac5e93f77d44782334f215b5e0c3b325c7ab78ed07d21236ecc6450b5f0185ece824
+Size (AitDoB-0.0.20120330-facbecc3cd621efabfcfe5a910cb2da70745fe46.tar.gz) = 9978 bytes
+SHA1 (patch-Makefile) = ebcfbf4b20f6e61bf731cdf4f6dbee2f3f985ddd
+SHA1 (patch-ui.cc) = d7d06589f232e36f138e8ead4b4d9c4b25f6d716
diff --git a/games/AitDoB/patches/patch-Makefile b/games/AitDoB/patches/patch-Makefile
new file mode 100644
index 00000000000..2276380f395
--- /dev/null
+++ b/games/AitDoB/patches/patch-Makefile
@@ -0,0 +1,32 @@
+$NetBSD: patch-Makefile,v 1.1 2018/10/04 15:46:48 roy Exp $
+
+Allow pkgsrc to influence the building and installation.
+
+diff --git a/Makefile b/Makefile
+index 0cf8efb..b033f86 100644
+--- Makefile
++++ Makefile
+@@ -1,7 +1,9 @@
+-CXX=g++
+-CXXFLAGS=-std=c++0x -pedantic -O2 -g -Wall -Wextra $(shell ncurses5-config --cflags)
+-LDFLAGS=$(shell ncurses5-config --libs) -lstdc++
+-PREFIX=/usr/local
++CXX?=g++
++CXXFLAGS+=-std=c++0x -pedantic -O2 -g -Wall -Wextra $(shell ncurses5-config --cflags)
++LDFLAGS+=$(shell ncurses5-config --libs) -lstdc++
++INSTALL?=install
++PREFIX?=/usr/local
++GAMESDIR?=/games
+
+ OBJECTS= aitdob.o \
+ combat.o \
+@@ -18,7 +20,8 @@ aitdob: $(OBJECTS)
+ $(CXX) $(OBJECTS) -o aitdob $(LDFLAGS)
+
+ install: aitdob
+- install -oroot -groot -m0755 -s aitdob $(PREFIX)/games
++ $(INSTALL) -d $(DESTDIR)$(PREFIX)$(GAMESDIR)
++ $(INSTALL) -m0755 aitdob $(DESTDIR)$(PREFIX)$(GAMESDIR)
+
+ clean:
+ -rm aitdob $(OBJECTS)
diff --git a/games/AitDoB/patches/patch-ui.cc b/games/AitDoB/patches/patch-ui.cc
new file mode 100644
index 00000000000..545ff553983
--- /dev/null
+++ b/games/AitDoB/patches/patch-ui.cc
@@ -0,0 +1,44 @@
+$NetBSD: patch-ui.cc,v 1.1 2018/10/04 15:46:48 roy Exp $
+
+Support NetBSD curses.
+Don't assume that stdscr is at y 0.
+
+diff --git a/ui.cc b/ui.cc
+index c8e7bb4..564e964 100644
+--- ui.cc
++++ ui.cc
+@@ -133,6 +133,11 @@ void Ui::init() {
+ signal (SIGINT, end_sig);
+ signal (SIGSEGV, end_sig);
+
++ ripoffline(1, createMessageWin);
++ ripoffline(-1, createStatusWin);
++ initscr();
++ keypad(stdscr, TRUE);
++
+ _viewport = 0;
+ _lines = 0;
+ _cols = 0;
+@@ -158,11 +163,6 @@ void Ui::init() {
+ _keybindings['n'] = &Game::move_downright;
+ _keybindings[KEY_RESIZE] = &Game::resize;
+
+- ripoffline(1, createMessageWin);
+- ripoffline(-1, createStatusWin);
+- initscr();
+- keypad(stdscr, TRUE);
+-
+ if (has_colors()) {
+ start_color();
+ init_pair(1, COLOR_BLACK, COLOR_WHITE);
+@@ -215,7 +215,9 @@ void Ui::resize() {
+ wbkgd(stdscr, ' ');
+
+ if (!_viewport) {
+- _viewport = subwin(stdscr, _lines, _cols, 0, 0);
++ int begy, begx;
++ getbegyx(stdscr, begy, begx);
++ _viewport = subwin(stdscr, _lines, _cols, begy, begx);
+ }
+ else {
+ wresize(_viewport, _lines, _cols);