From 4e4d9e85d8a4de585fb24c09dc86d6c06c78b2e0 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Mon, 29 Jul 2024 06:15:09 +0000 Subject: [PATCH] fix(main/litespeedtest): Enable CGO for non AArch64 architectures Fixes the following error android/amd64 requires external (cgo) linking, but cgo is not enabled --- packages/litespeedtest/Makefile.patch | 11 +++++++---- packages/litespeedtest/build.sh | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/litespeedtest/Makefile.patch b/packages/litespeedtest/Makefile.patch index 01fe39491671f6f..a4f2d1a1bdb7081 100644 --- a/packages/litespeedtest/Makefile.patch +++ b/packages/litespeedtest/Makefile.patch @@ -1,12 +1,15 @@ ---- ../LiteSpeedTest-0.12.0/Makefile 2022-10-16 08:46:16.000000000 +0000 -+++ ./Makefile 2022-10-17 18:59:57.111027624 +0000 -@@ -1,6 +1,5 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,8 +1,7 @@ NAME=lite BINDIR=bin -VERSION=$(shell git describe --tags || echo "unknown version") BUILDTIME=$(shell date -u) - GOBUILD=CGO_ENABLED=0 go build -trimpath -ldflags '-X "github.com/xxf098/LiteSpeedTest/constant.Version=$(VERSION)" \ +-GOBUILD=CGO_ENABLED=0 go build -trimpath -ldflags '-X "github.com/xxf098/LiteSpeedTest/constant.Version=$(VERSION)" \ ++GOBUILD=CGO_ENABLED=1 go build -trimpath -ldflags '-X "github.com/xxf098/LiteSpeedTest/constant.Version=$(VERSION)" \ -X "github.com/xxf098/LiteSpeedTest/constant.BuildTime=$(BUILDTIME)" \ + -w -s -buildid=' + @@ -27,10 +26,8 @@ windows-arm64 \ windows-arm32v7 diff --git a/packages/litespeedtest/build.sh b/packages/litespeedtest/build.sh index 71dd4d934d035b8..787f89f8bbdb794 100644 --- a/packages/litespeedtest/build.sh +++ b/packages/litespeedtest/build.sh @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A simple tool for batch test ss/ssr/v2ray/trojan servers TERMUX_PKG_LICENSE="GPL-3.0" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION="0.15.0" -TERMUX_PKG_REVISION=1 +TERMUX_PKG_REVISION=2 TERMUX_PKG_SRCURL=https://github.com/xxf098/LiteSpeedTest/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SHA256=93da1b6ca132a779b4ce754802699c6ecc6817739603e505c8f7c12cf97c69c9 TERMUX_PKG_DEPENDS="resolv-conf"