mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-25 11:57:36 -08:00
dev-games/aseprite: add 1.3.18.6
Closes: https://bugs.gentoo.org/984763 Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/47014 Closes: https://github.com/gentoo/gentoo/pull/47014 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
DIST Aseprite-v1.3.16.1-Source.zip 80095985 BLAKE2B 09918ce72b33ec6182c415b9745be2c3c4107d7a04ee75b243bb248845cb91097a40e6474cbb7665d42b283611cd8cd7282c90452d63ceb1d6845e032689063f SHA512 bb677e71faca8b21d209bc566da2156235f6c77fdf0e408bdf2004d4b4c8300aac40a286e808f1b1a8cfb117e160ed08fcaba2eacb78265bb33abf4d07dd891f
|
||||
DIST Aseprite-v1.3.18.6-Source.zip 80151325 BLAKE2B 8959896a75c029f54d052bb114e8ca621fda79dec03fc09f7e2bbbe766bab39e0334fae64d03c69fbd832d571df26b88782d39f944e8b66b96b7c3624377a9a6 SHA512 75922f7ce7bda140550229e21ac4e59dff638011ccb56a882dde75d56ec49ad35afe7065d71ac735106ca3e22f41d726bbfc1cbcc4ae2760be9efa6b0f21072e
|
||||
DIST Skia-Linux-Release-x64-m124-08a5439a6b.zip 35293958 BLAKE2B cff433ad435fef9e4d445579ff97f566ff53a997e00104a546eed7501a9ed60cdcbe7e3a9ed8d01ff1eafacfd0c878f32c795ee49befc5df3b4c188b3a48a416 SHA512 69f11a1db7bb214679b87537097b26514f5c0a534a7fd7e4f1165f9318d8f056311cce938f9b431a64a088560f480cdddf6cd9afc4f28ebae5c384755fa36f4b
|
||||
DIST skia-m124-08a5439a6b-aseprite.tar.gz 65486346 BLAKE2B 0e13f001707db70b8b949f3d8766cc05f37ea10942fd3e6c02b47190d9296564451c027cde2b86e59ff9338c19f1423dc042da210e54db0595174529baf5c43c SHA512 d4257c872a98691df12cd11786b3bd3a0d4c94dbe063d7100a7ffe4397f8ff93cbcfa924a7fcc0dd95dfa52969745b8bdb2bde55b1cfbfb8b06e5ce59f3eed5d
|
||||
|
||||
@@ -0,0 +1,268 @@
|
||||
# Copyright 1999-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{11..15} )
|
||||
|
||||
inherit cmake desktop flag-o-matic python-any-r1 toolchain-funcs xdg-utils
|
||||
|
||||
SKIA_VER="m124-08a5439a6b"
|
||||
|
||||
DESCRIPTION="Animated sprite editor & pixel art tool"
|
||||
HOMEPAGE="https://www.aseprite.org"
|
||||
# Use forked skia sources with local shanges
|
||||
# Precompiled skia required only for icudtl.dat
|
||||
SRC_URI="https://github.com/aseprite/aseprite/releases/download/v${PV}/Aseprite-v${PV}-Source.zip
|
||||
https://github.com/aseprite/skia/archive/refs/tags/${SKIA_VER}.tar.gz ->
|
||||
skia-${SKIA_VER}-aseprite.tar.gz
|
||||
https://github.com/aseprite/skia/releases/download/${SKIA_VER}/Skia-Linux-Release-x64.zip ->
|
||||
Skia-Linux-Release-x64-${SKIA_VER}.zip
|
||||
"
|
||||
|
||||
# See https://github.com/aseprite/aseprite#license
|
||||
LICENSE="Aseprite-EULA BSD MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
IUSE="test"
|
||||
|
||||
RESTRICT="bindist mirror !test? ( test )"
|
||||
|
||||
COMMON_DEPEND="
|
||||
app-arch/libarchive:=
|
||||
app-text/cmark:=
|
||||
dev-libs/icu:=
|
||||
dev-libs/libfmt:=
|
||||
dev-libs/tinyxml2:=
|
||||
media-libs/fontconfig
|
||||
media-libs/freetype
|
||||
media-libs/giflib:=
|
||||
media-libs/harfbuzz:=[truetype]
|
||||
media-libs/libjpeg-turbo:=
|
||||
media-libs/libwebp:=
|
||||
media-libs/libpng:=
|
||||
net-misc/curl
|
||||
virtual/zlib:=
|
||||
virtual/opengl
|
||||
x11-libs/libX11
|
||||
x11-libs/libXcursor
|
||||
x11-libs/libXi
|
||||
x11-libs/libxcb:=
|
||||
"
|
||||
RDEPEND="
|
||||
${COMMON_DEPEND}
|
||||
gnome-extra/zenity
|
||||
"
|
||||
DEPEND="
|
||||
${COMMON_DEPEND}
|
||||
x11-base/xorg-proto"
|
||||
BDEPEND="
|
||||
${PYTHON_DEPS}
|
||||
test? ( dev-cpp/gtest )
|
||||
app-arch/unzip
|
||||
dev-build/gn
|
||||
virtual/pkgconfig
|
||||
"
|
||||
|
||||
DOCS=(
|
||||
docs/ase-file-specs.md
|
||||
docs/gpl-palette-extension.md
|
||||
README.md
|
||||
)
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/aseprite-1.3.16.1_shared_libarchive.patch"
|
||||
"${FILESDIR}/aseprite-1.3.16.1_shared_json11.patch"
|
||||
"${FILESDIR}/aseprite-1.3.16.1_shared_webp.patch"
|
||||
"${FILESDIR}/aseprite-1.3.18.6_laf_fixes.patch"
|
||||
"${FILESDIR}/aseprite-1.3.16.1_shared_fmt.patch"
|
||||
"${FILESDIR}/aseprite-1.3.16.1_shared_tinyxml2.patch"
|
||||
"${FILESDIR}/aseprite-1.3.16.1_shared_libjpeg-turbo.patch"
|
||||
"${FILESDIR}/aseprite-1.3.16.1_shared_icu.patch"
|
||||
)
|
||||
|
||||
CMAKE_SKIP_TESTS=(
|
||||
app_tests # SEGFAULT (cannot create window)
|
||||
keyboard_shortcuts_tests # SEGFAULT (cannot create window)
|
||||
)
|
||||
|
||||
src_unpack() {
|
||||
mkdir "${S}" || die
|
||||
pushd "${S}" > /dev/null || die
|
||||
default
|
||||
popd > /dev/null || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Silence cmake-4 warnings
|
||||
rm -fr \
|
||||
laf/third_party/googletest \
|
||||
third_party/cmark \
|
||||
third_party/giflib \
|
||||
third_party/harfbuzz \
|
||||
third_party/freetype2 \
|
||||
third_party/libpng \
|
||||
third_party/libwebp \
|
||||
third_party/tinyxml2 \
|
||||
third_party/zlib \
|
||||
|| die
|
||||
cmake_src_prepare
|
||||
# Skia: remove custom optimizations
|
||||
sed -i -e 's:"\/\/gn\/skia\:optimize",::g' \
|
||||
"skia-${SKIA_VER}/gn/BUILDCONFIG.gn" || die
|
||||
# Aseprite: don't install targets from third_party projects
|
||||
sed -i -e \
|
||||
's:add_subdirectory(tga):add_subdirectory(tga EXCLUDE_FROM_ALL):g' \
|
||||
src/CMakeLists.txt || die
|
||||
sed -i \
|
||||
-e 's:add_subdirectory(json11):add_subdirectory(json11 EXCLUDE_FROM_ALL):g' \
|
||||
-e 's:add_subdirectory(TinyEXIF):add_subdirectory(TinyEXIF EXCLUDE_FROM_ALL):g' \
|
||||
third_party/CMakeLists.txt || die
|
||||
# Aseprite: don't use bundled gtest
|
||||
cmake_comment_add_subdirectory -f laf/third_party googletest
|
||||
# Fix shebang in thumbnailer
|
||||
sed -i -e 's:#!/usr/bin/sh:#!/bin/sh:' \
|
||||
src/desktop/linux/aseprite-thumbnailer || die
|
||||
# Move icudtl.dat to expected location
|
||||
mkdir -p "skia-${SKIA_VER}/third_party/externals/icu/flutter" || die
|
||||
cp third_party/externals/icu/flutter/icudtl.dat \
|
||||
"skia-${SKIA_VER}/third_party/externals/icu/flutter" || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# -Werror=strict-aliasing, -Werror=odr, -Werror=lto-type-mismatch
|
||||
# https://bugs.gentoo.org/924692
|
||||
# https://github.com/aseprite/aseprite/issues/4413
|
||||
#
|
||||
# There is a bundled skia that fails with ODR errors. When excluding just
|
||||
# skia from testing, aseprite itself failed with strict-aliasing (before
|
||||
# upstream PR#84), and when that is disabled, fails again with ODR and
|
||||
# lto-type-mismatch issues.
|
||||
#
|
||||
# There are a lot of issues, so don't trust any fixes without thorough
|
||||
# testing.
|
||||
append-flags -fno-strict-aliasing
|
||||
filter-lto
|
||||
|
||||
einfo "Skia configuration"
|
||||
pushd "skia-${SKIA_VER}" > /dev/null || 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_wuffs=false
|
||||
|
||||
skia_enable_pdf=false
|
||||
skia_enable_svg=false
|
||||
skia_enable_skunicode=true
|
||||
skia_use_expat=false
|
||||
skia_use_ffmpeg=false
|
||||
skia_use_fontconfig=true
|
||||
skia_use_freetype=true
|
||||
skia_use_gl=true
|
||||
skia_use_harfbuzz=true
|
||||
skia_use_icu=true
|
||||
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=true
|
||||
skia_use_libwebp_encode=true
|
||||
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
|
||||
popd > /dev/null || die
|
||||
|
||||
einfo "Aseprite configuration"
|
||||
local mycmakeargs=(
|
||||
-DGit_FOUND=OFF
|
||||
-DENABLE_CCACHE=OFF
|
||||
-DENABLE_DESKTOP_INTEGRATION=ON
|
||||
-DENABLE_I18N_STRINGS=OFF
|
||||
-DENABLE_SCRIPTING=OFF
|
||||
-DENABLE_STEAM=OFF
|
||||
-DENABLE_TESTS="$(usex test)"
|
||||
-DENABLE_QT_THUMBNAILER=OFF
|
||||
-DENABLE_UPDATER=OFF
|
||||
-DENABLE_WEBP=ON
|
||||
-DLAF_WITH_EXAMPLES=OFF
|
||||
-DLAF_WITH_TESTS="$(usex test)"
|
||||
-DFULLSCREEN_PLATFORM=ON
|
||||
-DSKIA_DIR="${S}/skia-${SKIA_VER}/"
|
||||
-DSKIA_LIBRARY_DIR="${S}/skia-${SKIA_VER}/out/Static/"
|
||||
-DSKIA_LIBRARY="${S}/skia-${SKIA_VER}/out/Static/libskia.a"
|
||||
-DSKSHAPER_LIBRARY="${S}/skia-${SKIA_VER}/out/Static/libskshaper.a"
|
||||
-DSKUNICODE_LIBRARY="${S}/skia-${SKIA_VER}/out/Static/libskunicode.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_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"
|
||||
pushd "skia-${SKIA_VER}" > /dev/null || die
|
||||
eninja -C out/Static
|
||||
popd > /dev/null || die
|
||||
|
||||
einfo "Aseprite compilation"
|
||||
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
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
diff --git a/cmake/FindSkia.cmake b/cmake/FindSkia.cmake
|
||||
index eee6ce0..d1c95b6 100644
|
||||
--- a/laf/cmake/FindSkia.cmake
|
||||
+++ b/laf/cmake/FindSkia.cmake
|
||||
@@ -172,18 +172,18 @@ if(NOT PNG_LIBRARIES)
|
||||
set(PNG_INCLUDE_DIRS "${SKIA_DIR}/third_party/externals/libpng")
|
||||
endif()
|
||||
|
||||
-set(FREETYPE_FOUND ON)
|
||||
-find_library(FREETYPE_LIBRARY freetype2 PATH "${SKIA_LIBRARY_DIR}" NO_DEFAULT_PATH)
|
||||
-set(FREETYPE_LIBRARIES ${FREETYPE_LIBRARY})
|
||||
-set(FREETYPE_INCLUDE_DIRS "${SKIA_DIR}/third_party/externals/freetype/include")
|
||||
-
|
||||
-find_library(HARFBUZZ_LIBRARY harfbuzz PATH "${SKIA_LIBRARY_DIR}" NO_DEFAULT_PATH)
|
||||
-set(HARFBUZZ_LIBRARIES ${HARFBUZZ_LIBRARY})
|
||||
-set(HARFBUZZ_INCLUDE_DIRS "${SKIA_DIR}/third_party/externals/harfbuzz/src")
|
||||
+find_package(PkgConfig QUIET)
|
||||
+pkg_check_modules(WEBP libwebp libwebpdemux libwebpmux)
|
||||
|
||||
set(SKIA_LIBRARIES
|
||||
${SKIA_LIBRARY}
|
||||
${SKIA_OPENGL_LIBRARY}
|
||||
+ ${FREETYPE_LIBRARIES}
|
||||
+ ${HARFBUZZ_LIBRARIES}
|
||||
+ ${PNG_LIBRARIES}
|
||||
+ ${WEBP_LIBRARIES}
|
||||
+ ICU::uc
|
||||
+ libjpeg-turbo::jpeg
|
||||
CACHE INTERNAL "Skia libraries")
|
||||
|
||||
add_library(skia INTERFACE)
|
||||
@@ -191,6 +191,8 @@ target_include_directories(skia INTERFACE
|
||||
${SKIA_DIR}
|
||||
${FREETYPE_INCLUDE_DIRS}
|
||||
${HARFBUZZ_INCLUDE_DIRS}
|
||||
+ ${PNG_INCLUDE_DIRS}
|
||||
+ ${WEBP_INCLUDE_DIRS}
|
||||
${PNG_INCLUDE_DIRS})
|
||||
target_link_libraries(skia INTERFACE ${SKIA_LIBRARIES})
|
||||
target_compile_definitions(skia INTERFACE
|
||||
Reference in New Issue
Block a user