Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 May 2021 00:08:21 GMT
From:      Li-Wen Hsu <lwhsu@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: cd4b02d068b2 - main - games/nbsdgames: (new port) 17 text-based modern games
Message-ID:  <202105240008.14O08L5n074790@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by lwhsu:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cd4b02d068b203b0eeed5d7477c9ca54705e2c3b

commit cd4b02d068b203b0eeed5d7477c9ca54705e2c3b
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2021-04-23 14:18:46 +0000
Commit:     Li-Wen Hsu <lwhsu@FreeBSD.org>
CommitDate: 2021-05-24 00:07:45 +0000

    games/nbsdgames: (new port) 17 text-based modern games
    
    A collection of terminal games including, Jewels, Sudoku, Mines,
    Reversi, Checkers, Battleship, SOS,  Rabbithole, Pipes, Fifteen,
    Memoblocks, Fisher, Muncher, Miketron, Redsquare, Darrt, and Snakeduel.
    
    The difficulty and/or dimensions are adjustable through simple command
    line options, you can play a minesweeper game that take hours to
    complete, or exprience hexadecimal sudoku and 8x8 fifteen-like puzzles!
    
    Play on xterm for best experience.
    
    WWW: https://github.com/abakh/nbsdgames
    
    PR:     255346
---
 games/Makefile                       |  1 +
 games/nbsdgames/Makefile             | 45 ++++++++++++++++++++++++++++++++++++
 games/nbsdgames/distinfo             |  3 +++
 games/nbsdgames/files/patch-Makefile | 35 ++++++++++++++++++++++++++++
 games/nbsdgames/pkg-descr            | 11 +++++++++
 games/nbsdgames/pkg-plist            | 41 ++++++++++++++++++++++++++++++++
 6 files changed, 136 insertions(+)

diff --git a/games/Makefile b/games/Makefile
index 330fa66447e4..065babe2c7fa 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -627,6 +627,7 @@
     SUBDIR += naev-data
     SUBDIR += narcissu2
     SUBDIR += nazghul
+    SUBDIR += nbsdgames
     SUBDIR += nehquake
     SUBDIR += neo-cowsay
     SUBDIR += nethack32
