milis/talimatname/genel/n/nim/talimat

50 lines
1.6 KiB
Plaintext
Raw Normal View History

2017-10-27 20:46:27 +02:00
# Tanım: Imperative, multi-paradigm, compiled programming language
2017-07-22 05:27:44 +02:00
# URL: https://nim-lang.org/
2017-10-27 20:46:27 +02:00
# Paketçi: milisarge
# Gerekler: python3
2017-07-22 05:27:44 +02:00
name=nim
_name=Nim
2017-09-11 03:13:42 +02:00
version=0.17.2
2017-07-22 05:27:44 +02:00
release=1
2017-07-26 01:53:37 +02:00
source=(https://github.com/nim-lang/Nim/archive/v$version.tar.gz::${_name}-$version.tar.gz
https://github.com/nim-lang/csources/archive/v$version.tar.gz::csources-$version.tar.gz)
2017-07-22 05:27:44 +02:00
2017-10-27 23:59:41 +02:00
derle() {
2017-07-22 05:27:44 +02:00
cd ${_name}-${version}
mv ../csources-${version} csources
rm bin/empty.txt
export PATH="${SRC}/${_name}-${version}/bin:${PATH}"
cd csources
sh build.sh
cd ..
nim c -d:release koch
./koch boot -d:release -d:nativeStacktrace -d:useGnuReadline
cd lib
nim c --app:lib -d:createNimRtl -d:release nimrtl.nim
cd ..
cd tools
nim c -d:release nimgrep.nim
cd ..
export PATH="${SRC}/${_name}-${version}/bin:${PATH}"
./koch install "${PKG}"
install -d "${PKG}/usr/lib"
cp -a lib "${PKG}/usr/lib/nim"
cp -a compiler "${PKG}/usr/lib/nim"
install -Dm 644 compiler.nimble "${PKG}/usr/lib/nim/compiler"
install -m 755 lib/libnimrtl.so "${PKG}/usr/lib/libnimrtl.so"
# Fix FS#48118, related to the doc2 command
ln -s /usr/share/nim/doc "${PKG}/usr/lib/nim/doc"
install -Dm 644 config/* -t "${PKG}/etc"
install -Dm 755 bin/* tools/nimgrep -t "${PKG}/usr/bin"
# Fix FS#50252, unusual placement of header files
install -d "${PKG}/usr/include"
cp -a "${PKG}/usr/lib/nim/"*.h "${PKG}/usr/include"
install -d "${PKG}/usr/share/nim/doc"
cp -a examples web doc/* "${PKG}/usr/share/nim/doc"
install -Dm 644 copying.txt "${PKG}/usr/share/licenses/${name}/LICENSE"
rm -r "${PKG}/nim" "${PKG}/usr/lib/nim/lib/nimcache"
rm -r "${PKG}/usr/share/nim/doc/web/"
}