jasper bc424771b1 from new maintainer Donovan Watteau:
"- update from 0.5.2 to 0.6.3, which fixes a lot of security issues and
  which makes the game playable online again.
- don't bother building on strict-alignment archs.  On loongson, both
  the client and the server SIGBUS during startup, and looking at the
  code it seems that it will crash on anything not x86 or ppc.
- don't include an extra copy of DejaVuSans.ttf.
- use audio/wavpack, not an internal copy.
- make sure an internal zlib is never used.
- invoke "bam" with -a, to make sure that it will abort on error.
- don't enforce stack protector, base gcc(1) enables it wherever
  it's possible.
- fix endianness detection (confirmed to work on macppc).
- drop patch-src_engine_client_ec_snd_c.  At first, I ported it to
  teeworlds-0.6.2, but actually this patch makes audio much worse
  for me, and I can't observe anymore the crash it was supposed
  to fix."

ok armani@
2015-12-27 17:56:22 +00:00

74 lines
2.6 KiB
Plaintext

$OpenBSD: patch-bam_lua,v 1.1 2015/12/27 17:56:22 jasper Exp $
- Don't enforce stack protector
- Don't hardcode python
- Make it possible to use wavpack as an external dependency (from Debian)
- Fix zlib external dependency (from Debian)
--- bam.lua.orig Wed May 1 13:47:39 2013
+++ bam.lua Thu May 8 16:13:57 2014
@@ -7,12 +7,12 @@ Import("other/freetype/freetype.lua")
--- Setup Config -------
config = NewConfig()
config:Add(OptCCompiler("compiler"))
-config:Add(OptTestCompileC("stackprotector", "int main(){return 0;}", "-fstack-protector -fstack-protector-all"))
config:Add(OptTestCompileC("minmacosxsdk", "int main(){return 0;}", "-mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk"))
config:Add(OptTestCompileC("macosxppc", "int main(){return 0;}", "-arch ppc"))
config:Add(OptLibrary("zlib", "zlib.h", false))
config:Add(SDL.OptFind("sdl", true))
config:Add(FreeType.OptFind("freetype", true))
+config:Add(OptLibrary("wavpack", "wavpack/wavpack.h", false))
config:Finalize("config.lua")
-- data compiler
@@ -20,7 +20,7 @@ function Script(name)
if family == "windows" then
return str_replace(name, "/", "\\")
end
- return "python " .. name
+ return "${MODPY_BIN} " .. name
end
function CHash(output, ...)
@@ -157,9 +157,6 @@ function build(settings)
settings.cc.flags:Add("-isysroot /Developer/SDKs/MacOSX10.5.sdk")
settings.link.flags:Add("-isysroot /Developer/SDKs/MacOSX10.5.sdk")
end
- elseif config.stackprotector.value == 1 then
- settings.cc.flags:Add("-fstack-protector", "-fstack-protector-all")
- settings.link.flags:Add("-fstack-protector", "-fstack-protector-all")
end
end
@@ -187,7 +184,7 @@ function build(settings)
end
-- compile zlib if needed
- if config.zlib.value == 1 then
+ if config.zlib.value then
settings.link.libs:Add("z")
if config.zlib.include_path then
settings.cc.includes:Add(config.zlib.include_path)
@@ -198,8 +195,20 @@ function build(settings)
settings.cc.includes:Add("src/engine/external/zlib")
end
+ -- compile wavpack if needed
+ if config.wavpack.value then
+ settings.link.libs:Add("wavpack")
+ if config.wavpack.include_path then
+ settings.cc.includes:Add(config.wavpack.include_path .. "/include")
+ settings.link.libpath:Add(config.wavpack.include_path .. "/lib")
+ end
+ wavpack = {}
+ else
+ wavpack = Compile(settings, Collect("src/engine/external/wavpack/*.c"))
+ settings.cc.includes:Add("src/engine/external")
+ end
+
-- build the small libraries
- wavpack = Compile(settings, Collect("src/engine/external/wavpack/*.c"))
pnglite = Compile(settings, Collect("src/engine/external/pnglite/*.c"))
-- build game components