From 20bba793e8899adb0bdf37dafe6793cc7bc121bb Mon Sep 17 00:00:00 2001 From: Robert Clausecker Date: Fri, 23 Apr 2021 16:18:46 +0200 Subject: [PATCH 1/3] New port: games/nbsdgames: 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 --- games/Makefile | 1 + games/nbsdgames/Makefile | 27 ++++++++++++++++++ games/nbsdgames/distinfo | 3 ++ games/nbsdgames/files/patch-Makefile | 35 ++++++++++++++++++++++++ games/nbsdgames/pkg-descr | 11 ++++++++ games/nbsdgames/pkg-plist | 41 ++++++++++++++++++++++++++++ 6 files changed, 118 insertions(+) create mode 100644 games/nbsdgames/Makefile create mode 100644 games/nbsdgames/distinfo create mode 100644 games/nbsdgames/files/patch-Makefile create mode 100644 games/nbsdgames/pkg-descr create mode 100644 games/nbsdgames/pkg-plist 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..8306d6756eba --- /dev/null +++ b/games/nbsdgames/Makefile @@ -0,0 +1,27 @@ +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 + +CFLAGS+= -I${NCURSESINC} -I${NCURSESBASE}/include +MAKE_ARGS+= GAMES_DIR=${PREFIX}/bin \ + SCORES_DIR=/var/games/nbsdgames \ + MAN_DIR=${PREFIX}/share/man/man6 + +post-install: +.for game in jewels sudoku mines reversi checkers battleship rabbithole sos pipes fifteen memoblocks fisher muncher miketron redsquare darrt snakeduel + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${game} +.endfor + +.include 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 -- 2.31.1