dev-games/aseprite: drop 1.3.5-r1, 1.3.13

Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/47014
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
Azamat H. Hackimov
2026-11-24 21:31:10 +01:00
committed by Andreas Sturmlechner
parent 38be9b6fc9
commit bb96dacf2b
15 changed files with 0 additions and 1170 deletions
-3
View File
@@ -1,6 +1,3 @@
DIST Aseprite-v1.3.13-Source.zip 73753124 BLAKE2B 08e4c48fd1b443ca32685323ac15ba60cf14c248011006b73d0de77c846ccbda2e69e9d6fb0866106b721142b0f4e815e572508f3edd86a4008c8643f8611cad SHA512 50b72593afe9bd136e283ed99ac37e7482d300da32e891ac4aefdf077f9f49dca1a1c3b57850d22ba72ed3d1ddb95306ceac209ead598aa77ba113015fd956f4
DIST Aseprite-v1.3.16.1-Source.zip 80095985 BLAKE2B 09918ce72b33ec6182c415b9745be2c3c4107d7a04ee75b243bb248845cb91097a40e6474cbb7665d42b283611cd8cd7282c90452d63ceb1d6845e032689063f SHA512 bb677e71faca8b21d209bc566da2156235f6c77fdf0e408bdf2004d4b4c8300aac40a286e808f1b1a8cfb117e160ed08fcaba2eacb78265bb33abf4d07dd891f
DIST Aseprite-v1.3.5-Source.zip 64189695 BLAKE2B f796f688f0ba565ae32fde2e8d84e39b610f451054440ced078ce1fc847a9208460b45aa6efa059a56c9e0603b4fd156cc476a2c40715ec2c37181e39c06a401 SHA512 885386e84c55b84cc85ffbf16f7269ac1640458abe973c3aa2e3eabd807ea3e1e06ee6e6dfaffff9dd7b09d3b37bd9ac41821152838cd80742edd4d53302c0e3
DIST Skia-Linux-Release-x64-m124-08a5439a6b.zip 35293958 BLAKE2B cff433ad435fef9e4d445579ff97f566ff53a997e00104a546eed7501a9ed60cdcbe7e3a9ed8d01ff1eafacfd0c878f32c795ee49befc5df3b4c188b3a48a416 SHA512 69f11a1db7bb214679b87537097b26514f5c0a534a7fd7e4f1165f9318d8f056311cce938f9b431a64a088560f480cdddf6cd9afc4f28ebae5c384755fa36f4b
DIST skia-m102-3338e90707323d2cd3a150276acb9f39933deee2.gh.tar.gz 53944562 BLAKE2B 9da3e8386cd7a18a6ee9362743bee4146c41038af8868a6f5e8a2dce468e4dc4669b488861d117da8d1bd8461b2ad47bfc300774a33a84153bca345d63a929a7 SHA512 9ae0032ee3861ce4958af6eb7047273d28b1faa3823576ef568e3c7faed7f49a9976540a72c3fa38234a4ae6319ac381324eff807938f9763781fd33ad67d075
DIST skia-m124-08a5439a6b-aseprite.tar.gz 65486346 BLAKE2B 0e13f001707db70b8b949f3d8766cc05f37ea10942fd3e6c02b47190d9296564451c027cde2b86e59ff9338c19f1423dc042da210e54db0595174529baf5c43c SHA512 d4257c872a98691df12cd11786b3bd3a0d4c94dbe063d7100a7ffe4397f8ff93cbcfa924a7fcc0dd95dfa52969745b8bdb2bde55b1cfbfb8b06e5ce59f3eed5d
-239
View File
@@ -1,239 +0,0 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..13} )
inherit cmake desktop flag-o-matic 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="test webp"
RESTRICT="bindist mirror !test? ( test )"
COMMON_DEPEND="
app-arch/libarchive:=
app-text/cmark:=
dev-libs/libfmt:=
dev-libs/tinyxml2:=
media-libs/freetype
media-libs/giflib:=
media-libs/harfbuzz:=[truetype]
media-libs/libjpeg-turbo:=
media-libs/libpng:=
net-misc/curl
virtual/zlib:=
virtual/opengl
x11-libs/libX11
x11-libs/libXcursor
x11-libs/libXi
x11-libs/libxcb:=
webp? ( media-libs/libwebp:= )
"
RDEPEND="
${COMMON_DEPEND}
gnome-extra/zenity
"
DEPEND="
${COMMON_DEPEND}
x11-base/xorg-proto"
BDEPEND="
${PYTHON_DEPS}
test? ( dev-cpp/gtest )
app-arch/unzip
dev-build/gn
virtual/pkgconfig
"
DOCS=(
docs/ase-file-specs.md
docs/gpl-palette-extension.md
README.md
)
PATCHES=(
"${FILESDIR}/skia-${SKIA_VER}_remove_angle2.patch"
"${FILESDIR}/aseprite-1.3.13_shared_libarchive.patch"
"${FILESDIR}/aseprite-1.3.8.1_shared_json11.patch"
"${FILESDIR}/aseprite-1.3.13_shared_webp.patch"
"${FILESDIR}/aseprite-1.2.35_laf_fixes.patch"
"${FILESDIR}/aseprite-1.3.8.1_shared_fmt.patch"
"${FILESDIR}/aseprite-1.3.13_shared_tinyxml2.patch"
)
src_unpack() {
mkdir "${S}" || die
pushd "${S}" > /dev/null || die
default
popd > /dev/null || die
}
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 targets from third_party projects
sed -i -e \
's:add_subdirectory(tga):add_subdirectory(tga EXCLUDE_FROM_ALL):g' \
src/CMakeLists.txt || die
sed -i \
-e 's:add_subdirectory(json11):add_subdirectory(json11 EXCLUDE_FROM_ALL):g' \
-e 's:add_subdirectory(TinyEXIF):add_subdirectory(TinyEXIF EXCLUDE_FROM_ALL):g' \
third_party/CMakeLists.txt || die
# Aseprite: don't use bundled gtest
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() {
# -Werror=strict-aliasing, -Werror=odr, -Werror=lto-type-mismatch
# https://bugs.gentoo.org/924692
# https://github.com/aseprite/aseprite/issues/4413
#
# There is a bundled skia that fails with ODR errors. When excluding just
# skia from testing, aseprite itself failed with strict-aliasing (before
# upstream PR#84), and when that is disabled, fails again with ODR and
# lto-type-mismatch issues.
#
# There are a lot of issues, so don't trust any fixes without thorough
# testing.
filter-lto
einfo "Skia configuration"
pushd skia-${SKIA_REV} > /dev/null || die
tc-export AR CC CXX
passflags() {
local _f _x
_f=( ${1} )
_x="[$(printf '"%s", ' "${_f[@]}")]"
myconf_gn+=( ${2}="${_x}" )
}
local myconf_gn=(
ar=\"${AR}\"
cc=\"${CC}\"
cxx=\"${CXX}\"
is_official_build=true
is_component_build=false
is_debug=false
skia_use_egl=false
skia_use_dawn=false
skia_use_dng_sdk=false
skia_use_metal=false
skia_use_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
popd > /dev/null || die
einfo "Aseprite configuration"
local mycmakeargs=(
-DENABLE_CCACHE=OFF
-DENABLE_DESKTOP_INTEGRATION=ON
-DENABLE_I18N_STRINGS=OFF
-DENABLE_STEAM=OFF
-DENABLE_TESTS="$(usex test)"
-DENABLE_QT_THUMBNAILER=OFF
-DENABLE_UPDATER=OFF
-DENABLE_WEBP="$(usex webp)"
-DLAF_WITH_EXAMPLES=OFF
-DLAF_WITH_TESTS="$(usex test)"
-DFULLSCREEN_PLATFORM=ON
-DSKIA_DIR="${S}/skia-${SKIA_REV}/"
-DSKIA_LIBRARY_DIR="${S}/skia-${SKIA_REV}/out/Static/"
-DSKIA_LIBRARY="${S}/skia-${SKIA_REV}/out/Static/libskia.a"
-DSKSHAPER_LIBRARY="${S}/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"
pushd skia-${SKIA_REV} > /dev/null || die
eninja -C out/Static
popd > /dev/null || die
einfo "Aseprite compilation"
cmake_src_compile
}
src_install() {
newicon -s 64 "${S}/data/icons/ase64.png" "${PN}.png"
cmake_src_install
}
pkg_postinst() {
xdg_desktop_database_update
xdg_icon_cache_update
xdg_mimeinfo_database_update
}
pkg_postrm() {
xdg_desktop_database_update
xdg_icon_cache_update
xdg_mimeinfo_database_update
}
-225
View File
@@ -1,225 +0,0 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..12} )
inherit cmake desktop flag-o-matic 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="test webp"
RESTRICT="bindist mirror !test? ( test )"
COMMON_DEPEND="
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
virtual/zlib:=
virtual/opengl
x11-libs/libX11
x11-libs/libXcursor
x11-libs/libXi
x11-libs/libxcb:=
webp? ( media-libs/libwebp:= )
"
RDEPEND="${COMMON_DEPEND}
gnome-extra/zenity
"
DEPEND="${COMMON_DEPEND}
x11-base/xorg-proto
"
BDEPEND="${PYTHON_DEPS}
app-arch/unzip
dev-build/gn
virtual/pkgconfig
test? ( dev-cpp/gtest )
"
DOCS=( docs/{ase-file-specs,gpl-palette-extension}.md README.md )
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}/${P}-no-fetch-in-cmake-kthx.patch" # bug 935448
)
src_unpack() {
mkdir "${S}" || die
pushd "${S}" > /dev/null || die
default
popd > /dev/null || die
}
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() {
# -Werror=strict-aliasing, -Werror=odr, -Werror=lto-type-mismatch
# https://bugs.gentoo.org/924692
# https://github.com/aseprite/aseprite/issues/4413
#
# There is a bundled skia that fails with ODR errors. When excluding just
# skia from testing, aseprite itself failed with strict-aliasing (before
# upstream PR#84), and when that is disabled, fails again with ODR and
# lto-type-mismatch issues.
#
# There are a lot of issues, so don't trust any fixes without thorough
# testing.
filter-lto
einfo "Skia configuration"
pushd skia-${SKIA_REV} > /dev/null || die
tc-export AR CC CXX
passflags() {
local _f _x
_f=( ${1} )
_x="[$(printf '"%s", ' "${_f[@]}")]"
myconf_gn+=( ${2}="${_x}" )
}
local myconf_gn=(
ar=\"${AR}\"
cc=\"${CC}\"
cxx=\"${CXX}\"
is_official_build=true
is_component_build=false
is_debug=false
skia_use_egl=false
skia_use_dawn=false
skia_use_dng_sdk=false
skia_use_metal=false
skia_use_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
popd > /dev/null || die
einfo "Aseprite configuration"
local mycmakeargs=(
-DENABLE_CCACHE=OFF
-DENABLE_DESKTOP_INTEGRATION=ON
-DENABLE_I18N_STRINGS=OFF
-DENABLE_STEAM=OFF
-DENABLE_TESTS="$(usex test)"
-DENABLE_QT_THUMBNAILER=OFF
-DENABLE_UPDATER=OFF
-DENABLE_UI=ON
-DENABLE_WEBP="$(usex webp)"
-DLAF_WITH_EXAMPLES=OFF
-DLAF_WITH_TESTS="$(usex test)"
-DFULLSCREEN_PLATFORM=ON
-DSKIA_DIR="${S}/skia-${SKIA_REV}/"
-DSKIA_LIBRARY_DIR="${S}/skia-${SKIA_REV}/out/Static/"
-DSKIA_LIBRARY="${S}/skia-${SKIA_REV}/out/Static/libskia.a"
-DSKSHAPER_LIBRARY="${S}/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"
pushd skia-${SKIA_REV} > /dev/null || die
eninja -C out/Static
popd > /dev/null || die
einfo "Aseprite compilation"
cmake_src_compile
}
src_install() {
newicon -s 64 "${S}/data/icons/ase64.png" "${PN}.png"
cmake_src_install
}
pkg_postinst() {
xdg_desktop_database_update
xdg_icon_cache_update
xdg_mimeinfo_database_update
}
pkg_postrm() {
xdg_desktop_database_update
xdg_icon_cache_update
xdg_mimeinfo_database_update
}
@@ -1,40 +0,0 @@
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
@@ -1,106 +0,0 @@
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
@@ -1,66 +0,0 @@
From 9a09ef3996bc65e131651c07db5ba57d87417844 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/4] Make LibArchive as shared library dependency
Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com>
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,6 +69,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_TINYEXIF "Use your installed copy of TinyEXIF" off)
option(USE_SHARED_TINYXML "Use your installed copy of tinyxml" off)
@@ -239,6 +240,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)
--- a/src/app/CMakeLists.txt
+++ b/src/app/CMakeLists.txt
@@ -752,8 +752,8 @@ target_link_libraries(app-lib
${GIF_LIBRARIES}
${PNG_LIBRARIES}
${ZLIB_LIBRARIES}
+ ${LibArchive_LIBRARIES}
json11
- archive_static
fmt
tinyexpr
qoi)
--- a/third_party/CMakeLists.txt
+++ b/third_party/CMakeLists.txt
@@ -130,6 +130,7 @@ endif()
add_subdirectory(json11)
# libarchive
+if(NOT USE_SHARED_LIBARCHIVE)
set(HAVE_WCSCPY 1)
set(HAVE_WCSLEN 1)
@@ -151,6 +152,7 @@ set(ENABLE_LIBB2 OFF CACHE BOOL "Enable the use of the system LIBB2 library if f
add_subdirectory(libarchive)
target_include_directories(archive_static INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libarchive/libarchive>)
+endif()
# benchmark
if(ENABLE_BENCHMARKS)
--
2.48.1
@@ -1,18 +0,0 @@
From 196418c19095c77a33d690a9762e1c9c373228ea Mon Sep 17 00:00:00 2001
From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
Date: Sat, 29 Mar 2025 02:36:18 +0300
Subject: [PATCH] Fix linking with third_party library
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -278,6 +278,7 @@ add_definitions(-DPNG_NO_MMX_CODE) # Do not use MMX optimizations in PNG code
if(USE_SHARED_TINYXML)
find_library(TINYXML_LIBRARY NAMES tinyxml2)
find_path(TINYXML_INCLUDE_DIR NAMES tinyxml2.h)
+ find_package(tinyxml2 REQUIRED)
else()
set(TINYXML_LIBRARY tinyxml2)
set(TINYXML_INCLUDE_DIR ${TINYXML_DIR})
--
2.48.1
@@ -1,73 +0,0 @@
From 95f9568b4fa27eac5ccd5c6a943335f89c49b450 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/4] Use shared webp library
Added option -DUSE_SHARED_WEBP
Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com>
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -75,6 +75,7 @@ option(USE_SHARED_LIBPNG "Use your installed copy of libpng" off)
option(USE_SHARED_TINYEXIF "Use your installed copy of TinyEXIF" 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)
@@ -386,21 +387,27 @@ 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(WEBP_LIBRARIES)
- set(WEBP_FOUND ON)
+ if(USE_SHARED_WEBP)
+ find_package(PkgConfig QUIET)
+ pkg_check_modules(WEBP libwebp libwebpdemux libwebpmux)
+ include_directories(${WEBP_INCLUDE_DIR})
+ else()
+ # 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(WEBP_LIBRARIES)
+ set(WEBP_FOUND ON)
+ else()
+ set(WEBP_FOUND OFF)
+ endif()
else()
- set(WEBP_FOUND OFF)
+ set(WEBP_FOUND ON)
+ set(WEBP_LIBRARIES webp webpdemux libwebpmux)
+ set(WEBP_INCLUDE_DIR ${LIBWEBP_DIR}/src)
endif()
- else()
- set(WEBP_FOUND ON)
- set(WEBP_LIBRARIES webp webpdemux libwebpmux)
- set(WEBP_INCLUDE_DIR ${LIBWEBP_DIR}/src)
endif()
endif()
message(STATUS "aseprite libwebp: ${WEBP_LIBRARIES}")
--- 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.48.1
@@ -1,52 +0,0 @@
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
@@ -1,56 +0,0 @@
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
@@ -1,81 +0,0 @@
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
@@ -1,108 +0,0 @@
From 147777df737d3f26a05d48eff262c8cd15d7fb37 Mon Sep 17 00:00:00 2001
From: David Capello <david@igara.com>
Date: Wed, 6 Mar 2024 09:59:20 -0300
Subject: [PATCH] Don't try to clone strings repo if Git isn't available (fix
#4357)
This can happen when the source code is downloaded as a .zip and the
Git command is not available to clone the strings repo.
Don't clone strings repository by default (fix #4489)
New ENABLE_I18N_STRINGS option (off by default) to avoid compilation
errors cloning the strings repo (no connection, no git, etc.).
Fix typo using ENABLE_I18N_STRINGS var
(cherry picked from commit 50d4f9d8028dc56686b7f0720ef4775db7b2f782)
(cherry picked from commit 064ddef1901b69c45a40a396b7444769e7fbb4c4)
(cherry picked from commit 8817724e448a297507b9ef4e41c54c75fd99b543)
---
CMakeLists.txt | 1 +
src/CMakeLists.txt | 52 +++++++++++++++++++++++++++-------------------
2 files changed, 32 insertions(+), 21 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4945a70dd..64234b9ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,6 +60,7 @@ option(ENABLE_DRM "Compile the DRM-enabled version (e.g. for automatic
option(ENABLE_STEAM "Compile with Steam library" off)
option(ENABLE_DEVMODE "Compile vesion for developers" off)
option(ENABLE_UI "Compile UI (turn off to compile CLI-only version)" on)
+option(ENABLE_I18N_STRINGS "Clone i18n strings repo (https://github.com/aseprite/strings) to bin/data/strings.git" off)
option(FULLSCREEN_PLATFORM "Enable fullscreen by default" off)
option(ENABLE_CLANG_TIDY "Enable static analysis" off)
option(ENABLE_CCACHE "Use CCache to improve recompilation speed (optional)" on)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 708dc7c6d..28adf6ae4 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -155,19 +155,27 @@ set(DATA_OUTPUT_DIR ${CMAKE_BINARY_DIR}/bin/data)
######################################################################
# Clone "strings" repo with translations into bin/data/strings.git
-include(FetchContent)
-
-FetchContent_Declare(
- clone_strings
- GIT_REPOSITORY https://github.com/aseprite/strings.git
- GIT_TAG origin/main
- SOURCE_DIR ${DATA_OUTPUT_DIR}/strings.git
- CONFIGURE_COMMAND ""
- BUILD_COMMAND ""
- INSTALL_COMMAND ""
- TEST_COMMAND "")
-FetchContent_MakeAvailable(clone_strings)
-add_custom_target(clone_strings DEPENDS clone_strings)
+if(ENABLE_I18N_STRINGS)
+ include(FetchContent)
+ find_package(Git)
+ if(GIT_FOUND)
+ FetchContent_Declare(
+ clone_strings
+ GIT_REPOSITORY https://github.com/aseprite/strings.git
+ GIT_TAG origin/main
+ SOURCE_DIR ${DATA_OUTPUT_DIR}/strings.git
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ""
+ INSTALL_COMMAND ""
+ TEST_COMMAND "")
+ FetchContent_MakeAvailable(clone_strings)
+ add_custom_target(clone_strings DEPENDS clone_strings)
+ else()
+ add_custom_target(clone_strings)
+ endif()
+else()
+ add_custom_target(clone_strings)
+endif()
######################################################################
# Copy data/ directory target into bin/data/
@@ -182,14 +190,16 @@ foreach(fn ${src_data_files})
list(APPEND out_data_files ${DATA_OUTPUT_DIR}/${fn})
endforeach()
-# Copy original en.ini to strings.git/en.ini to keep it updated. We
-# have to manually sync the "en.ini" file in the "strings" repo from
-# the "aseprite" repo.
-add_custom_command(
- OUTPUT ${DATA_OUTPUT_DIR}/strings.git/en.ini
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SOURCE_DATA_DIR}/strings/en.ini ${DATA_OUTPUT_DIR}/strings.git/en.ini
- MAIN_DEPENDENCY ${SOURCE_DATA_DIR}/strings/en.ini)
-list(APPEND out_data_files ${DATA_OUTPUT_DIR}/strings.git/en.ini)
+if(ENABLE_I18N_STRINGS AND GIT_FOUND)
+ # Copy original en.ini to strings.git/en.ini to keep it updated. We
+ # have to manually sync the "en.ini" file in the "strings" repo from
+ # the "aseprite" repo.
+ add_custom_command(
+ OUTPUT ${DATA_OUTPUT_DIR}/strings.git/en.ini
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${SOURCE_DATA_DIR}/strings/en.ini ${DATA_OUTPUT_DIR}/strings.git/en.ini
+ MAIN_DEPENDENCY ${SOURCE_DATA_DIR}/strings/en.ini)
+ list(APPEND out_data_files ${DATA_OUTPUT_DIR}/strings.git/en.ini)
+endif()
add_custom_command(
OUTPUT ${DATA_OUTPUT_DIR}/README.md
--
2.47.1
@@ -1,43 +0,0 @@
From 647b80ee1b3f78c269584e2d0890f4eb9d69959b 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 4/5] Use shared fmt library
Added option -DUSE_SHARED_FMT
--- 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)
@@ -203,6 +204,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)
--- a/third_party/CMakeLists.txt
+++ b/third_party/CMakeLists.txt
@@ -103,7 +103,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.44.2
@@ -1,45 +0,0 @@
From d3e5aac7c61d76bfb4c80facdbd1c89d0ab6a394 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/5] Use shared json11 library
Added option -DUSE_SHARED_JSON11
--- 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)
@@ -305,6 +306,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)
--- a/third_party/CMakeLists.txt
+++ b/third_party/CMakeLists.txt
@@ -113,7 +113,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.44.2
@@ -1,15 +0,0 @@
--- 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") {
}
-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
-}