commit:     fe3a315db72c6b2a701249a7f14901f92c82a61e
Author:     Albert Diserholt <albert <AT> diserholt <DOT> com>
AuthorDate: Wed Mar 16 07:59:04 2022 +0000
Commit:     Albert Diserholt <albert <AT> diserholt <DOT> com>
CommitDate: Wed Mar 16 07:59:04 2022 +0000
URL:        
https://gitweb.gentoo.org/repo/user/Drauthius.git/commit/?id=fe3a315d

dev-games/aseprite-1.2.34.1

Signed-off-by: Albert Diserholt <albert <AT> diserholt.com>

 dev-games/aseprite/Manifest                        |   5 +
 dev-games/aseprite/aseprite-1.2.34.1.ebuild        | 112 +++++++++++++++++++++
 .../files/aseprite-1.2.34.1-system_harfbuzz.patch  |  23 +++++
 .../aseprite-1.2.34.1-system_libarchive.patch      |  93 +++++++++++++++++
 .../files/aseprite-1.2.34.1-system_libwebp.patch   |  44 ++++++++
 5 files changed, 277 insertions(+)

diff --git a/dev-games/aseprite/Manifest b/dev-games/aseprite/Manifest
index 5afde3a..0cc548c 100644
--- a/dev-games/aseprite/Manifest
+++ b/dev-games/aseprite/Manifest
@@ -5,13 +5,18 @@ AUX aseprite-1.2.30-system_libwebp.patch 1595 BLAKE2B 
5bd386fae6723de0d6068b25d8
 AUX aseprite-1.2.33-system_harfbuzz.patch 580 BLAKE2B 
76874db3b8d1b164dfe46926ebd30dd7f782081104a000ff2c74733f4283aa20710072ddee0cae3022af4d9cf8d5ebd90c5db93dae8f46c05d5b08c2b1efcb3a
 SHA512 
fa36b354e5d42beb7c846a89edbda2d2b6071047eddc1c522a1115fa58b9ccf83a680ff0318cc022feebdda3c98818677c748e10d18c81c0b728b819aca52fc1
 AUX aseprite-1.2.33-system_libarchive.patch 4375 BLAKE2B 
15d0956e267d3ab756fd5c1c1799718dd484c501b501a9683b3f3709aded515ece3f0fd2eb87afc3a70e53015cf77d8b9a36505f83d0d8823aca64b3b35e2207
 SHA512 
ff07fa565fff198e59a4e2667c731d1b7f60886d6ebd34b3d3d513acf51f59f666b6b2743c2e27cf67bc0986936eb11524f2d42b7f629cbfd3930dd6d8218a55
 AUX aseprite-1.2.33-system_libwebp.patch 1871 BLAKE2B 
399933e038f6eefa71e95c3256b3ba9f9ac93cc230cf9e6c04f76af5ed77e085f929b1edc5d8a3ce8d69b4f84a384877c9e0745721b9c074c7f56e385b093f44
 SHA512 
7fb7b7e3a9a5d97e7dcb1668b3aecba33b1903e36ddeaea2d6d5e1c0a39bafc7164345c162133cf198edbbaee5aff81ee19836b660e1fd6af175425d90201f2e
+AUX aseprite-1.2.34.1-system_harfbuzz.patch 580 BLAKE2B 
76874db3b8d1b164dfe46926ebd30dd7f782081104a000ff2c74733f4283aa20710072ddee0cae3022af4d9cf8d5ebd90c5db93dae8f46c05d5b08c2b1efcb3a
 SHA512 
fa36b354e5d42beb7c846a89edbda2d2b6071047eddc1c522a1115fa58b9ccf83a680ff0318cc022feebdda3c98818677c748e10d18c81c0b728b819aca52fc1
+AUX aseprite-1.2.34.1-system_libarchive.patch 4375 BLAKE2B 
15d0956e267d3ab756fd5c1c1799718dd484c501b501a9683b3f3709aded515ece3f0fd2eb87afc3a70e53015cf77d8b9a36505f83d0d8823aca64b3b35e2207
 SHA512 
