aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-03-08 00:08:55 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2025-03-15 09:19:23 +0700
commitad151539dc2b91037aa04601db7a471c36ee3192 (patch)
tree955a5d14998200ce61be0e5269a61f7ded07d5b8 /games
parent32614c52b48201c50cbbc7fae4f5cf082415a82d (diff)
games/frotz: Fix parallel build heisenbug.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games')
-rw-r--r--games/frotz/frotz.SlackBuild11
-rw-r--r--games/frotz/sdl.parallel.fix.diff21
2 files changed, 32 insertions, 0 deletions
diff --git a/games/frotz/frotz.SlackBuild b/games/frotz/frotz.SlackBuild
index f82cb815e5..dc10cd106a 100644
--- a/games/frotz/frotz.SlackBuild
+++ b/games/frotz/frotz.SlackBuild
@@ -9,6 +9,10 @@
# Original had no license. This modified version is released under the
# WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+# 20250308 bkw:
+# - fix a race condition in src/sdl/Makefile, which was causing the
+# build to randomly fail on systems with more cores than I have.
+
# 20250222 bkw:
# - fix build when libmodplug not installed.
# - fix xfrotz build.
@@ -91,6 +95,13 @@ chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+# 20250308 bkw: fix parallel builds. src/sdl/Makefile has a problem:
+# make only checks for file existence, it can't tell that another
+# make rule is still appending stuff to the file.
+# Without this patch, the build fails 50% of the time on at least
+# one system (though I couldn't get it to fail on mine).
+patch -p1 < $CWD/sdl.parallel.fix.diff
+
# Fix typos:
sed -i "s/\\(Unlike it\\)'s/\1s/" doc/dfrotz.6
sed -i 's,forground,foreground,' doc/frotz.6
diff --git a/games/frotz/sdl.parallel.fix.diff b/games/frotz/sdl.parallel.fix.diff
new file mode 100644
index 0000000000..1c216d7054
--- /dev/null
+++ b/games/frotz/sdl.parallel.fix.diff
@@ -0,0 +1,21 @@
+diff -Naur frotz-2.55/src/sdl/Makefile frotz-2.55.patched/src/sdl/Makefile
+--- frotz-2.55/src/sdl/Makefile 2025-02-01 17:36:37.000000000 -0500
++++ frotz-2.55.patched/src/sdl/Makefile 2025-03-08 00:36:25.410732578 -0500
+@@ -35,16 +35,7 @@
+ $(CC) $(CFLAGS) $(SDL_CFLAGS) -fPIC -fpic -o $@ -c $<
+
+ $(DEFINES):
+- @echo "** Generating $@"
+- @echo "/* This file was automatically generated by the build process. */" > $@
+- @echo "/* These are defines specific to the SDL interface. */" >> $@
+- @echo >> $@
+- @echo "#ifndef SDL_DEFINES_H" >> $@
+- @echo "#define SDL_DEFINES_H" >> $@
+-ifeq ($(SOUND_TYPE),none)
+- @echo "#define NO_SOUND" >> $@
+-endif
+- @echo "#endif /* SDL_DEFINES_H */" >> $@
++ @echo > $@
+
+ clean:
+ -rm -f $(TARGET) $(OBJECTS) $(DEPS) $(DEFINES)