milis/talimatname/genel/zig/talimat

36 lines
934 B
Plaintext
Raw Normal View History

2017-06-19 07:58:44 +02:00
# Description: sağlamlık, optimallik ve netlik öncelik veren bir programlama dili
# URL: http://ziglang.org
# Packager: milisarge
2017-06-19 23:21:40 +02:00
# Depends on: cmake llvm clang lld
2017-06-19 07:58:44 +02:00
name=zig
2017-06-19 08:40:24 +02:00
hesap=zig-lang
2017-06-19 07:58:44 +02:00
version=0.1
2017-06-20 03:53:03 +02:00
release=2
2017-06-19 07:58:44 +02:00
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
}