ff07fa565fff198e59a4e2667c731d1b7f60886d6ebd34b3d3d513acf51f59f666b6b2743c2e27cf67bc0986936eb11524f2d42b7f629cbfd3930dd6d8218a55
+AUX aseprite-1.2.34.1-system_libwebp.patch 1871 BLAKE2B 
399933e038f6eefa71e95c3256b3ba9f9ac93cc230cf9e6c04f76af5ed77e085f929b1edc5d8a3ce8d69b4f84a384877c9e0745721b9c074c7f56e385b093f44
 SHA512 
7fb7b7e3a9a5d97e7dcb1668b3aecba33b1903e36ddeaea2d6d5e1c0a39bafc7164345c162133cf198edbbaee5aff81ee19836b660e1fd6af175425d90201f2e
 DIST Aseprite-v1.1.13-Source.zip 12809688 BLAKE2B 
e9d6d58cfeb4b07d63945025a31e5a52c2f65e59f01a65bc3ac2f8feef725b2caeef94f542c70132834280c3227a3a1cf7756a708f6970c12d4fd7aca4e646c3
 SHA512 
b6dd948223885bc9511a8a0f8427540011dc2a6a4ec3448d3461a5661c7de574487e2306024f9522240490b1784a4231818f2790466d106f8b21259c188ca258
 DIST Aseprite-v1.2.21-Source.zip 24477477 BLAKE2B 
b497cf5b6ba677eb742e44d2ee5d28c60ba57956ca04989e27ac8623832e08161c1cf0b64a9440c4fecf103e083556404d918a09ca61d7c496fdac7fb927b196
 SHA512 
17b2570f0114213b86e18f65a943867d72a497245b8f45bf22a23ad6ed32bb016c69391341cc0449c4fbc9d31e6f5d564c48a204df1c9f13488ffb4658393fee
 DIST Aseprite-v1.2.30-Source.zip 30057883 BLAKE2B 
fc3a0923c963ae4adf0afc4f2bc9949a5f86123250eb0600ada35e711da35363b7719cbfe0296f1b6faf90e948b58318a56918f926eb3361baf576a81c16280b
 SHA512 
c8534cc093a22078b44c3ae265625292e228e44bca894fbeb137759259862cc8956027a04d6982fdf1b6af2d8cd349842e1fc128827064e000de03e851e6620f
 DIST Aseprite-v1.2.33-Source.zip 56234668 BLAKE2B 
4afeaa210a31b26e76fb69c0b13b3c79598336241573c7db17248b37b28776eb95173da6181593f876591c851f4d480e8a83b2360c58b4f10524c05659fbefe0
 SHA512 
a965b6728283808a8fb8498ff557570014a0247fcb07585f0278088ddb65a79b2727bbfe57ba2edd1f275982c727c733a23013250ce82b1d2a242467b3105337
+DIST Aseprite-v1.2.34.1-Source.zip 56240404 BLAKE2B 
14a7867955f34332584ff137efbb77605ffda6d01e6902e40fa34a6ba6453a29b0de9e8c121232b5e65c3c8c266f2540a1cf98eaeaba486233b8bc2d67404b36
 SHA512 
43a7eeb542f621d2b4dc236b803a7fe3816d08a26c4b4974ba98c30d921da6f481234542bad715ffacd3efd175e404deda0e20611819c565bc41d2e60da2047a
 DIST aseprite-skia-m81-b607b32047-amd64.zip 35390542 BLAKE2B 
f5f5bc6d237c92a302dd593cb91f02904426d342a5c1484589e9ac3444e226637791c5ae951a7406adf4a75a192009aa19beee0f36c4563e10cd32b6b4c6768e
 SHA512 
