aboutsummaryrefslogtreecommitdiff
path: root/games/z26/statify.sh
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2018-01-23 13:50:45 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-01-27 07:43:52 +0700
commit217af619cac6afb4ac6f7b63d78efac273b79a08 (patch)
treeab5bf592ce65ed32465d87af2103bc10c593fd0e /games/z26/statify.sh
parent35cd4675691967bb8b0636f1365c4e48467696cb (diff)
games/z26: Add 64-bit support.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'games/z26/statify.sh')
-rw-r--r--games/z26/statify.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/games/z26/statify.sh b/games/z26/statify.sh
new file mode 100644
index 0000000000000..91a0abd094b17
--- /dev/null
+++ b/games/z26/statify.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# z26 is written partly in x86 (32-bit) assembly, so it can't be built
+# for 64-bit. So the solution for running it on pure 64-bit systems is
+# to use a static binary that doesn't require any 32-bit libs.
+
+# Run this script on a 32-bit host *with VDSO disabled*, to generate
+# the binary used for the 64-bit build.
+
+# Notes:
+# - libgcc_s.so has to be included or else z26 dumps core on exit.
+# - libaoss and libasound are needed because z26 doesn't use SDL's
+# sound API, it talks directly to OSS via /dev/dsp.
+# - libudev is needed for SDL to detect the mouse.
+# - If you run "file" on the statified binary, it looks dynamic:
+# $ file /usr/games/z26
+# /usr/games/z26: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, stripped
+# ...but ldd says it's "not a dynamic executable". This is normal
+# for statified binaries.
+# - Do not attempt to strip the statified binary. It will break.
+
+statifier --set=LD_PRELOAD=/usr/lib/libudev.so:/usr/lib/libaoss.so:/usr/lib/libasound.so:/usr/lib/libgcc_s.so /usr/games/z26 z26.static