pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators/mame Fix clang detection again.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/44a88523aa3e
branches:  trunk
changeset: 356288:44a88523aa3e
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sun Dec 25 21:44:35 2016 +0000

description:
Fix clang detection again.

diffstat:

 emulators/mame/distinfo                        |   6 +-
 emulators/mame/patches/patch-makefile          |  17 ++++++--
 emulators/mame/patches/patch-scripts_genie.lua |  52 ++++++++++++++++++++++++--
 3 files changed, 64 insertions(+), 11 deletions(-)

diffs (132 lines):

diff -r 91b45eb8521e -r 44a88523aa3e emulators/mame/distinfo
--- a/emulators/mame/distinfo   Sun Dec 25 21:43:56 2016 +0000
+++ b/emulators/mame/distinfo   Sun Dec 25 21:44:35 2016 +0000
@@ -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 @@
 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 -r 91b45eb8521e -r 44a88523aa3e emulators/mame/patches/patch-makefile
--- a/emulators/mame/patches/patch-makefile     Sun Dec 25 21:43:56 2016 +0000
+++ b/emulators/mame/patches/patch-makefile     Sun Dec 25 21:44:35 2016 +0000
@@ -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 @@
  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 @@
  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 -r 91b45eb8521e -r 44a88523aa3e emulators/mame/patches/patch-scripts_genie.lua
--- a/emulators/mame/patches/patch-scripts_genie.lua    Sun Dec 25 21:43:56 2016 +0000
+++ b/emulators/mame/patches/patch-scripts_genie.lua    Sun Dec 25 21:44:35 2016 +0000
@@ -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 @@
  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 @@
        }
  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



Home | Main Index | Thread Index | Old Index