6c417f289cc1874aefc4dc08ce2edf055c50106c9351476eafe2d554296e9075046eb726465c58097b0a894e2a709f9830208c44eb6c3c7f6ad53cc7d24e70ce
 DIST aseprite-skia-m81-b607b32047-x86.zip 33398654 BLAKE2B 
b312f09d54e81b1b77c8100443ae1464bbe22edb9ce21fdb17a1b0f56dff728665070ad5b895f70420c0671fac973267271eb864b240fc8a070ca9f2e676b363
 SHA512 
37a093fb9ab9f6c766f406fa62a610921108b118d2a324cf1e0d6f3b635992034f222ba3eb9a023dc968312e53ede29b6fa18628cfd484eddd52bcfe8383823c
 EBUILD aseprite-1.1.13.ebuild 3008 BLAKE2B 
7419fdaaa1d9506d841ec9c0af3fa04b930afa98373accff9c9d6ee150d9e2ff3c64e670a800c1e40a118f608b2a6f362a779637c397f77a90802a97eef9557d
 SHA512 
58cb3df2e8b33502021b90adde0459004507c9809ee4e0a06f5ddcbefef3c9758cd7374e7f529309a1c876a98e8983305e18f7f9344350221470a7bcebe9ce49
 EBUILD aseprite-1.2.21.ebuild 2189 BLAKE2B 
c01a0b8b93e6840a60066bfbab19ce275bfd67c0ed5957876d33b3d9afe491b2fb7192bb5b8a57deac7b5df5f933027128d877949e0c9f01c23f17292ae78f67
 SHA512 
ae8f1833c4041c6aa6bb7b34e15788095d0ec1bb63f8e7aed5cce8219cee1966bd48d794d4cf497b9f6d6877a132676d2d57c3bf31152d5b28b7081dfd20be72
 EBUILD aseprite-1.2.30.ebuild 2769 BLAKE2B 
e930dc6f025e428a194d3543fabedc963177cb625dd8354a38f70f5b6d8b8d4c3212a1e3b31771415fa2a3d26953e55db51770fd6f1291aa18b04162dfdb17e5
 SHA512 
9ee2454b560b5479bc4a55477d50bea3dd6c86175e5a6b816cc95527709b44a4a0e1afdd27d95c5a130e05816afa44b3005445669c7cd9bf1dc7aee391a03c4b
 EBUILD aseprite-1.2.33.ebuild 2529 BLAKE2B 
6894a72da565dce8243921de92546db8d448e440f2a9814624a6bdbbaff0cebc32e2c9b455f41fe84c4d003c2dc65e4d73d9e1da100d09424693ba9d1aa2d327
 SHA512 
e6b88031a9ccf1cbb5dcb0e54bae86a7483c18245bede5798939832bdca6fab22be604691432e44abdfaa484d782b3c05c10d75686ba9e15f46fd37e00c71716
+EBUILD aseprite-1.2.34.1.ebuild 2529 BLAKE2B 
6894a72da565dce8243921de92546db8d448e440f2a9814624a6bdbbaff0cebc32e2c9b455f41fe84c4d003c2dc65e4d73d9e1da100d09424693ba9d1aa2d327
 SHA512 
e6b88031a9ccf1cbb5dcb0e54bae86a7483c18245bede5798939832bdca6fab22be604691432e44abdfaa484d782b3c05c10d75686ba9e15f46fd37e00c71716

