diff --git a/anda/langs/nim/nim-nightly/nim-nightly.spec b/anda/langs/nim/nim-nightly/nim-nightly.spec index a446ad6f22..19bcca6dd4 100644 --- a/anda/langs/nim/nim-nightly/nim-nightly.spec +++ b/anda/langs/nim/nim-nightly/nim-nightly.spec @@ -1,13 +1,13 @@ %global csrc_commit 561b417c65791cd8356b5f73620914ceff845d10 -%global commit 21771765a2c1f1fc86d87ad6e032d4050d8a651b +%global commit 7dfadb8b4e95d09981fbeb01d85b12f23946c3e7 %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global ver 2.1.99 -%global commit_date 20240910 +%global ver 2.2.1 +%global commit_date 20241004 %global debug_package %nil Name: nim-nightly Version: %ver^%commit_date.%shortcommit -Release: 1%?dist +Release: 3%?dist Summary: Imperative, multi-paradigm, compiled programming language License: MIT and BSD URL: https://nim-lang.org @@ -124,6 +124,10 @@ ln -s %_prefix/lib/nim %buildroot%_prefix/lib/nim/lib || true rm -rf %buildroot/nim || true rm %buildroot%_bindir/*.bat || true +cp -r dist %buildroot%_prefix/lib/nim/ +# cannot use `ln` here, possibly a nim bug +cp -r %buildroot%_prefix/lib/nim/dist %buildroot%_datadir/nim/ + %files %license copying.txt dist/nimble/license.txt diff --git a/anda/langs/nim/nim/nim.spec b/anda/langs/nim/nim/nim.spec index 1ac2069ca4..a182cc33df 100644 --- a/anda/langs/nim/nim/nim.spec +++ b/anda/langs/nim/nim/nim.spec @@ -2,8 +2,8 @@ %global debug_package %{nil} Name: nim -Version: 2.0.8 -Release: 1%?dist +Version: 2.2.0 +Release: 3%?dist Summary: Imperative, multi-paradigm, compiled programming language License: MIT and BSD URL: https://nim-lang.org @@ -12,7 +12,7 @@ Source2: nimgrep.1 Source3: nimble.1 Source4: nimsuggest.1 BuildRequires: gcc mold git-core gcc-c++ nodejs openssl-devel pkgconfig(bash-completion) gc-devel pcre-devel -BuildRequires: redhat-rpm-config +BuildRequires: redhat-rpm-config anda-srpm-macros Requires: gcc @@ -46,18 +46,14 @@ and its standard library. %prep -rm -rf ./* -# using git clone to include submodules -git clone --recurse-submodules -j8 https://github.com/nim-lang/Nim -b v%version --depth 1 . -# hack -cp /usr/bin/mold /usr/bin/ld +%git_clone https://github.com/nim-lang/Nim v%version %build -export CFLAGS="${CFLAGS} -Ofast" -export CXXFLAGS="${CXXFLAGS} -Ofast" -export FFLAGS="${FFLAGS} -Ofast" -export FCFLAGS="${FCFLAGS} -Ofast" +export CFLAGS="${CFLAGS} -Ofast -fuse-ld=mold" +export CXXFLAGS="${CXXFLAGS} -Ofast -fuse-ld=mold" +export FFLAGS="${FFLAGS} -Ofast -fuse-ld=mold" +export FCFLAGS="${FCFLAGS} -Ofast -fuse-ld=mold" export PATH="$(pwd):$(pwd)/bin:${PATH}" @@ -81,6 +77,11 @@ sed -i '/