From 664924d8659185e3b43f99ee8a0b88177efb93dc Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 22 Nov 2022 19:06:54 +0000 Subject: gentoo auto-resync : 22:11:2022 - 19:06:54 --- .../files/aseprite-1.2.35_check_colorSpace.patch | 25 ----- .../files/aseprite-1.2.35_shared_json11.patch | 54 ----------- .../files/aseprite-1.2.35_shared_libarchive.patch | 106 --------------------- .../files/aseprite-1.2.35_shared_webp.patch | 90 ----------------- .../files/aseprite-1.2.40_musl_pthreads.patch | 57 +++++++++++ .../files/aseprite-1.2.40_shared_json11.patch | 54 +++++++++++ .../files/aseprite-1.2.40_shared_libarchive.patch | 106 +++++++++++++++++++++ .../files/aseprite-1.2.40_shared_webp.patch | 72 ++++++++++++++ 8 files changed, 289 insertions(+), 275 deletions(-) delete mode 100644 dev-games/aseprite/files/aseprite-1.2.35_check_colorSpace.patch delete mode 100644 dev-games/aseprite/files/aseprite-1.2.35_shared_json11.patch delete mode 100644 dev-games/aseprite/files/aseprite-1.2.35_shared_libarchive.patch delete mode 100644 dev-games/aseprite/files/aseprite-1.2.35_shared_webp.patch create mode 100644 dev-games/aseprite/files/aseprite-1.2.40_musl_pthreads.patch create mode 100644 dev-games/aseprite/files/aseprite-1.2.40_shared_json11.patch create mode 100644 dev-games/aseprite/files/aseprite-1.2.40_shared_libarchive.patch create mode 100644 dev-games/aseprite/files/aseprite-1.2.40_shared_webp.patch (limited to 'dev-games/aseprite/files') diff --git a/dev-games/aseprite/files/aseprite-1.2.35_check_colorSpace.patch b/dev-games/aseprite/files/aseprite-1.2.35_check_colorSpace.patch deleted file mode 100644 index e674d1409699..000000000000 --- a/dev-games/aseprite/files/aseprite-1.2.35_check_colorSpace.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 7ce4c04bce391ed16b8b8eeafc1b27c36638014c Mon Sep 17 00:00:00 2001 -From: "Azamat H. Hackimov" -Date: Sun, 10 Jul 2022 19:33:44 +0300 -Subject: [PATCH] Check colorSpace before accessing - -In some cases internal surface may not have a colorspace. ---- - src/app/ui/color_selector.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/app/ui/color_selector.cpp b/src/app/ui/color_selector.cpp -index 50ca45476..0aefaa52b 100644 ---- a/src/app/ui/color_selector.cpp -+++ b/src/app/ui/color_selector.cpp -@@ -447,6 +447,7 @@ void ColorSelector::onPaint(ui::PaintEvent& ev) - bool isSRGB; - // TODO compare both color spaces - if (get_current_color_space()->isSRGB() && -+ g->getInternalSurface()->colorSpace() && - g->getInternalSurface()->colorSpace()->isSRGB()) { - // We can render directly in the ui::Graphics surface - canvas = &static_cast(g->getInternalSurface())->canvas(); --- -2.35.1 - diff --git a/dev-games/aseprite/files/aseprite-1.2.35_shared_json11.patch b/dev-games/aseprite/files/aseprite-1.2.35_shared_json11.patch deleted file mode 100644 index ef962c507609..000000000000 --- a/dev-games/aseprite/files/aseprite-1.2.35_shared_json11.patch +++ /dev/null @@ -1,54 +0,0 @@ -From b7b1563f0a7b913bac62673b1629755eb2adafc3 Mon Sep 17 00:00:00 2001 -From: "Azamat H. Hackimov" -Date: Sun, 10 Jul 2022 19:53:06 +0300 -Subject: [PATCH] Use shared json11 library - -Added option -DUSE_SHARED_JSON11 ---- - CMakeLists.txt | 7 +++++++ - third_party/CMakeLists.txt | 4 +++- - 2 files changed, 10 insertions(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 26e09c418..306049917 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -50,6 +50,7 @@ option(USE_SHARED_CMARK "Use your installed copy of cmark" off) - option(USE_SHARED_CURL "Use your installed copy of curl" off) - 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_JSON11 "Use your installed copy of json11" 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) -@@ -308,6 +309,12 @@ else() - endif() - include_directories(${JPEG_INCLUDE_DIRS}) - -+if(USE_SHARED_JSON11) -+ find_package(PkgConfig QUIET) -+ pkg_check_modules(JSON11 json11) -+ include_directories(${JSON11_INCLUDE_DIRS}) -+endif() -+ - if(USE_SHARED_CMARK) - find_library(CMARK_LIBRARIES NAMES cmark) - find_path(CMARK_INCLUDE_DIRS NAMES cmark.h) -diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt -index 12017190f..f499545b6 100644 ---- a/third_party/CMakeLists.txt -+++ b/third_party/CMakeLists.txt -@@ -123,7 +123,9 @@ if(NOT USE_SHARED_CMARK) - endif() - - # JSON --add_subdirectory(json11) -+if(NOT USE_SHARED_JSON11) -+ add_subdirectory(json11) -+endif() - - # libarchive - if(NOT USE_SHARED_LIBARCHIVE) --- -2.35.1 - diff --git a/dev-games/aseprite/files/aseprite-1.2.35_shared_libarchive.patch b/dev-games/aseprite/files/aseprite-1.2.35_shared_libarchive.patch deleted file mode 100644 index 0e0e1bd0e98f..000000000000 --- a/dev-games/aseprite/files/aseprite-1.2.35_shared_libarchive.patch +++ /dev/null @@ -1,106 +0,0 @@ -From ddc7f2c19fd104e99bc49210b1f6ac3f5cec1548 Mon Sep 17 00:00:00 2001 -From: "Azamat H. Hackimov" -Date: Fri, 9 Oct 2020 02:18:36 +0300 -Subject: [PATCH] Make LibArchive as shared library dependency - ---- - CMakeLists.txt | 11 +++++++++++ - src/app/CMakeLists.txt | 2 +- - third_party/CMakeLists.txt | 38 ++++++++++++++++++++------------------ - 3 files changed, 32 insertions(+), 19 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1e7692679..26e09c418 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -51,6 +51,7 @@ option(USE_SHARED_CURL "Use your installed copy of curl" off) - 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) -@@ -210,6 +211,16 @@ else() - endif() - include_directories(${ZLIB_INCLUDE_DIRS}) - -+# libarchive -+if(USE_SHARED_LIBARCHIVE) -+ find_package(LibArchive REQUIRED) -+else() -+ set(LibArchive_FOUND) -+ set(LibArchive_LIBRARIES archive_static) -+ set(LibArchive_INCLUDE_DIRS $) -+endif() -+include_directories(${LibArchive_INCLUDE_DIRS}) -+ - # libpng - if(USE_SHARED_LIBPNG) - find_package(PNG REQUIRED) -diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt -index c42768ff6..e0495f98f 100644 ---- a/src/app/CMakeLists.txt -+++ b/src/app/CMakeLists.txt -@@ -670,8 +670,8 @@ target_link_libraries(app-lib - ${ZLIB_LIBRARIES} - ${FREETYPE_LIBRARIES} - ${HARFBUZZ_LIBRARIES} -+ ${LibArchive_LIBRARIES} - json11 -- archive_static - fmt - tinyexpr) - -diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt -index 2c0a08248..12017190f 100644 ---- a/third_party/CMakeLists.txt -+++ b/third_party/CMakeLists.txt -@@ -126,24 +126,26 @@ endif() - 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_EXPAT OFF CACHE BOOL "Enable the use of the system EXPAT 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") --set(ENABLE_LIBB2 OFF CACHE BOOL "Enable the use of the system LIBB2 library if found") --add_subdirectory(libarchive) --target_include_directories(archive_static INTERFACE -- $) -+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_EXPAT OFF CACHE BOOL "Enable the use of the system EXPAT 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") -+ set(ENABLE_LIBB2 OFF CACHE BOOL "Enable the use of the system LIBB2 library if found") -+ add_subdirectory(libarchive) -+ target_include_directories(archive_static INTERFACE -+ $) -+endif() - - # benchmark - if(ENABLE_BENCHMARKS) --- -2.35.1 - diff --git a/dev-games/aseprite/files/aseprite-1.2.35_shared_webp.patch b/dev-games/aseprite/files/aseprite-1.2.35_shared_webp.patch deleted file mode 100644 index 0344c691a06c..000000000000 --- a/dev-games/aseprite/files/aseprite-1.2.35_shared_webp.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 848e031f0289c7fd67c2d6d098de26e479a40adb Mon Sep 17 00:00:00 2001 -From: "Azamat H. Hackimov" -Date: Sun, 10 Jul 2022 20:14:00 +0300 -Subject: [PATCH] Use shared webp library - -Added option -DUSE_SHARED_WEBP ---- - CMakeLists.txt | 13 ++++++++++--- - third_party/CMakeLists.txt | 34 ++++++++++++++++++---------------- - 2 files changed, 28 insertions(+), 19 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 306049917..0196a47f2 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -56,6 +56,7 @@ 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) -+option(USE_SHARED_WEBP "User your installed copy of webp" off) - option(USE_SHARED_FREETYPE "Use shared FreeType library" off) - option(USE_SHARED_HARFBUZZ "Use shared HarfBuzz library" off) - option(ENABLE_ASEPRITE_EXE "Compile main Aseprite executable" on) -@@ -241,9 +242,15 @@ add_definitions(-DPNG_NO_MMX_CODE) # Do not use MMX optimizations in PNG code - - # libwebp - if(ENABLE_WEBP) -- set(WEBP_LIBRARIES webp webpdemux libwebpmux) -- set(WEBP_INCLUDE_DIR ${LIBWEBP_DIR}/src) -- include_directories(${WEBP_INCLUDE_DIR}) -+ if(USE_SHARED_WEBP) -+ find_package(PkgConfig QUIET) -+ pkg_check_modules(WEBP libwebp libwebpdemux libwebpmux) -+ include_directories(${WEBP_INCLUDE_DIR}) -+ else() -+ set(WEBP_LIBRARIES webp webpdemux libwebpmux) -+ set(WEBP_INCLUDE_DIR ${LIBWEBP_DIR}/src) -+ include_directories(${WEBP_INCLUDE_DIR}) -+ endif() - endif() - - # tinyxml -diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt -index f499545b6..6855fd6db 100644 ---- a/third_party/CMakeLists.txt -+++ b/third_party/CMakeLists.txt -@@ -34,22 +34,24 @@ if(NOT USE_SHARED_GIFLIB) - endif() - - if(ENABLE_WEBP) -- set(WEBP_BUILD_EXTRAS OFF CACHE BOOL "Build extras.") -- set(WEBP_BUILD_ANIM_UTILS OFF CACHE BOOL "Build animation utilities.") -- set(WEBP_BUILD_CWEBP OFF CACHE BOOL "Build the cwebp command line tool.") -- set(WEBP_BUILD_DWEBP OFF CACHE BOOL "Build the dwebp command line tool.") -- set(WEBP_BUILD_GIF2WEBP OFF CACHE BOOL "Build the gif2webp conversion tool.") -- set(WEBP_BUILD_IMG2WEBP OFF CACHE BOOL "Build the img2webp animation tool.") -- set(WEBP_BUILD_VWEBP OFF CACHE BOOL "Build the vwebp viewer tool.") -- set(WEBP_BUILD_WEBPINFO OFF CACHE BOOL "Build the webpinfo command line tool.") -- set(WEBP_BUILD_WEBPMUX OFF CACHE BOOL "Build the webpmux command line tool.") -- -- add_subdirectory(libwebp) -- -- if(NOT USE_SHARED_LIBPNG) -- add_dependencies(webp ${PNG_LIBRARY}) -- add_dependencies(webpdemux ${PNG_LIBRARY}) -- add_dependencies(libwebpmux ${PNG_LIBRARY}) -+ if(NOT USE_SHARED_WEBP) -+ set(WEBP_BUILD_EXTRAS OFF CACHE BOOL "Build extras.") -+ set(WEBP_BUILD_ANIM_UTILS OFF CACHE BOOL "Build animation utilities.") -+ set(WEBP_BUILD_CWEBP OFF CACHE BOOL "Build the cwebp command line tool.") -+ set(WEBP_BUILD_DWEBP OFF CACHE BOOL "Build the dwebp command line tool.") -+ set(WEBP_BUILD_GIF2WEBP OFF CACHE BOOL "Build the gif2webp conversion tool.") -+ set(WEBP_BUILD_IMG2WEBP OFF CACHE BOOL "Build the img2webp animation tool.") -+ set(WEBP_BUILD_VWEBP OFF CACHE BOOL "Build the vwebp viewer tool.") -+ set(WEBP_BUILD_WEBPINFO OFF CACHE BOOL "Build the webpinfo command line tool.") -+ set(WEBP_BUILD_WEBPMUX OFF CACHE BOOL "Build the webpmux command line tool.") -+ -+ add_subdirectory(libwebp) -+ -+ if(NOT USE_SHARED_LIBPNG) -+ add_dependencies(webp ${PNG_LIBRARY}) -+ add_dependencies(webpdemux ${PNG_LIBRARY}) -+ add_dependencies(libwebpmux ${PNG_LIBRARY}) -+ endif() - endif() - endif() - --- -2.35.1 - diff --git a/dev-games/aseprite/files/aseprite-1.2.40_musl_pthreads.patch b/dev-games/aseprite/files/aseprite-1.2.40_musl_pthreads.patch new file mode 100644 index 000000000000..6a6dfd9f6020 --- /dev/null +++ b/dev-games/aseprite/files/aseprite-1.2.40_musl_pthreads.patch @@ -0,0 +1,57 @@ +From 27403363708ca72cbbbdb085de27896485c5c422 Mon Sep 17 00:00:00 2001 +From: "Azamat H. Hackimov" +Date: Sat, 12 Nov 2022 05:13:08 +0300 +Subject: [PATCH] Don't use pthread_detach() after pthread_join() + +After pthread_join() all allocated to thread resources are freed, so +pthread_detach() after pthread_join() will results in undefined behavior +with SIGSERV on some libc implementations (like MUSL). According to +pthread_detach(3), "Either pthread_join(3) or pthread_detach() should be +called for each thread that an application creates". +--- + base/thread.cpp | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/laf/base/thread.cpp b/laf/base/thread.cpp +index 81c1284..4d5e0ce 100644 +--- a/laf/base/thread.cpp ++++ b/laf/base/thread.cpp +@@ -55,8 +55,12 @@ thread::thread() + + thread::~thread() + { +- if (joinable()) ++ if (joinable()) { ++#if LAF_WINDOWS ++ ::CloseHandle(m_native_handle); ++#endif + detach(); ++ } + } + + bool thread::joinable() const +@@ -69,6 +73,7 @@ void thread::join() + if (joinable()) { + #if LAF_WINDOWS + ::WaitForSingleObject(m_native_handle, INFINITE); ++ ::CloseHandle(m_native_handle); + #else + ::pthread_join((pthread_t)m_native_handle, NULL); + #endif +@@ -79,12 +84,7 @@ void thread::join() + void thread::detach() + { + if (joinable()) { +-#if LAF_WINDOWS +- ::CloseHandle(m_native_handle); +- m_native_handle = (native_handle_type)0; +-#else +- ::pthread_detach((pthread_t)m_native_handle); +-#endif ++ m_native_handle = (native_handle_type)NULL; + } + } + +-- +2.37.4 + diff --git a/dev-games/aseprite/files/aseprite-1.2.40_shared_json11.patch b/dev-games/aseprite/files/aseprite-1.2.40_shared_json11.patch new file mode 100644 index 000000000000..d4c50484c9a8 --- /dev/null +++ b/dev-games/aseprite/files/aseprite-1.2.40_shared_json11.patch @@ -0,0 +1,54 @@ +From d92660c3187d0e7d5a0b7b2210f328d0d0bf73f2 Mon Sep 17 00:00:00 2001 +From: "Azamat H. Hackimov" +Date: Sun, 10 Jul 2022 19:53:06 +0300 +Subject: [PATCH 2/3] Use shared json11 library + +Added option -DUSE_SHARED_JSON11 +--- + CMakeLists.txt | 7 +++++++ + third_party/CMakeLists.txt | 4 +++- + 2 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 85d447ac8..69ab97ed8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -50,6 +50,7 @@ option(USE_SHARED_CMARK "Use your installed copy of cmark" off) + option(USE_SHARED_CURL "Use your installed copy of curl" off) + 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_JSON11 "Use your installed copy of json11" 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) +@@ -301,6 +302,12 @@ else() + endif() + include_directories(${JPEG_INCLUDE_DIRS}) + ++if(USE_SHARED_JSON11) ++ find_package(PkgConfig QUIET) ++ pkg_check_modules(JSON11 json11) ++ include_directories(${JSON11_INCLUDE_DIRS}) ++endif() ++ + if(USE_SHARED_CMARK) + find_library(CMARK_LIBRARIES NAMES cmark) + find_path(CMARK_INCLUDE_DIRS NAMES cmark.h) +diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt +index e0a11c9c6..63ad42f23 100644 +--- a/third_party/CMakeLists.txt ++++ b/third_party/CMakeLists.txt +@@ -123,7 +123,9 @@ if(NOT USE_SHARED_CMARK) + endif() + + # JSON +-add_subdirectory(json11) ++if(NOT USE_SHARED_JSON11) ++ add_subdirectory(json11) ++endif() + + # libarchive + if(NOT USE_SHARED_LIBARCHIVE) +-- +2.37.4 + diff --git a/dev-games/aseprite/files/aseprite-1.2.40_shared_libarchive.patch b/dev-games/aseprite/files/aseprite-1.2.40_shared_libarchive.patch new file mode 100644 index 000000000000..ffe5ae8bdeef --- /dev/null +++ b/dev-games/aseprite/files/aseprite-1.2.40_shared_libarchive.patch @@ -0,0 +1,106 @@ +From dcad402ec83ca298cc206a1e8170b13c3f9a40fd Mon Sep 17 00:00:00 2001 +From: "Azamat H. Hackimov" +Date: Fri, 9 Oct 2020 02:18:36 +0300 +Subject: [PATCH 1/3] Make LibArchive as shared library dependency + +--- + CMakeLists.txt | 11 +++++++++++ + src/app/CMakeLists.txt | 2 +- + third_party/CMakeLists.txt | 38 ++++++++++++++++++++------------------ + 3 files changed, 32 insertions(+), 19 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e9814380d..85d447ac8 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -51,6 +51,7 @@ option(USE_SHARED_CURL "Use your installed copy of curl" off) + 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) +@@ -210,6 +211,16 @@ else() + endif() + include_directories(${ZLIB_INCLUDE_DIRS}) + ++# libarchive ++if(USE_SHARED_LIBARCHIVE) ++ find_package(LibArchive REQUIRED) ++else() ++ set(LibArchive_FOUND) ++ set(LibArchive_LIBRARIES archive_static) ++ set(LibArchive_INCLUDE_DIRS $) ++endif() ++include_directories(${LibArchive_INCLUDE_DIRS}) ++ + # libpng + if(USE_SHARED_LIBPNG) + find_package(PNG REQUIRED) +diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt +index c42768ff6..e0495f98f 100644 +--- a/src/app/CMakeLists.txt ++++ b/src/app/CMakeLists.txt +@@ -670,8 +670,8 @@ target_link_libraries(app-lib + ${ZLIB_LIBRARIES} + ${FREETYPE_LIBRARIES} + ${HARFBUZZ_LIBRARIES} ++ ${LibArchive_LIBRARIES} + json11 +- archive_static + fmt + tinyexpr) + +diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt +index 96a82829d..e0a11c9c6 100644 +--- a/third_party/CMakeLists.txt ++++ b/third_party/CMakeLists.txt +@@ -126,24 +126,26 @@ endif() + 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_EXPAT OFF CACHE BOOL "Enable the use of the system EXPAT 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") +-set(ENABLE_LIBB2 OFF CACHE BOOL "Enable the use of the system LIBB2 library if found") +-add_subdirectory(libarchive) +-target_include_directories(archive_static INTERFACE +- $) ++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_EXPAT OFF CACHE BOOL "Enable the use of the system EXPAT 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") ++ set(ENABLE_LIBB2 OFF CACHE BOOL "Enable the use of the system LIBB2 library if found") ++ add_subdirectory(libarchive) ++ target_include_directories(archive_static INTERFACE ++ $) ++endif() + + # benchmark + if(ENABLE_BENCHMARKS) +-- +2.37.4 + diff --git a/dev-games/aseprite/files/aseprite-1.2.40_shared_webp.patch b/dev-games/aseprite/files/aseprite-1.2.40_shared_webp.patch new file mode 100644 index 000000000000..44f46efac5d5 --- /dev/null +++ b/dev-games/aseprite/files/aseprite-1.2.40_shared_webp.patch @@ -0,0 +1,72 @@ +From adabed7947074268be713e1da3b4cb2d6d8c88a5 Mon Sep 17 00:00:00 2001 +From: "Azamat H. Hackimov" +Date: Sun, 10 Jul 2022 20:14:00 +0300 +Subject: [PATCH 3/3] Use shared webp library + +Added option -DUSE_SHARED_WEBP +--- + CMakeLists.txt | 25 ++++++++++++++++--------- + third_party/CMakeLists.txt | 2 +- + 2 files changed, 17 insertions(+), 10 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 69ab97ed8..2cb0886cd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -56,6 +56,7 @@ 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) ++option(USE_SHARED_WEBP "Use your installed copy of webp" off) + option(USE_SHARED_FREETYPE "Use shared FreeType library" off) + option(USE_SHARED_HARFBUZZ "Use shared HarfBuzz library" off) + option(ENABLE_ASEPRITE_EXE "Compile main Aseprite executable" on) +@@ -345,17 +346,23 @@ add_subdirectory(laf) + + # libwebp + if(ENABLE_WEBP) +- # Use libwebp from Skia +- if(LAF_BACKEND STREQUAL "skia") +- find_library(WEBP_LIBRARIES webp +- NAMES libwebp # required for Windows +- PATHS "${SKIA_LIBRARY_DIR}" NO_DEFAULT_PATH) +- set(WEBP_INCLUDE_DIR "${SKIA_DIR}/third_party/externals/libwebp/src") ++ if(USE_SHARED_WEBP) ++ find_package(PkgConfig QUIET) ++ pkg_check_modules(WEBP libwebp libwebpdemux libwebpmux) ++ include_directories(${WEBP_INCLUDE_DIR}) + else() +- set(WEBP_LIBRARIES webp webpdemux libwebpmux) +- set(WEBP_INCLUDE_DIR ${LIBWEBP_DIR}/src) ++ # Use libwebp from Skia ++ if(LAF_BACKEND STREQUAL "skia") ++ find_library(WEBP_LIBRARIES webp ++ NAMES libwebp # required for Windows ++ PATHS "${SKIA_LIBRARY_DIR}" NO_DEFAULT_PATH) ++ set(WEBP_INCLUDE_DIR "${SKIA_DIR}/third_party/externals/libwebp/src") ++ else() ++ set(WEBP_LIBRARIES webp webpdemux libwebpmux) ++ set(WEBP_INCLUDE_DIR ${LIBWEBP_DIR}/src) ++ endif() ++ include_directories(${WEBP_INCLUDE_DIR}) + endif() +- include_directories(${WEBP_INCLUDE_DIR}) + endif() + message(STATUS "aseprite libwebp: ${WEBP_LIBRARIES}") + +diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt +index 63ad42f23..9e240bc3e 100644 +--- a/third_party/CMakeLists.txt ++++ b/third_party/CMakeLists.txt +@@ -33,7 +33,7 @@ if(NOT USE_SHARED_GIFLIB) + add_subdirectory(giflib) + endif() + +-if(ENABLE_WEBP AND NOT LAF_BACKEND STREQUAL "skia") ++if(ENABLE_WEBP AND NOT USE_SHARED_WEBP AND NOT LAF_BACKEND STREQUAL "skia") + set(WEBP_BUILD_EXTRAS OFF CACHE BOOL "Build extras.") + set(WEBP_BUILD_ANIM_UTILS OFF CACHE BOOL "Build animation utilities.") + set(WEBP_BUILD_CWEBP OFF CACHE BOOL "Build the cwebp command line tool.") +-- +2.37.4 + -- cgit v1.2.3