diff --git a/dev-games/aseprite/aseprite-1.2.34.1.ebuild 
b/dev-games/aseprite/aseprite-1.2.34.1.ebuild
new file mode 100644
index 0000000..96d4a58
--- /dev/null
+++ b/dev-games/aseprite/aseprite-1.2.34.1.ebuild
@@ -0,0 +1,112 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=7
+inherit cmake-utils toolchain-funcs xdg-utils
+
+DESCRIPTION="Animated sprite editor & pixel art tool"
+HOMEPAGE="http://www.aseprite.org";
+LICENSE="Proprietary"
+SLOT="0"
+
+PATCHES=(
+       "${FILESDIR}/${P}-system_harfbuzz.patch"
+       "${FILESDIR}/${P}-system_libarchive.patch"
+       "${FILESDIR}/${P}-system_libwebp.patch"
+)
+
+ASEPRITE_FILE="${PN^}-v${PV//_/-}-Source.zip"
+ASEPRITE_URI="https://github.com/${PN}/${PN}/releases/download/v${PV//_/-}/${ASEPRITE_FILE}";
+
+SRC_URI="${ASEPRITE_URI}"
+KEYWORDS="~amd64 ~x86"
+S="${WORKDIR}"
+
+IUSE="
+       debug
+       memleak
+       webp
+       kde
+"
+
+RDEPEND="
+       app-arch/libarchive
+       app-text/cmark
+       dev-libs/expat
+       dev-libs/tinyxml
+       =dev-games/aseprite-skia-9999-r96
+       media-libs/freetype:2
+       >=media-libs/giflib-5.0
+       media-libs/fontconfig
+       media-libs/libpng:0
+       webp? ( media-libs/libwebp )
+       net-misc/curl
+       sys-apps/util-linux
+       sys-libs/zlib
+       virtual/jpeg:=
+       virtual/opengl
+       x11-libs/libX11
+       x11-libs/libXcursor
+       x11-libs/pixman
+       kde? (
+                kde-apps/thumbnailers
+       )"
+
+DOCS=(
+       EULA.txt
+       docs/ase-file-specs.md
+       docs/LICENSES.md
+       README.md)
+
+src_prepare() {
+       cmake-utils_src_prepare
+
+       sed -i 
"s:Icon=aseprite:Icon=${EPREFIX}/usr/share/aseprite/data/icons/ase256.png:" 
"${S}/src/desktop/linux/aseprite.desktop" || die
+       sed -i "s:#!/usr/bin/sh:#!/bin/env sh:" 
"${S}/src/desktop/linux/aseprite-thumbnailer" || die
+}
+
+src_configure() {
+       use debug && CMAKE_BUILD_TYPE=Debug || CMAKE_BUILD_TYPE=Release
+
+       local mycmakeargs=(
+               -DENABLE_UPDATER=OFF
+               -DENABLE_CCACHE="$(has ccache "${FEATURES}" && echo 'ON' || 
echo 'OFF')"
+               -DFULLSCREEN_PLATFORM=ON
+               -DUSE_SHARED_CMARK=ON
+               -DUSE_SHARED_CURL=ON
+               -DUSE_SHARED_GIFLIB=ON
+               -DUSE_SHARED_JPEGLIB=ON
+               -DUSE_SHARED_ZLIB=ON
+               -DUSE_SHARED_LIBARCHIVE=ON
+               -DUSE_SHARED_LIBPNG=ON
+               -DUSE_SHARED_TINYXML=ON
+               -DUSE_SHARED_PIXMAN=ON
+               -DUSE_SHARED_FREETYPE=ON
+               -DUSE_SHARED_HARFBUZZ=ON
+               -DUSE_SHARED_WEBP=ON
+               -DENABLE_DESKTOP_INTEGRATION=ON
+               -DENABLE_QT_THUMBNAILER="$(usex kde)"
+               -DENABLE_WEBP="$(usex webp)"
+               -DENABLE_MEMLEAK="$(usex memleak)"
+               -DLAF_BACKEND=skia
+               -DLAF_WITH_EXAMPLES=OFF
+               -DLAF_WITH_TESTS=OFF
+               -DSKIA_DIR="/var/lib/aseprite-skia"
+               -DSKIA_LIBRARY_DIR="/var/lib/aseprite-skia/out/Release"
+       )
+
+       cmake-utils_src_configure
+}
+
+pkg_postinst() {
+       ewarn "Aseprite is for personal use only. You may not distribute it."
+
+       xdg_desktop_database_update
+       xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+       xdg_desktop_database_update
+       xdg_mimeinfo_database_update
+}

