diff options
author | joerg <joerg@pkgsrc.org> | 2016-04-04 17:32:17 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2016-04-04 17:32:17 +0000 |
commit | eb9623691eb247d91b66f7dc56c91c2067f8a9f1 (patch) | |
tree | 489191c13d30a77623ef3753e6d7a4673c004a82 /emulators | |
parent | 1734690196ccc15546f9275af289d8541536a176 (diff) | |
download | pkgsrc-eb9623691eb247d91b66f7dc56c91c2067f8a9f1.tar.gz |
Don't introduce target specific flags for Clang. Fix clang handling in
the Lua build script and avoid alloca issues on NetBSD.
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/mame/distinfo | 4 | ||||
-rw-r--r-- | emulators/mame/patches/patch-makefile | 16 | ||||
-rw-r--r-- | emulators/mame/patches/patch-scripts_genie.lua | 74 |
3 files changed, 93 insertions, 1 deletions
diff --git a/emulators/mame/distinfo b/emulators/mame/distinfo index 27e98bd7e69..581b8abf445 100644 --- a/emulators/mame/distinfo +++ b/emulators/mame/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.48 2016/03/04 12:47:13 wiz Exp $ +$NetBSD: distinfo,v 1.49 2016/04/04 17:32:17 joerg Exp $ SHA1 (mame-0.171.tar.gz) = 53a6c72b2b8c11e72e622c14cb4d2ec710c1dbd5 RMD160 (mame-0.171.tar.gz) = 7f0468d0240f3dd7f927eb135925d7ad78a66464 @@ -9,4 +9,6 @@ SHA1 (patch-3rdparty_bx_include_bx_thread.h) = 779c8b750a3ae5d50d12c6430678ada64 SHA1 (patch-3rdparty_libuv_src_unix_netbsd.c) = 63d2378c19cbbcb71d7540e088c3bdf5940f4dc6 SHA1 (patch-3rdparty_luv_deps_uv.cmake) = 619cebcb8013139d765c2dfe2bcf7b5b86f50681 SHA1 (patch-3rdparty_luv_src_dns.c) = 44d480e34971362ee696191c267dbac08005ec0f +SHA1 (patch-makefile) = 620a9ca0884479f9624dfd8720e9cdbd9afcd1a7 +SHA1 (patch-scripts_genie.lua) = abcdc05a019761b815ce22991062ca546ae2f711 SHA1 (patch-scripts_src_3rdparty.lua) = 306917af65da601667ffc9ffaf7b8092a2d03ef7 diff --git a/emulators/mame/patches/patch-makefile b/emulators/mame/patches/patch-makefile new file mode 100644 index 00000000000..7a98c2d1884 --- /dev/null +++ b/emulators/mame/patches/patch-makefile @@ -0,0 +1,16 @@ +$NetBSD: patch-makefile,v 1.14 2016/04/04 17:32:17 joerg Exp $ + +--- makefile.orig 2016-04-04 07:38:18.519192767 +0000 ++++ makefile +@@ -806,11 +806,6 @@ ifeq ($(CLANG_VERSION),) + $(info GCC $(GCC_VERSION) detected) + else + $(info Clang $(CLANG_VERSION) detected) +-ifeq ($(ARCHITECTURE),_x64) +-ARCHITECTURE := _x64_clang +-else +-ARCHITECTURE := _x86_clang +-endif + endif + ifneq ($(PYTHON_AVAILABLE),python) + $(error Python is not available in path) diff --git a/emulators/mame/patches/patch-scripts_genie.lua b/emulators/mame/patches/patch-scripts_genie.lua new file mode 100644 index 00000000000..301ad338aec --- /dev/null +++ b/emulators/mame/patches/patch-scripts_genie.lua @@ -0,0 +1,74 @@ +$NetBSD: patch-scripts_genie.lua,v 1.1 2016/04/04 17:32:17 joerg Exp $ + +Detect clang correctly. +Use GNU version of the C++ standard to avoid trouble with alloca on NetBSD. + +--- scripts/genie.lua.orig 2016-04-04 07:47:22.946297308 +0000 ++++ scripts/genie.lua +@@ -692,12 +692,12 @@ local version = str_to_version(_OPTIONS[ + if string.find(_OPTIONS["gcc"], "clang") and ((version < 30500) or (_OPTIONS["targetos"]=="macosx" and (version <= 60000))) then + buildoptions_cpp { + "-x c++", +- "-std=c++1y", ++ "-std=gnu++1y", + } + + buildoptions_objc { + "-x objective-c++", +- "-std=c++1y", ++ "-std=gnu++1y", + } + else + if _OPTIONS["targetos"]=="os2" then +@@ -708,13 +708,13 @@ else + else + buildoptions_cpp { + "-x c++", +- "-std=c++14", ++ "-std=gnu++14", + } + end + + buildoptions_objc { + "-x objective-c++", +- "-std=c++14", ++ "-std=gnu++14", + } + end + -- this speeds it up a bit by piping between the preprocessor/compiler/assembler +@@ -955,7 +955,17 @@ end + + + local version = str_to_version(_OPTIONS["gcc_version"]) +- if string.find(_OPTIONS["gcc"], "clang") then ++ if _OPTIONS["clang_version"] == "" then ++ if (version < 40900) then ++ print("GCC version 4.9 or later needed") ++ os.exit(-1) ++ end ++ buildoptions { ++ "-Wno-unused-result", -- needed for fgets,fread on linux ++ -- array bounds checking seems to be buggy in 4.8.1 (try it on video/stvvdp1.c and video/model1.c without -Wno-array-bounds) ++ "-Wno-array-bounds", ++ } ++ else + if (version < 30400) then + print("Clang version 3.4 or later needed") + os.exit(-1) +@@ -981,16 +991,6 @@ end + "-Wno-tautological-undefined-compare", + } + end +- else +- if (version < 40900) then +- print("GCC version 4.9 or later needed") +- os.exit(-1) +- end +- buildoptions { +- "-Wno-unused-result", -- needed for fgets,fread on linux +- -- array bounds checking seems to be buggy in 4.8.1 (try it on video/stvvdp1.c and video/model1.c without -Wno-array-bounds) +- "-Wno-array-bounds", +- } + end + end + |