termux-packages/packages/zig/build.sh
Leap of Azzam 7fa5b47ec8
zig: bump to 0.9.1 (#9137)
* zig: bump to 0.9.1
2022-02-26 14:07:10 +05:30

23 lines
882 B
Bash

TERMUX_PKG_HOMEPAGE=https://ziglang.org
TERMUX_PKG_DESCRIPTION="General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software."
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_MAINTAINER="@leapofazzam123"
TERMUX_PKG_VERSION=0.9.1
TERMUX_PKG_SRCURL=https://ziglang.org/download/$TERMUX_PKG_VERSION/zig-$TERMUX_PKG_VERSION.tar.xz
TERMUX_PKG_SHA256=38cf4e84481f5facc766ba72783e7462e08d6d29a5d47e3b75c8ee3142485210
TERMUX_PKG_DEPENDS="libandroid-spawn, libc++, libxml2, ncurses, zlib"
TERMUX_PKG_BUILD_DEPENDS="llvm, libllvm-static"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DZIG_PREFER_CLANG_CPP_DYLIB=OFF
-DLLVM_LIBDIRS=$TERMUX_PREFIX/lib
"
termux_step_pre_configure() {
termux_setup_zig
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+="
-DZIG_EXECUTABLE=$(command -v zig)
-DZIG_TARGET_TRIPLE=$ZIG_TARGET_NAME
"
LDFLAGS+=" -landroid-spawn -lncursesw -lxml2 -lz"
}