Update package version to 2.2.8

This commit is contained in:
2026-04-05 13:53:04 +03:00
parent fb94a3798a
commit d94e69f5ef
4 changed files with 2247 additions and 52 deletions
+11 -6
View File
@@ -1,7 +1,7 @@
name: nim name: nim
description: Statically typed compiled systems programming language description: Statically typed compiled systems programming language
version: 2.2.6 version: 2.2.8
revision: 2 revision: 1
url: https://nim-lang.org/ url: https://nim-lang.org/
license: MIT license: MIT
maintainers: maintainers:
@@ -13,8 +13,13 @@ depends:
- gcc - gcc
- gcc-libs - gcc-libs
- glibc - glibc
make_depends:
- git
- help2man
- nodejs
downloads: downloads:
- url: https://nim-lang.org/download/nim-${BPM_PKG_VERSION}.tar.xz - url: https://github.com/nim-lang/Nim
extract_to: ${BPM_SOURCE} type: git
extract_strip_components: 1 clone_to: ${BPM_SOURCE}
checksum: 657b0e3d5def788148d2a87fa6123fa755b2d92cad31ef60fd261e451785528b git_branch: v${BPM_PKG_VERSION}
checksum: 4f500679b196fad944caa50a753f5bbfaefda001
+9
View File
@@ -0,0 +1,9 @@
--- a/build_all.sh
+++ b/build_all.sh
@@ -13,5 +13,6 @@ nimBuildCsourcesIfNeeded "$@"
echo_run bin/nim c --noNimblePath --skipUserCfg --skipParentCfg --hints:off koch
echo_run ./koch boot -d:release --skipUserCfg --skipParentCfg --hints:off
+echo_run ./koch docs --skipUserCfg --skipParentCfg --hints:off
echo_run ./koch tools --skipUserCfg --skipParentCfg --hints:off
File diff suppressed because it is too large Load Diff
+36 -46
View File
@@ -6,70 +6,60 @@
# This function is used for putting downloaded files to the correct location or applying patches # This function is used for putting downloaded files to the correct location or applying patches
prepare() { prepare() {
cd "$BPM_SOURCE" cd "$BPM_SOURCE"
for nimcfg in {compiler,config}/nim.cfg; do patch -Np1 -i "$BPM_WORKDIR"/build-docs.patch
echo "gcc.options.always %= \"\${gcc.options.always} ${CFLAGS:-} ${CPPFLAGS}\"" >> "$nimcfg" patch -Np1 -i "$BPM_WORKDIR"/migrate-to-pcre2.patch
echo "gcc.options.linker %= \"\${gcc.options.linker} ${LDFLAGS:-}\"" >> "$nimcfg"
done
} }
# The build function is executed in the source directory # The build function is executed in the source directory
# This function is used to compile the source code # This function is used to compile the source code
build() { build() {
# Compile nim export SOURCE_DATE_EPOCH=$(git log -n 1 --format=%at)
echo "Building nim..."
sh build.sh
# Compile koch ./build_all.sh
echo "Building koch..."
./bin/nim c -d:release koch
./koch boot -d:release -d:nativeStacktrace -d:useGnuReadline
# Compile libraries # Generate man pages
echo "Building libraries..." local h2m_args=(
( cd lib; ../bin/nim c --app:lib -d:createNimRtl -d:release nimrtl.nim ) --section=1
--no-info
--version-string="$BPM_PKG_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
# Compile tools
echo "Building tools..."
./koch tools
( cd tools; ../bin/nim c -d:release nimgrep.nim )
# Compile nimsuggest # Generate install.sh
echo "Building nimsuggest..." ./koch distrohelper
./bin/nim c -d:release nimsuggest/nimsuggest.nim
} }
# The package function is executed in the source directory # The package function is executed in the source directory
# This function is used to move the compiled files into the output directory # This function is used to move the compiled files into the output directory
package() { package() {
./koch install "$BPM_OUTPUT" DESTDIR="$BPM_OUTPUT" ./install.sh /usr/bin
# Install libraries and compiler # Install documentation
install -d "$BPM_OUTPUT"/usr/lib install -d "$BPM_OUTPUT"/usr/share/doc/nim
cp -a lib "$BPM_OUTPUT"/usr/lib/nim cp -r doc/html "$BPM_OUTPUT"/usr/share/doc/nim
cp -a compiler "$BPM_OUTPUT"/usr/lib/nim find "$BPM_OUTPUT"/usr/share/doc/nim -name '*.idx' -delete
install -Dm644 nim.nimble "$BPM_OUTPUT"/usr/lib/nim/compiler
install -m755 lib/libnimrtl.so "$BPM_OUTPUT"/usr/lib/libnimrtl.so
# Install binaries # Install man pages
install -Dm755 bin/* -t "$BPM_OUTPUT"/usr/bin install -Dm644 ./*.1 -t "$BPM_OUTPUT"/usr/share/man/man1
# Install configuration # Install tools
install -Dm644 config/* -t "$BPM_OUTPUT"/etc/nim for fn in nimble nimsuggest nimgrep nim-gdb; do cp ./bin/$fn "$BPM_OUTPUT"/usr/bin/; done
install -Dm644 doc/nimdoc.{css,cls} -t "$BPM_OUTPUT"/usr/lib/nim/doc
install -Dm644 tools/debug/nim-gdb.py -t "$BPM_OUTPUT"/usr/lib/nim/tools
install -Dm644 tools/dochack/{dochack.js,fuzzysearch.nim} -t "$BPM_OUTPUT"/usr/lib/nim/tools/dochack
# Move header files # Install shell completions
install -d "$BPM_OUTPUT"/usr/include for comp in {tools,dist/nimble}/*.bash-completion; do
cp -a "$BPM_OUTPUT"/usr/lib/nim/*.h -t "$BPM_OUTPUT"/usr/include install -Dm644 "${comp}" "$BPM_OUTPUT"/usr/share/bash-completion/completions/$(basename "${comp/.bash-completion}")
done
# Fix wrong path for system.nim for comp in {tools,dist/nimble}/*.zsh-completion; do
ln -s /usr/lib/nim "$BPM_OUTPUT"/usr/lib/nim/lib install -Dm644 "${comp}" "$BPM_OUTPUT"/usr/share/zsh/site-functions/_$(basename "${comp/.zsh-completion}")
done
# Install shell completion
install -Dm644 tools/nim.bash-completion "$BPM_OUTPUT"/usr/share/bash-completion/completions/nim
install -Dm644 tools/nim.zsh-completion "$BPM_OUTPUT"/usr/share/zsh/site-functions/_nim
# Remove unwanted files
rm -r "$BPM_OUTPUT"/nim
# Install package license # Install package license
install -Dm644 "$BPM_SOURCE"/copying.txt "$BPM_OUTPUT"/usr/share/licenses/nim/copying.txt install -Dm644 "$BPM_SOURCE"/copying.txt "$BPM_OUTPUT"/usr/share/licenses/nim/copying.txt