pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/AitDoB Import Ascent into the Depths of Beyond -...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b2ec65f262d2
branches:  trunk
changeset: 323993:b2ec65f262d2
user:      roy <roy%pkgsrc.org@localhost>
date:      Thu Oct 04 15:46:48 2018 +0000

description:
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:

 games/AitDoB/DESCR                  |   1 +
 games/AitDoB/Makefile               |  24 ++++++++++++++++++++
 games/AitDoB/PLIST                  |   2 +
 games/AitDoB/distinfo               |   8 ++++++
 games/AitDoB/patches/patch-Makefile |  32 ++++++++++++++++++++++++++
 games/AitDoB/patches/patch-ui.cc    |  44 +++++++++++++++++++++++++++++++++++++
 6 files changed, 111 insertions(+), 0 deletions(-)

diffs (135 lines):

diff -r f718b68a3194 -r b2ec65f262d2 games/AitDoB/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/AitDoB/DESCR        Thu Oct 04 15:46:48 2018 +0000
@@ -0,0 +1,1 @@
+Ascent into the Depths of Beyond -- A roguelike game
diff -r f718b68a3194 -r b2ec65f262d2 games/AitDoB/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/AitDoB/Makefile     Thu Oct 04 15:46:48 2018 +0000
@@ -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@localhost
+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 -r f718b68a3194 -r b2ec65f262d2 games/AitDoB/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/AitDoB/PLIST        Thu Oct 04 15:46:48 2018 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1 2018/10/04 15:46:48 roy Exp $
+bin/aitdob
diff -r f718b68a3194 -r b2ec65f262d2 games/AitDoB/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/AitDoB/distinfo     Thu Oct 04 15:46:48 2018 +0000
@@ -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 -r f718b68a3194 -r b2ec65f262d2 games/AitDoB/patches/patch-Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/AitDoB/patches/patch-Makefile       Thu Oct 04 15:46:48 2018 +0000
@@ -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 -r f718b68a3194 -r b2ec65f262d2 games/AitDoB/patches/patch-ui.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/games/AitDoB/patches/patch-ui.cc  Thu Oct 04 15:46:48 2018 +0000
@@ -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);



Home | Main Index | Thread Index | Old Index