diff options
Diffstat (limited to 'dev-games/aseprite')
-rw-r--r-- | dev-games/aseprite/Manifest | 8 | ||||
-rw-r--r-- | dev-games/aseprite/aseprite-1.2.40.ebuild | 4 | ||||
-rw-r--r-- | dev-games/aseprite/aseprite-1.3.2.ebuild | 219 | ||||
-rw-r--r-- | dev-games/aseprite/files/aseprite-1.3.2_shared_fmt.patch | 52 | ||||
-rw-r--r-- | dev-games/aseprite/files/aseprite-1.3.2_shared_json11.patch | 56 | ||||
-rw-r--r-- | dev-games/aseprite/files/aseprite-1.3.2_shared_webp.patch | 81 | ||||
-rw-r--r-- | dev-games/aseprite/files/aseprite-1.3.2_strict-aliasing.patch | 55 |
7 files changed, 472 insertions, 3 deletions
diff --git a/dev-games/aseprite/Manifest b/dev-games/aseprite/Manifest index 95bc7a4f7463..4f1fd142b0e9 100644 --- a/dev-games/aseprite/Manifest +++ b/dev-games/aseprite/Manifest @@ -5,8 +5,14 @@ AUX aseprite-1.2.40_musl_pthreads.patch 1575 BLAKE2B 5dfbce6090973765fb2a4b34f04 AUX aseprite-1.2.40_shared_json11.patch 1790 BLAKE2B 7965d8116463ec8481e14f9f773e0bc942bd18ceb418595a13418850f3bf85a07f70bc5f17a0b74d3f6ee0dc853412df8c93ae8b2bf8e8f1cb262c175c6863b1 SHA512 6b97b6a0c4469d2130cada95f88a279608571593c9b45ee8329891ac6b094dbc55b12141c7fb1c80b4770402972d09e5e7d67e556af180c74d2e62428160d5ee AUX aseprite-1.2.40_shared_libarchive.patch 5060 BLAKE2B 1bce76d6621810152ef59e84c4c469753e379e550d074d7b2740e7d03a3c3affa8f1e90bbe3d30de91cd5ef9fa8d7d1ce34ac4bc559ed814d2290b7780ff6d43 SHA512 f673b03344fb56d4a71c23a4cc603a4db003efa604039607d854aaa6b8c87967d64d7c8d3c5e76b7b495f93e329e0d5e3b4f425aa580c37e43419aaff472ffc8 AUX aseprite-1.2.40_shared_webp.patch 2865 BLAKE2B d3e54e5230c6161de6221b68bbbd574580b925052a0e8d28503c879c8cb6dc87b7e9053b926cc688987418d213da1937d419c1894342474fae4288e15016e7bf SHA512 0fea1dc6b0b0acff8a9097e026f45d648fad45f7510dc9bcd9ebbec340921017c8c53962b0c186e6cc3b89ff180c00389304be27278b56a12eb9463c1e1985d0 +AUX aseprite-1.3.2_shared_fmt.patch 1576 BLAKE2B 79480979ad9ef65b4f448e45397ddfbdcec0429c039543ba32b3d65507f86246266d739165594c9bb7e0046eb162742a0ec41fbba0f67d750fc8b8853cff02e3 SHA512 2754fab5fce3024f18719db597dbb1a37294c2f073e129427ddd5fb1190736e61396e09e0e28bdced2eec1ef88b5b75becda20bbc8fb45b54be4d8975b27edca +AUX aseprite-1.3.2_shared_json11.patch 1974 BLAKE2B ccdf9d22544e2eaaad16909fd594bae37151dd885863885fc0138e14c55e74ebab04c1a575a6a48553d1a707e05b6985a3f5a2d4513bee9aeb385c59ea31afee SHA512 775f963876822bafc4a064be02dfccfefcd7841a5354935412b2a644222dfcaccb54f343b50343267c5f9d07299392686dc5fcb2bd0f7f2a60358de21550ce41 +AUX aseprite-1.3.2_shared_webp.patch 3174 BLAKE2B f3415a4a08236dd42254c9e3cc97337904f268bec28c71efcb8723bf547482bea3b30d8639a520c8e2370b81514dd882d603046fa6c1cb8a6a6186f57b5ad57c SHA512 01c7b2f6d2a2c1140067412d258718ea5fbeea21e6874fe21f659b239255976c85e93c9669ea18255e6a6c76c402d5948e748b9c22a13f4269d0f99d708a0a50 +AUX aseprite-1.3.2_strict-aliasing.patch 1438 BLAKE2B e7d63e22b4e1c1ab21526b51dabb9d6def6d017346037f0001538d309f0d3628cd460bb0f4628240639792c8c293a9a858dfcb31d4f57a7c56583511bb6b2d3a SHA512 00f16ec56d2ed6ec84def9c88be0cd575452bf64c533b395fc7951fce1136b93b47a4afa373531cc68730a554b627777145f062ec21694de1322dca88c783dcc AUX skia-m102_remove_angle2.patch 644 BLAKE2B 11705c6376ad85303b8d64e6046e6e31191774d940458ddc64b8bf2d2e998168d3f1c8cd4361d623c040a03fd948ee4e0b6189c774522ae255cd0f2f572bf4c0 SHA512 bc587d92286528cbaec140a0492d5381a1dfce8263e4a2c2231b1e28778e3e5919b3896ccae416faa1b39f34517b6ada77ccaf671d25ae7d3c552a7991f5bb45 DIST Aseprite-v1.2.40-Source.zip 61802371 BLAKE2B f6f586a3ca222de208e6639e3fc94a63f98e487e1975dccd2974ffa71f937384177639e3799fb81f064afaf1c4a048394fab32a30bcda353320ac55c38b17636 SHA512 0a548428a3362f49cb6cecaa061de8371ad3f0bc22d00bc957e21f22316772e854d7ad36ebb7e5b69274eea376bb62fa39abfd4bc02250524c3707f81a628b1f +DIST Aseprite-v1.3.2-Source.zip 64151421 BLAKE2B 9e23bf62b7d8c6377e36149ce830151d35b48e125a5a99aeb44b0fb1f2f653e53df9b8d74b7127598607561cf6dde4b59f00dd6c6abd08581eddab71feda415d SHA512 cbe1acd1f851f049ceaa948eb59ec1cb1e67c99e9204750f1e38cbedb8122fe0ce63230b63ab537e59d87c88d5ebae03b0785d0eb5195c8ef9a206c8ac71b977 DIST skia-m102-3338e90707323d2cd3a150276acb9f39933deee2.gh.tar.gz 53944562 BLAKE2B 9da3e8386cd7a18a6ee9362743bee4146c41038af8868a6f5e8a2dce468e4dc4669b488861d117da8d1bd8461b2ad47bfc300774a33a84153bca345d63a929a7 SHA512 9ae0032ee3861ce4958af6eb7047273d28b1faa3823576ef568e3c7faed7f49a9976540a72c3fa38234a4ae6319ac381324eff807938f9763781fd33ad67d075 -EBUILD aseprite-1.2.40.ebuild 5314 BLAKE2B d7202ae2e5489535cf8cb3e59fe6c4c00658b1b12a4ac929b07189d0c7461014f69bd431633eb54bd38e306091c8b55cbbba460f954360d60d163fc8f5c31b5d SHA512 5e61ab95a0d52219b2ad121a7adb52c7d55af89d944f298aa70d85a7d1ca86ab2ee85d39de823dc1eabaac2ee15717eee55f7e38854338c63dad6ba7fa990954 +EBUILD aseprite-1.2.40.ebuild 5324 BLAKE2B a173cb402db497115153e940b9618801dad4a2156c7bbd9dc6e17a42b1271eb1e2427b382c5bd1bf9ed29c865bdb36e458b842f6ca135d36457aad286527cdf0 SHA512 2aa873c1d1fbfab3638f12a234842ba96ba2f2044399d0728bc4f46accb8993abb12995207f705559b82e81ccab8ab5ef5cdf53a87e0c9ec0d42b018be1fa34b +EBUILD aseprite-1.3.2.ebuild 5249 BLAKE2B 376a0a186771aef5bf20e5b8c9074e28def3b52783fca0df206eb762c7cf57d8960637d34c86a112c4455171bf7f4e933458761889f5351dfa20f2e788c862b2 SHA512 a294046fbad266141f65e07f06cd77c3f383f7123e3ea05f2658c114502cefe33d4649770082a223ac8771cc26ca757c2bdd0e59c3c25d8d728ce68cb006a8ff MISC metadata.xml 489 BLAKE2B a7c8e63d627aed0bbdcab626fd6b15941b1597b56abe3de87d172a919008122cfa9ee29dc10256c5722e6cea243d836a8d3bb9918f1d1d1963bc299d04fab285 SHA512 beb3ca2b414414980370e02138e0ec8bc931d4807fabb403e21a244365c4af65a5830dc6465d2a3798d56eec360930444a71a549d4d6d4a03f292bf3946bab79 diff --git a/dev-games/aseprite/aseprite-1.2.40.ebuild b/dev-games/aseprite/aseprite-1.2.40.ebuild index bd7646097d95..1438903e7b8f 100644 --- a/dev-games/aseprite/aseprite-1.2.40.ebuild +++ b/dev-games/aseprite/aseprite-1.2.40.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_COMPAT=( python3_{9..12} ) inherit cmake desktop ninja-utils python-any-r1 toolchain-funcs xdg-utils @@ -32,7 +32,7 @@ RDEPEND=" dev-libs/tinyxml media-libs/freetype media-libs/giflib:= - media-libs/harfbuzz:= + media-libs/harfbuzz:=[truetype] media-libs/libjpeg-turbo:= media-libs/libpng:= net-misc/curl diff --git a/dev-games/aseprite/aseprite-1.3.2.ebuild b/dev-games/aseprite/aseprite-1.3.2.ebuild new file mode 100644 index 000000000000..dcf66f4f2316 --- /dev/null +++ b/dev-games/aseprite/aseprite-1.3.2.ebuild @@ -0,0 +1,219 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) + +inherit cmake desktop 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 )" + +CDEPEND=" + app-arch/libarchive:= + app-text/cmark:= + dev-libs/libfmt:= + dev-libs/tinyxml + media-libs/freetype + media-libs/giflib:= + media-libs/harfbuzz:=[truetype] + 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:= )" +RDEPEND=" + ${CDEPEND} + gnome-extra/zenity +" +DEPEND=" + ${CDEPEND} + x11-base/xorg-proto" +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.40_shared_libarchive.patch" + "${FILESDIR}/${PN}-1.3.2_shared_json11.patch" + "${FILESDIR}/${PN}-1.3.2_shared_webp.patch" + "${FILESDIR}/${PN}-1.2.35_laf_fixes.patch" + "${FILESDIR}/${PN}-1.3.2_shared_fmt.patch" + "${FILESDIR}/${PN}-1.3.2_strict-aliasing.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_FMT=ON + -DUSE_SHARED_FREETYPE=ON + -DUSE_SHARED_GIFLIB=ON + -DUSE_SHARED_HARFBUZZ=ON + -DUSE_SHARED_JPEGLIB=ON + -DUSE_SHARED_JSON11=OFF # Custom methods added to bundled version + -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.3.2_shared_fmt.patch b/dev-games/aseprite/files/aseprite-1.3.2_shared_fmt.patch new file mode 100644 index 000000000000..ddb32c5b672d --- /dev/null +++ b/dev-games/aseprite/files/aseprite-1.3.2_shared_fmt.patch @@ -0,0 +1,52 @@ +From 7afccfca25ffe17aba5dada1dab663c8b6228ab1 Mon Sep 17 00:00:00 2001 +From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com> +Date: Tue, 2 Jan 2024 20:00:12 +0300 +Subject: [PATCH] Use shared fmt library + +Added option -DUSE_SHARED_FMT +--- + CMakeLists.txt | 5 +++++ + third_party/CMakeLists.txt | 4 +++- + 2 files changed, 8 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 2fc29252b..e49373323 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -39,6 +39,7 @@ enable_testing() + + 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_FMT "Use your installed copy of libfmt" 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) +@@ -197,6 +198,10 @@ if(NOT USE_SHARED_CURL) + set(CURL_STATICLIB ON BOOL) + endif() + ++if(USE_SHARED_FMT) ++ find_package(fmt REQUIRED) ++endif() ++ + # zlib + if(USE_SHARED_ZLIB) + find_package(ZLIB REQUIRED) +diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt +index babbd4742..3c83991a4 100644 +--- a/third_party/CMakeLists.txt ++++ b/third_party/CMakeLists.txt +@@ -113,7 +113,9 @@ if(NOT USE_SHARED_HARFBUZZ AND NOT LAF_BACKEND STREQUAL "skia") + endif() + + add_subdirectory(simpleini) +-add_subdirectory(fmt) ++if(NOT USE_SHARED_FMT) ++ add_subdirectory(fmt) ++endif() + + # Add cmark without tests + if(NOT USE_SHARED_CMARK) +-- +2.41.0 + diff --git a/dev-games/aseprite/files/aseprite-1.3.2_shared_json11.patch b/dev-games/aseprite/files/aseprite-1.3.2_shared_json11.patch new file mode 100644 index 000000000000..98b10f76b58d --- /dev/null +++ b/dev-games/aseprite/files/aseprite-1.3.2_shared_json11.patch @@ -0,0 +1,56 @@ +From 7fa34e4a478ae4e4eab4031e626040a9db210417 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 1/3] Use shared json11 library + +Added option -DUSE_SHARED_JSON11 +--- + CMakeLists.txt | 7 +++++++ + third_party/CMakeLists.txt | 6 +++++- + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f099e1deb..c4f364185 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -41,6 +41,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) +@@ -299,6 +300,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 bdd52435c..88eea9b5e 100644 +--- a/third_party/CMakeLists.txt ++++ b/third_party/CMakeLists.txt +@@ -123,7 +123,11 @@ if(NOT USE_SHARED_CMARK) + endif() + + # JSON +-add_subdirectory(json11) ++if(NOT USE_SHARED_JSON11) ++ add_library(json11 STATIC json11/json11.cpp) ++ target_include_directories(json11 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/json11) ++ #target_compile_options(json11 PRIVATE -fPIC -fno-rtti -fno-exceptions -Wall) ++endif() + + # libarchive + if(NOT USE_SHARED_LIBARCHIVE) +-- +2.41.0 + diff --git a/dev-games/aseprite/files/aseprite-1.3.2_shared_webp.patch b/dev-games/aseprite/files/aseprite-1.3.2_shared_webp.patch new file mode 100644 index 000000000000..3026b7641e6d --- /dev/null +++ b/dev-games/aseprite/files/aseprite-1.3.2_shared_webp.patch @@ -0,0 +1,81 @@ +From 06d5d4cd307e9ee0b83bdbff71729dab1305ea9a 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 2/4] Use shared webp library + +Added option -DUSE_SHARED_WEBP +--- + CMakeLists.txt | 28 ++++++++++++++++++---------- + third_party/CMakeLists.txt | 2 +- + 2 files changed, 19 insertions(+), 11 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index c4f364185..ba05f8d84 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -47,6 +47,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) +@@ -342,24 +343,31 @@ set(UNDO_TESTS ${ENABLE_TESTS} CACHE BOOL "Enable undo tests") + if(ENABLE_DRM) + add_subdirectory(drm) + endif() +-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}") + ++add_subdirectory(laf) ++ + # LAF libraries + Aseprite are compiled with config.h + target_include_directories(laf-base PUBLIC src) + target_compile_definitions(laf-base PUBLIC HAVE_CONFIG_H) +diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt +index 88eea9b5e..31aa3e52f 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.41.0 + diff --git a/dev-games/aseprite/files/aseprite-1.3.2_strict-aliasing.patch b/dev-games/aseprite/files/aseprite-1.3.2_strict-aliasing.patch new file mode 100644 index 000000000000..de88b29a82aa --- /dev/null +++ b/dev-games/aseprite/files/aseprite-1.3.2_strict-aliasing.patch @@ -0,0 +1,55 @@ +From 4e2066a7eb108503bfea2092672329e19ffbde49 Mon Sep 17 00:00:00 2001 +From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com> +Date: Tue, 2 Jan 2024 21:09:04 +0300 +Subject: [PATCH] Fix strict-aliasing warnings + +--- + src/dio/aseprite_decoder.cpp | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/src/dio/aseprite_decoder.cpp b/src/dio/aseprite_decoder.cpp +index e01fbba32..209a67307 100644 +--- a/src/dio/aseprite_decoder.cpp ++++ b/src/dio/aseprite_decoder.cpp +@@ -28,10 +28,20 @@ + #include "zlib.h" + + #include <cstdio> ++#include <cstring> + #include <vector> + + namespace dio { + ++template <typename T> ++T ++copy_reinterpret_cast(const void* ptr) ++{ ++ T tmp; ++ std::memcpy(&tmp, ptr, sizeof(T)); ++ return tmp; ++} ++ + bool AsepriteDecoder::decode() + { + bool ignore_old_color_chunks = false; +@@ -425,7 +435,7 @@ float AsepriteDecoder::readFloat() + + // Little endian. + int v = ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1); +- return *reinterpret_cast<float*>(&v); ++ return *copy_reinterpret_cast<float*>(&v); + } + + double AsepriteDecoder::readDouble() +@@ -465,7 +475,7 @@ double AsepriteDecoder::readDouble() + ((long long)b3 << 16) | + ((long long)b2 << 8) | + (long long)b1); +- return *reinterpret_cast<double*>(&v); ++ return *copy_reinterpret_cast<double*>(&v); + } + + doc::Palette* AsepriteDecoder::readColorChunk(doc::Palette* prevPal, +-- +2.41.0 + |