fix(nim-nightly): unbdep pcre, add atlas (#11099) (#12700)

This commit is contained in:
Raboneko
2026-05-27 08:19:59 -05:00
committed by GitHub
parent de609f47e0
commit a4c2c5ba36
+41 -17
View File
@@ -12,10 +12,7 @@ Summary: Imperative, multi-paradigm, compiled programming language
License: MIT and BSD
URL: https://nim-lang.org
Source0: https://github.com/nim-lang/Nim/archive/%commit.tar.gz
Source1: nim.1
Source2: nimgrep.1
Source4: nimsuggest.1
BuildRequires: gcc mold git gcc-c++ nodejs openssl-devel pkgconfig(bash-completion) gc-devel pcre pcre-devel
BuildRequires: gcc mold git gcc-c++ nodejs openssl-devel pkgconfig(bash-completion) gc-devel help2man
Requires: redhat-rpm-config gcc
Conflicts: choosenim
# somehow wrong name and never noticed
@@ -57,8 +54,13 @@ order of priority).
This package provides documentation and reference manual for the language
and its standard library.
%endif
%pkg_completion -Bz nim nimble
%pkg_completion -Bn nimgrep
%pkg_completion -Bn nimpretty
%pkg_completion -Bn nimsuggest
%prep
%autosetup -n Nim-%commit
@@ -81,17 +83,14 @@ nim c --noNimblePath --skipUserCfg --skipParentCfg --hints:off -d:danger koch.ni
koch boot -d:release -d:nimStrictMode --lib:lib
%ifarch x86_64
koch docs &
./koch docs --skipUserCfg --skipParentCfg --hints:off &
%endif
(cd lib; nim c --app:lib -d:danger -d:createNimRtl -t:-fPIE -l:-pie nimrtl.nim) &
koch tools --skipUserCfg --skipParentCfg --hints:off -d:release -t:-fPIE -l:-pie &
nim c -d:danger -t:-fPIE -l:-pie nimsuggest/nimsuggest.nim &
wait
%ifarch x86_64
sed -i '/<link.*fonts.googleapis.com/d' doc/html/*.html
%endif
# generate install.sh
./koch distrohelper
%install
export PATH="$(pwd):$(pwd)/bin:${PATH}"
@@ -101,16 +100,38 @@ mold -run bin/nim cc -d:nimCallDepthLimit=10000 -r tools/niminst/niminst --var:v
sh ./install.sh %buildroot/usr/bin
# generate man pages
h2m_args=(
--section=1
--no-info
--version-string=%version
)
help2man --name='Nim Language Compiler' "${h2m_args[@]}" -o nim.1 ./bin/nim
help2man --name='Nimsuggest' "${h2m_args[@]}" -o nimsuggest.1 ./bin/nimsuggest
#help2man --name='Nimgrep' "${h2m_args[@]}" -o nimgrep.1 ./bin/nimgrep
help2man --name='Nimpretty' "${h2m_args[@]}" -o nimpretty.1 ./bin/nimpretty
help2man --name='Nim Package Installer' "${h2m_args[@]}" -o nimble.1 ./bin/nimble
help2man --name='Atlas' "${h2m_args[@]}" -o atlas.1 ./bin/atlas
mkdir -p %buildroot/%_bindir %buildroot/%_datadir/bash-completion/completions %buildroot/usr/lib/nim %buildroot%_datadir
install -Dpm755 bin/nim{grep,suggest,pretty} %buildroot/%_bindir
install -Dpm644 tools/nim.bash-completion %buildroot/%_datadir/bash-completion/completions/nim
install -Dpm644 -t%buildroot/%_mandir/man1 %SOURCE1 %SOURCE2 %SOURCE4
install -Dpm755 bin/nim{grep,suggest,pretty} bin/atlas %buildroot/%_bindir
install -Dpm644 tools/nim.bash-completion %buildroot%bash_completions_dir/nim
install -Dpm644 tools/nim.zsh-completion %buildroot%zsh_completions_dir/_nim
for comp in {tools,dist/nimble}/*.bash-completion; do
install -Dm 644 ${comp} "%buildroot%bash_completions_dir/$(basename "${comp/.bash-completion}")"
done
for comp in {tools,dist/nimble}/*.zsh-completion; do
install -Dm 644 ${comp} "%buildroot%zsh_completions_dir/_$(basename "${comp/.zsh-completion}")"
done
install -Dpm644 -t%buildroot/%_mandir/man1 *.1
mv %buildroot%_bindir/nim %buildroot%_datadir/
ln -s %_datadir/nim/bin/nim %buildroot%_bindir/nim
%ifarch x86_64
mkdir -p %buildroot/%_docdir/%name/html || true
cp -a doc/html/*.html %buildroot/%_docdir/%name/html/ || true
find "%buildroot%_docdir/%name" -name '*.idx' -delete
cp tools/dochack/dochack.js %buildroot/%_docdir/%name/ || true
%endif
@@ -133,16 +154,16 @@ cp -r %buildroot%_prefix/lib/nim/dist %buildroot%_datadir/nim/
%license copying.txt dist/nimble/license.txt
%doc doc/readme.txt
%_bindir/nim
%_mandir/man1/nim.1.*
%_datadir/bash-completion/completions/nim
%_mandir/man1/nim{,ble}.1.*
%_datadir/nim/
%_prefix/lib/nim/
%_sysconfdir/nim/
%files tools
%license copying.txt
%_bindir/atlas
%_bindir/nim{grep,suggest,pretty}
%_mandir/man1/nim{grep,suggest}.1*
%_mandir/man1/{atlas,nimsuggest,nimpretty}.1*
%ifarch x86_64
%files doc
@@ -150,4 +171,7 @@ cp -r %buildroot%_prefix/lib/nim/dist %buildroot%_datadir/nim/
%endif
%changelog
%autochangelog
* Wed May 27 2026 madonuko <mado@fyralabs.com> - 2.3.1^20260522.561b417
- more manfiles
- no more nimgrep manfile (cannot generate)
- no longer dep on pcre