diff --git a/games/nbsdgames/Makefile b/games/nbsdgames/Makefile
new file mode 100644
index 000000000000..2097cb835b1e
--- /dev/null
+++ b/games/nbsdgames/Makefile
@@ -0,0 +1,45 @@
+PORTNAME=	nbsdgames
+DISTVERSIONPREFIX=	v
+DISTVERSION=	4.1.1
+CATEGORIES=	games
+
+MAINTAINER=	fuz@fuz.su
+COMMENT=	17 text-based modern games
+
+LICENSE=	CC0-1.0
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=	ncurses
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	abakh
+
+MAKE_ARGS+=	GAMES_DIR=${PREFIX}/bin \
+		MAN_DIR=${PREFIX}/share/man/man6 \
+		SCORES_DIR=/var/games/nbsdgames
+CFLAGS+=	-I${NCURSESINC} -I${NCURSESBASE}/include
+
+_GAMES=	battleship \
+	checkers \
+	darrt \
+	fifteen \
+	fisher \
+	jewels \
+	memoblocks \
+	miketron \
+	mines \
+	muncher \
+	pipes \
+	rabbithole \
+	redsquare \
+	reversi \
+	snakeduel \
+	sos \
+	sudoku \
+
+post-install:
+.for game in ${_GAMES}
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${game}
+.endfor
+
+.include <bsd.port.mk>
diff --git a/games/nbsdgames/distinfo b/games/nbsdgames/distinfo
new file mode 100644
index 000000000000..ae1322d62244
--- /dev/null
+++ b/games/nbsdgames/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1621250633
+SHA256 (abakh-nbsdgames-v4.1.1_GH0.tar.gz) = 85d4de6530ed34a9ac24317a724247162d6839644b2106d494718f37e68e72da
+SIZE (abakh-nbsdgames-v4.1.1_GH0.tar.gz) = 49596
diff --git a/games/nbsdgames/files/patch-Makefile b/games/nbsdgames/files/patch-Makefile
new file mode 100644
index 000000000000..00cd15fc084b
--- /dev/null
+++ b/games/nbsdgames/files/patch-Makefile
@@ -0,0 +1,35 @@
+--- Makefile.orig	2021-05-05 17:39:38 UTC
++++ Makefile
+@@ -6,7 +6,7 @@
+ GAMES_DIR?=/usr/games
+ SCORES_DIR?=/var/games
+ MAN_DIR?=/usr/share/man/man6
+-CFLAGS+=  -Wno-unused-result -D SCORES_DIR=\"$(SCORES_DIR)\"
++CFLAGS+= ${CPPFLAGS} -Wno-unused-result -D SCORES_DIR=\"$(SCORES_DIR)\"
+ LDFLAGS+= -lncurses -lm
+ 
+ 
+@@ -16,11 +16,11 @@ SCORE_FILES= pipes_scores jewels_scores miketron_score
+ all: $(ALL)
+ 
+ scorefiles:
+-	for sf in $(SCORE_FILES); do touch $(SCORES_DIR)/$$sf ; chmod 664 $(SCORES_DIR)/$$sf; chown :games $(SCORES_DIR)/$$sf ; done;
+-	for game in $(ALL); do chown :games $(GAMES_DIR)/$$game; chmod g+s $(GAMES_DIR)/$$game ; done;
++	mkdir -p ${DESTDIR}${SCORES_DIR}
++	for sf in $(SCORE_FILES); do touch ${DESTDIR}$(SCORES_DIR)/$$sf.sample; done;
+ 
+ manpages:
+-	cp man/* $(MAN_DIR)
++	cp man/* ${DESTDIR}$(MAN_DIR)
+ jewels: jewels.c config.h common.h
+ 	$(CC) jewels.c $(LDFLAGS) $(CFLAGS) -o ./jewels
+ sudoku: sudoku.c config.h 
+@@ -60,6 +60,6 @@ clean:
+ 	rm $(ALL)
+ uninstall:
+ 	for game in $(ALL); do rm $(GAMES_DIR)/$$game; rm $(MAN_DIR)/$$game.6.gz done;
+-install: $(ALL)
+-	cp $(ALL) $(GAMES_DIR)
++install: $(ALL) manpages scorefiles
++	cp $(ALL) ${DESTDIR}$(GAMES_DIR)
+ 
diff --git a/games/nbsdgames/pkg-descr b/games/nbsdgames/pkg-descr
new file mode 100644
index 000000000000..42d2a56e1ea2
--- /dev/null
+++ b/games/nbsdgames/pkg-descr
@@ -0,0 +1,11 @@
+A collection of terminal games including, Jewels, Sudoku, Mines,
+Reversi, Checkers, Battleship, SOS,  Rabbithole, Pipes, Fifteen,
+Memoblocks, Fisher, Muncher, Miketron, Redsquare, Darrt, and Snakeduel.
+
+The difficulty and/or dimensions are adjustable through simple command
+line options, you can play a minesweeper game that take hours to
+complete, or exprience hexadecimal sudoku and 8x8 fifteen-like puzzles!
+
+Play on xterm for best experience.
+
+WWW: https://github.com/abakh/nbsdgames
diff --git a/games/nbsdgames/pkg-plist b/games/nbsdgames/pkg-plist
new file mode 100644
index 000000000000..ac26f2075057
--- /dev/null
+++ b/games/nbsdgames/pkg-plist
@@ -0,0 +1,41 @@
+bin/battleship
+bin/checkers
+@(,games,2555) bin/darrt
+bin/fifteen
+@(,games,2555) bin/fisher
+@(,games,2555) bin/jewels
+bin/memoblocks
+@(,games,2555) bin/miketron
+bin/mines
+@(,games,2555) bin/muncher
+@(,games,2555) bin/pipes
+bin/rabbithole
+bin/redsquare
+bin/reversi
+bin/snakeduel
+bin/sos
+bin/sudoku
+@dir(,games) /var/games/nbsdgames
+@sample(,games,0664) /var/games/nbsdgames/darrt_scores.sample
+@sample(,games,0664) /var/games/nbsdgames/fisher_scores.sample
+@sample(,games,0664) /var/games/nbsdgames/jewels_scores.sample
+@sample(,games,0664) /var/games/nbsdgames/muncher_scores.sample
+@sample(,games,0664) /var/games/nbsdgames/miketron_scores.sample
+@sample(,games,0664) /var/games/nbsdgames/pipes_scores.sample
+share/man/man6/battleship.6.gz
+share/man/man6/checkers.6.gz
+share/man/man6/darrt.6.gz
+share/man/man6/fifteen.6.gz
+share/man/man6/fisher.6.gz
+share/man/man6/jewels.6.gz
+share/man/man6/memoblocks.6.gz
+share/man/man6/miketron.6.gz
+share/man/man6/mines.6.gz
+share/man/man6/muncher.6.gz
+share/man/man6/pipes.6.gz
+share/man/man6/rabbithole.6.gz
+share/man/man6/redsquare.6.gz
+share/man/man6/reversi.6.gz
+share/man/man6/snakeduel.6.gz
+share/man/man6/sos.6.gz
+share/man/man6/sudoku.6.gz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105240008.14O08L5n074790>