From cc52f2e3320eb677251e2fd9d7fa74e9ef1b3ae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=9A=93?= Date: Thu, 2 Jan 2025 18:54:50 -0500 Subject: [PATCH] Make libzip Meson subproject use header files from the other Meson subprojects --- .github/workflows/autobuild.yml | 6 ++-- meson.build | 7 ---- subprojects/packagefiles/libzip.patch | 50 +++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 10 deletions(-) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 85b238ff..762ec7df 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -351,7 +351,7 @@ jobs: - uses: msys2/setup-msys2@v2 with: msystem: mingw64 - install: base-devel git mingw-w64-x86_64-make mingw-w64-x86_64-cmake mingw-w64-x86_64-meson mingw-w64-x86_64-gcc + install: base-devel git mingw-w64-x86_64-gcc mingw-w64-x86_64-meson mingw-w64-x86_64-cmake - name: Build phase 2 shell: msys2 {0} @@ -427,7 +427,7 @@ jobs: echo 'Components: main universe' | sudo tee -a /etc/apt/sources.list.d/ubuntu.sources fi sudo apt update - sudo apt install git build-essential make meson cmake -y + sudo apt install git build-essential meson cmake -y if [ '${{ matrix.arch_mkxpz }}' != 'x86_64' ] then sudo apt install gcc-${{ matrix.arch_gcc }} g++-${{ matrix.arch_gcc }} -y @@ -468,7 +468,7 @@ jobs: - name: Install dependencies run: | - brew install -q git make meson cmake + brew install -q git meson cmake - name: Build phase 2 run: | diff --git a/meson.build b/meson.build index 67c63245..ea1121dd 100644 --- a/meson.build +++ b/meson.build @@ -49,13 +49,6 @@ if get_option('retro') == true 'ENABLE_LIB_ONLY': true, }) - bzip2_options = cmake.subproject_options() - bzip2_options.add_cmake_defines({ - 'CMAKE_POSITION_INDEPENDENT_CODE': true, - 'ENABLE_STATIC_LIB': true, - 'ENABLE_LIB_ONLY': true, - }) - lzma_options = cmake.subproject_options() lzma_options.add_cmake_defines({ 'CMAKE_POSITION_INDEPENDENT_CODE': true, diff --git a/subprojects/packagefiles/libzip.patch b/subprojects/packagefiles/libzip.patch index af7cd6b0..601f18e7 100644 --- a/subprojects/packagefiles/libzip.patch +++ b/subprojects/packagefiles/libzip.patch @@ -99,3 +99,53 @@ diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt target_include_directories(zip PUBLIC $ +diff --git a/lib/zip_algorithm_bzip2.c b/lib/zip_algorithm_bzip2.c +--- a/lib/zip_algorithm_bzip2.c ++++ b/lib/zip_algorithm_bzip2.c +@@ -33,7 +33,7 @@ + + #include "zipint.h" + +-#include ++#include "../../bzip2/bzlib.h" + #include + #include + +diff --git a/lib/zip_algorithm_deflate.c b/lib/zip_algorithm_deflate.c +--- a/lib/zip_algorithm_deflate.c ++++ b/lib/zip_algorithm_deflate.c +@@ -35,7 +35,7 @@ + + #include + #include +-#include ++#include "../../zlib/zlib.h" + + struct ctx { + zip_error_t *error; +diff --git a/lib/zip_algorithm_xz.c b/lib/zip_algorithm_xz.c +--- a/lib/zip_algorithm_xz.c ++++ b/lib/zip_algorithm_xz.c +@@ -35,7 +35,7 @@ + #include "zipint.h" + + #include +-#include ++#include "../../lzma/src/liblzma/api/lzma.h" + #include + #include + +diff --git a/lib/zip_algorithm_zstd.c b/lib/zip_algorithm_zstd.c +--- a/lib/zip_algorithm_zstd.c ++++ b/lib/zip_algorithm_zstd.c +@@ -34,8 +34,8 @@ + #include "zipint.h" + + #include +-#include +-#include ++#include "../../zstd/lib/zstd.h" ++#include "../../zstd/lib/zstd_errors.h" + + struct ctx { + zip_error_t *error;