public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-games/aseprite/files/, dev-games/aseprite/
@ 2016-09-14 11:22 Patrice Clement
  0 siblings, 0 replies; 10+ messages in thread
From: Patrice Clement @ 2016-09-14 11:22 UTC (permalink / raw
  To: gentoo-commits

commit:     b59f9d201c94f30a5ab8584f708f0905ae5f79f9
Author:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 14 11:21:11 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Wed Sep 14 11:21:11 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b59f9d20

dev-games/aseprite: Clean up old.

Package-Manager: portage-2.2.28

 dev-games/aseprite/Manifest                        |  1 -
 dev-games/aseprite/aseprite-1.1.4.1.ebuild         | 78 ----------------------
 .../files/aseprite-1.1.4.1_underlinking.patch      | 28 --------
 3 files changed, 107 deletions(-)

diff --git a/dev-games/aseprite/Manifest b/dev-games/aseprite/Manifest
index 095a276..e0c25a1 100644
--- a/dev-games/aseprite/Manifest
+++ b/dev-games/aseprite/Manifest
@@ -1,4 +1,3 @@
-DIST Aseprite-v1.1.4.1-Source.zip 11723085 SHA256 731ac44259217626dde91cdcae9a24cdd4337540fc91bbe5c05cebcb12869879 SHA512 deeb42c123517e17378498584bb788f375e8aaaf046d5f9732848a5bd794a1af1d8381ff51271f9e30c198478e0f716ae23495972b693db9049ff4c2b8968672 WHIRLPOOL 5c2bd1bf8f5d187c385086a431ab070f55308b01089ce703e54093963402a9300295ea1cbf3602021fea1211ae68c6a2a07391e8e054827ce82ee60462001c4a
 DIST Aseprite-v1.1.6-Source.zip 11801981 SHA256 259c6418d5bc48a04f63a27f4a8c5a0aa44ce759403ba976ebbfad293eab08e8 SHA512 d87bcc5ece64cbc772ea5d4dc1edf29943d9038221905c0263511852afbb4e9119ce82468502a78c286729bb91389d08e3a8b7f358e4f6f8fe88507e7e69c9ac WHIRLPOOL 8f9168551be29d8c453fc1db27930a87e8228081b837c8c1a608045acdb7968715a8eb3994e04df83288f1fb12c5744f2bbb6c0733e578dd20bc4c4a2a234801
 DIST Aseprite-v1.1.7-Source.zip 11801711 SHA256 7b5b42d301fc37d3b62a50432a0fbff1483857b8f1829bb6fdac3b1a22d19ade SHA512 9a92853042c7de567a7eb33d10ddd38c6d6bd53acfe4b93dc96e11408a7bda39ef7503c159934c483f0455700933c541dfdc0cb4c505d3385778e40686e474e6 WHIRLPOOL 09097fe4784395370c7d8e1af7ee921943e0798c8e0853fdc6491f2daa0e80e1cf6e637041972a05abcfe687581ab1d2d72f99696def6ddbd69e2b8c1220db5e
 DIST aseprite-0.9.5.tar.xz 507744 SHA256 81e0360d9d8a32d6c548775dbacdb1520aac94b54c2d9f1327d52f219737f154 SHA512 fc6df942aefea67fd05e1b688209b70a2d5879a1441f61a6e3ee4d72fcdab4e580e1d4d7392fd493e0a46c45401a3eef759aa3efee17450e4c98df7f310b2d00 WHIRLPOOL 060dcf2754827ab3b30dde55cfcecd25e2d88f6e296b45529737e2194f4a9891d171776d10f9c571890efb9766b64080b85dc3d737102d2ac7be9843d27fdaef

diff --git a/dev-games/aseprite/aseprite-1.1.4.1.ebuild b/dev-games/aseprite/aseprite-1.1.4.1.ebuild
deleted file mode 100644
index 075510a..00000000
--- a/dev-games/aseprite/aseprite-1.1.4.1.ebuild
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-
-inherit cmake-utils flag-o-matic
-
-DESCRIPTION="Animated sprite editor & pixel art tool"
-HOMEPAGE="http://www.aseprite.org"
-SRC_URI="https://github.com/aseprite/aseprite/releases/download/v${PV}/Aseprite-v${PV}-Source.zip"
-
-# See https://github.com/aseprite/aseprite#credits
-# Some bundled third-party packages built-in:
-# gtest duktape modp_b64 simpleini
-LICENSE="BSD GPL-2 MIT"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-IUSE="debug test webp"
-
-RDEPEND="dev-libs/tinyxml
-	media-libs/allegro:0[X,png]
-	media-libs/freetype
-	media-libs/giflib:=
-	webp? ( media-libs/libwebp )
-	media-libs/libpng:0=
-	net-misc/curl
-	sys-libs/zlib
-	virtual/jpeg:0
-	x11-libs/libX11
-	x11-libs/pixman"
-DEPEND="${RDEPEND}
-	app-arch/unzip"
-
-PATCHES=( "${FILESDIR}"/${P}_underlinking.patch )
-
-DOCS=( docs/files/ase.txt
-	docs/files/fli.txt
-	docs/files/msk.txt
-	docs/files/pic.txt
-	docs/files/picpro.txt
-	README.md )
-
-S="${WORKDIR}"
-
-src_prepare() {
-	cmake-utils_src_prepare
-
-	# Fix to make flag-o-matic work.
-	if use debug ; then
-		sed -i '/-DNDEBUG/d' CMakeLists.txt || die
-	fi
-}
-
-src_configure() {
-	use debug && append-cppflags -DDEBUGMODE -D_DEBUG
-
-	local mycmakeargs=(
-		-DENABLE_UPDATER=OFF
-		-DFULLSCREEN_PLATFORM=ON
-		-DUSE_SHARED_ALLEGRO4=ON
-		-DUSE_SHARED_CURL=ON
-		-DUSE_SHARED_FREETYPE=ON
-		-DUSE_SHARED_GIFLIB=ON
-		-DUSE_SHARED_JPEGLIB=ON
-		-DUSE_SHARED_LIBLOADPNG=ON
-		-DUSE_SHARED_LIBPNG=ON
-		-DUSE_SHARED_PIXMAN=ON
-		-DUSE_SHARED_TINYXML=ON
-		-DUSE_SHARED_ZLIB=ON
-		-DUSE_SHARED_LIBWEBP=ON
-		-DWITH_WEBP_SUPPORT="$(usex webp)"
-		-DENABLE_TESTS="$(usex test)"
-	)
-
-	cmake-utils_src_configure
-}

diff --git a/dev-games/aseprite/files/aseprite-1.1.4.1_underlinking.patch b/dev-games/aseprite/files/aseprite-1.1.4.1_underlinking.patch
deleted file mode 100644
index 4795881..00000000
--- a/dev-games/aseprite/files/aseprite-1.1.4.1_underlinking.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From e7883b7d6428662077fa88c8dfa4e0fdee28ff46 Mon Sep 17 00:00:00 2001
-From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
-Date: Fri, 22 Apr 2016 13:42:26 +0500
-Subject: [PATCH] Fixing underlinking for gcc 4.9
-
-Allegro4 backend uses XGrabPointer() from libX11.
-Added ${X11_LIBRARIES} to resolve underlinking.
----
- src/she/CMakeLists.txt | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/she/CMakeLists.txt b/src/she/CMakeLists.txt
-index cddf5bc..1841aa6 100644
---- a/src/she/CMakeLists.txt
-+++ b/src/she/CMakeLists.txt
-@@ -242,7 +242,8 @@ if(USE_ALLEG4_BACKEND)
-   target_link_libraries(she
-     ${LOADPNG_LIBRARY}
-     ${LIBALLEGRO4_LINK_FLAGS}
--    ${DXGUID_LIBRARIES})
-+    ${DXGUID_LIBRARIES}
-+    ${X11_LIBRARIES})
- endif()
- 
- if(USE_SKIA_BACKEND)
--- 
-2.7.3
-


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-games/aseprite/files/, dev-games/aseprite/
@ 2024-04-16 14:18 Joonas Niilola
  0 siblings, 0 replies; 10+ messages in thread
