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