Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package nim for openSUSE:Factory checked in at 2022-07-19 17:19:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nim (Old) and /work/SRC/openSUSE:Factory/.nim.new.1523 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nim" Tue Jul 19 17:19:34 2022 rev:18 rq:990013 version:1.6.6 Changes: -------- --- /work/SRC/openSUSE:Factory/nim/nim.changes 2022-05-28 22:17:02.581016430 +0200 +++ /work/SRC/openSUSE:Factory/.nim.new.1523/nim.changes 2022-07-19 17:19:35.584385130 +0200 @@ -1,0 +2,10 @@ +Thu Jul 14 14:15:04 UTC 2022 - David Anes <[email protected]> + +- Remove duplicated strip for nimble. +- Require (at least) a C compiler. +- Addded _constraints file to require more RAM on build nodes. +- Add patch to correctly detect GCC version, so it builds in i586 + and arm: + * nim-fix-gcc-major-version-detection.patch + +------------------------------------------------------------------- New: ---- _constraints nim-fix-gcc-major-version-detection.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nim.spec ++++++ --- /var/tmp/diff_new_pack.Vp9sEN/_old 2022-07-19 17:19:36.164385904 +0200 +++ /var/tmp/diff_new_pack.Vp9sEN/_new 2022-07-19 17:19:36.168385909 +0200 @@ -30,6 +30,11 @@ Patch1: nim-fix-tests-certificate-key-too-small.patch # UPSTREAM FIX: https://github.com/nim-lang/Nim/commit/2c73e84436a11cae1676c7da0228158ba1a885cc Patch2: nim-fix-tests-ip-protocol-missing.patch +Patch3: nim-fix-gcc-major-version-detection.patch + +# pull in a C compiler (required to build Nim programs) +Requires: gcc +Recommends: clang BuildRequires: binutils-devel @@ -53,6 +58,7 @@ # skip it and run tests without this compiler target afterwards) %if 0%{?suse_version} >= 150100 || 0%{?is_backports} BuildRequires: nodejs >= 12 +Recommends: nodejs %endif %if 0%{?is_opensuse} || 0%{?is_backports} @@ -235,7 +241,6 @@ strip --strip-all %{buildroot}%{_libdir}/nim/bin/nim strip --strip-all %{buildroot}%{_libdir}/nim/bin/nimble strip --strip-all %{buildroot}%{_libdir}/nim/bin/nim_dbg -strip --strip-all %{buildroot}%{_libdir}/nim/bin/nimble strip --strip-all %{buildroot}%{_libdir}/nim/bin/nimgrep strip --strip-all %{buildroot}%{_libdir}/nim/bin/nimpretty strip --strip-all %{buildroot}%{_libdir}/nim/bin/nimsuggest ++++++ _constraints ++++++ <constraints> <hardware> <memory> <size unit="G">4</size> </memory> </hardware> </constraints> (No newline at EOF) ++++++ nim-fix-gcc-major-version-detection.patch ++++++ Index: nim-1.6.6/compiler/extccomp.nim =================================================================== --- nim-1.6.6.orig/compiler/extccomp.nim +++ nim-1.6.6/compiler/extccomp.nim @@ -14,7 +14,7 @@ import ropes, platform, condsyms, options, msgs, lineinfos, pathutils -import std/[os, strutils, osproc, sha1, streams, sequtils, times, strtabs, json, jsonutils, sugar] +import std/[os, strutils, osproc, sha1, streams, sequtils, times, strtabs, json, jsonutils, sugar, parseutils] type TInfoCCProp* = enum # properties of the C compiler: @@ -512,26 +512,11 @@ proc ccHasSaneOverflow*(conf: ConfigRef) result = false # assume an old or crappy GCC var exe = getConfigVar(conf, conf.cCompiler, ".exe") if exe.len == 0: exe = CC[conf.cCompiler].compilerExe - let (s, exitCode) = try: execCmdEx(exe & " --version") except: ("", 1) + let (s, exitCode) = try: execCmdEx(exe & " -dumpversion") except: ("", 1) if exitCode == 0: - var i = 0 - var j = 0 - # the version is the last part of the first line: - while i < s.len and s[i] != '\n': - if s[i] in {' ', '\t'}: j = i+1 - inc i - if j > 0: - var major = 0 - while j < s.len and s[j] in {'0'..'9'}: - major = major * 10 + (ord(s[j]) - ord('0')) - inc j - if i < s.len and s[j] == '.': inc j - while j < s.len and s[j] in {'0'..'9'}: - inc j - if j+1 < s.len and s[j] == '.' and s[j+1] in {'0'..'9'}: - # we found a third version number, chances are high - # we really parsed the version: - result = major >= 5 + var major: int + discard parseInt(s, major) + result = major > 5 else: result = conf.cCompiler == ccCLang