From: Joonas Niilola @ 2024-04-16 14:18 UTC (permalink / raw
  To: gentoo-commits

commit:     ca2ef8cf81daa4afafa3a052e8fba433f507c3cf
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Mon Mar  4 13:43:00 2024 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Apr 16 14:18:23 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca2ef8cf

dev-games/aseprite: add 1.3.5

Closes: https://bugs.gentoo.org/924692
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-games/aseprite/Manifest                        |   1 +
 dev-games/aseprite/aseprite-1.3.5.ebuild           | 220 +++++++++++++++++++++
 .../files/aseprite-1.3.5_laf-strict-aliasing.patch | 155 +++++++++++++++
 3 files changed, 376 insertions(+)

diff --git a/dev-games/aseprite/Manifest b/dev-games/aseprite/Manifest
index 4f38c8c61a76..cc19ea7f17fc 100644
--- a/dev-games/aseprite/Manifest
+++ b/dev-games/aseprite/Manifest
@@ -1,3 +1,4 @@
 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 Aseprite-v1.3.5-Source.zip 64189695 BLAKE2B f796f688f0ba565ae32fde2e8d84e39b610f451054440ced078ce1fc847a9208460b45aa6efa059a56c9e0603b4fd156cc476a2c40715ec2c37181e39c06a401 SHA512 885386e84c55b84cc85ffbf16f7269ac1640458abe973c3aa2e3eabd807ea3e1e06ee6e6dfaffff9dd7b09d3b37bd9ac41821152838cd80742edd4d53302c0e3
 DIST skia-m102-3338e90707323d2cd3a150276acb9f39933deee2.gh.tar.gz 53944562 BLAKE2B 9da3e8386cd7a18a6ee9362743bee4146c41038af8868a6f5e8a2dce468e4dc4669b488861d117da8d1bd8461b2ad47bfc300774a33a84153bca345d63a929a7 SHA512 9ae0032ee3861ce4958af6eb7047273d28b1faa3823576ef568e3c7faed7f49a9976540a72c3fa38234a4ae6319ac381324eff807938f9763781fd33ad67d075

diff --git a/dev-games/aseprite/aseprite-1.3.5.ebuild b/dev-games/aseprite/aseprite-1.3.5.ebuild
new file mode 100644
index 000000000000..fbbe0ad3e3a5
--- /dev/null
+++ b/dev-games/aseprite/aseprite-1.3.5.ebuild
@@ -0,0 +1,220 @@
+# 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 MIT"
+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-build/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"
+	"${FILESDIR}/${PN}-1.3.5_laf-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.5_laf-strict-aliasing.patch b/dev-games/aseprite/files/aseprite-1.3.5_laf-strict-aliasing.patch
new file mode 100644
index 000000000000..de6d5ffe3e7c
--- /dev/null
+++ b/dev-games/aseprite/files/aseprite-1.3.5_laf-strict-aliasing.patch
@@ -0,0 +1,155 @@
+https://github.com/aseprite/laf/pull/84
+From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
+Date: Sun, 14 Apr 2024 21:47:02 +0300
+Subject: [PATCH] Fix strict-alias warnings
+
+reinterpret_cast on pointers break strict-aliasing rule (-Wstrict-aliasing). Implemented internal function copy_reinterpret_cast that memcpy pointer into type, that can be converted to desired type.
+--- a/laf/base/cfile.cpp
++++ b/laf/base/cfile.cpp
+@@ -7,6 +7,7 @@
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+ #endif
++#include "base/mem_utils.h"
+ 
+ #include <cstdio>
+ 
+@@ -114,7 +115,7 @@ float fgetf(FILE* file)
+ 
+   // Little endian.
+   int v = ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1);
+-  return *reinterpret_cast<float*>(&v);
++  return *copy_reinterpret_cast<float*>(&v);
+ }
+ 
+ // Reads a 64-bit double-precision floating point number using
+@@ -156,7 +157,7 @@ double fgetd(FILE* file)
+                  ((long long)b3 << 16) |
+                  ((long long)b2 << 8) |
+                  (long long)b1);
+-  return *reinterpret_cast<double*>(&v);
++  return *copy_reinterpret_cast<double*>(&v);
+ }
+ 
+ // Writes a word using little-endian byte ordering.
+@@ -231,7 +232,7 @@ int fputq(long long l, FILE* file)
+ // Returns 0 in success or -1 in error
+ int fputf(float l, FILE* file)
+ {
+-  int b = *(reinterpret_cast<int*>(&l));
++  int b = *(copy_reinterpret_cast<int*>(&l));
+   int b1, b2, b3, b4;
+ 
+   // Little endian.
+@@ -254,7 +255,7 @@ int fputf(float l, FILE* file)
+ // Returns 0 in success or -1 in error
+ int fputd(double l, FILE* file)
+ {
+-  long long b = *(reinterpret_cast<long long*>(&l));
++  long long b = *(copy_reinterpret_cast<long long*>(&l));
+   int b1, b2, b3, b4, b5, b6, b7, b8;
+ 
+   // Little endian.
+--- a/laf/base/mem_utils.h
++++ b/laf/base/mem_utils.h
+@@ -8,10 +8,18 @@
+ #define BASE_MEM_UTILS_H_INCLUDED
+ #pragma once
+ 
++#include <cstring>
+ #include <string>
+ 
+ namespace base {
+ 
++  template<typename T>
++  T copy_reinterpret_cast(const void* ptr) {
++    T tmp;
++    std::memcpy(&tmp, ptr, sizeof(T));
++    return tmp;
++  }
++
+   std::string get_pretty_memory_size(std::size_t memsize);
+ 
+ } // namespace base
+--- a/laf/base/serialization.cpp
++++ b/laf/base/serialization.cpp
+@@ -8,6 +8,7 @@
+ #include "config.h"
+ #endif
+ 
++#include "base/mem_utils.h"
+ #include "base/serialization.h"
+ 
+ #include <iostream>
+@@ -57,7 +58,7 @@ std::ostream& little_endian::write64(std::ostream& os, uint64_t qword)
+ 
+ std::ostream& little_endian::write_float(std::ostream& os, float value)
+ {
+-  int b = *(reinterpret_cast<int*>(&value));
++  int b = *(copy_reinterpret_cast<int*>(&value));
+   os.put((int)((b & 0x000000ffl)));
+   os.put((int)((b & 0x0000ff00l) >> 8));
+   os.put((int)((b & 0x00ff0000l) >> 16));
+@@ -67,7 +68,7 @@ std::ostream& little_endian::write_float(std::ostream& os, float value)
+ 
+ std::ostream& little_endian::write_double(std::ostream& os, double value)
+ {
+-  long long b = *(reinterpret_cast<long long*>(&value));
++  long long b = *(copy_reinterpret_cast<long long*>(&value));
+   os.put((int)((b & 0x00000000000000ffl)));
+   os.put((int)((b & 0x000000000000ff00l) >> 8));
+   os.put((int)((b & 0x0000000000ff0000l) >> 16));
+@@ -126,7 +127,7 @@ float little_endian::read_float(std::istream& is)
+   b3 = is.get();
+   b4 = is.get();
+   int v = ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1);
+-  return *reinterpret_cast<float*>(&v);
++  return *copy_reinterpret_cast<float*>(&v);
+ }
+ 
+ double little_endian::read_double(std::istream& is)
+@@ -148,7 +149,7 @@ double little_endian::read_double(std::istream& is)
+            ((long long)b3 << 16) |
+            ((long long)b2 << 8) |
+            (long long)b1);
+-  return *reinterpret_cast<double*>(&v);
++  return *copy_reinterpret_cast<double*>(&v);
+ }
+ 
+ std::ostream& big_endian::write16(std::ostream& os, uint16_t word)
+@@ -182,7 +183,7 @@ std::ostream& big_endian::write64(std::ostream& os, uint64_t qword)
+ 
+ std::ostream& big_endian::write_float(std::ostream& os, float value)
+ {
+-  int b = *(reinterpret_cast<int*>(&value));
++  int b = *(copy_reinterpret_cast<int*>(&value));
+   os.put((int)((b & 0xff000000l) >> 24));
+   os.put((int)((b & 0x00ff0000l) >> 16));
+   os.put((int)((b & 0x0000ff00l) >> 8));
+@@ -192,7 +193,7 @@ std::ostream& big_endian::write_float(std::ostream& os, float value)
+ 
+ std::ostream& big_endian::write_double(std::ostream& os, double value)
+ {
+-  long long b = *(reinterpret_cast<long long*>(&value));
++  long long b = *(copy_reinterpret_cast<long long*>(&value));
+   os.put((int)((b & 0xff00000000000000l) >> 56));
+   os.put((int)((b & 0x00ff000000000000l) >> 48));
+   os.put((int)((b & 0x0000ff0000000000l) >> 40));
+@@ -251,7 +252,7 @@ float big_endian::read_float(std::istream& is)
+   b2 = is.get();
+   b1 = is.get();
+   int v = ((b4 << 24) | (b3 << 16) | (b2 << 8) | b1);
+-  return *reinterpret_cast<float*>(&v);
++  return *copy_reinterpret_cast<float*>(&v);
+ }
+ 
+ double big_endian::read_double(std::istream& is)
+@@ -273,7 +274,7 @@ double big_endian::read_double(std::istream& is)
+            ((long long)b3 << 16) |
+            ((long long)b2 << 8) |
+            (long long)b1);
+-  return *reinterpret_cast<double*>(&v);
++  return *copy_reinterpret_cast<double*>(&v);
+ }
+ 
+ 


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-games/aseprite/files/, dev-games/aseprite/
@ 2024-01-07  0:20 Conrad Kostecki
  0 siblings, 0 replies; 10+ messages in thread
