From a8d636a2e36c14b0765c7f830a2f5ef1f8351f38 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 25 Dec 2022 13:35:31 +0800 Subject: [PATCH] xmake: 2.7.4 --- packages/xmake/build.sh | 8 ++++-- packages/xmake/configure.patch | 45 ++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 packages/xmake/configure.patch diff --git a/packages/xmake/build.sh b/packages/xmake/build.sh index 2941b543e5..1a470670bb 100644 --- a/packages/xmake/build.sh +++ b/packages/xmake/build.sh @@ -2,8 +2,12 @@ TERMUX_PKG_HOMEPAGE=https://xmake.io/ TERMUX_PKG_DESCRIPTION="A cross-platform build utility based on Lua" TERMUX_PKG_LICENSE="Apache-2.0" TERMUX_PKG_MAINTAINER="Ruki Wang @waruqi" -TERMUX_PKG_VERSION="2.7.3" +TERMUX_PKG_VERSION="2.7.4" TERMUX_PKG_SRCURL=https://github.com/xmake-io/xmake/releases/download/v${TERMUX_PKG_VERSION}/xmake-v${TERMUX_PKG_VERSION}.tar.gz -TERMUX_PKG_SHA256=3e71437ad2a59d1fbbc9fba75ab4ca8d428c49beefcce86c11f6c4710dd4b6f2 +TERMUX_PKG_SHA256=d490ff8825fa53fe5abfb549310cb54a2dfef1ebd3f82e24548483772994e06a TERMUX_PKG_AUTO_UPDATE=true TERMUX_PKG_BUILD_IN_SRC=true + +termux_step_configure () { + $TERMUX_PKG_SRCDIR/configure --prefix=$TERMUX_PREFIX +} diff --git a/packages/xmake/configure.patch b/packages/xmake/configure.patch new file mode 100644 index 0000000000..ab56d8eced --- /dev/null +++ b/packages/xmake/configure.patch @@ -0,0 +1,45 @@ +diff --git a/configure b/configure +index 8e304282a..354bfda29 100755 +--- a/configure ++++ b/configure +@@ -612,20 +612,26 @@ if test_eq "${os_arch}" "i686"; then + os_arch="i386" + fi + +-# set the default target platform and architecture ++# set the default target platform + _target_plat_default=${os_host} + if is_host "msys"; then + _target_plat_default="mingw" + elif is_host "freebsd"; then + _target_plat_default="bsd" + fi ++ ++# set the default target architecture + _target_arch_default=${os_arch} + if is_host "msys" && test_nz "${MSYSTEM_CARCH}"; then + _target_arch_default="${MSYSTEM_CARCH}" ++elif test_nz "${TERMUX_ARCH}"; then ++ _target_arch_default="${TERMUX_ARCH}" + fi + if test_eq "${_target_arch_default}" "i686"; then + _target_arch_default="i386" + fi ++ ++# set the default target mode + _target_mode_default="release" + + # set the default project generator and build program +diff --git a/core/src/demo/xmake.sh b/core/src/demo/xmake.sh +index 0a04b8bfb..2f091b6ef 100755 +--- a/core/src/demo/xmake.sh ++++ b/core/src/demo/xmake.sh +@@ -34,6 +34,8 @@ target "demo" + add_syslinks "ws2_32" "pthread" "m" + elif is_plat "bsd"; then + add_syslinks "pthread" "m" ++ elif test_nz "${TERMUX_ARCH}"; then ++ add_syslinks "m" "dl" + else + add_syslinks "pthread" "dl" "m" "c" + fi