swift: use the new LLVM major version symlink instead

This commit is contained in:
Butta 2022-04-22 17:49:23 +05:30
parent 0d9fbc22f1
commit f7e237f104

View File

@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Swift is a high-performance system programming language"
TERMUX_PKG_LICENSE="Apache-2.0, NCSA"
TERMUX_PKG_MAINTAINER="@buttaface"
TERMUX_PKG_VERSION=5.6.1
TERMUX_PKG_REVISION=1
SWIFT_RELEASE="RELEASE"
TERMUX_PKG_SRCURL=https://github.com/apple/swift/archive/swift-$TERMUX_PKG_VERSION-$SWIFT_RELEASE.tar.gz
TERMUX_PKG_SHA256=39e4e2b7343756e26627b945a384e1b828e38778b34cc5b0f3ecc23f18d22fd6
@ -134,8 +135,8 @@ termux_step_pre_configure() {
}
termux_step_make() {
# The Swift compiler searches for the clang headers, so symlink against them using their version.
export TERMUX_CLANG_VERSION=$(grep ^TERMUX_PKG_VERSION= $TERMUX_PKG_BUILDER_DIR/../libllvm/build.sh | cut -f2 -d=)
# The Swift compiler searches for the clang headers, so symlink against them using the clang major version.
export TERMUX_CLANG_VERSION=$(. $TERMUX_SCRIPTDIR/packages/libllvm/build.sh; echo $LLVM_MAJOR_VERSION)
if [ "$TERMUX_ON_DEVICE_BUILD" = "false" ]; then
ln -sf $TERMUX_PKG_HOSTBUILD_DIR/llvm-linux-x86_64 $TERMUX_PKG_BUILDDIR/llvm-linux-x86_64