milis/talimatname/genel/z/zig/talimat

37 lines
943 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Tanım: sağlamlık, optimallik ve netlik öncelik veren bir programlama dili
# URL: http://ziglang.org
# Paketçi: milisarge
# Gerekler: cmake llvm clang lld
# Grup: geliştirme
isim=zig
hesap=zig-lang
surum=0.1
devir=2
kaynak=()
derle() {
if [ ! -d $DERLEME_KAYNAKDIZIN/$isim ];then
git clone https://github.com/$hesap/$isim $DERLEME_KAYNAKDIZIN/$isim
else
cd $DERLEME_KAYNAKDIZIN/$isim
git pull
cd -
fi
cp -r $DERLEME_KAYNAKDIZIN/$isim $SRC/
cd $SRC/$isim
mkdir -p build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DZIG_LIBC_LIB_DIR=$(dirname $(cc -print-file-isim=crt1.o)) \
-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/ .*//") \
-DZIG_LIBC_STATIC_LIB_DIR=$(dirname $(cc -print-file-isim=crtbegin.o))
make
make DESTDIR="$PKG" install
}