diff --git a/dev-games/aseprite/files/aseprite-1.2.34.1-system_harfbuzz.patch 
b/dev-games/aseprite/files/aseprite-1.2.34.1-system_harfbuzz.patch
new file mode 100644
index 0000000..f7c8543
--- /dev/null
+++ b/dev-games/aseprite/files/aseprite-1.2.34.1-system_harfbuzz.patch
@@ -0,0 +1,23 @@
+diff -uNr a/laf/CMakeLists.txt b/laf/CMakeLists.txt
+--- a/laf/CMakeLists.txt       2021-12-01 22:06:08.000000000 +0100
++++ b/laf/CMakeLists.txt       2022-02-15 18:05:31.640137967 +0100
+@@ -44,13 +44,12 @@
+ # Find libraries
+ if(LAF_BACKEND STREQUAL "skia")
+   include(FindSkia)
+-else()
+-  if(NOT FREETYPE_LIBRARIES)
+-    find_package(Freetype)
+-  endif()
+-  if(NOT HARFBUZZ_LIBRARIES)
+-    find_package(HarfBuzz)
+-  endif()
++endif()
++if(NOT FREETYPE_LIBRARIES)
++  find_package(Freetype)
++endif()
++if(NOT HARFBUZZ_LIBRARIES)
++  find_package(HarfBuzz)
+ endif()
+ 
+ add_subdirectory(third_party)

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)

diff --git a/dev-games/aseprite/files/aseprite-1.2.34.1-system_libwebp.patch 
b/dev-games/aseprite/files/aseprite-1.2.34.1-system_libwebp.patch
new file mode 100644
index 0000000..161e4f8
--- /dev/null
+++ b/dev-games/aseprite/files/aseprite-1.2.34.1-system_libwebp.patch
@@ -0,0 +1,44 @@
+diff -uNr a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt   2022-01-12 15:10:33.000000000 +0100
++++ b/CMakeLists.txt   2022-02-15 18:39:49.384093189 +0100
+@@ -62,6 +62,7 @@
+ option(USE_SHARED_PIXMAN  "Use your installed copy of pixman" off)
+ option(USE_SHARED_FREETYPE "Use shared FreeType library" off)
+ option(USE_SHARED_HARFBUZZ "Use shared HarfBuzz library" off)
++option(USE_SHARED_WEBP    "Use your installed copy of webp" off)
+ option(ENABLE_ASEPRITE_EXE "Compile main Aseprite executable" on)
+ option(ENABLE_MEMLEAK      "Enable memory-leaks detector (only for 
developers)" off)
+ option(ENABLE_NEWS         "Enable the news in Home tab" on)
+@@ -235,9 +236,17 @@
+ 
+ # 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_library(WEBP_LIBRARY NAMES webp)
++    find_library(WEBPDEMUX_LIBRARY NAMES webpdemux)
++    find_library(WEBPMUX_LIBRARY NAMES webpmux)
++    set(WEBP_LIBRARIES ${WEBP_LIBRARY} ${WEBPDEMUX_LIBRARY} 
${WEBPMUX_LIBRARY})
++    find_path(WEBP_INCLUDE_DIRS NAMES decode.h PATH_SUFFIXES webp)
++  else()
++    set(WEBP_LIBRARIES webp webpdemux libwebpmux)
++    set(WEBP_INCLUDE_DIR ${LIBWEBP_DIR}/src)
++    include_directories(${WEBP_INCLUDE_DIR})
++  endif()
+ endif()
+ 
+ # tinyxml
+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-02-15 18:39:26.632093684 +0100
+@@ -33,7 +33,7 @@
+   add_subdirectory(giflib)
+ endif()
+ 
+-if(ENABLE_WEBP)
++if(ENABLE_WEBP AND 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.")

Reply via email to