milis/talimatname/genel/zig/talimat

36 lines
934 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.

# Description: sağlamlık, optimallik ve netlik öncelik veren bir programlama dili
# URL: http://ziglang.org
# Packager: milisarge
# Depends on: cmake llvm clang lld
name=zig
hesap=zig-lang
version=0.1
release=2
source=()
build() {
if [ ! -d $DERLEME_KAYNAKDIZIN/$name ];then
git clone https://github.com/$hesap/$name $DERLEME_KAYNAKDIZIN/$name
else
cd $DERLEME_KAYNAKDIZIN/$name
git pull
cd -
fi
cp -r $DERLEME_KAYNAKDIZIN/$name $SRC/
cd $SRC/$name
mkdir -p build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DZIG_LIBC_LIB_DIR=$(dirname $(cc -print-file-name=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-name=crtbegin.o))
make
make DESTDIR="$PKG" install
}