freebsd-ports/games/nbsdgames/files/patch-Makefile
Robert Clausecker 03c4407ac9 games/nbsdgames: update to 5
From ChangeLog: https://github.com/abakh/nbsdgames/releases/tag/v5

 * icon and menu shortcut included
 * tugow added
 * menu added
 * sudoku algorithm is replaced with a simple and fast algorithm that
   generates good puzzles in little time
 * miketron gameplay is improved upon
 * RedSquare now fits in the screen
 * command-line options are now in more conventional, getopt syntax
 * minor bug fixes

PR:	261778
Reported by:	fuz@fuz.su (maintainer)
2022-02-08 10:15:36 +01:00

37 lines
1.2 KiB
Text

--- Makefile.orig 2022-02-02 12:39:13 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} -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 $(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
@@ -66,8 +66,8 @@ clean:
for game in $(ALL); do rm $$game; done;
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)
test:
for game in $(ALL); do ./$$game ;done;