From 50285811bfb309b24aafe94c1a863d9ae16b693a Mon Sep 17 00:00:00 2001 From: Zhen Date: Sun, 28 Sep 2025 14:43:25 +0800 Subject: [PATCH 01/18] fix(docs): Correct typos in comments --- xrepo.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xrepo.cmake b/xrepo.cmake index 64945c6..bd1b9e2 100644 --- a/xrepo.cmake +++ b/xrepo.cmake @@ -67,7 +67,7 @@ set(XREPO_XMAKEFILE "" CACHE STRING "Xmake script file of Xrepo package") # `target_link_directories` to use the package. # - User should figure out what library to use for `target_link_libraries`. # - If `DIRECTORY_SCOPE` is specified, execute following code so the package -# can be used in cmake's direcotry scope: +# can be used in cmake's directory scope: # include_directories(foo_INCLUDE_DIRS) # link_directories(foo_LIBRARY_DIRS) # 3. Append package install directory to `CMAKE_PREFIX_PATH`. @@ -375,7 +375,7 @@ function(xrepo_package package) _xrepo_finish_package_setup(${package_name}) - # Store xrepo command and arguments for furture comparison. + # Store xrepo command and arguments for future comparison. set(_cache_xrepo_cmdargs_${package_name} "${_xrepo_cmdargs_${package_name}}" CACHE INTERNAL "") endfunction() @@ -421,7 +421,7 @@ function(xrepo_target_packages target) endforeach() endfunction() -# Append parent directorie of include directory to CMAKE_PREFIX_PATH. +# Append parent directory of include directory to CMAKE_PREFIX_PATH. macro(_xrepo_set_cmake_prefix_path package_name) # CMake looks for quite a few directories under each prefix directory for config-file.cmake. # Thus Using CMAKE_PREFIX_PATH is easier and more reliable for config-file packages to be found From 72074f33ecdd216018569246d2b1e23c8e98c7dd Mon Sep 17 00:00:00 2001 From: Zhen Date: Sun, 28 Sep 2025 14:45:41 +0800 Subject: [PATCH 02/18] fix(cmake): correct argument order in string(REPLACE) for compiler name Fixes incorrect usage of string(REPLACE) in _detect_toolchain, ensuring compiler name normalization works as intended for C++ compilers. --- xrepo.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xrepo.cmake b/xrepo.cmake index bd1b9e2..3867ecb 100644 --- a/xrepo.cmake +++ b/xrepo.cmake @@ -217,8 +217,8 @@ function(_detect_toolchain) get_filename_component(_compiler_name "${CMAKE_C_COMPILER}" NAME_WLE) elseif(DEFINED CMAKE_CXX_COMPILER) get_filename_component(_compiler_name "${CMAKE_CXX_COMPILER}" NAME_WLE) - string(REPLACE "g++" "gcc" "${_compiler_name}" _compiler_name) - string(REPLACE "clang++" "clang" "${_compiler_name}" _compiler_name) + string(REPLACE "g++" "gcc" _compiler_name "${_compiler_name}") + string(REPLACE "clang++" "clang" _compiler_name "${_compiler_name}") else() # Shouldn't reach here because cmake will try to detect compiler and set # corresponding variables. From 7ef6cab8b9cb98534a89d7600c82332f9917d303 Mon Sep 17 00:00:00 2001 From: Zhen Date: Sun, 28 Sep 2025 17:26:02 +0800 Subject: [PATCH 03/18] fix(ci): update github actions workflows for cmake and gcc Installs CMake 3.5.2 to support gflags 2.2.2, which requires CMake <= 3.5. Updates GCC/G++ alternative commands for newer Ubuntu versions in Linux workflow. --- .github/workflows/linux.yml | 24 +++++++++++++++++------- .github/workflows/macos.yml | 10 ++++++++-- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index f73c092..169f811 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -16,16 +16,26 @@ jobs: steps: - uses: actions/checkout@v1 + - name: Install CMake 3.5.2 + # gflags 2.2.2 uses cmake 3.0, and the latest cmake doesn't support cmake that <= 3.5 + # To pass the tests, install the specified cmake + run: | + set -e + curl -sL https://cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz | tar -xz + echo "$(pwd)/cmake-3.5.2-Linux-x86_64/bin" >> $GITHUB_PATH + cmake --version + - name: Installation + # The latest ubuntu doesn't contain gcc-9 anymore run: | - sudo apt-get install -y cmake - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 60 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 - sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-9 60 - sudo update-alternatives --set g++ /usr/bin/g++-9 - sudo update-alternatives --set gcc /usr/bin/gcc-9 - sudo update-alternatives --set cpp /usr/bin/cpp-9 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++ 60 + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc 60 + sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp 60 + sudo update-alternatives --set g++ /usr/bin/g++ + sudo update-alternatives --set gcc /usr/bin/gcc + sudo update-alternatives --set cpp /usr/bin/cpp - name: Tests run: | ./scripts/test-unix.sh + diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 7c3399c..d58a2dd 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -16,10 +16,16 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Installation + - name: Install CMake 3.5.2 + # gflags 2.2.2 uses cmake 3.0, and the latest cmake doesn't support cmake that <= 3.5 + # To pass the tests, install the specified cmake run: | - brew install cmake + set -e + curl -sL https://cmake.org/files/v3.5/cmake-3.5.2-Darwin-x86_64.tar.gz | tar -xzv + echo "$(pwd)/cmake-3.5.2-Darwin-x86_64/CMake.app/Contents/bin" >> $GITHUB_PATH + cmake --version - name: Tests run: | ./scripts/test-unix.sh + From a2d66869dcc5db943adfb0f455b669b9bdafb14a Mon Sep 17 00:00:00 2001 From: Zhen Date: Sun, 28 Sep 2025 17:26:15 +0800 Subject: [PATCH 04/18] docs: fix typos in README and example CMakeLists Corrects various spelling mistakes in README.md and example/CMakeLists.txt for improved clarity and accuracy. --- README.md | 8 ++++---- example/CMakeLists.txt | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 395dc10..ac52b20 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ After calling `xrepo_package(foo)`, there are three ways to use `foo` package: 1. Call `find_package(foo)` if package provides cmake config-files. - Refer to CMake [`find_package`](https://cmake.org/cmake/help/latest/command/find_package.html) documentation for more details. 2. If the package does not provide cmake config files or find modules - - Following variables can be used to use the pacakge (variable names following cmake + - Following variables can be used to use the package (variable names following cmake find modules [standard variable names](https://cmake.org/cmake/help/latest/manual/cmake-developer.7.html#standard-variable-names)) - `foo_INCLUDE_DIRS` - `foo_LIBRARY_DIRS` @@ -252,7 +252,7 @@ We can write a custom package in xmake.lua, please refer [Define Xrepo package]( ### Options and variables for `xrepo.cmake` -Following options can be speicified with `cmake -D=`. +Following options can be specified with `cmake -D=`. Or use `set(var value)` in `CMakeLists.txt`. - `XMAKE_CMD`: string, defaults to empty string @@ -277,7 +277,7 @@ Or use `set(var value)` in `CMakeLists.txt`. ### Switching compiler and cross compilation -Following variables controll cross compilation. Note: to specify a different compiler other than +Following variables control cross compilation. Note: to specify a different compiler other than the default one on system, platform must be set to "cross". - `XREPO_TOOLCHAIN`: string, defaults to empty string @@ -391,5 +391,5 @@ the specified package. For CMake 3.19 and later which has JSON support, `xrepo_package` parses the JSON output. For previous version of CMake, `xrepo_package` uses only the `--cflags` option -to get package include directory. Library and cmake module directory are infered from that +to get package include directory. Library and cmake module directory are inferred from that directory, so it maybe unreliable to detect the correct paths. diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index c750775..a373b37 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -26,7 +26,7 @@ xrepo_package("glog" #DEPS CONFIGS "packages/glog.lua") -# find_pacakge works because package install dir is added to CMAKE_PREFIX_PATH. +# find_package works because package install dir is added to CMAKE_PREFIX_PATH. find_package(gflags) find_package(glog) @@ -40,8 +40,8 @@ add_executable(example-bin "") target_sources(example-bin PRIVATE src/main.cpp ) -# For packges that does not provide cmake config-file packages, -# xrepo_target_packges is convenient to setup include, library path and link targets. +# For packages that does not provide cmake config-file packages, +# xrepo_target_packages is convenient to setup include, library path and link targets. # We can specify multiple packages in a single call. #xrepo_target_packages(example-bin pcre2 zlib) From 15f79a0e392cb63fe3c9cf91fcbb425a26f733e3 Mon Sep 17 00:00:00 2001 From: Zhen Date: Sun, 28 Sep 2025 17:35:25 +0800 Subject: [PATCH 05/18] ci(workflows): add workflow_dispatch trigger to CI workflows This enables manual triggering of the Linux, macOS, and Windows CI workflows directly from the GitHub Actions UI. This provides flexibility for re-running workflows on demand for specific branches or commits. --- .github/workflows/linux.yml | 1 + .github/workflows/macos.yml | 1 + .github/workflows/windows.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 169f811..6dd770c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -3,6 +3,7 @@ name: Linux on: pull_request: push: + workflow_dispatch: jobs: build: diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d58a2dd..3075b9b 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -3,6 +3,7 @@ name: macOS on: pull_request: push: + workflow_dispatch: jobs: build: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index b4fc51d..6156258 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -3,6 +3,7 @@ name: Windows on: pull_request: push: + workflow_dispatch: jobs: build: From 1873304149ff32d4ff92f6ce1d582645a89576db Mon Sep 17 00:00:00 2001 From: Zhen Date: Sun, 28 Sep 2025 17:45:50 +0800 Subject: [PATCH 06/18] ci: upgrade CMake and GCC versions in CI workflows Update CMake from 3.5.2 to 3.13.0 in both Linux and macOS CI workflows. Also, upgrade GCC/G++ to version 13 in the Linux CI workflow, as newer Ubuntu runners no longer include GCC 9 by default. This ensures compatibility with modern build tools and environments. --- .github/workflows/linux.yml | 20 ++++++++++---------- .github/workflows/macos.yml | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 6dd770c..ed7431f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -17,24 +17,24 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Install CMake 3.5.2 + - name: Install CMake 3.13.0 # gflags 2.2.2 uses cmake 3.0, and the latest cmake doesn't support cmake that <= 3.5 # To pass the tests, install the specified cmake run: | set -e - curl -sL https://cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz | tar -xz - echo "$(pwd)/cmake-3.5.2-Linux-x86_64/bin" >> $GITHUB_PATH + curl -sL https://cmake.org/files/v3.13/cmake-3.13.0-Linux-x86_64.tar.gz | tar -xz + echo "$(pwd)/cmake-3.13.0-Linux-x86_64/bin" >> $GITHUB_PATH cmake --version - name: Installation - # The latest ubuntu doesn't contain gcc-9 anymore + # The latest ubuntu doesn't contain gcc-9 by default anymore run: | - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++ 60 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc 60 - sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp 60 - sudo update-alternatives --set g++ /usr/bin/g++ - sudo update-alternatives --set gcc /usr/bin/gcc - sudo update-alternatives --set cpp /usr/bin/cpp + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 60 + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 60 + sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-13 60 + sudo update-alternatives --set g++ /usr/bin/g++-13 + sudo update-alternatives --set gcc /usr/bin/gcc-13 + sudo update-alternatives --set cpp /usr/bin/cpp-13 - name: Tests run: | diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3075b9b..eb94c46 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -17,13 +17,13 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Install CMake 3.5.2 + - name: Install CMake 3.13 # gflags 2.2.2 uses cmake 3.0, and the latest cmake doesn't support cmake that <= 3.5 # To pass the tests, install the specified cmake run: | set -e - curl -sL https://cmake.org/files/v3.5/cmake-3.5.2-Darwin-x86_64.tar.gz | tar -xzv - echo "$(pwd)/cmake-3.5.2-Darwin-x86_64/CMake.app/Contents/bin" >> $GITHUB_PATH + curl -sL https://cmake.org/files/v3.13/cmake-3.13.0-Darwin-x86_64.tar.gz | tar -xzv + echo "$(pwd)/cmake-3.13.0-Darwin-x86_64/CMake.app/Contents/bin" >> $GITHUB_PATH cmake --version - name: Tests From 97d784cd5b51b6dfa61b2f13ef935e98909d8193 Mon Sep 17 00:00:00 2001 From: Zhen Date: Sun, 28 Sep 2025 17:54:27 +0800 Subject: [PATCH 07/18] ci(workflow): Remove explicit gcc-13 installation from Linux CI The default GCC version on GitHub Actions Ubuntu runners is now sufficient, making the explicit installation and configuration for unnecessary. This simplifies the workflow. --- .github/workflows/linux.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index ed7431f..effe3f8 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -26,16 +26,6 @@ jobs: echo "$(pwd)/cmake-3.13.0-Linux-x86_64/bin" >> $GITHUB_PATH cmake --version - - name: Installation - # The latest ubuntu doesn't contain gcc-9 by default anymore - run: | - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 60 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 60 - sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-13 60 - sudo update-alternatives --set g++ /usr/bin/g++-13 - sudo update-alternatives --set gcc /usr/bin/gcc-13 - sudo update-alternatives --set cpp /usr/bin/cpp-13 - - name: Tests run: | ./scripts/test-unix.sh From 000b4be0877ee376f010e29d5ce40e3d5b2fc0aa Mon Sep 17 00:00:00 2001 From: Zhen Date: Sun, 28 Sep 2025 18:01:39 +0800 Subject: [PATCH 08/18] ci(workflow): Update CMake version in CI to 3.22.0 The CI workflows for Linux and macOS are updated to use CMake 3.22.0 instead of 3.13.0. This ensures compatibility with newer build systems and potentially resolves issues with older CMake versions. --- .github/workflows/linux.yml | 6 +++--- .github/workflows/macos.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index effe3f8..a55e8ce 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -17,13 +17,13 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Install CMake 3.13.0 + - name: Install CMake 3.22.0 # gflags 2.2.2 uses cmake 3.0, and the latest cmake doesn't support cmake that <= 3.5 # To pass the tests, install the specified cmake run: | set -e - curl -sL https://cmake.org/files/v3.13/cmake-3.13.0-Linux-x86_64.tar.gz | tar -xz - echo "$(pwd)/cmake-3.13.0-Linux-x86_64/bin" >> $GITHUB_PATH + curl -sL https://cmake.org/files/v3.22/cmake-3.22.0-Linux-x86_64.tar.gz | tar -xz + echo "$(pwd)/cmake-3.22.0-Linux-x86_64/bin" >> $GITHUB_PATH cmake --version - name: Tests diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index eb94c46..0f4f5b5 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -17,13 +17,13 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Install CMake 3.13 + - name: Install CMake 3.22 # gflags 2.2.2 uses cmake 3.0, and the latest cmake doesn't support cmake that <= 3.5 # To pass the tests, install the specified cmake run: | set -e - curl -sL https://cmake.org/files/v3.13/cmake-3.13.0-Darwin-x86_64.tar.gz | tar -xzv - echo "$(pwd)/cmake-3.13.0-Darwin-x86_64/CMake.app/Contents/bin" >> $GITHUB_PATH + curl -sL https://cmake.org/files/v3.22/cmake-3.22.0-Darwin-x86_64.tar.gz | tar -xzv + echo "$(pwd)/cmake-3.22.0-Darwin-x86_64/CMake.app/Contents/bin" >> $GITHUB_PATH cmake --version - name: Tests From 92b3682ee6d879cabd8577573f2f4c6617755945 Mon Sep 17 00:00:00 2001 From: Zhen Date: Sun, 28 Sep 2025 18:05:12 +0800 Subject: [PATCH 09/18] ci: Update CMake download paths in CI workflows Correct CMake archive filename capitalization for Linux workflow. Update macOS workflow to use universal CMake archive for broader compatibility. --- .github/workflows/linux.yml | 4 ++-- .github/workflows/macos.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index a55e8ce..fd0f160 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -22,8 +22,8 @@ jobs: # To pass the tests, install the specified cmake run: | set -e - curl -sL https://cmake.org/files/v3.22/cmake-3.22.0-Linux-x86_64.tar.gz | tar -xz - echo "$(pwd)/cmake-3.22.0-Linux-x86_64/bin" >> $GITHUB_PATH + curl -sL https://cmake.org/files/v3.22/cmake-3.22.0-linux-x86_64.tar.gz | tar -xz + echo "$(pwd)/cmake-3.22.0-linux-x86_64/bin" >> $GITHUB_PATH cmake --version - name: Tests diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 0f4f5b5..2864e48 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -22,8 +22,8 @@ jobs: # To pass the tests, install the specified cmake run: | set -e - curl -sL https://cmake.org/files/v3.22/cmake-3.22.0-Darwin-x86_64.tar.gz | tar -xzv - echo "$(pwd)/cmake-3.22.0-Darwin-x86_64/CMake.app/Contents/bin" >> $GITHUB_PATH + curl -sL https://cmake.org/files/v3.22/cmake-3.22.0-macos-universal.tar.gz | tar -xzv + echo "$(pwd)/cmake-3.22.0-macos-universal/CMake.app/Contents/bin" >> $GITHUB_PATH cmake --version - name: Tests From 247941f545916bae56b18abec52d014601884785 Mon Sep 17 00:00:00 2001 From: Zhen Date: Sun, 28 Sep 2025 18:27:00 +0800 Subject: [PATCH 10/18] fix(zlib): Apply macOS compatibility patch This patch addresses potential build issues for zlib on macOS by simplifying the macOS detection logic in and removing unnecessary related code. --- example/packages/xmake.lua | 1 + example/packages/zlib_macos.patch | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 example/packages/zlib_macos.patch diff --git a/example/packages/xmake.lua b/example/packages/xmake.lua index 0a125e5..99da772 100644 --- a/example/packages/xmake.lua +++ b/example/packages/xmake.lua @@ -7,6 +7,7 @@ package("myzlib") add_versions("v1.2.10", "42cd7b2bdaf1c4570e0877e61f2fdc0bce8019492431d054d3d86925e5058dc5") add_versions("v1.2.11", "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff") + add_patches("zlib_macos.patch") -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 on_install(function (package) io.writefile("xmake.lua", [[ diff --git a/example/packages/zlib_macos.patch b/example/packages/zlib_macos.patch new file mode 100644 index 0000000..a66a19e --- /dev/null +++ b/example/packages/zlib_macos.patch @@ -0,0 +1,21 @@ +--- a/zutil.h ++++ b/zutil.h +@@ -137,17 +137,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ + # endif + #endif + +-#if defined(MACOS) || defined(TARGET_OS_MAC) ++#if defined(MACOS) + # define OS_CODE 7 +-# ifndef Z_SOLO +-# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os +-# include /* for fdopen */ +-# else +-# ifndef fdopen +-# define fdopen(fd,mode) NULL /* No fdopen() */ +-# endif +-# endif +-# endif + #endif + + #ifdef __acorn From 09be0639185f5b3eca6f690455090c0a9d2a6440 Mon Sep 17 00:00:00 2001 From: Zhen Date: Sun, 28 Sep 2025 18:43:38 +0800 Subject: [PATCH 11/18] feat(zlib): Apply macOS patch version-specifically and relocate The has been moved to for better organization. The configuration has been updated to apply this patch specifically to zlib versions and . This ensures the macOS compatibility fix is applied only to the relevant versions, improving build system clarity and maintainability. The patch itself simplifies macOS detection in by removing and deprecated related code. --- example/packages/{ => patches}/zlib_macos.patch | 5 ++--- example/packages/xmake.lua | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) rename example/packages/{ => patches}/zlib_macos.patch (90%) diff --git a/example/packages/zlib_macos.patch b/example/packages/patches/zlib_macos.patch similarity index 90% rename from example/packages/zlib_macos.patch rename to example/packages/patches/zlib_macos.patch index a66a19e..94d1c1d 100644 --- a/example/packages/zlib_macos.patch +++ b/example/packages/patches/zlib_macos.patch @@ -5,8 +5,7 @@ #endif -#if defined(MACOS) || defined(TARGET_OS_MAC) -+#if defined(MACOS) - # define OS_CODE 7 +-# define OS_CODE 7 -# ifndef Z_SOLO -# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os -# include /* for fdopen */ @@ -16,6 +15,6 @@ -# endif -# endif -# endif - #endif +-#endif #ifdef __acorn diff --git a/example/packages/xmake.lua b/example/packages/xmake.lua index 99da772..184340d 100644 --- a/example/packages/xmake.lua +++ b/example/packages/xmake.lua @@ -7,7 +7,8 @@ package("myzlib") add_versions("v1.2.10", "42cd7b2bdaf1c4570e0877e61f2fdc0bce8019492431d054d3d86925e5058dc5") add_versions("v1.2.11", "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff") - add_patches("zlib_macos.patch") -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 + add_patches("v1.2.10", "patches/zlib_macos.patch") -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 + add_patches("v1.2.11", "patches/zlib_macos.patch") -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 on_install(function (package) io.writefile("xmake.lua", [[ From bff64887a72962e9abce6366a89a6a6be19518d4 Mon Sep 17 00:00:00 2001 From: Zhen Date: Sun, 28 Sep 2025 18:51:06 +0800 Subject: [PATCH 12/18] fix(xmake): Resolve zlib_macos.patch not found issue Updated add_patches to use absolute path for zlib_macos.patch using path.join(package:scriptdir(), ...) to ensure the patch is found during xmake package installation. --- example/packages/xmake.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/packages/xmake.lua b/example/packages/xmake.lua index 184340d..a517aab 100644 --- a/example/packages/xmake.lua +++ b/example/packages/xmake.lua @@ -7,8 +7,8 @@ package("myzlib") add_versions("v1.2.10", "42cd7b2bdaf1c4570e0877e61f2fdc0bce8019492431d054d3d86925e5058dc5") add_versions("v1.2.11", "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff") - add_patches("v1.2.10", "patches/zlib_macos.patch") -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 - add_patches("v1.2.11", "patches/zlib_macos.patch") -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 + add_patches("v1.2.10", path.join(package:scriptdir(), "patches", "zlib_macos.patch")) -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 + add_patches("v1.2.11", path.join(package:scriptdir(), "patches", "zlib_macos.patch")) -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 on_install(function (package) io.writefile("xmake.lua", [[ From dc5e94383dae2640398bf5230e00481c35287612 Mon Sep 17 00:00:00 2001 From: Zhen Date: Sun, 28 Sep 2025 18:56:24 +0800 Subject: [PATCH 13/18] refactor(xmake): use os.scriptdir instead of deprecated API Replaced the deprecated with the recommended in the example package definition. This aligns with modern Xmake practices and improves script consistency. --- example/packages/xmake.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/packages/xmake.lua b/example/packages/xmake.lua index a517aab..883804f 100644 --- a/example/packages/xmake.lua +++ b/example/packages/xmake.lua @@ -7,8 +7,8 @@ package("myzlib") add_versions("v1.2.10", "42cd7b2bdaf1c4570e0877e61f2fdc0bce8019492431d054d3d86925e5058dc5") add_versions("v1.2.11", "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff") - add_patches("v1.2.10", path.join(package:scriptdir(), "patches", "zlib_macos.patch")) -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 - add_patches("v1.2.11", path.join(package:scriptdir(), "patches", "zlib_macos.patch")) -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 + add_patches("v1.2.10", path.join(os.scriptdir(), "patches", "zlib_macos.patch")) -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 + add_patches("v1.2.11", path.join(os.scriptdir(), "patches", "zlib_macos.patch")) -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 on_install(function (package) io.writefile("xmake.lua", [[ From d00f2f209a9ac8f6b430539c72cff8be4c39c2ad Mon Sep 17 00:00:00 2001 From: Zhen Date: Sun, 28 Sep 2025 19:03:27 +0800 Subject: [PATCH 14/18] ci: try to fix patch path --- example/packages/xmake.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/packages/xmake.lua b/example/packages/xmake.lua index 883804f..28fbba1 100644 --- a/example/packages/xmake.lua +++ b/example/packages/xmake.lua @@ -7,8 +7,8 @@ package("myzlib") add_versions("v1.2.10", "42cd7b2bdaf1c4570e0877e61f2fdc0bce8019492431d054d3d86925e5058dc5") add_versions("v1.2.11", "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff") - add_patches("v1.2.10", path.join(os.scriptdir(), "patches", "zlib_macos.patch")) -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 - add_patches("v1.2.11", path.join(os.scriptdir(), "patches", "zlib_macos.patch")) -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 + add_patches("v1.2.10", "packages/patches/zlib_macos.patch") -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 + add_patches("v1.2.11", "packages/patches/zlib_macos.patch") -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 on_install(function (package) io.writefile("xmake.lua", [[ From 29e29ed4a994d8df03d6c25f41bc893988c67cd5 Mon Sep 17 00:00:00 2001 From: Zhen Date: Sun, 28 Sep 2025 19:07:06 +0800 Subject: [PATCH 15/18] ci: try to fix patch path --- example/packages/xmake.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/example/packages/xmake.lua b/example/packages/xmake.lua index 28fbba1..ae46b2e 100644 --- a/example/packages/xmake.lua +++ b/example/packages/xmake.lua @@ -7,8 +7,8 @@ package("myzlib") add_versions("v1.2.10", "42cd7b2bdaf1c4570e0877e61f2fdc0bce8019492431d054d3d86925e5058dc5") add_versions("v1.2.11", "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff") - add_patches("v1.2.10", "packages/patches/zlib_macos.patch") -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 - add_patches("v1.2.11", "packages/patches/zlib_macos.patch") -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 + add_patches("v1.2.10", "example/packages/patches/zlib_macos.patch") -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 + add_patches("v1.2.11", "example/packages/patches/zlib_macos.patch") -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 on_install(function (package) io.writefile("xmake.lua", [[ From 956858e7f9fae781e2ec01f9d88ef59bc125ebed Mon Sep 17 00:00:00 2001 From: Zhen Date: Sun, 28 Sep 2025 19:40:39 +0800 Subject: [PATCH 16/18] ci: fix zlib --- example-bin | Bin 0 -> 50584 bytes example/packages/patches/zlib_macos.patch | 20 -------------------- example/packages/xmake.lua | 6 ++---- 3 files changed, 2 insertions(+), 24 deletions(-) create mode 100755 example-bin delete mode 100644 example/packages/patches/zlib_macos.patch diff --git a/example-bin b/example-bin new file mode 100755 index 0000000000000000000000000000000000000000..832b93a9ef08d996949dc8fb0ef868279bbe8b4c GIT binary patch literal 50584 zcmeHw4SZC^x%ZsiL=rwEV)zgdf}#x&vb)KKBo%cbiHK56AzGx!VY7RZtZY8WE*Pp; z*T%0}t;Uxst<(Zy3tsG{YAvZyqIg@{Yj44Ftyj6;ptKEIdu{8zO|Y2zf9A~W&N;ga z5$b#I`+N7mWafWno@ZvBdFGip=giFh^7#87k7P_^xEyd3;0lK^b{CsUx7c}bSHbCe z?cDh_%W4*1OLwgoC$`>7Ld2&K8R&Xl&C)t+G^h7j?=gY1ahu#(B3jp@Mn_Ztcy@kE z$D5T|Kgmo(nCcb3vREu0MnKmi(KYpv_$@oX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$ID6 zwaU!?jTnk$ldAQ*XL39qDJ)yqDwylK2=)QHFjJ~`6?ZiIR~fE=KhR{j+OQiG8>u3$ zk}`LttIfrW;_|qQy*XzM9ZEv|z+2Cz(SJYQlR#dpcp?Y#WlUWtT{=($!id(0r%5lgQinIsfwJfP{$M1N$_~p-!41D>mFD(A-m_ObT+3?E`qIzkk4yXA$6KYFBlSoWJ6KljUl89%>z z#f%eKf8KlT?S~(pdBKZ&4n!W--gDpa+Y3KB_R|+#$3MS$^al@)S@o+A$36Q%U+33n z&L2DL`^Wxe(!t=P)q!W;bWJpc6V zJDyqE`jcY~Jz2j#cyN{D+NIfpw?234m+pFF&sVSdO3`=EH2$rR|6$b)>zaRXxvTN; z$oG!?@}56j|H9xK?AZtX`>(%k$D!}u{m4gocf~He|GYPrzxn+Ydm>L>`op}X)4$&7 z3cl5D-1v)+nrU;YSCoxZ8Lwd zr|7wd|NP#iOW!@)zu=O>9lt3m8+Gi`{a3XA<&}T-|E%Dn14pk5y*=)uH-CN4UD|I~ V^mN`>Uis>acmG?!f6tDy{~KhnyRZNN literal 0 HcmV?d00001 diff --git a/example/packages/patches/zlib_macos.patch b/example/packages/patches/zlib_macos.patch deleted file mode 100644 index 94d1c1d..0000000 --- a/example/packages/patches/zlib_macos.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/zutil.h -+++ b/zutil.h -@@ -137,17 +137,8 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ - # endif - #endif - --#if defined(MACOS) || defined(TARGET_OS_MAC) --# define OS_CODE 7 --# ifndef Z_SOLO --# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os --# include /* for fdopen */ --# else --# ifndef fdopen --# define fdopen(fd,mode) NULL /* No fdopen() */ --# endif --# endif --# endif --#endif - - #ifdef __acorn diff --git a/example/packages/xmake.lua b/example/packages/xmake.lua index ae46b2e..b0b3ebe 100644 --- a/example/packages/xmake.lua +++ b/example/packages/xmake.lua @@ -5,10 +5,8 @@ package("myzlib") add_urls("https://github.com/madler/zlib/archive/$(version).tar.gz", "https://github.com/madler/zlib.git") - add_versions("v1.2.10", "42cd7b2bdaf1c4570e0877e61f2fdc0bce8019492431d054d3d86925e5058dc5") - add_versions("v1.2.11", "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff") - add_patches("v1.2.10", "example/packages/patches/zlib_macos.patch") -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 - add_patches("v1.2.11", "example/packages/patches/zlib_macos.patch") -- https://forums.bannister.org/ubbthreads.php?ubb=showflat&Number=124397 + add_versions("v1.3", "b5b06d60ce49c8ba700e0ba517fa07de80b5d4628a037f4be8ad16955be7a7c0") + add_versions("v1.3.1", "17e88863f3600672ab49182f217281b6fc4d3c762bde361935e436a95214d05c") on_install(function (package) io.writefile("xmake.lua", [[ From 020fbe6e0fc482d3eaf2f4cd426a780b9eb917fa Mon Sep 17 00:00:00 2001 From: Zhen Date: Sun, 28 Sep 2025 19:45:48 +0800 Subject: [PATCH 17/18] feat(ci): add Visual Studio v144 toolset install step for Windows Ensure the required MSVC v144 build tools are available in Windows CI by installing them via Chocolatey before running tests. --- .github/workflows/windows.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 6156258..d4cb48e 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -18,6 +18,10 @@ jobs: steps: - uses: actions/checkout@v1 + - name: Install Visual Studio v144 toolset + run: | + choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.v144" + - name: Tests run: | cmake -DXREPO_PACKAGE_VERBOSE=ON example From bb4ed5afab8580f8064588086f0ca9ef1414e3bf Mon Sep 17 00:00:00 2001 From: Zhen Date: Sun, 28 Sep 2025 20:08:14 +0800 Subject: [PATCH 18/18] build: Update xmake and streamline Windows CI Update the default xmake version to 3.0.3. Remove redundant Visual Studio 2022 v144 toolset installation from Windows CI workflow, improving build efficiency. The toolset is now pre-installed on GitHub Actions runners. --- .github/workflows/windows.yml | 4 ---- xrepo.cmake | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index d4cb48e..6156258 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -18,10 +18,6 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Install Visual Studio v144 toolset - run: | - choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.v144" - - name: Tests run: | cmake -DXREPO_PACKAGE_VERBOSE=ON example diff --git a/xrepo.cmake b/xrepo.cmake index 3867ecb..4fe14f1 100644 --- a/xrepo.cmake +++ b/xrepo.cmake @@ -74,7 +74,7 @@ set(XREPO_XMAKEFILE "" CACHE STRING "Xmake script file of Xrepo package") function(_install_xmake_program) if (NOT XMAKE_RELEASE_LATEST) - set(XMAKE_RELEASE_LATEST 2.9.4) + set(XMAKE_RELEASE_LATEST 3.0.3) endif() set(XMAKE_VERSION master) set(XMAKE_BINARY_DIR ${CMAKE_BINARY_DIR}/xmake)