From 430892f7246a9120e7bc0a8cbe5e5d66f8dd52b5 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 6 Nov 2025 01:46:32 +0000 Subject: [PATCH 1/3] Update quickjs-ng to v0.11.0 --- packages/q/quickjs-ng/xmake.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/q/quickjs-ng/xmake.lua b/packages/q/quickjs-ng/xmake.lua index 487548c3049..570516bc8a3 100644 --- a/packages/q/quickjs-ng/xmake.lua +++ b/packages/q/quickjs-ng/xmake.lua @@ -6,6 +6,7 @@ package("quickjs-ng") add_urls("https://github.com/quickjs-ng/quickjs/archive/refs/tags/$(version).tar.gz", "https://github.com/quickjs-ng/quickjs.git", {submodules = false}) + add_versions("v0.11.0", "b456e6aa05522eed9cbf9dec1e947ba1ba6578fd09386391e581339ddabaa641") add_versions("v0.9.0", "77f9e79b42e2e7cff9517bae612431af47e120730286cb1dcfad0753bc160f10") add_versions("v0.8.0", "7e60e1e0dcd07d25664331308a2f4aee2a88d60d85896e828d25df7c3d40204e") add_versions("v0.7.0", "46c45cc2ed174474765dac8e41062998d92c4dd5fd779624da4073d6cd430eeb") From fd09809a21e2cc40efea4bdccdbf8af976627f0b Mon Sep 17 00:00:00 2001 From: star9029 Date: Fri, 28 Nov 2025 22:02:53 +0800 Subject: [PATCH 2/3] fix ios --- packages/q/quickjs-ng/xmake.lua | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/q/quickjs-ng/xmake.lua b/packages/q/quickjs-ng/xmake.lua index 570516bc8a3..c0c88f161d4 100644 --- a/packages/q/quickjs-ng/xmake.lua +++ b/packages/q/quickjs-ng/xmake.lua @@ -30,11 +30,23 @@ package("quickjs-ng") assert(minor and minor >= 30, "package(quickjs-ng) require vs_toolset >= 14.3") end end) + on_check("iphoneos", function (package) + if package:version() and package:version():gt("v0.11.0") then + raise("package(quickjs-ng >v0.11.0) supports ios") + end + end) end on_install(function (package) io.replace("CMakeLists.txt", "xcheck_add_c_compiler_flag(-Werror)", "", {plain = true}) io.replace("CMakeLists.txt", "if(NOT WIN32 AND NOT EMSCRIPTEN)", "if(0)", {plain = true}) + if package:is_plat("wasm") then + io.replace("quickjs-libc.c", " defined(__wasi__)", " (defined(__wasi__) || defined(EMSCRIPTEN))", {plain = true}) + io.replace("quickjs-libc.c", " !defined(__wasi__)", " (!defined(__wasi__) && !defined(EMSCRIPTEN))", {plain = true}) + end + if package:is_plat("linux", "bsd", "cross") then + io.replace("CMakeLists.txt", "M_LIBRARIES OR CMAKE_C_COMPILER_ID STREQUAL \"TinyCC\"", "1", {plain = true}) -- m library link + end local configs = {} table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) @@ -46,20 +58,8 @@ package("quickjs-ng") if package:config("shared") and package:is_plat("windows") then table.insert(configs, "-DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON") end - if package:is_plat("wasm") then - io.replace("quickjs-libc.c", " defined(__wasi__)", " (defined(__wasi__) || defined(EMSCRIPTEN))", {plain = true}) - io.replace("quickjs-libc.c", " !defined(__wasi__)", " (!defined(__wasi__) && !defined(EMSCRIPTEN))", {plain = true}) - end - if package:is_plat("linux", "bsd", "cross") then - io.replace("CMakeLists.txt", "M_LIBRARIES OR CMAKE_C_COMPILER_ID STREQUAL \"TinyCC\"", "1", {plain = true}) -- m library link - end import("package.tools.cmake").install(package, configs) - if package:is_plat("windows") and package:is_debug() then - local dir = package:installdir(package:config("shared") and "bin" or "lib") - os.vcp(path.join(package:buildir(), "qjs.pdb"), dir) - end - os.trycp("*.h", package:installdir("include")) os.trycp(path.join(package:buildir(), "**.a"), package:installdir("lib")) os.trycp(path.join(package:buildir(), "**.so"), package:installdir("lib")) From 81f60820553bebd1b6edc81af1ea5feee0674f55 Mon Sep 17 00:00:00 2001 From: star9029 Date: Fri, 28 Nov 2025 22:09:59 +0800 Subject: [PATCH 3/3] fix again --- packages/q/quickjs-ng/xmake.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/q/quickjs-ng/xmake.lua b/packages/q/quickjs-ng/xmake.lua index c0c88f161d4..863bb8e0c9d 100644 --- a/packages/q/quickjs-ng/xmake.lua +++ b/packages/q/quickjs-ng/xmake.lua @@ -31,8 +31,8 @@ package("quickjs-ng") end end) on_check("iphoneos", function (package) - if package:version() and package:version():gt("v0.11.0") then - raise("package(quickjs-ng >v0.11.0) supports ios") + if package:version() and package:version():le("v0.11.0") then + raise("package(quickjs-ng <=v0.11.0) unsupported ios platform") end end) end