milis/talimatname/genel/z/zig/talimat

36 lines
923 B
Plaintext
Raw Normal View History

2017-10-27 20:46:27 +02:00
# Tanım: sağlamlık, optimallik ve netlik öncelik veren bir programlama dili
2017-06-19 07:58:44 +02:00
# URL: http://ziglang.org
2017-10-27 20:46:27 +02:00
# Paketçi: milisarge
# Gerekler: cmake llvm clang lld
2017-06-19 07:58:44 +02:00
2017-10-28 14:10:23 +02:00
isim=zig
2017-06-19 08:40:24 +02:00
hesap=zig-lang
2017-10-28 14:10:23 +02:00
surum=0.1
devir=2
kaynak=()
2017-06-19 07:58:44 +02:00
2017-10-27 23:59:41 +02:00
derle() {
2017-06-19 07:58:44 +02:00
2017-10-28 14:10:23 +02:00
if [ ! -d $DERLEME_KAYNAKDIZIN/$isim ];then
git clone https://github.com/$hesap/$isim $DERLEME_KAYNAKDIZIN/$isim
2017-06-19 07:58:44 +02:00
else
2017-10-28 14:10:23 +02:00
cd $DERLEME_KAYNAKDIZIN/$isim
2017-06-19 07:58:44 +02:00
git pull
cd -
fi
2017-10-28 14:10:23 +02:00
cp -r $DERLEME_KAYNAKDIZIN/$isim $SRC/
cd $SRC/$isim
2017-06-19 07:58:44 +02:00
mkdir -p build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
2017-10-28 14:10:23 +02:00
-DZIG_LIBC_LIB_DIR=$(dirname $(cc -print-file-isim=crt1.o)) \
2017-06-19 07:58:44 +02:00
-DZIG_LIBC_INCLUDE_DIR=$(echo -n | cc -E -x c - -v 2>&1 | grep -B1 "End of search list." | head -n1 | cut -c 2- | sed "s/ .*//") \
2017-10-28 14:10:23 +02:00
-DZIG_LIBC_STATIC_LIB_DIR=$(dirname $(cc -print-file-isim=crtbegin.o))
2017-06-19 07:58:44 +02:00
make
make DESTDIR="$PKG" install
}