TERMUX_PKG_HOMEPAGE=https://github.com/KhronosGroup/SPIRV-LLVM-Translator
TERMUX_PKG_DESCRIPTION="SPIR-V LLVM Translator"
TERMUX_PKG_LICENSE="Apache-2.0"
TERMUX_PKG_MAINTAINER="@termux"
_LLVM_VERSION=$(. $TERMUX_SCRIPTDIR/packages/libllvm/build.sh; echo "${TERMUX_PKG_VERSION}")
_LLVM_MAJOR_VERSION=$(. $TERMUX_SCRIPTDIR/packages/libllvm/build.sh; echo "${LLVM_MAJOR_VERSION}")
_LLVM_MAJOR_VERSION_NEXT=$((_LLVM_MAJOR_VERSION + 1))
TERMUX_PKG_VERSION="20.1.4"
TERMUX_PKG_SRCURL=https://github.com/KhronosGroup/SPIRV-LLVM-Translator/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=f6c414f9384c8f68775d9461e55e7c492f01759f5a1754f30dad4cbfb049c7d7
TERMUX_PKG_DEPENDS="libc++, libllvm (<< ${_LLVM_MAJOR_VERSION_NEXT})"
TERMUX_PKG_BUILD_DEPENDS="libllvm-static, spirv-headers, spirv-tools"
TERMUX_PKG_NO_STATICSPLIT=true
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DBASE_LLVM_VERSION=${_LLVM_VERSION}
-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=${TERMUX_PREFIX}
"