From: Conrad Kostecki @ 2024-01-07  0:20 UTC (permalink / raw
  To: gentoo-commits

commit:     774bfe9d9aeef263ee06d2baeb8769d662f70073
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Tue Jan  2 19:30:39 2024 +0000
Commit:     Conrad Kostecki <conikost <AT> gentoo <DOT> org>
CommitDate: Sun Jan  7 00:19:36 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=774bfe9d

dev-games/aseprite: add 1.3.2

Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/33967
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org>

 dev-games/aseprite/Manifest                        |   1 +
 dev-games/aseprite/aseprite-1.3.2.ebuild           | 219 +++++++++++++++++++++
 .../aseprite/files/aseprite-1.3.2_shared_fmt.patch |  52 +++++
 .../files/aseprite-1.3.2_shared_json11.patch       |  56 ++++++
 .../files/aseprite-1.3.2_shared_webp.patch         |  81 ++++++++
 .../files/aseprite-1.3.2_strict-aliasing.patch     |  55 ++++++
 6 files changed, 464 insertions(+)

diff --git a/dev-games/aseprite/Manifest b/dev-games/aseprite/Manifest
index 3a17ddaab2ba..4f38c8c61a76 100644
--- a/dev-games/aseprite/Manifest
+++ b/dev-games/aseprite/Manifest
@@ -1,2 +1,3 @@
 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

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
+


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-games/aseprite/files/, dev-games/aseprite/
@ 2023-02-22  7:42 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2023-02-22  7:42 UTC (permalink / raw
  To: gentoo-commits

commit:     ed21a3aa28e193ce16d039bc3f6db3a5381640a5
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Tue Feb 21 16:35:52 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 22 07:42:18 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed21a3aa

dev-games/aseprite: additional fixes for gcc13

Closes: https://bugs.gentoo.org/895616
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/29706
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-games/aseprite/aseprite-1.2.40.ebuild          |  1 +
 .../aseprite/files/aseprite-1.2.40_laf-gcc13.patch | 47 ++++++++++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/dev-games/aseprite/aseprite-1.2.40.ebuild b/dev-games/aseprite/aseprite-1.2.40.ebuild
index f13050e1e1d3..bd7646097d95 100644
--- a/dev-games/aseprite/aseprite-1.2.40.ebuild
+++ b/dev-games/aseprite/aseprite-1.2.40.ebuild
@@ -74,6 +74,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-1.2.35_laf_fixes.patch"
 	"${FILESDIR}/${PN}-1.2.40_musl_pthreads.patch"
 	"${FILESDIR}/${PN}-1.2.40_ixwebsocket-gcc13.patch"
+	"${FILESDIR}/${PN}-1.2.40_laf-gcc13.patch"
 )
 
 src_prepare() {

diff --git a/dev-games/aseprite/files/aseprite-1.2.40_laf-gcc13.patch b/dev-games/aseprite/files/aseprite-1.2.40_laf-gcc13.patch
new file mode 100644
index 000000000000..3d7ff309342b
--- /dev/null
+++ b/dev-games/aseprite/files/aseprite-1.2.40_laf-gcc13.patch
@@ -0,0 +1,47 @@
+From 59c6af303dea4c6dc0c9da687ec73612929eacfc Mon Sep 17 00:00:00 2001
+From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
+Date: Tue, 21 Feb 2023 17:01:04 +0300
+Subject: [PATCH] Fix compilation on GCC13
+
+GCC-13 changes internal cstdint includes, and now files that uses
+standard integer types should directly include cstdint header.
+
+See: https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes
+See: https://github.com/aseprite/laf/pull/55
+Bug: https://bugs.gentoo.org/865117
+Bug: https://bugs.gentoo.org/895616
+--- a/laf/base/file_content.h
++++ b/laf/base/file_content.h
+@@ -9,6 +9,7 @@
+ #pragma once
+ 
+ #include "base/buffer.h"
++#include "base/ints.h"
+ 
+ #include <cstdio>
+ #include <string>
+--- a/laf/base/sha1.h
++++ b/laf/base/sha1.h
+@@ -11,6 +11,8 @@
+ #include <vector>
+ #include <string>
+ 
++#include "base/ints.h"
++
+ extern "C" struct SHA1Context;
+ 
+ namespace base {
+--- a/laf/base/sha1_rfc3174.h
++++ b/laf/base/sha1_rfc3174.h
+@@ -18,6 +18,8 @@
+ #define BASE_SHA1_RFC3174_H_INCLUDED
+ #pragma once
+ 
++#include "base/ints.h"
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+-- 
+2.39.2
+


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-games/aseprite/files/, dev-games/aseprite/
@ 2022-12-24 14:49 Andreas Sturmlechner
  0 siblings, 0 replies; 10+ messages in thread
From: Andreas Sturmlechner @ 2022-12-24 14:49 UTC (permalink / raw
  To: gentoo-commits

commit:     1e97075934c5241362b48cae77ebf7a5f964b143
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 24 08:56:31 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Dec 24 14:48:06 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e970759

dev-games/aseprite: drop 1.1.9

Closes: https://bugs.gentoo.org/886897
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-games/aseprite/Manifest                        |   1 -
 dev-games/aseprite/aseprite-1.1.9.ebuild           | 113 ---------------------
 .../files/aseprite-1.1.7_type-punned_pointer.patch |  28 -----
 dev-games/aseprite/metadata.xml                    |   4 -
 4 files changed, 146 deletions(-)

diff --git a/dev-games/aseprite/Manifest b/dev-games/aseprite/Manifest
index e8732fd20ba9..3a17ddaab2ba 100644
--- a/dev-games/aseprite/Manifest
+++ b/dev-games/aseprite/Manifest
@@ -1,3 +1,2 @@
-DIST Aseprite-v1.1.9-Source.zip 11746265 BLAKE2B fa16be059a7bb3b83705c56e7e93cbbb71676617a8d0798f0e481b09199ae069b85826615f8609acabb10a4e9a9da0857f2f99b03c2b913f26eee6d4dfdc0f0a SHA512 44c5878c67e69d2510c862e8f6869d727aa47b3d23d41d4e7318eca54c6d72fc5f89e72c70c160ce6da78fa091e11eedefa74e0273dc4cea59b2fe16c8851d9e
 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.1.9.ebuild b/dev-games/aseprite/aseprite-1.1.9.ebuild
deleted file mode 100644
index 61608ae8db1d..000000000000
--- a/dev-games/aseprite/aseprite-1.1.9.ebuild
+++ /dev/null
@@ -1,113 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit cmake desktop flag-o-matic xdg-utils
-
-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"
-
-# See https://github.com/aseprite/aseprite#license
-# Some bundled third-party packages built-in:
-# gtest duktape modp_b64 simpleini
-LICENSE="Aseprite-EULA"
-SLOT="0"
-KEYWORDS="amd64 x86"
-
-IUSE="bundled-libs debug kde gtk3 test webp"
-RESTRICT="bindist mirror !test? ( test )"
-
-RDEPEND="
-	!bundled-libs? ( media-libs/allegro:0[X,png] )
-	gtk3? ( dev-cpp/gtkmm:3.0 )
-	kde? (
-		dev-qt/qtcore:5
-		kde-frameworks/kio:5
-	)
-	webp? ( media-libs/libwebp )
-	dev-libs/tinyxml
-	media-libs/freetype
-	media-libs/giflib:=
-	media-libs/libpng:0=
-	net-misc/curl
-	sys-libs/zlib
-	virtual/jpeg:0
-	x11-libs/libX11
-	x11-libs/pixman"
-BDEPEND="
-	app-arch/unzip
-	gtk3? ( virtual/pkgconfig )
-	webp? ( virtual/pkgconfig )"
-
-DOCS=( docs/files/ase.txt
-	docs/files/fli.txt
-	docs/files/msk.txt
-	docs/files/pic.txt
-	docs/files/picpro.txt
-	README.md )
-
-S="${WORKDIR}"
-
-PATCHES=( "${FILESDIR}/${PN}-1.1.7_type-punned_pointer.patch" )
-
-src_prepare() {
-	cmake_src_prepare
-
-	# Fix to make flag-o-matic work.
-	if use debug ; then
-		sed -i '/-DNDEBUG/d' CMakeLists.txt || die
-	fi
-	# Fix shebang in thumbnailer
-	sed -i -e 's:#!/usr/bin/sh:#!/bin/sh:' desktop/aseprite-thumbnailer || die
-}
-
-src_configure() {
-	use debug && append-cppflags -DDEBUGMODE -D_DEBUG
-
-	local mycmakeargs=(
-		-DENABLE_UPDATER=OFF
-		-DFULLSCREEN_PLATFORM=ON
-		-DUSE_SHARED_ALLEGRO4=$(usex !bundled-libs)
-		-DUSE_SHARED_CURL=ON
-		-DUSE_SHARED_FREETYPE=ON
-		-DUSE_SHARED_GIFLIB=ON
-		-DUSE_SHARED_JPEGLIB=ON
-		-DUSE_SHARED_LIBLOADPNG=$(usex !bundled-libs)
-		-DUSE_SHARED_LIBPNG=ON
-		-DUSE_SHARED_PIXMAN=ON
-		-DUSE_SHARED_TINYXML=ON
-		-DUSE_SHARED_ZLIB=ON
-		-DUSE_SHARED_LIBWEBP=ON
-		-DWITH_DESKTOP_INTEGRATION=ON
-		-DWITH_GTK_FILE_DIALOG_SUPPORT="$(usex gtk3)"
-		-DWITH_QT_THUMBNAILER="$(usex kde)"
-		-DWITH_WEBP_SUPPORT="$(usex webp)"
-		-DENABLE_TESTS="$(usex test)"
-		-DKDE_INSTALL_USE_QT_SYS_PATHS=ON
-	)
-	cmake_src_configure
-}
-
-src_install() {
-	newicon -s 64 "${S}/data/icons/ase64.png" "${PN}.png"
-	cmake_src_install
-}
-
-pkg_postinst() {
-	if use !bundled-libs ; then
-		ewarn "Aseprite has been built with system-wide Allegro 4."
-		ewarn "Please note that you will not be able to resize the main window."
-		ewarn "For resizing support enable USE-flag bundled-libs and rebuild package."
-	fi
-	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.1.7_type-punned_pointer.patch b/dev-games/aseprite/files/aseprite-1.1.7_type-punned_pointer.patch
deleted file mode 100644
index ca0921437fc8..000000000000
--- a/dev-games/aseprite/files/aseprite-1.1.7_type-punned_pointer.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/src/allegro/src/x/xkeyboard.c b/src/allegro/src/x/xkeyboard.c
-index f121e62..86fa4f7 100644
---- a/src/allegro/src/x/xkeyboard.c
-+++ b/src/allegro/src/x/xkeyboard.c
-@@ -356,6 +356,14 @@ static int find_unknown_key_assignment (int i)
-    return _xwin.keycode_to_scancode[i];
- }
-
-+/* unicode_getc:
-+ * Reads a character from a Unicode string.
-+ */
-+static int unicode_getc(AL_CONST char *s)
-+{
-+   return *((unsigned short *)s);
-+}
-+
-
-
- /* _xwin_keyboard_handler:
-@@ -412,7 +420,7 @@ void _xwin_keyboard_handler(XKeyEvent *event, int dga2_hack)
-       }
-       buffer[len] = '\0';
-       uconvert(buffer, U_UTF8, buffer2, U_UNICODE, sizeof buffer2);
--      unicode = *(unsigned short *)buffer2;
-+      unicode = unicode_getc(buffer2);
-
- #ifdef ALLEGRO_XWINDOWS_WITH_XIM
-       r = XFilterEvent((XEvent *)event, _xwin.window);

diff --git a/dev-games/aseprite/metadata.xml b/dev-games/aseprite/metadata.xml
index 6a0f95b9f0be..66ff5b77ea41 100644
--- a/dev-games/aseprite/metadata.xml
+++ b/dev-games/aseprite/metadata.xml
@@ -9,10 +9,6 @@
 		<email>proxy-maint@gentoo.org</email>
 		<name>Proxy Maintainers</name>
 	</maintainer>
-	<use>
-		<flag name="bundled-libs">Use the upstream provided bundled version of allegro 4.4.2</flag>
-		<flag name="gtk3">Enable support for the experimental native GTK File Dialog</flag>
-	</use>
 	<upstream>
 		<remote-id type="github">aseprite/aseprite</remote-id>
 	</upstream>


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-games/aseprite/files/, dev-games/aseprite/
@ 2022-11-22 14:01 Joonas Niilola
  0 siblings, 0 replies; 10+ messages in thread
From: Joonas Niilola @ 2022-11-22 14:01 UTC (permalink / raw
  To: gentoo-commits

commit:     9bba7c9fcceefdb2c96ff8077037a1cbb65b0ee9
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Sat Nov 12 02:38:54 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Nov 22 14:01:10 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bba7c9f

dev-games/aseprite: drop 1.2.37

Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/28236
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-games/aseprite/Manifest                        |   1 -
 dev-games/aseprite/aseprite-1.2.37.ebuild          | 211 ---------------------
 .../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 ---------
 6 files changed, 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
-


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-games/aseprite/files/, dev-games/aseprite/
@ 2022-11-22 14:01 Joonas Niilola
  0 siblings, 0 replies; 10+ messages in thread
From: Joonas Niilola @ 2022-11-22 14:01 UTC (permalink / raw
  To: gentoo-commits

commit:     4a0b14e46fc79eb11a96815dd787bf620b4bad81
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Sat Nov 12 02:36:24 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Nov 22 14:01:10 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a0b14e4

dev-games/aseprite: add 1.2.40

Closes: https://bugs.gentoo.org/834090
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-games/aseprite/Manifest                        |   1 +
 dev-games/aseprite/aseprite-1.2.40.ebuild          | 211 +++++++++++++++++++++
 .../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 +++++++
 6 files changed, 501 insertions(+)

diff --git a/dev-games/aseprite/Manifest b/dev-games/aseprite/Manifest
index e2144df40ea9..27e0ce592a56 100644
--- a/dev-games/aseprite/Manifest
+++ b/dev-games/aseprite/Manifest
@@ -1,3 +1,4 @@
 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.40.ebuild b/dev-games/aseprite/aseprite-1.2.40.ebuild
new file mode 100644
index 000000000000..a3d1b977ef33
--- /dev/null
+++ b/dev-games/aseprite/aseprite-1.2.40.ebuild
@@ -0,0 +1,211 @@
+# 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.40_shared_libarchive.patch"
+	"${FILESDIR}/${PN}-1.2.40_shared_json11.patch"
+	"${FILESDIR}/${PN}-1.2.40_shared_webp.patch"
+	"${FILESDIR}/${PN}-1.2.35_laf_fixes.patch"
+	"${FILESDIR}/${PN}-1.2.40_musl_pthreads.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.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" <azamat.hackimov@gmail.com>
+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" <azamat.hackimov@gmail.com>
+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" <azamat.hackimov@gmail.com>
+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 $<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 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
+-  $<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.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" <azamat.hackimov@gmail.com>
+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
+


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-games/aseprite/files/, dev-games/aseprite/
@ 2022-07-26 12:14 Joonas Niilola
  0 siblings, 0 replies; 10+ messages in thread
From: Joonas Niilola @ 2022-07-26 12:14 UTC (permalink / raw
  To: gentoo-commits

commit:     486b4513d17db2df841153495118a8018b908c45
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Sat Jul 23 20:26:03 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Jul 26 12:14:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=486b4513

dev-games/aseprite: regenerate Manifest

Don't use *.googlesource.com as tarball source, it generates
non-reproducible tarballs (https://github.com/google/gitiles/issues/84).

Closes: https://bugs.gentoo.org/860297
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/26550
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-games/aseprite/Manifest                        |  2 +-
 dev-games/aseprite/aseprite-1.2.35.ebuild          | 26 +++++++++-------------
 .../aseprite/files/skia-m102_remove_angle2.patch   |  4 ++--
 3 files changed, 13 insertions(+), 19 deletions(-)

diff --git a/dev-games/aseprite/Manifest b/dev-games/aseprite/Manifest
index 7a47be51dcd6..18ab0748f31b 100644
--- a/dev-games/aseprite/Manifest
+++ b/dev-games/aseprite/Manifest
@@ -1,3 +1,3 @@
 DIST Aseprite-v1.1.9-Source.zip 11746265 BLAKE2B fa16be059a7bb3b83705c56e7e93cbbb71676617a8d0798f0e481b09199ae069b85826615f8609acabb10a4e9a9da0857f2f99b03c2b913f26eee6d4dfdc0f0a SHA512 44c5878c67e69d2510c862e8f6869d727aa47b3d23d41d4e7318eca54c6d72fc5f89e72c70c160ce6da78fa091e11eedefa74e0273dc4cea59b2fe16c8851d9e
 DIST Aseprite-v1.2.35-Source.zip 61972632 BLAKE2B f9e24d04a19756f65041cb9c96a4142fe5078a4f6d8b48f69e79501822ff8a5070f350cf9016e5500fec5aeb82d4d8eb2c8d8b42a73fd8bc73aecab185d002fe SHA512 2577a683516adc9c601300da15e9099d6fa698fec32f4b62ce95c46412c1dd26b0538cc23996e0a1060ac4a4de47c2538124c4a01ade375f3b4efcbc99fbbdc8
-DIST skia-m102-3338e90707323d2cd3a150276acb9f39933deee2.tar.gz 53866802 BLAKE2B c8a67c96a78bb09802b54536f994a0964ba46f1996cc1e7f41757c08802519ec0c7fe22c667b546e7d9cdee6b0d257f8629f2294b880ff9b5acac6a7f3bf18bf SHA512 15c44ffe7d1e9c678ab80826e4a76e783014859b05f1dc9410077e1a1a45b8b3bcc80bd99237e7b1a7e7301f73abdb51f7ddb10010ffe97418b2fc1356ea55e9
+DIST skia-m102-3338e90707323d2cd3a150276acb9f39933deee2.tar.gz 53944562 BLAKE2B 9da3e8386cd7a18a6ee9362743bee4146c41038af8868a6f5e8a2dce468e4dc4669b488861d117da8d1bd8461b2ad47bfc300774a33a84153bca345d63a929a7 SHA512 9ae0032ee3861ce4958af6eb7047273d28b1faa3823576ef568e3c7faed7f49a9976540a72c3fa38234a4ae6319ac381324eff807938f9763781fd33ad67d075

diff --git a/dev-games/aseprite/aseprite-1.2.35.ebuild b/dev-games/aseprite/aseprite-1.2.35.ebuild
index 367e97fc2ace..fde3fc002290 100644
--- a/dev-games/aseprite/aseprite-1.2.35.ebuild
+++ b/dev-games/aseprite/aseprite-1.2.35.ebuild
@@ -7,12 +7,13 @@ inherit cmake desktop ninja-utils 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://skia.googlesource.com/skia/+archive/${SKIA_REV}.tar.gz -> skia-${SKIA_VER}-${SKIA_REV}.tar.gz"
+	https://github.com/google/skia/archive/${SKIA_REV}.tar.gz -> skia-${SKIA_VER}-${SKIA_REV}.tar.gz"
 
 # See https://github.com/aseprite/aseprite#license
 LICENSE="Aseprite-EULA"
@@ -68,18 +69,11 @@ PATCHES=(
 	"${FILESDIR}/${P}_laf_fixes.patch"
 )
 
-src_unpack() {
-	unpack "Aseprite-v${PV}-Source.zip"
-	# Unpack skia into separate dir
-	mkdir -p "${WORKDIR}/skia" || die
-	cd "${WORKDIR}/skia" || die
-	unpack "skia-${SKIA_VER}-${SKIA_REV}.tar.gz"
-}
-
 src_prepare() {
 	cmake_src_prepare
 	# Skia: remove custom optimizations
-	sed -i -e 's:"\/\/gn\/skia\:optimize",::g' skia/gn/BUILDCONFIG.gn || die
+	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
@@ -92,7 +86,7 @@ src_prepare() {
 
 src_configure() {
 	einfo "Skia configuration"
-	cd "${WORKDIR}/skia" || die
+	cd "${WORKDIR}/skia-${SKIA_REV}" || die
 
 	tc-export AR CC CXX
 
@@ -164,10 +158,10 @@ src_configure() {
 		-DLAF_WITH_EXAMPLES=OFF
 		-DLAF_WITH_TESTS="$(usex test)"
 		-DFULLSCREEN_PLATFORM=ON
-		-DSKIA_DIR="${WORKDIR}/skia/"
-		-DSKIA_LIBRARY_DIR="${WORKDIR}/skia/out/Static/"
-		-DSKIA_LIBRARY="${WORKDIR}/skia/out/Static/libskia.a"
-		-DSKSHAPER_LIBRARY="${WORKDIR}/skia/out/Static/libskshaper.a"
+		-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
@@ -187,7 +181,7 @@ src_configure() {
 
 src_compile() {
 	einfo "Skia compilation"
-	cd "${WORKDIR}/skia" || die
+	cd "${WORKDIR}/skia-${SKIA_REV}" || die
 	eninja -C out/Static
 
 	einfo "Aseprite compilation"

diff --git a/dev-games/aseprite/files/skia-m102_remove_angle2.patch b/dev-games/aseprite/files/skia-m102_remove_angle2.patch
index 71b9bd6f3326..7539a1e9aeb7 100644
--- a/dev-games/aseprite/files/skia-m102_remove_angle2.patch
+++ b/dev-games/aseprite/files/skia-m102_remove_angle2.patch
@@ -1,5 +1,5 @@
---- a/skia/third_party/zlib/BUILD.gn	2022-07-10 00:39:12.507321714 +0300
-+++ b/skia/third_party/zlib/BUILD.gn	2022-07-10 00:40:49.175261689 +0300
+--- a/skia-3338e90707323d2cd3a150276acb9f39933deee2/third_party/zlib/BUILD.gn	2022-07-10 00:39:12.507321714 +0300
++++ b/skia-3338e90707323d2cd3a150276acb9f39933deee2/third_party/zlib/BUILD.gn	2022-07-10 00:40:49.175261689 +0300
 @@ -197,12 +197,3 @@
  config("zlib_config") {
  }


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-games/aseprite/files/, dev-games/aseprite/
@ 2022-07-23  9:13 Joonas Niilola
  0 siblings, 0 replies; 10+ messages in thread
From: Joonas Niilola @ 2022-07-23  9:13 UTC (permalink / raw
  To: gentoo-commits

commit:     554fef0b9b28d3cce7889fa999cdf7c48e99479c
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Sun Jul 10 21:41:39 2022 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Jul 23 09:13:33 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=554fef0b

dev-games/aseprite: add 1.2.35

Closes: https://bugs.gentoo.org/696186
Closes: https://bugs.gentoo.org/791682
Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/26335
Closes: https://github.com/gentoo/gentoo/pull/26171
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 dev-games/aseprite/Manifest                        |   2 +
 dev-games/aseprite/aseprite-1.2.35.ebuild          | 208 +++++++++++++++++++++
 .../files/aseprite-1.2.35_check_colorSpace.patch   |  25 +++
 .../aseprite/files/aseprite-1.2.35_laf_fixes.patch |  40 ++++
 .../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 +++++++++
 .../aseprite/files/skia-m102_remove_angle2.patch   |  15 ++
 8 files changed, 540 insertions(+)

diff --git a/dev-games/aseprite/Manifest b/dev-games/aseprite/Manifest
index 61be6a72eed5..39395901a5e5 100644
--- a/dev-games/aseprite/Manifest
+++ b/dev-games/aseprite/Manifest
@@ -1 +1,3 @@
 DIST Aseprite-v1.1.9-Source.zip 11746265 BLAKE2B fa16be059a7bb3b83705c56e7e93cbbb71676617a8d0798f0e481b09199ae069b85826615f8609acabb10a4e9a9da0857f2f99b03c2b913f26eee6d4dfdc0f0a SHA512 44c5878c67e69d2510c862e8f6869d727aa47b3d23d41d4e7318eca54c6d72fc5f89e72c70c160ce6da78fa091e11eedefa74e0273dc4cea59b2fe16c8851d9e
+DIST Aseprite-v1.2.35-Source.zip 61972632 BLAKE2B f9e24d04a19756f65041cb9c96a4142fe5078a4f6d8b48f69e79501822ff8a5070f350cf9016e5500fec5aeb82d4d8eb2c8d8b42a73fd8bc73aecab185d002fe SHA512 2577a683516adc9c601300da15e9099d6fa698fec32f4b62ce95c46412c1dd26b0538cc23996e0a1060ac4a4de47c2538124c4a01ade375f3b4efcbc99fbbdc8
+DIST skia-m102-3338e90707323d2cd3a150276acb9f39933deee2.tar.gz 53866897 BLAKE2B 90688df3069cae84a4bd3c14bf13a78288fbf7e621f8e9c9688f44fc2a57dd85f5d354d41a5afc98687571f5550a04abfc48ec8758f61a0bb248ae7abd334d15 SHA512 af1f820ea6935ef06df32f96f813d5ffc4921eb29f930bc417816475aa1f7a4ac4d31acb8a11144a4907eda89fce63fd49b84098b1ec8048b43c61a68f8721d7

diff --git a/dev-games/aseprite/aseprite-1.2.35.ebuild b/dev-games/aseprite/aseprite-1.2.35.ebuild
new file mode 100644
index 000000000000..d685ef6d95f3
--- /dev/null
+++ b/dev-games/aseprite/aseprite-1.2.35.ebuild
@@ -0,0 +1,208 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake desktop ninja-utils toolchain-funcs xdg-utils
+
+SKIA_VER="m102"
+# Last commit in ${SKIA_VER} feature branch
+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://skia.googlesource.com/skia/+archive/${SKIA_REV}.tar.gz -> skia-${SKIA_VER}-${SKIA_REV}.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="
+	kde? (
+		dev-qt/qtcore:5
+		kde-frameworks/kio:5
+	)
+	webp? ( media-libs/libwebp )
+	app-arch/libarchive
+	app-text/cmark
+	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/pixman"
+BDEPEND="
+	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}/${P}_check_colorSpace.patch"
+	"${FILESDIR}/${P}_shared_libarchive.patch"
+	"${FILESDIR}/${P}_shared_json11.patch"
+	"${FILESDIR}/${P}_shared_webp.patch"
+	"${FILESDIR}/${P}_laf_fixes.patch"
+)
+
+src_unpack() {
+	unpack "Aseprite-v${PV}-Source.zip"
+	# Unpack skia into separate dir
+	mkdir -p "${WORKDIR}/skia" || die
+	cd "${WORKDIR}/skia" || die
+	unpack "skia-${SKIA_VER}-${SKIA_REV}.tar.gz"
+}
+
+src_prepare() {
+	cmake_src_prepare
+	# Skia: remove custom optimizations
+	sed -i -e 's:"\/\/gn\/skia\:optimize",::g' skia/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" || 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/"
+		-DSKIA_LIBRARY_DIR="${WORKDIR}/skia/out/Static/"
+		-DSKIA_LIBRARY="${WORKDIR}/skia/out/Static/libskia.a"
+		-DSKSHAPER_LIBRARY="${WORKDIR}/skia/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" || 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
new file mode 100644
index 000000000000..e674d1409699
--- /dev/null
+++ b/dev-games/aseprite/files/aseprite-1.2.35_check_colorSpace.patch
@@ -0,0 +1,25 @@
+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_laf_fixes.patch b/dev-games/aseprite/files/aseprite-1.2.35_laf_fixes.patch
new file mode 100644
index 000000000000..31a9ab5b3be9
--- /dev/null
+++ b/dev-games/aseprite/files/aseprite-1.2.35_laf_fixes.patch
@@ -0,0 +1,40 @@
+diff --git a/cmake/FindSkia.cmake b/cmake/FindSkia.cmake
+index 2d18c12..2e37f22 100644
+--- a/laf/cmake/FindSkia.cmake
++++ b/laf/cmake/FindSkia.cmake
+@@ -122,25 +122,25 @@ if(NOT ZLIB_LIBRARIES)
+   set(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
+ 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")
+-
+ set(SKIA_LIBRARIES
+   ${SKIA_LIBRARY}
+   ${SKIA_OPENGL_LIBRARY}
++  ${FREETYPE_LIBRARIES}
++  ${JPEG_LIBRARIES}
++  ${HARFBUZZ_LIBRARIES}
++  ${PNG_LIBRARIES}
++  ${WEBP_LIBRARIES}
+   CACHE INTERNAL "Skia libraries")
+ 
+ add_library(skia INTERFACE)
+ target_include_directories(skia INTERFACE
+   ${SKIA_DIR}
+   ${FREETYPE_INCLUDE_DIRS}
+-  ${HARFBUZZ_INCLUDE_DIRS})
++  ${JPEG_INCLUDE_DIRS}
++  ${HARFBUZZ_INCLUDE_DIRS}
++  ${PNG_INCLUDE_DIRS}
++  ${WEBP_INCLUDE_DIRS}
++)
+ target_link_libraries(skia INTERFACE ${SKIA_LIBRARIES})
+ target_compile_definitions(skia INTERFACE
+   SK_INTERNAL

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
new file mode 100644
index 000000000000..ef962c507609
--- /dev/null
+++ b/dev-games/aseprite/files/aseprite-1.2.35_shared_json11.patch
@@ -0,0 +1,54 @@
+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
new file mode 100644
index 000000000000..0e0e1bd0e98f
--- /dev/null
+++ b/dev-games/aseprite/files/aseprite-1.2.35_shared_libarchive.patch
@@ -0,0 +1,106 @@
+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
new file mode 100644
index 000000000000..0344c691a06c
--- /dev/null
+++ b/dev-games/aseprite/files/aseprite-1.2.35_shared_webp.patch
@@ -0,0 +1,90 @@
+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
+

diff --git a/dev-games/aseprite/files/skia-m102_remove_angle2.patch b/dev-games/aseprite/files/skia-m102_remove_angle2.patch
new file mode 100644
index 000000000000..71b9bd6f3326
--- /dev/null
+++ b/dev-games/aseprite/files/skia-m102_remove_angle2.patch
@@ -0,0 +1,15 @@
+--- a/skia/third_party/zlib/BUILD.gn	2022-07-10 00:39:12.507321714 +0300
++++ b/skia/third_party/zlib/BUILD.gn	2022-07-10 00:40:49.175261689 +0300
+@@ -197,12 +197,3 @@
+ config("zlib_config") {
+ }
+ 
+-third_party("compression_utils_portable") {
+-  visibility = [ "//third_party/externals/angle2:*" ]
+-  public_include_dirs = [ "../externals/zlib/google" ]
+-  sources = [
+-    "../externals/zlib/google/compression_utils_portable.cc",
+-    "../externals/zlib/google/compression_utils_portable.h",
+-  ]
+-  public_deps = [ ":zlib" ]  # either system or from source
+-}


^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-games/aseprite/files/, dev-games/aseprite/
@ 2016-04-21 20:12 Patrice Clement
  0 siblings, 0 replies; 10+ messages in thread
From: Patrice Clement @ 2016-04-21 20:12 UTC (permalink / raw
  To: gentoo-commits

commit:     f8be78804df4efe111af69f0d65e2914855cfc2f
Author:     Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com>
AuthorDate: Tue Apr 19 17:10:26 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Thu Apr 21 19:51:23 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8be7880

dev-games/aseprite: Bump to 1.4.1.1. Drop old.

New version 1.4.1.1, dropping failed 1.0.6 and 9999.
Added SLOT for virtual/jpeg:0 for 0.9.5-r1.

Gentoo-Bug: https://bugs.gentoo.org/571776
Package-Manager: portage-2.2.26
Closes: https://github.com/gentoo/gentoo/pull/1309

Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 dev-games/aseprite/Manifest                        |  2 +-
 dev-games/aseprite/aseprite-0.9.5-r1.ebuild        |  4 +-
 ...eprite-1.0.6.ebuild => aseprite-1.1.4.1.ebuild} | 44 +++++-----
 dev-games/aseprite/aseprite-9999.ebuild            | 95 ----------------------
 .../aseprite/files/aseprite-1.0.6-obinary.patch    | 27 ------
 .../aseprite/files/aseprite-1.0.6-png_sizeof.patch | 11 ---
 .../files/aseprite-1.1.4.1_underlinking.patch      | 12 +++
 dev-games/aseprite/metadata.xml                    |  1 +
 8 files changed, 39 insertions(+), 157 deletions(-)

diff --git a/dev-games/aseprite/Manifest b/dev-games/aseprite/Manifest
index 00fdc16..b04c4f0 100644
--- a/dev-games/aseprite/Manifest
+++ b/dev-games/aseprite/Manifest
@@ -1,2 +1,2 @@
+DIST Aseprite-v1.1.4.1-Source.zip 11723085 SHA256 731ac44259217626dde91cdcae9a24cdd4337540fc91bbe5c05cebcb12869879 SHA512 deeb42c123517e17378498584bb788f375e8aaaf046d5f9732848a5bd794a1af1d8381ff51271f9e30c198478e0f716ae23495972b693db9049ff4c2b8968672 WHIRLPOOL 5c2bd1bf8f5d187c385086a431ab070f55308b01089ce703e54093963402a9300295ea1cbf3602021fea1211ae68c6a2a07391e8e054827ce82ee60462001c4a
 DIST aseprite-0.9.5.tar.xz 507744 SHA256 81e0360d9d8a32d6c548775dbacdb1520aac94b54c2d9f1327d52f219737f154 SHA512 fc6df942aefea67fd05e1b688209b70a2d5879a1441f61a6e3ee4d72fcdab4e580e1d4d7392fd493e0a46c45401a3eef759aa3efee17450e4c98df7f310b2d00 WHIRLPOOL 060dcf2754827ab3b30dde55cfcecd25e2d88f6e296b45529737e2194f4a9891d171776d10f9c571890efb9766b64080b85dc3d737102d2ac7be9843d27fdaef
-DIST aseprite-1.0.6.tar.gz 3685678 SHA256 449619ee49eaf18c483706c6d2364868085b0f311548bd69e5664fdc0c06e21e SHA512 0189cb6d845ea799f84c17b6456a10341a5ba2a2712bed2c202a711ffe60bb3f2e2eb47bb5702c6326f16a842cd8780c4c1f44ba61111a535b172c34e6f2d327 WHIRLPOOL 4bbf000bf30beafef0003f047f625d4af7e61d51336562ba9192eceb4c72cafbd361bf68ba5fef20b260e74997b679d440d2f9e6386c1ab48c0a6e103577caf2

diff --git a/dev-games/aseprite/aseprite-0.9.5-r1.ebuild b/dev-games/aseprite/aseprite-0.9.5-r1.ebuild
index 1904a98..9965cf3 100644
--- a/dev-games/aseprite/aseprite-0.9.5-r1.ebuild
+++ b/dev-games/aseprite/aseprite-0.9.5-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -22,7 +22,7 @@ RDEPEND="dev-libs/tinyxml
 	media-libs/libpng:0
 	net-misc/curl
 	sys-libs/zlib
-	virtual/jpeg
+	virtual/jpeg:0
 	x11-libs/libX11"
 DEPEND="${RDEPEND}
 	test? ( dev-cpp/gtest )"

diff --git a/dev-games/aseprite/aseprite-1.0.6.ebuild b/dev-games/aseprite/aseprite-1.1.4.1.ebuild
similarity index 57%
rename from dev-games/aseprite/aseprite-1.0.6.ebuild
rename to dev-games/aseprite/aseprite-1.1.4.1.ebuild
index a701677..f89be11 100644
--- a/dev-games/aseprite/aseprite-1.0.6.ebuild
+++ b/dev-games/aseprite/aseprite-1.1.4.1.ebuild
@@ -1,36 +1,39 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI="5"
+EAPI=6
 
-inherit cmake-utils multilib toolchain-funcs flag-o-matic
+inherit cmake-utils flag-o-matic
 
 DESCRIPTION="Animated sprite editor & pixel art tool"
 HOMEPAGE="http://www.aseprite.org"
-SRC_URI="https://github.com/aseprite/aseprite/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI="https://github.com/aseprite/aseprite/releases/download/v${PV}/Aseprite-v${PV}-Source.zip"
 
-LICENSE="GPL-2 FTL"
+# See https://github.com/aseprite/aseprite#credits
+# Some bundled third-party packages built-in:
+# gtest duktape modp_b64 simpleini
+LICENSE="BSD GPL-2 MIT"
 SLOT="0"
-# giflib still unkeyworded
-KEYWORDS=""
+KEYWORDS="~amd64 ~x86"
 
-IUSE="debug memleak"
+IUSE="debug test webp"
 
 RDEPEND="dev-libs/tinyxml
 	media-libs/allegro:0[X,png]
-	>=media-libs/giflib-5.0
+	media-libs/freetype
+	media-libs/giflib
+	webp? ( media-libs/libwebp )
 	media-libs/libpng:0
+	net-misc/curl
 	sys-libs/zlib
-	virtual/jpeg
+	virtual/jpeg:0
 	x11-libs/libX11
 	x11-libs/pixman"
 DEPEND="${RDEPEND}
-	dev-cpp/gtest"
+	app-arch/unzip"
 
-PATCHES=( "${FILESDIR}"/aseprite-0.9.5-underlinking.patch
-	"${FILESDIR}"/${P}-obinary.patch
-	"${FILESDIR}"/${P}-png_sizeof.patch )
+PATCHES=( "${FILESDIR}"/${P}_underlinking.patch )
 
 DOCS=( docs/files/ase.txt
 	docs/files/fli.txt
@@ -39,6 +42,8 @@ DOCS=( docs/files/ase.txt
 	docs/files/picpro.txt
 	README.md )
 
+S="${WORKDIR}"
+
 src_prepare() {
 	cmake-utils_src_prepare
 
@@ -46,30 +51,27 @@ src_prepare() {
 	if use debug ; then
 		sed -i '/-DNDEBUG/d' CMakeLists.txt || die
 	fi
-
-	rm -r third_party/* || die
 }
 
 src_configure() {
 	use debug && append-cppflags -DDEBUGMODE -D_DEBUG
 
 	local mycmakeargs=(
-		-DCURL_STATICLIB=OFF
 		-DENABLE_UPDATER=OFF
 		-DFULLSCREEN_PLATFORM=ON
-		-DLIBPIXMAN_INCLUDE_DIR="$($(tc-getPKG_CONFIG) --variable=includedir pixman-1)/pixman-1"
-		-DLIBPIXMAN_LIBRARY="$($(tc-getPKG_CONFIG) --variable=libdir pixman-1)/libpixman-1.so"
 		-DUSE_SHARED_ALLEGRO4=ON
 		-DUSE_SHARED_CURL=ON
+		-DUSE_SHARED_FREETYPE=ON
 		-DUSE_SHARED_GIFLIB=ON
-		-DUSE_SHARED_GTEST=ON
 		-DUSE_SHARED_JPEGLIB=ON
 		-DUSE_SHARED_LIBLOADPNG=ON
 		-DUSE_SHARED_LIBPNG=ON
 		-DUSE_SHARED_PIXMAN=ON
 		-DUSE_SHARED_TINYXML=ON
 		-DUSE_SHARED_ZLIB=ON
-		$(cmake-utils_use_enable memleak)
+		-DUSE_SHARED_LIBWEBP=ON
+		-DWITH_WEBP_SUPPORT="$(usex webp)"
+		-DENABLE_TESTS="$(usex test)"
 	)
 
 	cmake-utils_src_configure

diff --git a/dev-games/aseprite/aseprite-9999.ebuild b/dev-games/aseprite/aseprite-9999.ebuild
deleted file mode 100644
index 56d2693..0000000
--- a/dev-games/aseprite/aseprite-9999.ebuild
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="5"
-
-inherit cmake-utils flag-o-matic git-2
-
-DESCRIPTION="Animated sprite editor & pixel art tool"
-HOMEPAGE="http://www.aseprite.org"
-EGIT_REPO_URI="git://github.com/dacap/${PN}.git"
-
-LICENSE="GPL-2 FTL"
-SLOT="0"
-KEYWORDS=""
-
-IUSE="debug memleak static test"
-
-RDEPEND="dev-libs/tinyxml
-	media-libs/allegro:0[X,png]
-	media-libs/giflib
-	media-libs/libpng:0
-	net-misc/curl
-	sys-libs/zlib
-	virtual/jpeg
-	x11-libs/libX11"
-DEPEND="${RDEPEND}
-	test? ( dev-cpp/gtest )"
-
-DOCS=( docs/quickref.odt
-	docs/files/ase.txt
-	docs/files/fli.txt
-	docs/files/msk.txt
-	docs/files/pic.txt
-	docs/files/picpro.txt )
-
-src_prepare() {
-	cmake-utils_src_prepare
-
-	# Fix to make flag-o-matic work.
-	if use debug ; then
-		sed -i '/-DNDEBUG/d' CMakeLists.txt || die
-	fi
-
-	# Only do a static link with Allegro if the user explicitly wants it.
-	if ! use static ; then
-		sed -i '/-DALLEGRO_STATICLINK/d' CMakeLists.txt || die
-	fi
-
-	# Remove long compiling tests for users with FEATURES="-test",
-	# also removes the gtest dependency from the build.
-	if ! use test ; then
-		sed -i '/^find_unittests/d' src/CMakeLists.txt || die
-		sed -i '/include_directories(.*third_party\/gtest.*)/d' src/CMakeLists.txt || die
-		sed -i '/add_subdirectory(gtest)/d' third_party/CMakeLists.txt || die
-	fi
-}
-
-src_configure() {
-	use debug && append-cppflags -DDEBUGMODE -D_DEBUG
-
-	local mycmakeargs
-
-	mycmakeargs=(
-		-DENABLE_UPDATER=OFF
-		-DUSE_SHARED_ALLEGRO4=ON
-		-DUSE_SHARED_CURL=ON
-		-DUSE_SHARED_GIFLIB=ON
-		-DUSE_SHARED_JPEGLIB=ON
-		-DUSE_SHARED_LIBLOADPNG=ON
-		-DUSE_SHARED_LIBPNG=ON
-		-DUSE_SHARED_TINYXML=ON
-		-DUSE_SHARED_ZLIB=ON
-		-DFULLSCREEN_PLATFORM=ON
-		$(cmake-utils_use_enable memleak)
-		$(cmake-utils_use_use static STATIC_LIBC)
-	)
-
-	if use test ; then
-		mycmakeargs+=(
-			-DUSE_SHARED_GTEST=ON
-		)
-	fi
-
-	cmake-utils_src_configure
-}
-
-pkg_postinst() {
-	elog "Warning: aseprite might not choose the resolution correctly; so, you might need"
-	elog "         to change the resolution once using the -resolution WxH[xBPP] argument."
-	elog ""
-	elog "         On subsequent runs, aseprite will remember the resolution you have set."
-	elog ""
-	elog "         For example: \`aseprite -resolution 1440x900\`"
-}

diff --git a/dev-games/aseprite/files/aseprite-1.0.6-obinary.patch b/dev-games/aseprite/files/aseprite-1.0.6-obinary.patch
deleted file mode 100644
index 4536fc5..0000000
--- a/dev-games/aseprite/files/aseprite-1.0.6-obinary.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 9997ad9fcbb0dcef16e4e8224e4238ecdfe56b66 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?=
- <Mailaender@users.noreply.github.com>
-Date: Sun, 28 Sep 2014 06:38:18 +0200
-Subject: [PATCH] always declare O_BINARY
-
-closes #461
----
- src/base/file_handle.cpp | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/src/base/file_handle.cpp b/src/base/file_handle.cpp
-index 0ba214e..f336513 100644
---- a/src/base/file_handle.cpp
-+++ b/src/base/file_handle.cpp
-@@ -21,6 +21,11 @@
- #include <fcntl.h>
- #endif
- 
-+#ifndef O_BINARY
-+#define O_BINARY  0
-+#define O_TEXT    0
-+#endif
-+
- using namespace std;
- 
- namespace base {

diff --git a/dev-games/aseprite/files/aseprite-1.0.6-png_sizeof.patch b/dev-games/aseprite/files/aseprite-1.0.6-png_sizeof.patch
deleted file mode 100644
index 02fa480..0000000
--- a/dev-games/aseprite/files/aseprite-1.0.6-png_sizeof.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/app/file/png_format.cpp
-+++ src/app/file/png_format.cpp
-@@ -413,7 +413,7 @@
- #endif
- 
-     // Save the color palette.
--    palette = (png_colorp)png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH * png_sizeof(png_color));
-+    palette = (png_colorp)png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH * sizeof(png_color));
-     for (c = 0; c < PNG_MAX_PALETTE_LENGTH; c++) {
-       fop_sequence_get_color(fop, c, &r, &g, &b);
-       palette[c].red   = r;

diff --git a/dev-games/aseprite/files/aseprite-1.1.4.1_underlinking.patch b/dev-games/aseprite/files/aseprite-1.1.4.1_underlinking.patch
new file mode 100644
index 0000000..4240040
--- /dev/null
+++ b/dev-games/aseprite/files/aseprite-1.1.4.1_underlinking.patch
@@ -0,0 +1,12 @@
+diff --git a/src/she/CMakeLists.txt b/src/she/CMakeLists.txt
+index eddf386..d1b8ce5 100644
+--- a/src/she/CMakeLists.txt
++++ b/src/she/CMakeLists.txt
+@@ -205,6 +205,7 @@ endif()
+ add_library(she ${SHE_SOURCES})
+ 
+ target_link_libraries(she
++  ${PLATFORM_LIBS}
+   gfx-lib
+   base-lib)
+ 

diff --git a/dev-games/aseprite/metadata.xml b/dev-games/aseprite/metadata.xml
index c61cf29..21336c4 100644
--- a/dev-games/aseprite/metadata.xml
+++ b/dev-games/aseprite/metadata.xml
@@ -8,6 +8,7 @@
   <use>
     <flag name="memleak">Enable memory-leaks detector (only for developers)</flag>
     <flag name="static">Link against static version of C and C++ runtimes</flag>
+    <flag name="webp">Enable webp image format support</flag>
   </use>
   <upstream>
     <remote-id type="github">aseprite/aseprite</remote-id>


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-04-16 14:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-14 11:22 [gentoo-commits] repo/gentoo:master commit in: dev-games/aseprite/files/, dev-games/aseprite/ Patrice Clement
  -- strict thread matches above, loose matches on Subject: below --
2024-04-16 14:18 Joonas Niilola
2024-01-07  0:20 Conrad Kostecki
2023-02-22  7:42 Sam James
2022-12-24 14:49 Andreas Sturmlechner
2022-11-22 14:01 Joonas Niilola
2022-11-22 14:01 Joonas Niilola
2022-07-26 12:14 Joonas Niilola
2022-07-23  9:13 Joonas Niilola
2016-04-21 20:12 Patrice Clement

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox