summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzamat H. Hackimov <azamat.hackimov@gmail.com>2022-11-12 05:38:54 +0300
committerJoonas Niilola <juippis@gentoo.org>2022-11-22 16:01:10 +0200
commit9bba7c9fcceefdb2c96ff8077037a1cbb65b0ee9 (patch)
treed1232fd7e1ec256530fe58dc8926ee07d62f17a7
parentdev-games/aseprite: add 1.2.40 (diff)
downloadgentoo-9bba7c9fcceefdb2c96ff8077037a1cbb65b0ee9.tar.gz
gentoo-9bba7c9fcceefdb2c96ff8077037a1cbb65b0ee9.tar.bz2
gentoo-9bba7c9fcceefdb2c96ff8077037a1cbb65b0ee9.zip
dev-games/aseprite: drop 1.2.37
Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/28236 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
-rw-r--r--dev-games/aseprite/Manifest1
-rw-r--r--dev-games/aseprite/aseprite-1.2.37.ebuild211
-rw-r--r--dev-games/aseprite/files/aseprite-1.2.35_check_colorSpace.patch25
-rw-r--r--dev-games/aseprite/files/aseprite-1.2.35_shared_json11.patch54
-rw-r--r--dev-games/aseprite/files/aseprite-1.2.35_shared_libarchive.patch106
-rw-r--r--dev-games/aseprite/files/aseprite-1.2.35_shared_webp.patch90
6 files changed, 0 insertions, 487 deletions
diff --git a/dev-games/aseprite/Manifest b/dev-games/aseprite/Manifest
index 27e0ce592a56..e8732fd20ba9 100644
--- a/dev-games/aseprite/Manifest
+++ b/dev-games/aseprite/Manifest
@@ -1,4 +1,3 @@
DIST Aseprite-v1.1.9-Source.zip 11746265 BLAKE2B fa16be059a7bb3b83705c56e7e93cbbb71676617a8d0798f0e481b09199ae069b85826615f8609acabb10a4e9a9da0857f2f99b03c2b913f26eee6d4dfdc0f0a SHA512 44c5878c67e69d2510c862e8f6869d727aa47b3d23d41d4e7318eca54c6d72fc5f89e72c70c160ce6da78fa091e11eedefa74e0273dc4cea59b2fe16c8851d9e
-DIST Aseprite-v1.2.37-Source.zip 61977600 BLAKE2B f904e5f2a296fa5dae6dedb7b32d5249a8cda64e3b545057e9c033e3e428f050ee128b4f96098a655d871339a77b48d7be58fdad8edffd252d8bbd7b80d0db5f SHA512 c846a6bd6f11bea18e49146cac735a165c6ab7ca63f76b3dfaf7c1f64ddc6719804bfbb340e05ecb75a171b12db9a6a0444b26782d31a84cc810b7266843b0e9
DIST Aseprite-v1.2.40-Source.zip 61802371 BLAKE2B f6f586a3ca222de208e6639e3fc94a63f98e487e1975dccd2974ffa71f937384177639e3799fb81f064afaf1c4a048394fab32a30bcda353320ac55c38b17636 SHA512 0a548428a3362f49cb6cecaa061de8371ad3f0bc22d00bc957e21f22316772e854d7ad36ebb7e5b69274eea376bb62fa39abfd4bc02250524c3707f81a628b1f
DIST skia-m102-3338e90707323d2cd3a150276acb9f39933deee2.gh.tar.gz 53944562 BLAKE2B 9da3e8386cd7a18a6ee9362743bee4146c41038af8868a6f5e8a2dce468e4dc4669b488861d117da8d1bd8461b2ad47bfc300774a33a84153bca345d63a929a7 SHA512 9ae0032ee3861ce4958af6eb7047273d28b1faa3823576ef568e3c7faed7f49a9976540a72c3fa38234a4ae6319ac381324eff807938f9763781fd33ad67d075
diff --git a/dev-games/aseprite/aseprite-1.2.37.ebuild b/dev-games/aseprite/aseprite-1.2.37.ebuild
deleted file mode 100644
index 0848144f77df..000000000000
--- a/dev-games/aseprite/aseprite-1.2.37.ebuild
+++ /dev/null
@@ -1,211 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..11} )
-
-inherit cmake desktop ninja-utils python-any-r1 toolchain-funcs xdg-utils
-
-SKIA_VER="m102"
-# Last commit in ${SKIA_VER} feature branch
-# Don't use skia.googlesource.com, it produces non-reproducible tarballs
-SKIA_REV="3338e90707323d2cd3a150276acb9f39933deee2"
-
-DESCRIPTION="Animated sprite editor & pixel art tool"
-HOMEPAGE="https://www.aseprite.org"
-SRC_URI="https://github.com/aseprite/aseprite/releases/download/v${PV}/Aseprite-v${PV}-Source.zip
- https://github.com/google/skia/archive/${SKIA_REV}.tar.gz -> skia-${SKIA_VER}-${SKIA_REV}.gh.tar.gz"
-
-# See https://github.com/aseprite/aseprite#license
-LICENSE="Aseprite-EULA"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-IUSE="kde test webp"
-RESTRICT="bindist mirror !test? ( test )"
-
-RDEPEND="
- app-arch/libarchive:=
- app-text/cmark:=
- dev-cpp/json11
- dev-libs/tinyxml
- media-libs/freetype
- media-libs/giflib:=
- media-libs/harfbuzz:=
- media-libs/libjpeg-turbo:=
- media-libs/libpng:=
- net-misc/curl
- sys-libs/zlib:=
- virtual/opengl
- x11-libs/libX11
- x11-libs/libXcursor
- x11-libs/libXi
- x11-libs/libxcb:=
- kde? (
- dev-qt/qtcore:5
- dev-qt/qtgui:5
- kde-frameworks/kio:5
- )
- webp? ( media-libs/libwebp:= )"
-DEPEND="${RDEPEND}"
-BDEPEND="
- ${PYTHON_DEPS}
- test? ( dev-cpp/gtest )
- app-arch/unzip
- dev-util/gn
- virtual/pkgconfig"
-
-DOCS=(
- docs/ase-file-specs.md
- docs/gpl-palette-extension.md
- README.md
-)
-
-S="${WORKDIR}"
-
-PATCHES=(
- "${FILESDIR}/skia-${SKIA_VER}_remove_angle2.patch"
- "${FILESDIR}/${PN}-1.2.35_check_colorSpace.patch"
- "${FILESDIR}/${PN}-1.2.35_shared_libarchive.patch"
- "${FILESDIR}/${PN}-1.2.35_shared_json11.patch"
- "${FILESDIR}/${PN}-1.2.35_shared_webp.patch"
- "${FILESDIR}/${PN}-1.2.35_laf_fixes.patch"
-)
-
-src_prepare() {
- cmake_src_prepare
- # Skia: remove custom optimizations
- sed -i -e 's:"\/\/gn\/skia\:optimize",::g' \
- "skia-${SKIA_REV}/gn/BUILDCONFIG.gn" || die
- # Aseprite: don't install tga bundled library
- sed -i -e '/install/d' src/tga/CMakeLists.txt || die
- # Aseprite: don't use bundled gtest
- sed -i -e '/add_subdirectory(googletest)/d' \
- laf/third_party/CMakeLists.txt || die
- # Fix shebang in thumbnailer
- sed -i -e 's:#!/usr/bin/sh:#!/bin/sh:' \
- src/desktop/linux/aseprite-thumbnailer || die
-}
-
-src_configure() {
- einfo "Skia configuration"
- cd "${WORKDIR}/skia-${SKIA_REV}" || die
-
- tc-export AR CC CXX
-
- passflags() {
- local _f _x
- _f=( ${1} )
- _x="[$(printf '"%s", ' "${_f[@]}")]"
- myconf_gn+=( ${2}="${_x}" )
- }
-
- local myconf_gn=(
- ar=\"${AR}\"
- cc=\"${CC}\"
- cxx=\"${CXX}\"
-
- is_official_build=true
- is_component_build=false
- is_debug=false
-
- skia_use_egl=false
- skia_use_dawn=false
- skia_use_dng_sdk=false
- skia_use_metal=false
- skia_use_sfntly=false
- skia_use_wuffs=false
-
- skia_enable_pdf=false
- skia_enable_svg=false
- skia_use_expat=false
- skia_use_ffmpeg=false
- skia_use_fontconfig=false
- skia_use_freetype=true
- skia_use_gl=true
- skia_use_harfbuzz=true
- skia_use_icu=false
- skia_use_libjpeg_turbo_decode=true
- skia_use_libjpeg_turbo_encode=true
- skia_use_libpng_decode=true
- skia_use_libpng_encode=true
- skia_use_libwebp_decode=$(usex webp true false)
- skia_use_libwebp_encode=$(usex webp true false)
- skia_use_lua=false
- skia_use_vulkan=false
- skia_use_x11=false
- skia_use_xps=false
- skia_use_zlib=true
- )
-
- passflags "${CFLAGS}" extra_cflags_c
- passflags "${CXXFLAGS}" extra_cflags_cc
- passflags "${LDFLAGS}" extra_ldflags
- myconf_gn="${myconf_gn[@]}"
- set -- gn gen --args="${myconf_gn% }" out/Static
- echo "$@"
- "$@" || die
-
- einfo "Aseprite configuration"
- cd "${WORKDIR}" || die
-
- local mycmakeargs=(
- -DENABLE_CCACHE=OFF
- -DENABLE_DESKTOP_INTEGRATION=ON
- -DENABLE_STEAM=OFF
- -DENABLE_TESTS="$(usex test)"
- -DENABLE_QT_THUMBNAILER="$(usex kde)"
- -DENABLE_UPDATER=OFF
- -DENABLE_UI=ON
- -DENABLE_WEBP="$(usex webp)"
- -DLAF_WITH_EXAMPLES=OFF
- -DLAF_WITH_TESTS="$(usex test)"
- -DFULLSCREEN_PLATFORM=ON
- -DSKIA_DIR="${WORKDIR}/skia-${SKIA_REV}/"
- -DSKIA_LIBRARY_DIR="${WORKDIR}/skia-${SKIA_REV}/out/Static/"
- -DSKIA_LIBRARY="${WORKDIR}/skia-${SKIA_REV}/out/Static/libskia.a"
- -DSKSHAPER_LIBRARY="${WORKDIR}/skia-${SKIA_REV}/out/Static/libskshaper.a"
- -DUSE_SHARED_CMARK=ON
- -DUSE_SHARED_CURL=ON
- -DUSE_SHARED_FREETYPE=ON
- -DUSE_SHARED_GIFLIB=ON
- -DUSE_SHARED_HARFBUZZ=ON
- -DUSE_SHARED_JPEGLIB=ON
- -DUSE_SHARED_JSON11=ON
- -DUSE_SHARED_LIBARCHIVE=ON
- -DUSE_SHARED_LIBPNG=ON
- -DUSE_SHARED_PIXMAN=ON
- -DUSE_SHARED_TINYXML=ON
- -DUSE_SHARED_WEBP=ON
- -DUSE_SHARED_ZLIB=ON
- )
- cmake_src_configure
-}
-
-src_compile() {
- einfo "Skia compilation"
- cd "${WORKDIR}/skia-${SKIA_REV}" || die
- eninja -C out/Static
-
- einfo "Aseprite compilation"
- cd "${WORKDIR}" || die
- cmake_src_compile
-}
-
-src_install() {
- newicon -s 64 "${S}/data/icons/ase64.png" "${PN}.png"
- cmake_src_install
-}
-
-pkg_postinst() {
- xdg_desktop_database_update
- xdg_icon_cache_update
- xdg_mimeinfo_database_update
-}
-
-pkg_postrm() {
- xdg_desktop_database_update
- xdg_icon_cache_update
- xdg_mimeinfo_database_update
-}
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" <azamat.hackimov@gmail.com>
-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<os::SkiaSurface*>(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" <azamat.hackimov@gmail.com>
-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" <azamat.hackimov@gmail.com>
-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 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libarchive/libarchive>)
-+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
-- $<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_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
-+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libarchive/libarchive>)
-+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" <azamat.hackimov@gmail.com>
-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
-