diff options
author | joerg <joerg@pkgsrc.org> | 2016-12-25 21:44:35 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2016-12-25 21:44:35 +0000 |
commit | cc59dfda51f8758911a10d03063f24fc1f10ed3f (patch) | |
tree | 2614496671d5ec1eb442e1bea64164dd54f35f12 /emulators/mame | |
parent | 5822067ee5cc69921f3f3e77d8ed39b123884ea0 (diff) | |
download | pkgsrc-cc59dfda51f8758911a10d03063f24fc1f10ed3f.tar.gz |
Fix clang detection again.
Diffstat (limited to 'emulators/mame')
-rw-r--r-- | emulators/mame/distinfo | 6 | ||||
-rw-r--r-- | emulators/mame/patches/patch-makefile | 17 | ||||
-rw-r--r-- | emulators/mame/patches/patch-scripts_genie.lua | 52 |
3 files changed, 64 insertions, 11 deletions
diff --git a/emulators/mame/distinfo b/emulators/mame/distinfo index 8edd27e77cf..3838a07ee79 100644 --- a/emulators/mame/distinfo +++ b/emulators/mame/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.59 2016/11/05 10:05:26 wiz Exp $ +$NetBSD: distinfo,v 1.60 2016/12/25 21:44:35 joerg Exp $ SHA1 (mame-0.179.tar.gz) = 6ae1b932fc73767199ea388a625081578b5075ef RMD160 (mame-0.179.tar.gz) = cd6405238b451fe18c2bde04beb3806a75bf2af3 @@ -6,5 +6,5 @@ SHA512 (mame-0.179.tar.gz) = e600c29fd6c0df03f011d581830170ee5cabba06312e1aa5204 Size (mame-0.179.tar.gz) = 115928011 bytes SHA1 (patch-3rdparty_asio_include_asio_detail_config.hpp) = 9b0d6139e853d8efb9d51270bbfa5382feac42a7 SHA1 (patch-3rdparty_bgfx_examples_common_font_font__manager.cpp) = e39b2dff553505531adb5f0a31b0a22306b8e2e4 -SHA1 (patch-makefile) = 0b42791f1d6a11b6ce168bd57a995987e692ab52 -SHA1 (patch-scripts_genie.lua) = bd402f8127cf5d5bd5d70e12f5a6bd04cb8d7a73 +SHA1 (patch-makefile) = 69334d62bfe7f9e7a6abfca37ed99cecca67c976 +SHA1 (patch-scripts_genie.lua) = 8c5c3c5d843e494c4c44b026691feba02760d451 diff --git a/emulators/mame/patches/patch-makefile b/emulators/mame/patches/patch-makefile index de295e4fde9..2bbb0f0ecbb 100644 --- a/emulators/mame/patches/patch-makefile +++ b/emulators/mame/patches/patch-makefile @@ -1,10 +1,10 @@ -$NetBSD: patch-makefile,v 1.17 2016/09/02 12:22:46 wiz Exp $ +$NetBSD: patch-makefile,v 1.18 2016/12/25 21:44:35 joerg Exp $ Treat all BSDs the same. ---- makefile.orig 2016-06-29 06:34:30.000000000 +0000 +--- makefile.orig 2016-10-25 23:47:23.000000000 +0000 +++ makefile -@@ -168,19 +168,19 @@ GENIEOS := solaris +@@ -177,19 +177,19 @@ GENIEOS := solaris endif ifeq ($(firstword $(filter FreeBSD,$(UNAME))),FreeBSD) OS := freebsd @@ -28,7 +28,7 @@ Treat all BSDs the same. endif ifeq ($(firstword $(filter Darwin,$(UNAME))),Darwin) OS := macosx -@@ -881,11 +881,6 @@ $(info GCC $(GCC_VERSION) detected) +@@ -884,11 +884,6 @@ $(info GCC $(GCC_VERSION) detected) else $(info Clang $(CLANG_VERSION) detected) ifneq ($(TARGETOS),asmjs) @@ -40,3 +40,12 @@ Treat all BSDs the same. endif endif +@@ -1279,7 +1274,7 @@ freebsd_x86: generate $(PROJECTDIR)/$(MA + #------------------------------------------------- + + $(PROJECTDIR)/$(MAKETYPE)-netbsd/Makefile: makefile $(SCRIPTS) $(GENIE) +- $(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --gcc=netbsd --gcc_version=$(GCC_VERSION) $(MAKETYPE) ++ $(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --gcc=netbsd --gcc_version=$(GCC_VERSION) --clang_version=$(CLANG_VERSION) $(MAKETYPE) + + .PHONY: netbsd_x64 + netbsd_x64: generate $(PROJECTDIR)/$(MAKETYPE)-netbsd/Makefile diff --git a/emulators/mame/patches/patch-scripts_genie.lua b/emulators/mame/patches/patch-scripts_genie.lua index f7509f3d767..1f3647bb45d 100644 --- a/emulators/mame/patches/patch-scripts_genie.lua +++ b/emulators/mame/patches/patch-scripts_genie.lua @@ -1,12 +1,12 @@ -$NetBSD: patch-scripts_genie.lua,v 1.4 2016/09/02 12:22:46 wiz Exp $ +$NetBSD: patch-scripts_genie.lua,v 1.5 2016/12/25 21:44:35 joerg Exp $ Precompilation is broken on NetBSD with gcc-5.3. Use GNU version of the C++ standard to avoid trouble with alloca on NetBSD. Detect clang correctly. ---- scripts/genie.lua.orig 2016-04-27 06:13:59.000000000 +0000 +--- scripts/genie.lua.orig 2016-10-25 23:47:23.000000000 +0000 +++ scripts/genie.lua -@@ -65,11 +65,6 @@ function layoutbuildtask(_folder, _name) +@@ -66,11 +66,6 @@ function layoutbuildtask(_folder, _name) end function precompiledheaders() @@ -18,7 +18,19 @@ Detect clang correctly. end function addprojectflags() -@@ -692,22 +687,22 @@ local version = str_to_version(_OPTIONS[ +@@ -169,6 +164,11 @@ newoption { + } + + newoption { ++ trigger = "clang_version", ++ description = "Clang compiler version", ++} ++ ++newoption { + trigger = "CC", + description = "CC replacement", + } +@@ -673,22 +673,22 @@ 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++", @@ -45,3 +57,35 @@ Detect clang correctly. } end -- this speeds it up a bit by piping between the preprocessor/compiler/assembler +@@ -930,9 +930,10 @@ end + + + +- local version = str_to_version(_OPTIONS["gcc_version"]) +- if string.find(_OPTIONS["gcc"], "clang") or string.find(_OPTIONS["gcc"], "pnacl") or string.find(_OPTIONS["gcc"], "asmjs") or string.find(_OPTIONS["gcc"], "android") then +- if (version < 30400) then ++ local gcc_version = str_to_version(_OPTIONS["gcc_version"]) ++ local clang_version = str_to_version(_OPTIONS["clang_version"]) ++ if (clang_version) then ++ if (clang_version < 30400) then + print("Clang version 3.4 or later needed") + os.exit(-1) + end +@@ -944,7 +945,7 @@ end + "-Wno-missing-braces", -- clang is not as permissive as GCC about std::array initialization + "-fdiagnostics-show-note-include-stack", + } +- if (version >= 30500) then ++ if (clang_version >= 30500) then + buildoptions { + "-Wno-unknown-warning-option", + "-Wno-extern-c-compat", +@@ -953,7 +954,7 @@ end + } + end + else +- if (version < 50000) then ++ if (gcc_version < 50000) then + print("GCC version 5.0 or later needed") + os.exit(-1) + end |