gnu: Add kafs-client
[jackhill/guix/guix.git] / gnu / packages / patches / bsd-games-dont-install-empty-files.patch
1 Those games rely on user to provide the files to write scores in.
2 Those score-files are initially empty. Anyway, the Store is read-only.
3 So we do not install those empty files.
4
5 diff -Naur bsd-games-2.17/install-score.in bsd-games-patch/install-score.in
6 --- bsd-games-2.17/install-score.in 1970-01-01 07:00:00.000000000 +0700
7 +++ bsd-games-patch/install-score.in 2020-04-22 21:41:47.810544804 +0700
8 @@ -1,45 +0,0 @@
9 -# install-score.in - install a score file
10 -#
11 -# Copyright (c) 1997, 1998, 1999 Joseph Samuel Myers.
12 -# All rights reserved.
13 -#
14 -# Redistribution and use in source and binary forms, with or without
15 -# modification, are permitted provided that the following conditions
16 -# are met:
17 -# 1. Redistributions of source code must retain the above copyright
18 -# notice, this list of conditions and the following disclaimer.
19 -# 2. Redistributions in binary form must reproduce the above copyright
20 -# notice, this list of conditions and the following disclaimer in the
21 -# documentation and/or other materials provided with the distribution.
22 -# 3. The name of the author may not be used to endorse or promote products
23 -# derived from this software without specific prior written permission.
24 -#
25 -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
26 -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
27 -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28 -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
29 -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
30 -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31 -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
32 -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
33 -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 -# SUCH DAMAGE.
36 -
37 -set -e
38 -
39 -if [ "$1" = "-p" ]; then
40 - scorefile="@install_prefix@$2"
41 - perms=@vardata_perms_priv@
42 -else
43 - scorefile="@install_prefix@$1"
44 - perms=@vardata_perms@
45 -fi
46 -
47 -mkdir -p "$(dirname "$scorefile")"
48 -
49 -test -e "$scorefile" || touch "$scorefile"
50 -if [ @do_chown@ = y ]; then
51 - chown @vardata_owner@:@vardata_group@ "$scorefile"
52 -fi
53 -chmod "$perms" "$scorefile"
54 diff -Naur bsd-games-2.17/phantasia/Makefrag bsd-games-patch/phantasia/Makefrag
55 --- bsd-games-2.17/phantasia/Makefrag 1970-01-01 07:00:00.000000000 +0700
56 +++ bsd-games-patch/phantasia/Makefrag 2020-04-22 21:26:00.162409464 +0700
57 @@ -27,9 +27,8 @@
58 # SUCH DAMAGE.
59
60 phantasia_DIRS := $(GAMESDIR) $(MAN6DIR) $(PHANTASIA_DIR)
61 -phantasia_VFILES1 := gold lastdead mess monsters motd void
62 -phantasia_VFILES2 := scoreboard characs
63 -phantasia_CLEANFILES := $(phantasia_VFILES1) $(phantasia_VFILES2) scorefiles.stamp
64 +phantasia_VFILES1 := monsters
65 +phantasia_CLEANFILES := $(phantasia_VFILES1) scorefiles.stamp
66
67 phantasia_all: phantasia/phantasia phantasia/phantasia.6 phantasia/scorefiles.stamp
68
69 @@ -43,9 +42,4 @@
70 (set -e; for f in $(phantasia_VFILES1); do \
71 cp phantasia/$$f $(INSTALL_PREFIX)$(PHANTASIA_DIR)/$$f; \
72 $(INSTALL_SCORE_FILE) $(PHANTASIA_DIR)/$$f; done)
73 - (set -e; for f in $(phantasia_VFILES2); do \
74 - if [ ! -e $(PHANTASIA_DIR)/$$f ]; then \
75 - cp phantasia/$$f $(INSTALL_PREFIX)$(PHANTASIA_DIR)/$$f; fi; done; \
76 - $(INSTALL_SCORE_FILE) $(PHANTASIA_DIR)/scoreboard; \
77 - $(INSTALL_SCORE_FILE) -p $(PHANTASIA_DIR)/characs)
78 $(INSTALL_MANUAL) phantasia/phantasia.6
79 diff -Naur bsd-games-2.17/sail/Makefrag bsd-games-patch/sail/Makefrag
80 --- bsd-games-2.17/sail/Makefrag 1970-01-01 07:00:00.000000000 +0700
81 +++ bsd-games-patch/sail/Makefrag 2020-04-22 21:26:48.701801676 +0700
82 @@ -34,5 +34,4 @@
83 $(INSTALL_SCORE_GAME) sail/sail $(INSTALL_PREFIX)$(GAMESDIR)/sail
84 $(HIDE_GAME) sail
85 $(INSTALL_SCORE_FILE) $(SAIL_SCOREFILE)
86 - $(INSTALL_SAIL_DIR) $(INSTALL_PREFIX)$(SAIL_DIR)
87 $(INSTALL_MANUAL) sail/sail.6