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
|
|
|
|
|
2017-10-28 14:10:23 +02:00
|
|
|
|
isim=nim
|
|
|
|
|
_isim=Nim
|
|
|
|
|
surum=0.17.2
|
|
|
|
|
devir=1
|
|
|
|
|
kaynak=(https://github.com/nim-lang/Nim/archive/v$surum.tar.gz::${_name}-$surum.tar.gz
|
|
|
|
|
https://github.com/nim-lang/csources/archive/v$surum.tar.gz::csources-$surum.tar.gz)
|
2017-07-22 05:27:44 +02:00
|
|
|
|
|
2017-10-27 23:59:41 +02:00
|
|
|
|
derle() {
|
2017-10-28 14:10:23 +02:00
|
|
|
|
cd ${_name}-${surum}
|
|
|
|
|
mv ../csources-${surum} csources
|
2017-07-22 05:27:44 +02:00
|
|
|
|
rm bin/empty.txt
|
|
|
|
|
|
2017-10-28 14:10:23 +02:00
|
|
|
|
export PATH="${SRC}/${_name}-${surum}/bin:${PATH}"
|
2017-07-22 05:27:44 +02:00
|
|
|
|
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 ..
|
2017-10-28 14:10:23 +02:00
|
|
|
|
export PATH="${SRC}/${_name}-${surum}/bin:${PATH}"
|
2017-07-22 05:27:44 +02:00
|
|
|
|
./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"
|
2017-10-28 14:10:23 +02:00
|
|
|
|
install -Dm 644 copying.txt "${PKG}/usr/share/licenses/${isim}/LICENSE"
|
2017-07-22 05:27:44 +02:00
|
|
|
|
rm -r "${PKG}/nim" "${PKG}/usr/lib/nim/lib/nimcache"
|
|
|
|
|
rm -r "${PKG}/usr/share/nim/doc/web/"
|
|
|
|
|
}
|