Update package version to 2.2.8
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
name: nim
|
||||
description: Statically typed compiled systems programming language
|
||||
version: 2.2.6
|
||||
revision: 2
|
||||
version: 2.2.8
|
||||
revision: 1
|
||||
url: https://nim-lang.org/
|
||||
license: MIT
|
||||
maintainers:
|
||||
@@ -13,8 +13,13 @@ depends:
|
||||
- gcc
|
||||
- gcc-libs
|
||||
- glibc
|
||||
make_depends:
|
||||
- git
|
||||
- help2man
|
||||
- nodejs
|
||||
downloads:
|
||||
- url: https://nim-lang.org/download/nim-${BPM_PKG_VERSION}.tar.xz
|
||||
extract_to: ${BPM_SOURCE}
|
||||
extract_strip_components: 1
|
||||
checksum: 657b0e3d5def788148d2a87fa6123fa755b2d92cad31ef60fd261e451785528b
|
||||
- url: https://github.com/nim-lang/Nim
|
||||
type: git
|
||||
clone_to: ${BPM_SOURCE}
|
||||
git_branch: v${BPM_PKG_VERSION}
|
||||
checksum: 4f500679b196fad944caa50a753f5bbfaefda001
|
||||
|
||||
@@ -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
@@ -6,70 +6,60 @@
|
||||
# This function is used for putting downloaded files to the correct location or applying patches
|
||||
prepare() {
|
||||
cd "$BPM_SOURCE"
|
||||
for nimcfg in {compiler,config}/nim.cfg; do
|
||||
echo "gcc.options.always %= \"\${gcc.options.always} ${CFLAGS:-} ${CPPFLAGS}\"" >> "$nimcfg"
|
||||
echo "gcc.options.linker %= \"\${gcc.options.linker} ${LDFLAGS:-}\"" >> "$nimcfg"
|
||||
done
|
||||
|
||||
patch -Np1 -i "$BPM_WORKDIR"/build-docs.patch
|
||||
patch -Np1 -i "$BPM_WORKDIR"/migrate-to-pcre2.patch
|
||||
}
|
||||
|
||||
# The build function is executed in the source directory
|
||||
# This function is used to compile the source code
|
||||
build() {
|
||||
# Compile nim
|
||||
echo "Building nim..."
|
||||
sh build.sh
|
||||
export SOURCE_DATE_EPOCH=$(git log -n 1 --format=%at)
|
||||
|
||||
# Compile koch
|
||||
echo "Building koch..."
|
||||
./bin/nim c -d:release koch
|
||||
./koch boot -d:release -d:nativeStacktrace -d:useGnuReadline
|
||||
./build_all.sh
|
||||
|
||||
# Compile libraries
|
||||
echo "Building libraries..."
|
||||
( cd lib; ../bin/nim c --app:lib -d:createNimRtl -d:release nimrtl.nim )
|
||||
# Generate man pages
|
||||
local h2m_args=(
|
||||
--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
|
||||
echo "Building nimsuggest..."
|
||||
./bin/nim c -d:release nimsuggest/nimsuggest.nim
|
||||
# Generate install.sh
|
||||
./koch distrohelper
|
||||
}
|
||||
|
||||
# The package function is executed in the source directory
|
||||
# This function is used to move the compiled files into the output directory
|
||||
package() {
|
||||
./koch install "$BPM_OUTPUT"
|
||||
DESTDIR="$BPM_OUTPUT" ./install.sh /usr/bin
|
||||
|
||||
# Install libraries and compiler
|
||||
install -d "$BPM_OUTPUT"/usr/lib
|
||||
cp -a lib "$BPM_OUTPUT"/usr/lib/nim
|
||||
cp -a compiler "$BPM_OUTPUT"/usr/lib/nim
|
||||
install -Dm644 nim.nimble "$BPM_OUTPUT"/usr/lib/nim/compiler
|
||||
install -m755 lib/libnimrtl.so "$BPM_OUTPUT"/usr/lib/libnimrtl.so
|
||||
# Install documentation
|
||||
install -d "$BPM_OUTPUT"/usr/share/doc/nim
|
||||
cp -r doc/html "$BPM_OUTPUT"/usr/share/doc/nim
|
||||
find "$BPM_OUTPUT"/usr/share/doc/nim -name '*.idx' -delete
|
||||
|
||||
# Install binaries
|
||||
install -Dm755 bin/* -t "$BPM_OUTPUT"/usr/bin
|
||||
# Install man pages
|
||||
install -Dm644 ./*.1 -t "$BPM_OUTPUT"/usr/share/man/man1
|
||||
|
||||
# Install configuration
|
||||
install -Dm644 config/* -t "$BPM_OUTPUT"/etc/nim
|
||||
# Install tools
|
||||
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 -d "$BPM_OUTPUT"/usr/include
|
||||
cp -a "$BPM_OUTPUT"/usr/lib/nim/*.h -t "$BPM_OUTPUT"/usr/include
|
||||
|
||||
# Fix wrong path for system.nim
|
||||
ln -s /usr/lib/nim "$BPM_OUTPUT"/usr/lib/nim/lib
|
||||
|
||||
# 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 shell completions
|
||||
for comp in {tools,dist/nimble}/*.bash-completion; do
|
||||
install -Dm644 "${comp}" "$BPM_OUTPUT"/usr/share/bash-completion/completions/$(basename "${comp/.bash-completion}")
|
||||
done
|
||||
for comp in {tools,dist/nimble}/*.zsh-completion; do
|
||||
install -Dm644 "${comp}" "$BPM_OUTPUT"/usr/share/zsh/site-functions/_$(basename "${comp/.zsh-completion}")
|
||||
done
|
||||
|
||||
# Install package license
|
||||
install -Dm644 "$BPM_SOURCE"/copying.txt "$BPM_OUTPUT"/usr/share/licenses/nim/copying.txt
|
||||
|
||||
Reference in New Issue
Block a user