diff options
Diffstat (limited to 'dev-games/aseprite/files/aseprite-1.2.34.1-system_libarchive.patch')
-rw-r--r-- | dev-games/aseprite/files/aseprite-1.2.34.1-system_libarchive.patch | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/dev-games/aseprite/files/aseprite-1.2.34.1-system_libarchive.patch b/dev-games/aseprite/files/aseprite-1.2.34.1-system_libarchive.patch new file mode 100644 index 0000000..8b23f45 --- /dev/null +++ b/dev-games/aseprite/files/aseprite-1.2.34.1-system_libarchive.patch @@ -0,0 +1,93 @@ +diff -uNr a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2022-01-12 15:10:33.000000000 +0100 ++++ b/CMakeLists.txt 2022-01-18 15:06:41.357885045 +0100 +@@ -57,6 +57,7 @@ + option(USE_SHARED_GIFLIB "Use your installed copy of giflib" off) + option(USE_SHARED_JPEGLIB "Use your installed copy of jpeglib" off) + option(USE_SHARED_ZLIB "Use your installed copy of zlib" off) ++option(USE_SHARED_LIBARCHIVE "Use your installed copy of libarchive" off) + option(USE_SHARED_LIBPNG "Use your installed copy of libpng" off) + option(USE_SHARED_TINYXML "Use your installed copy of tinyxml" off) + option(USE_SHARED_PIXMAN "Use your installed copy of pixman" off) +@@ -216,6 +217,15 @@ + endif() + include_directories(${ZLIB_INCLUDE_DIRS}) + ++# libarchive ++if(USE_SHARED_LIBARCHIVE) ++ find_library(ARCHIVE_LIBRARIES NAMES archive) ++ find_path(ARCHIVE_INCLUDE_DIRS NAMES archive.h) ++else() ++ add_definitions(-DLIBARCHIVE_STATIC) ++ set(ARCHIVE_LIBRARIES archive_static) ++endif() ++ + # libpng + if(USE_SHARED_LIBPNG) + find_package(PNG REQUIRED) +diff -uNr a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt +--- a/src/app/CMakeLists.txt 2022-01-12 15:10:33.000000000 +0100 ++++ b/src/app/CMakeLists.txt 2022-01-18 15:06:41.357885045 +0100 +@@ -91,9 +91,6 @@ + add_definitions(-DENABLE_WEBP) + endif() + +-# libarchive definitions +-add_definitions(-DLIBARCHIVE_STATIC) +- + ###################################################################### + # app-lib target + +@@ -669,7 +666,7 @@ + ${FREETYPE_LIBRARIES} + ${HARFBUZZ_LIBRARIES} + json11 +- archive_static ++ ${ARCHIVE_LIBRARIES} + fmt + tinyexpr) + +diff -uNr a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt +--- a/third_party/CMakeLists.txt 2022-01-12 15:10:34.000000000 +0100 ++++ b/third_party/CMakeLists.txt 2022-01-18 15:06:41.357885045 +0100 +@@ -119,22 +119,24 @@ + add_subdirectory(json11) + + # libarchive +-set(ENABLE_WERROR OFF CACHE BOOL "Treat warnings as errors - default is ON for Debug, OFF otherwise.") +-set(ENABLE_TEST OFF CACHE BOOL "Enable unit and regression tests") +-set(ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage (GCC only, automatically sets ENABLE_TEST to ON)") +-set(ENABLE_LZ4 OFF CACHE BOOL "Enable the use of the system LZ4 library if found") +-set(ENABLE_LZO OFF CACHE BOOL "Enable the use of the system LZO library if found") +-set(ENABLE_LZMA OFF CACHE BOOL "Enable the use of the system LZMA library if found") +-set(ENABLE_ZSTD OFF CACHE BOOL "Enable the use of the system zstd library if found") +-set(ENABLE_CNG OFF CACHE BOOL "Enable the use of CNG(Crypto Next Generation)") +-set(ENABLE_BZip2 OFF CACHE BOOL "Enable the use of the system BZip2 library if found") +-set(ENABLE_LIBXML2 OFF CACHE BOOL "Enable the use of the system libxml2 library if found") +-set(ENABLE_CAT OFF CACHE BOOL "Enable cat building") +-set(ENABLE_TAR OFF CACHE BOOL "Enable tar building") +-set(ENABLE_CPIO OFF CACHE BOOL "Enable cpio building") +-add_subdirectory(libarchive) +-target_include_directories(archive_static INTERFACE +- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libarchive/libarchive>) ++if(NOT USE_SHARED_LIBARCHIVE) ++ set(ENABLE_WERROR OFF CACHE BOOL "Treat warnings as errors - default is ON for Debug, OFF otherwise.") ++ set(ENABLE_TEST OFF CACHE BOOL "Enable unit and regression tests") ++ set(ENABLE_COVERAGE OFF CACHE BOOL "Enable code coverage (GCC only, automatically sets ENABLE_TEST to ON)") ++ set(ENABLE_LZ4 OFF CACHE BOOL "Enable the use of the system LZ4 library if found") ++ set(ENABLE_LZO OFF CACHE BOOL "Enable the use of the system LZO library if found") ++ set(ENABLE_LZMA OFF CACHE BOOL "Enable the use of the system LZMA library if found") ++ set(ENABLE_ZSTD OFF CACHE BOOL "Enable the use of the system zstd library if found") ++ set(ENABLE_CNG OFF CACHE BOOL "Enable the use of CNG(Crypto Next Generation)") ++ set(ENABLE_BZip2 OFF CACHE BOOL "Enable the use of the system BZip2 library if found") ++ set(ENABLE_LIBXML2 OFF CACHE BOOL "Enable the use of the system libxml2 library if found") ++ set(ENABLE_CAT OFF CACHE BOOL "Enable cat building") ++ set(ENABLE_TAR OFF CACHE BOOL "Enable tar building") ++ set(ENABLE_CPIO OFF CACHE BOOL "Enable cpio building") ++ add_subdirectory(libarchive) ++ target_include_directories(archive_static INTERFACE ++ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libarchive/libarchive>) ++endif() + + # benchmark + if(ENABLE_BENCHMARKS) |