generated from archlinux/template
Use brand new PKGBUILD for Aseprite Package (#1)
* Use brand new PKGBUILD instead Attempting to fix the old one's jank * Install third-party licenses as well * Install .desktop file as well * Add missing build-time dependencies * Install icons in the icon theme directories instead Also remove redundant `$srcdir`s in `package()` * Put font license in the central directory as well * Bump pkgrel It was bumped during my work * Ignore files in subdirectories * Add missing resource files * Use underscores for local variable names https://wiki.archlinux.org/title/Arch_package_guidelines#Package_etiquette https://github.com/ImperatorStorm/PKGBUILDs/pull/1#discussion_r777122781 * Use HTTPS for upstream URL * Add myself as co-maintainer Thanks! * Remove ICU dependency We are using a statically-linked version instead, apparently * Avoid interactive prompts when patching fails * Clean up $srcdir Extract Aseprite's sources into a separate directory Configure Aseprite out-of-tree Configure Skia in a fresh directory (apparently `gn` does not support out-of-tree) * Disable Skottie in Skia This functionality doesn't appear to be used by Aseprite, and excluding it should reduce build time * Only pull Skia dependencies that we need This significantly reduces initial build time (from syncing large repos) and storage use. The only remaining dependency that has a chance to be axed is `dng_sdk`, for which more investigation is needed. * Avoid printing redundant flags in `gn` args Brainfart. "static" flags like `is_debug` were re-printed for each "non-static" (e.g. `skia_use_*`) variant. Doing it this way also allows getting rid of weird quote shenanigans. * Simplify `gn` configure line `is_official_build=true` sets Skia up to use system libs by default, so only specify those that we *don't* want * Pull `gn` version ourselves That way, we can additionally check its integrity via the SHA256 * Add forgotten `libgl` dependency What's weird is that the lib seems not to be linked to dynamically, but I can't see it not being required at run time. Right? * Maybe use system libwebp? Based on https://patch-diff.githubusercontent.com/raw/aseprite/aseprite/pull/2535.patch * Fix system `libwebp`, add `pixman` as makedep * possibly fix shared-libwebp.patch? * Disable updater https://github.com/ImperatorStorm/PKGBUILDs/pull/1#issuecomment-1003838784 * Avoid creating symlinks to Skia deps in their dirs Would occur if they were already symlinked * Use system HarfBuzz and FreeType I remember getting build errors, but cannot reproduce them anymore. So use the system libs more where possible! * Find all WebP libs * Mark libwebp as runtime dep * Remove CMake variables used by libwebp build They do nothing now that we are using shared libwebp * Remove build-time dep on Pixman It doesn't wind up being used at all in the end * Trim off a bunch of dependencies from Skia Only libpng is required to render some of the images, it seems, so this reduces build time and the amount of sources, which is good! Co-authored-by: ImperatorStorm <30777770+ImperatorStorm@users.noreply.github.com>
This commit is contained in:
parent
e576abc19c
commit
4bf904749f
138
.SRCINFO
138
.SRCINFO
@ -1,129 +1,55 @@
|
|||||||
pkgbase = aseprite
|
pkgbase = aseprite
|
||||||
pkgdesc = Create animated sprites and pixel art
|
pkgdesc = Create animated sprites and pixel art
|
||||||
pkgver = 1.2.30
|
pkgver = 1.2.30
|
||||||
pkgrel = 3
|
pkgrel = 4
|
||||||
url = http://www.aseprite.org/
|
url = https://www.aseprite.org/
|
||||||
arch = x86_64
|
arch = x86_64
|
||||||
license = custom
|
license = custom
|
||||||
makedepends = cmake
|
makedepends = cmake
|
||||||
makedepends = ninja
|
makedepends = ninja
|
||||||
makedepends = git
|
makedepends = git
|
||||||
makedepends = python2
|
|
||||||
makedepends = python
|
makedepends = python
|
||||||
makedepends = freeglut
|
|
||||||
makedepends = xorgproto
|
|
||||||
makedepends = libxi
|
makedepends = libxi
|
||||||
|
makedepends = pixman
|
||||||
makedepends = harfbuzz-icu
|
makedepends = harfbuzz-icu
|
||||||
makedepends = nettle
|
|
||||||
depends = cmark
|
depends = cmark
|
||||||
depends = curl
|
depends = libcurl.so
|
||||||
depends = giflib
|
depends = libgif.so
|
||||||
|
depends = libjpeg.so
|
||||||
depends = zlib
|
depends = zlib
|
||||||
depends = libpng
|
depends = libpng
|
||||||
depends = tinyxml
|
depends = tinyxml
|
||||||
depends = freetype2
|
depends = libfreetype.so
|
||||||
depends = fontconfig
|
depends = libarchive.so
|
||||||
depends = libxcursor
|
depends = libwebp.so
|
||||||
|
depends = libwebpmux.so
|
||||||
|
depends = libwebpdemux.so
|
||||||
depends = hicolor-icon-theme
|
depends = hicolor-icon-theme
|
||||||
conflicts = aseprite-git
|
depends = libexpat.so=1-64
|
||||||
conflicts = aseprite-gpl
|
depends = libharfbuzz.so=0-64
|
||||||
conflicts = skia-git
|
depends = libgl
|
||||||
noextract = aseprite-1.2.30-buildtools.tar.gz
|
depends = libfontconfig.so
|
||||||
noextract = aseprite-1.2.30-common.tar.gz
|
depends = libxcursor
|
||||||
noextract = aseprite-1.2.30-angle2.tar.gz
|
noextract = Aseprite-v1.2.30-Source.zip
|
||||||
noextract = aseprite-1.2.30-dawn.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-dng_sdk.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-egl-registry.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-expat.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-freetype.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-harfbuzz.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-icu.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-imgui.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-libgifcodec.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-libjpeg-turbo.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-libpng.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-libwebp.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-lua.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-microhttpd.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-opencl-lib.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-opencl-registry.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-opengl-registry.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-piex.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-sdl.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-sfntly.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-spirv-cross.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-spirv-headers.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-spirv-tools.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-swiftshader.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-wuffs.tar.gz
|
|
||||||
noextract = aseprite-1.2.30-zlib.tar.gz
|
|
||||||
source = https://github.com/aseprite/aseprite/releases/download/v1.2.30/Aseprite-v1.2.30-Source.zip
|
source = https://github.com/aseprite/aseprite/releases/download/v1.2.30/Aseprite-v1.2.30-Source.zip
|
||||||
source = aseprite.desktop
|
|
||||||
source = git+https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
|
||||||
source = git+https://github.com/aseprite/skia.git#branch=aseprite-m81
|
source = git+https://github.com/aseprite/skia.git#branch=aseprite-m81
|
||||||
source = aseprite-1.2.30-buildtools.tar.gz::https://chromium.googlesource.com/chromium/buildtools.git/+archive/505de88083136eefd056e5ee4ca0f01fe9b33de8.tar.gz
|
|
||||||
source = aseprite-1.2.30-common.tar.gz::https://skia.googlesource.com/common.git/+archive/9737551d7a52c3db3262db5856e6bcd62c462b92.tar.gz
|
|
||||||
source = aseprite-1.2.30-angle2.tar.gz::https://chromium.googlesource.com/angle/angle.git/+archive/ee07cb317579dfda40dabb5d6d9c209e0e9e0643.tar.gz
|
|
||||||
source = aseprite-1.2.30-dawn.tar.gz::https://dawn.googlesource.com/dawn.git/+archive/604072bc2ed01018eb03bcbbf9d94042f679af63.tar.gz
|
|
||||||
source = aseprite-1.2.30-dng_sdk.tar.gz::https://android.googlesource.com/platform/external/dng_sdk.git/+archive/c8d0c9b1d16bfda56f15165d39e0ffa360a11123.tar.gz
|
|
||||||
source = aseprite-1.2.30-egl-registry.tar.gz::https://skia.googlesource.com/external/github.com/KhronosGroup/EGL-Registry/+archive/a0bca08de07c7d7651047bedc0b653cfaaa4f2ae.tar.gz
|
|
||||||
source = aseprite-1.2.30-expat.tar.gz::https://android.googlesource.com/platform/external/expat.git/+archive/e5aa0a2cb0a5f759ef31c0819dc67d9b14246a4a.tar.gz
|
|
||||||
source = aseprite-1.2.30-freetype.tar.gz::https://skia.googlesource.com/third_party/freetype2.git/+archive/0a3d2bb99b45b72e1d45185ab054efa993d97210.tar.gz
|
|
||||||
source = aseprite-1.2.30-harfbuzz.tar.gz::https://chromium.googlesource.com/external/github.com/harfbuzz/harfbuzz.git/+archive/3a74ee528255cc027d84b204a87b5c25e47bff79.tar.gz
|
|
||||||
source = aseprite-1.2.30-icu.tar.gz::https://chromium.googlesource.com/chromium/deps/icu.git/+archive/dbd3825b31041d782c5b504c59dcfb5ac7dda08c.tar.gz
|
|
||||||
source = aseprite-1.2.30-imgui.tar.gz::https://skia.googlesource.com/external/github.com/ocornut/imgui.git/+archive/d38d7c6628bebd02692cfdd6fa76b4d992a35b75.tar.gz
|
|
||||||
source = aseprite-1.2.30-libgifcodec.tar.gz::https://skia.googlesource.com/libgifcodec/+archive/38d9c73f49b861bb4a9829371ac311544b120023.tar.gz
|
|
||||||
source = aseprite-1.2.30-libjpeg-turbo.tar.gz::https://skia.googlesource.com/external/github.com/libjpeg-turbo/libjpeg-turbo.git/+archive/574f3a772c96dc9db2c98ef24706feb3f6dbda9a.tar.gz
|
|
||||||
source = aseprite-1.2.30-libpng.tar.gz::https://skia.googlesource.com/third_party/libpng.git/+archive/386707c6d19b974ca2e3db7f5c61873813c6fe44.tar.gz
|
|
||||||
source = aseprite-1.2.30-libwebp.tar.gz::https://chromium.googlesource.com/webm/libwebp.git/+archive/0fe1a89dbf1930fc2554dbe76adad5d962054ead.tar.gz
|
|
||||||
source = aseprite-1.2.30-lua.tar.gz::https://skia.googlesource.com/external/github.com/lua/lua.git/+archive/e354c6355e7f48e087678ec49e340ca0696725b1.tar.gz
|
|
||||||
source = aseprite-1.2.30-microhttpd.tar.gz::https://android.googlesource.com/platform/external/libmicrohttpd/+archive/748945ec6f1c67b7efc934ab0808e1d32f2fb98d.tar.gz
|
|
||||||
source = aseprite-1.2.30-opencl-lib.tar.gz::https://skia.googlesource.com/external/github.com/GPUOpen-Tools/common-lib-amd-APPSDK-3.0/+archive/4e6d30e406d2e5a65e1d65e404fe6df5f772a32b.tar.gz
|
|
||||||
source = aseprite-1.2.30-opencl-registry.tar.gz::https://skia.googlesource.com/external/github.com/KhronosGroup/OpenCL-Registry/+archive/932ed55c85f887041291cef8019e54280c033c35.tar.gz
|
|
||||||
source = aseprite-1.2.30-opengl-registry.tar.gz::https://skia.googlesource.com/external/github.com/KhronosGroup/OpenGL-Registry/+archive/14b80ebeab022b2c78f84a573f01028c96075553.tar.gz
|
|
||||||
source = aseprite-1.2.30-piex.tar.gz::https://android.googlesource.com/platform/external/piex.git/+archive/bb217acdca1cc0c16b704669dd6f91a1b509c406.tar.gz
|
|
||||||
source = aseprite-1.2.30-sdl.tar.gz::https://skia.googlesource.com/third_party/sdl/+archive/5d7cfcca344034aff9327f77fc181ae3754e7a90.tar.gz
|
|
||||||
source = aseprite-1.2.30-sfntly.tar.gz::https://chromium.googlesource.com/external/github.com/googlei18n/sfntly.git/+archive/b55ff303ea2f9e26702b514cf6a3196a2e3e2974.tar.gz
|
|
||||||
source = aseprite-1.2.30-spirv-cross.tar.gz::https://chromium.googlesource.com/external/github.com/KhronosGroup/SPIRV-Cross/+archive/53ab2144b90abede33be5161aec5dfc94ddc3caf.tar.gz
|
|
||||||
source = aseprite-1.2.30-spirv-headers.tar.gz::https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers.git/+archive/29c11140baaf9f7fdaa39a583672c556bf1795a1.tar.gz
|
|
||||||
source = aseprite-1.2.30-spirv-tools.tar.gz::https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Tools.git/+archive/0c4feb643b89d1792b02f7cbef315e9d95633bd7.tar.gz
|
|
||||||
source = aseprite-1.2.30-swiftshader.tar.gz::https://swiftshader.googlesource.com/SwiftShader/+archive/430def835f9f85d52f4a96db9b715cd9a7403c9c.tar.gz
|
|
||||||
source = aseprite-1.2.30-wuffs.tar.gz::https://skia.googlesource.com/external/github.com/google/wuffs.git/+archive/4080840928c0b05a80cda0d14ac2e2615f679f1a.tar.gz
|
|
||||||
source = aseprite-1.2.30-zlib.tar.gz::https://chromium.googlesource.com/chromium/src/third_party/zlib/+archive/ea3ba903faac98b64b2bf8de5e98cd97b335a474.tar.gz
|
|
||||||
source = gn::https://chromium-gn.storage-download.googleapis.com/3523d50538357829725d4ed74b777a572ce0ac74
|
source = gn::https://chromium-gn.storage-download.googleapis.com/3523d50538357829725d4ed74b777a572ce0ac74
|
||||||
|
source = git+https://chromium.googlesource.com/chromium/buildtools.git#commit=505de88083136eefd056e5ee4ca0f01fe9b33de8
|
||||||
|
source = git+https://skia.googlesource.com/common.git#commit=9737551d7a52c3db3262db5856e6bcd62c462b92
|
||||||
|
source = aseprite.desktop
|
||||||
|
source = is_clang.py
|
||||||
|
source = shared-libarchive.patch
|
||||||
|
source = shared-libwebp.patch
|
||||||
|
source = optional-pixman.patch
|
||||||
sha256sums = 9f4b098fe2327f2e9d73eb9f2aeebecad63e87ff2cf6fb6eeeee3c0778bb8874
|
sha256sums = 9f4b098fe2327f2e9d73eb9f2aeebecad63e87ff2cf6fb6eeeee3c0778bb8874
|
||||||
|
sha256sums = SKIP
|
||||||
|
sha256sums = c8c2d617f1a33d6eb27f25ebcc30bd8ba1e6a0aa980cada21dda2ad1401fa4a2
|
||||||
|
sha256sums = SKIP
|
||||||
|
sha256sums = SKIP
|
||||||
sha256sums = deaf646a615c79a4672b087562a09c44beef37e7acfc6f5f66a437d4f3b97a25
|
sha256sums = deaf646a615c79a4672b087562a09c44beef37e7acfc6f5f66a437d4f3b97a25
|
||||||
sha256sums = SKIP
|
sha256sums = cb901aaf479bcf1a2406ce21eb31e43d3581712a9ea245672ffd8fbcd9190441
|
||||||
sha256sums = SKIP
|
sha256sums = e42675504bfbc17655aef1dca957041095026cd3dd4e6981fb6df0a363948aa7
|
||||||
sha256sums = SKIP
|
sha256sums = 9a85e9b1b52c1d33d128cb87c12395d9a245049cfc10e148659ae2acd4cab3e6
|
||||||
sha256sums = SKIP
|
sha256sums = c2d14f9738a96a9db3695c00ac3d14b1312b6a595b151bd56e19422c86517654
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
sha256sums = SKIP
|
|
||||||
|
|
||||||
pkgname = aseprite
|
pkgname = aseprite
|
||||||
|
12
.gitignore
vendored
12
.gitignore
vendored
@ -1,5 +1,9 @@
|
|||||||
*
|
*
|
||||||
!.gitignore
|
!/.gitignore
|
||||||
!.SRCINFO
|
!/.SRCINFO
|
||||||
!aseprite.desktop
|
!/aseprite.desktop
|
||||||
!PKGBUILD
|
!/PKGBUILD
|
||||||
|
!/is_clang.py
|
||||||
|
!/shared-libarchive.patch
|
||||||
|
!/shared-libwebp.patch
|
||||||
|
!/optional-pixman.patch
|
||||||
|
296
PKGBUILD
296
PKGBUILD
@ -1,4 +1,5 @@
|
|||||||
# Maintainer: Imperator Storm <30777770+ImperatorStorm@users.noreply.github.com>
|
# Maintainer: Imperator Storm <30777770+ImperatorStorm@users.noreply.github.com>
|
||||||
|
# Co-Maintainer: Eldred Habert <me@eldred.fr>
|
||||||
# Contributor: Fredrick Brennan <copypaste@kittens.ph>
|
# Contributor: Fredrick Brennan <copypaste@kittens.ph>
|
||||||
# Contributor: Andrew Bueide <abueide@protonmail.com>
|
# Contributor: Andrew Bueide <abueide@protonmail.com>
|
||||||
# Contributor: rouhannb <rouhannb@protonmail.com>
|
# Contributor: rouhannb <rouhannb@protonmail.com>
|
||||||
@ -9,213 +10,132 @@
|
|||||||
|
|
||||||
pkgname=aseprite
|
pkgname=aseprite
|
||||||
pkgver=1.2.30
|
pkgver=1.2.30
|
||||||
pkgrel=3
|
pkgrel=4
|
||||||
pkgdesc='Create animated sprites and pixel art'
|
pkgdesc='Create animated sprites and pixel art'
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
url="http://www.aseprite.org/"
|
url="https://www.aseprite.org/"
|
||||||
license=('custom')
|
license=('custom')
|
||||||
depends=('cmark' 'curl' 'giflib' 'zlib' 'libpng' 'tinyxml' 'freetype2' 'fontconfig' 'libxcursor'
|
depends=(# ~ Aseprite's direct dependencies ~
|
||||||
'hicolor-icon-theme')
|
# pixman is not linked to because we use Skia instead
|
||||||
makedepends=('cmake' 'ninja' 'git' 'python2' 'python' 'freeglut' 'xorgproto' 'libxi' 'harfbuzz-icu'
|
# harfbuzz is linked statically because Aseprite expects an older version
|
||||||
'nettle')
|
cmark libcurl.so libgif.so libjpeg.so zlib libpng tinyxml libfreetype.so libarchive.so
|
||||||
conflicts=("aseprite-git" "aseprite-gpl" "skia-git")
|
libwebp.so libwebpmux.so libwebpdemux.so
|
||||||
source=("https://github.com/${pkgname}/${pkgname}/releases/download/v${pkgver}/${pkgname^}-\
|
hicolor-icon-theme # For installing Aseprite's icons
|
||||||
v${pkgver}-Source.zip"
|
# ~ Skia deps ~
|
||||||
"${pkgname}.desktop"
|
# (Skia links dynamically to HarfBuzz, only Aseprite itself doesn't. >_<)
|
||||||
"git+https://chromium.googlesource.com/chromium/tools/depot_tools.git"
|
libexpat.so=1-64 libharfbuzz.so=0-64 libgl
|
||||||
"git+https://github.com/${pkgname}/skia.git#branch=${pkgname}-m81"
|
# Already required by Aseprite: libjpeg-turbo libpng zlib freetype2
|
||||||
"${pkgname}-${pkgver}-buildtools.tar.gz::https://chromium.googlesource.com/chromium/buildtools.git/+archive/\
|
# These two are only reported by Namcap, but don't seem to be direct dependencies?
|
||||||
505de88083136eefd056e5ee4ca0f01fe9b33de8.tar.gz"
|
libfontconfig.so libxcursor)
|
||||||
"${pkgname}-${pkgver}-common.tar.gz::https://skia.googlesource.com/common.git/+archive/\
|
makedepends=(# "Meta" dependencies
|
||||||
9737551d7a52c3db3262db5856e6bcd62c462b92.tar.gz"
|
cmake ninja git python
|
||||||
"${pkgname}-${pkgver}-angle2.tar.gz::https://chromium.googlesource.com/angle/angle.git/+archive/\
|
# Aseprite (including e.g. LAF)
|
||||||
ee07cb317579dfda40dabb5d6d9c209e0e9e0643.tar.gz"
|
libxi pixman
|
||||||
"${pkgname}-${pkgver}-dawn.tar.gz::https://dawn.googlesource.com/dawn.git/+archive/\
|
# Skia
|
||||||
604072bc2ed01018eb03bcbbf9d94042f679af63.tar.gz"
|
harfbuzz-icu)
|
||||||
"${pkgname}-${pkgver}-dng_sdk.tar.gz::https://android.googlesource.com/platform/external/dng_sdk.git/\
|
source=("https://github.com/aseprite/aseprite/releases/download/v$pkgver/Aseprite-v$pkgver-Source.zip"
|
||||||
+archive/c8d0c9b1d16bfda56f15165d39e0ffa360a11123.tar.gz"
|
# Which branch a given build of Aseprite requires is noted in its `INSTALL.md`
|
||||||
"${pkgname}-${pkgver}-egl-registry.tar.gz::https://skia.googlesource.com/external/github.com/KhronosGroup\
|
"git+https://github.com/aseprite/skia.git#branch=aseprite-m81"
|
||||||
/EGL-Registry/+archive/a0bca08de07c7d7651047bedc0b653cfaaa4f2ae.tar.gz"
|
# `gn` executable required to configure Skia, pulled from `skia/bin/fetch-gn`
|
||||||
"${pkgname}-${pkgver}-expat.tar.gz::https://android.googlesource.com/platform/external/expat.git/+archive/\
|
# Normally we'd use the Arch-provided one, but it has API incompatibilities
|
||||||
e5aa0a2cb0a5f759ef31c0819dc67d9b14246a4a.tar.gz"
|
"gn::https://chromium-gn.storage-download.googleapis.com/3523d50538357829725d4ed74b777a572ce0ac74"
|
||||||
"${pkgname}-${pkgver}-freetype.tar.gz::https://skia.googlesource.com/third_party/freetype2.git/+archive/\
|
# Skia dependencies, determined from `skia/DEPS`
|
||||||
0a3d2bb99b45b72e1d45185ab054efa993d97210.tar.gz"
|
# Only pulling what we need, though
|
||||||
"${pkgname}-${pkgver}-harfbuzz.tar.gz::https://chromium.googlesource.com/external/github.com/harfbuzz/\
|
"git+https://chromium.googlesource.com/chromium/buildtools.git#commit=505de88083136eefd056e5ee4ca0f01fe9b33de8"
|
||||||
harfbuzz.git/+archive/3a74ee528255cc027d84b204a87b5c25e47bff79.tar.gz"
|
"git+https://skia.googlesource.com/common.git#commit=9737551d7a52c3db3262db5856e6bcd62c462b92"
|
||||||
"${pkgname}-${pkgver}-icu.tar.gz::https://chromium.googlesource.com/chromium/deps/icu.git/+archive/\
|
"$pkgname.desktop"
|
||||||
dbd3825b31041d782c5b504c59dcfb5ac7dda08c.tar.gz"
|
# Python 3-compliant version of the script
|
||||||
"${pkgname}-${pkgver}-imgui.tar.gz::https://skia.googlesource.com/external/github.com/ocornut/imgui.git\
|
is_clang.py
|
||||||
/+archive/d38d7c6628bebd02692cfdd6fa76b4d992a35b75.tar.gz"
|
# Based on https://patch-diff.githubusercontent.com/raw/aseprite/aseprite/pull/2535.patch
|
||||||
"${pkgname}-${pkgver}-libgifcodec.tar.gz::https://skia.googlesource.com/libgifcodec/+archive/\
|
shared-libarchive.patch
|
||||||
38d9c73f49b861bb4a9829371ac311544b120023.tar.gz"
|
# Based on https://patch-diff.githubusercontent.com/raw/aseprite/aseprite/pull/2523.patch
|
||||||
"${pkgname}-${pkgver}-libjpeg-turbo.tar.gz::https://skia.googlesource.com/external/github.com/libjpeg-turbo\
|
shared-libwebp.patch
|
||||||
/libjpeg-turbo.git/+archive/574f3a772c96dc9db2c98ef24706feb3f6dbda9a.tar.gz"
|
optional-pixman.patch)
|
||||||
"${pkgname}-${pkgver}-libpng.tar.gz::https://skia.googlesource.com/third_party/libpng.git/+archive/\
|
noextract=("${source[0]##*/}") # Don't extract Aseprite sources at the root
|
||||||
386707c6d19b974ca2e3db7f5c61873813c6fe44.tar.gz"
|
|
||||||
"${pkgname}-${pkgver}-libwebp.tar.gz::https://chromium.googlesource.com/webm/libwebp.git/+archive/\
|
|
||||||
0fe1a89dbf1930fc2554dbe76adad5d962054ead.tar.gz"
|
|
||||||
"${pkgname}-${pkgver}-lua.tar.gz::https://skia.googlesource.com/external/github.com/lua/lua.git/+archive/\
|
|
||||||
e354c6355e7f48e087678ec49e340ca0696725b1.tar.gz"
|
|
||||||
"${pkgname}-${pkgver}-microhttpd.tar.gz::https://android.googlesource.com/platform/external/libmicrohttpd\
|
|
||||||
/+archive/748945ec6f1c67b7efc934ab0808e1d32f2fb98d.tar.gz"
|
|
||||||
"${pkgname}-${pkgver}-opencl-lib.tar.gz::https://skia.googlesource.com/external/github.com/GPUOpen-Tools/\
|
|
||||||
common-lib-amd-APPSDK-3.0/+archive/4e6d30e406d2e5a65e1d65e404fe6df5f772a32b.tar.gz"
|
|
||||||
"${pkgname}-${pkgver}-opencl-registry.tar.gz::https://skia.googlesource.com/external/github.com/\
|
|
||||||
KhronosGroup/OpenCL-Registry/+archive/932ed55c85f887041291cef8019e54280c033c35.tar.gz"
|
|
||||||
"${pkgname}-${pkgver}-opengl-registry.tar.gz::https://skia.googlesource.com/external/github.com/\
|
|
||||||
KhronosGroup/OpenGL-Registry/+archive/14b80ebeab022b2c78f84a573f01028c96075553.tar.gz"
|
|
||||||
"${pkgname}-${pkgver}-piex.tar.gz::https://android.googlesource.com/platform/external/piex.git/+archive/\
|
|
||||||
bb217acdca1cc0c16b704669dd6f91a1b509c406.tar.gz"
|
|
||||||
"${pkgname}-${pkgver}-sdl.tar.gz::https://skia.googlesource.com/third_party/sdl/+archive/\
|
|
||||||
5d7cfcca344034aff9327f77fc181ae3754e7a90.tar.gz"
|
|
||||||
"${pkgname}-${pkgver}-sfntly.tar.gz::https://chromium.googlesource.com/external/github.com/googlei18n/\
|
|
||||||
sfntly.git/+archive/b55ff303ea2f9e26702b514cf6a3196a2e3e2974.tar.gz"
|
|
||||||
"${pkgname}-${pkgver}-spirv-cross.tar.gz::https://chromium.googlesource.com/external/github.com/\
|
|
||||||
KhronosGroup/SPIRV-Cross/+archive/53ab2144b90abede33be5161aec5dfc94ddc3caf.tar.gz"
|
|
||||||
"${pkgname}-${pkgver}-spirv-headers.tar.gz::https://skia.googlesource.com/external/github.com/KhronosGroup/\
|
|
||||||
SPIRV-Headers.git/+archive/29c11140baaf9f7fdaa39a583672c556bf1795a1.tar.gz"
|
|
||||||
"${pkgname}-${pkgver}-spirv-tools.tar.gz::https://skia.googlesource.com/external/github.com/KhronosGroup\
|
|
||||||
/SPIRV-Tools.git/+archive/0c4feb643b89d1792b02f7cbef315e9d95633bd7.tar.gz"
|
|
||||||
"${pkgname}-${pkgver}-swiftshader.tar.gz::https://swiftshader.googlesource.com/SwiftShader/+archive/\
|
|
||||||
430def835f9f85d52f4a96db9b715cd9a7403c9c.tar.gz"
|
|
||||||
"${pkgname}-${pkgver}-wuffs.tar.gz::https://skia.googlesource.com/external/github.com/google/wuffs.git\
|
|
||||||
/+archive/4080840928c0b05a80cda0d14ac2e2615f679f1a.tar.gz"
|
|
||||||
"${pkgname}-${pkgver}-zlib.tar.gz::https://chromium.googlesource.com/chromium/src/third_party/zlib/+archive/\
|
|
||||||
ea3ba903faac98b64b2bf8de5e98cd97b335a474.tar.gz"
|
|
||||||
"gn::https://chromium-gn.storage-download.googleapis.com/3523d50538357829725d4ed74b777a572ce0ac74"
|
|
||||||
)
|
|
||||||
_gitsrc=("${source[@]:4:29}")
|
|
||||||
noextract=("${_gitsrc[@]%%::*}")
|
|
||||||
sha256sums=('9f4b098fe2327f2e9d73eb9f2aeebecad63e87ff2cf6fb6eeeee3c0778bb8874'
|
sha256sums=('9f4b098fe2327f2e9d73eb9f2aeebecad63e87ff2cf6fb6eeeee3c0778bb8874'
|
||||||
|
'SKIP'
|
||||||
|
'c8c2d617f1a33d6eb27f25ebcc30bd8ba1e6a0aa980cada21dda2ad1401fa4a2'
|
||||||
|
'SKIP'
|
||||||
|
'SKIP'
|
||||||
'deaf646a615c79a4672b087562a09c44beef37e7acfc6f5f66a437d4f3b97a25'
|
'deaf646a615c79a4672b087562a09c44beef37e7acfc6f5f66a437d4f3b97a25'
|
||||||
'SKIP'
|
'cb901aaf479bcf1a2406ce21eb31e43d3581712a9ea245672ffd8fbcd9190441'
|
||||||
'SKIP'
|
'e42675504bfbc17655aef1dca957041095026cd3dd4e6981fb6df0a363948aa7'
|
||||||
'SKIP'
|
'9a85e9b1b52c1d33d128cb87c12395d9a245049cfc10e148659ae2acd4cab3e6'
|
||||||
'SKIP'
|
'c2d14f9738a96a9db3695c00ac3d14b1312b6a595b151bd56e19422c86517654')
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP'
|
|
||||||
'SKIP')
|
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd "${srcdir}"
|
# Extract Aseprite's sources
|
||||||
|
mkdir -p aseprite
|
||||||
|
bsdtar -xf "${noextract[0]}" -C aseprite
|
||||||
|
|
||||||
# Install skia deps (essentially runs git-sync-deps with the files already downloaded)
|
# Symlink Skia's build dependencies
|
||||||
mkdir --parents --verbose skia/third_party/externals
|
# Sort of emulating `skia/tools/git-sync-deps`, but only grabbing what we need
|
||||||
|
mkdir -p skia/third_party/externals
|
||||||
for _dep in buildtools common
|
# Key = repo name (from above), value = path under `src/skia/`
|
||||||
do
|
local -A _skiadeps=([buildtools]=buildtools
|
||||||
mkdir --parents --verbose "skia/${_dep}"
|
[common]=common) _dep
|
||||||
tar --verbose --extract --file "${pkgname}-${pkgver}-${_dep}.tar.gz" --directory "skia/${_dep}"
|
for _dep in "${!_skiadeps[@]}"; do
|
||||||
|
ln -svfT "$(realpath $_dep)" "skia/${_skiadeps[$_dep]}"
|
||||||
done
|
done
|
||||||
|
chmod 755 gn
|
||||||
|
|
||||||
for _dep in angle2 dawn dng_sdk egl-registry expat freetype harfbuzz icu imgui opencl-registry \
|
# Replace `is_clang.py` with Python 3-compliant version
|
||||||
libjpeg-turbo libpng libwebp lua microhttpd opencl-lib opengl-registry piex \
|
cp -v is_clang.py skia/gn
|
||||||
sdl sfntly spirv-cross spirv-headers spirv-tools swiftshader zlib wuffs
|
|
||||||
do
|
|
||||||
mkdir --parents --verbose "skia/third_party/externals/${_dep}"
|
|
||||||
tar --verbose --extract --file "${pkgname}-${pkgver}-${_dep}.tar.gz" --directory \
|
|
||||||
"skia/third_party/externals/${_dep}"
|
|
||||||
done
|
|
||||||
|
|
||||||
chmod u=rwx,g=rx,o=rx --verbose gn
|
# Allow using shared libarchive (the bundled version prevents using the `None` build type...)
|
||||||
mv --verbose gn skia/bin/gn
|
env -C aseprite patch -tp1 <shared-libarchive.patch
|
||||||
cp --verbose skia/bin/gn skia/buildtools/linux64/gn
|
# Allow using shared libarchive (breaks builds otherwise...)
|
||||||
|
env -C aseprite patch -tp1 <shared-libwebp.patch
|
||||||
mkdir --parents --verbose binsub
|
# Skip the build-time dependency on Pixman since it doesn't get used in the end
|
||||||
ln --force --symbolic $(which python2) binsub/python
|
env -C aseprite patch -tp1 <optional-pixman.patch
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "${srcdir}"
|
echo Building Skia...
|
||||||
|
local _skiadir="$PWD/skia/obj"
|
||||||
|
# Must use the bundled `gn` executable and HarfBuzz libraries because of incompatibilities
|
||||||
|
# Flags can typically be found in `src/skia/gn/skia.gni`... but you're kind of on your own
|
||||||
|
env -C skia ../gn gen "$_skiadir" --args="`printf '%s ' \
|
||||||
|
is_debug=false is_official_build=true skia_enable_{skottie,pdf}=false \
|
||||||
|
skia_use_{expat,libjpeg_turbo,libwebp,xps,zlib,libgifcodec,sfntly}=false`"
|
||||||
|
ninja -C "$_skiadir" skia modules
|
||||||
|
|
||||||
# Build skia
|
echo Building Aseprite...
|
||||||
_skiapath="${srcdir}/binsub:${srcdir}/depot_tools:${PATH}"
|
# Suppress install messages since we install to a temporary area; `install -v` will do the job
|
||||||
cd skia
|
cmake -S aseprite -B build -G Ninja -Wno-dev -DCMAKE_INSTALL_MESSAGE=NEVER -DCMAKE_BUILD_TYPE=None \
|
||||||
PATH="${_skiapath}" gn gen out/Release-x64 \
|
-DENABLE_UPDATER=NO -DLAF_WITH_EXAMPLES=OFF -DLAF_WITH_TESTS=OFF -DLAF_BACKEND=skia \
|
||||||
--args="is_debug=false is_official_build=true skia_use_system_expat=false \
|
-DSKIA_DIR="$PWD/skia" -DSKIA_LIBRARY_DIR="$_skiadir" -DSKIA_LIBRARY="$_skiadir/libskia.a" \
|
||||||
skia_use_system_icu=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false \
|
-DUSE_SHARED_{CMARK,CURL,GIFLIB,JPEGLIB,ZLIB,LIBPNG,TINYXML,PIXMAN,FREETYPE,HARFBUZZ,LIBARCHIVE,WEBP}=YES
|
||||||
skia_use_system_libwebp=false skia_use_system_zlib=false"
|
ninja -C build
|
||||||
PATH="${_skiapath}" ninja -C out/Release-x64 skia modules
|
}
|
||||||
|
|
||||||
# Build aseprite
|
check() {
|
||||||
cd "${srcdir}"
|
env -C build ctest --output-on-failure
|
||||||
mkdir --parents --verbose build && cd build
|
|
||||||
|
|
||||||
cmake \
|
|
||||||
-DWITH_WEBP_SUPPORT=ON \
|
|
||||||
-DUSE_SHARED_CURL=ON \
|
|
||||||
-DUSE_SHARED_GIFLIB=ON \
|
|
||||||
-DUSE_SHARED_HARFBUZZ=ON \
|
|
||||||
-DUSE_SHARED_ZLIB=ON \
|
|
||||||
-DUSE_SHARED_LIBPNG=ON \
|
|
||||||
-DUSE_SHARED_TINYXML=ON \
|
|
||||||
-DUSE_SHARED_CMARK=ON \
|
|
||||||
-DENABLE_UPDATER=OFF \
|
|
||||||
-DUSE_SHARED_FREETYPE=ON \
|
|
||||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
|
||||||
-DLAF_BACKEND=skia \
|
|
||||||
-DSKIA_DIR="${srcdir}/skia" \
|
|
||||||
-DSKIA_LIBRARY_DIR="${srcdir}/skia/out/Release-x64" \
|
|
||||||
-DSKIA_LIBRARY="${srcdir}/skia/out/Release-x64/libskia.a" \
|
|
||||||
-G Ninja \
|
|
||||||
..
|
|
||||||
|
|
||||||
ninja aseprite
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd "${srcdir}"/build
|
# Now the fun part: components of e.g. `libwebp` get installed as well,
|
||||||
|
# since we've had to compile it. But we don't want them.
|
||||||
|
# So, install normally, and then cherry-pick Aseprite's files out of that.
|
||||||
|
# Use a whitelist to prefer installing not enough (breakage goes noticed),
|
||||||
|
# instead of too much (cruft rarely goes noticed). Also hope that it doesn't break :)
|
||||||
|
cmake --install build --prefix=staging --strip
|
||||||
|
|
||||||
install -D --verbose "bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
|
# Install the binary and its `.desktop` file
|
||||||
|
install -vDm 755 staging/bin/aseprite "$pkgdir/usr/bin/aseprite"
|
||||||
# Aseprite, by default, doesn't install a few files on its own. So, they are installed manually.
|
install -vDm 644 aseprite.desktop "$pkgdir/usr/share/applications/$pkgname.desktop"
|
||||||
|
# Install the icons in the correct directory (which is not the default)
|
||||||
install --directory --verbose "${pkgdir}/usr/share/${pkgname}/data"
|
local _size
|
||||||
cp --recursive --verbose 'bin/data' "${pkgdir}/usr/share/${pkgname}"
|
for _size in 16 32 48 64 128 256; do
|
||||||
|
# The installed icon's name is taken from the `.desktop` file
|
||||||
install --directory --verbose "${pkgdir}/usr/share/doc/${pkgname}"
|
install -vDm 644 staging/share/aseprite/data/icons/ase$_size.png "$pkgdir/usr/share/icons/hicolor/${_size}x$_size/apps/aseprite.png"
|
||||||
cp --recursive --verbose '../docs' "${pkgdir}/usr/share/doc/${pkgname}"
|
|
||||||
install --mode=644 --verbose 'bin/data/EULA.txt' "${pkgdir}/usr/share/doc/${pkgname}"
|
|
||||||
install --mode=644 --verbose '../README.md' "${pkgdir}/usr/share/doc/${pkgname}"
|
|
||||||
|
|
||||||
install -D --mode=644 --verbose "../${pkgname}.desktop" \
|
|
||||||
"${pkgdir}/usr/share/applications/${pkgname}.desktop"
|
|
||||||
|
|
||||||
for _size in 32 48 64
|
|
||||||
do
|
|
||||||
install -D --mode=644 --verbose "../data/icons/ase${_size}.png" \
|
|
||||||
"${pkgdir}/usr/share/icons/hicolor/${_size}x${_size}/apps/${pkgname}.png"
|
|
||||||
done
|
done
|
||||||
|
# Delete the icons to avoid copying them in two places (they aren't used by Aseprite itself)
|
||||||
install -D --mode=644 --verbose --target-directory "${pkgdir}/usr/share/licenses/${pkgname}" \
|
rm -rf staging/share/aseprite/data/icons
|
||||||
'bin/data/EULA.txt'
|
# Install all of the program's data
|
||||||
install --mode=644 --verbose '../docs/LICENSES.md' "${pkgdir}/usr/share/licenses/${pkgname}"
|
cp -vrt "$pkgdir/usr/share" staging/share/aseprite
|
||||||
|
# Also install the licenses
|
||||||
|
install -vDm 644 -t "$pkgdir/usr/share/licenses/$pkgname" aseprite/{EULA.txt,docs/LICENSES.md}
|
||||||
|
# Copy the font's license, but leave it in the font directory as well (probably doesn't hurt)
|
||||||
|
install -vm 644 aseprite/data/fonts/LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/font.txt"
|
||||||
}
|
}
|
||||||
|
|
||||||
# vim:set ts=2 sw=2 et:
|
|
||||||
|
17
is_clang.py
Executable file
17
is_clang.py
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
#
|
||||||
|
# Copyright 2016 Google Inc.
|
||||||
|
#
|
||||||
|
# Use of this source code is governed by a BSD-style license that can be
|
||||||
|
# found in the LICENSE file.
|
||||||
|
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
cc,cxx = sys.argv[1:3]
|
||||||
|
|
||||||
|
if (b'clang' in subprocess.check_output('%s --version' % cc, shell=True) and
|
||||||
|
b'clang' in subprocess.check_output('%s --version' % cxx, shell=True)):
|
||||||
|
print('true')
|
||||||
|
else:
|
||||||
|
print('false')
|
||||||
|
|
23
optional-pixman.patch
Normal file
23
optional-pixman.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index f16f09660d..40065905d3 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -271,16 +271,18 @@
|
||||||
|
include_directories(${TINYXML_INCLUDE_DIR})
|
||||||
|
|
||||||
|
# pixman
|
||||||
|
+if(NOT LAF_BACKEND STREQUAL "skia")
|
||||||
|
if(USE_SHARED_PIXMAN)
|
||||||
|
find_library(PIXMAN_LIBRARY NAMES pixman pixman-1)
|
||||||
|
find_path(PIXMAN_INCLUDE_DIR NAMES pixman.h PATH_SUFFIXES pixman-1)
|
||||||
|
else()
|
||||||
|
set(PIXMAN_LIBRARY pixman)
|
||||||
|
set(PIXMAN_INCLUDE_DIR
|
||||||
|
${PIXMAN_DIR}/pixman
|
||||||
|
${CMAKE_BINARY_DIR}) # For pixman-version.h
|
||||||
|
endif()
|
||||||
|
include_directories(${PIXMAN_INCLUDE_DIR})
|
||||||
|
+endif()
|
||||||
|
|
||||||
|
# freetype
|
||||||
|
if(USE_SHARED_FREETYPE)
|
74
shared-libarchive.patch
Normal file
74
shared-libarchive.patch
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
From cf84155eb143d821963e8fdf18781dfa164eac9b 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 | 22 ++++++++++++----------
|
||||||
|
3 files changed, 24 insertions(+), 11 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 9cb5a2cdfb..9d95936f36 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -60,6 +60,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)
|
||||||
|
@@ -200,6 +201,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 e1e3bc1ae3..4a37838e95 100644
|
||||||
|
--- a/src/app/CMakeLists.txt
|
||||||
|
+++ b/src/app/CMakeLists.txt
|
||||||
|
@@ -651,8 +651,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 ffd1c0cfcd..4839d4097c 100644
|
||||||
|
--- a/third_party/CMakeLists.txt.orig
|
||||||
|
+++ b/third_party/CMakeLists.txt
|
||||||
|
@@ -110,6 +110,7 @@ endif()
|
||||||
|
add_subdirectory(json11)
|
||||||
|
|
||||||
|
# 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)")
|
||||||
|
@@ -123,6 +124,7 @@ set(ENABLE_CPIO OFF CACHE BOOL "Enable cpio building")
|
||||||
|
add_subdirectory(libarchive)
|
||||||
|
target_include_directories(archive_static INTERFACE
|
||||||
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/libarchive/libarchive>)
|
||||||
|
+endif()
|
||||||
|
|
||||||
|
# benchmark
|
||||||
|
if(ENABLE_BENCHMARKS)
|
58
shared-libwebp.patch
Normal file
58
shared-libwebp.patch
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
From ca9e20a87be6dcc8d9b97841535b2320d2eb2f91 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Drauthius <albert@diserholt.com>
|
||||||
|
Date: Sat, 26 Sep 2020 10:40:13 +0200
|
||||||
|
Subject: [PATCH] Shared webp library
|
||||||
|
|
||||||
|
Making optional linking with shared system webp library with
|
||||||
|
-DUSE_SHARED_WEBP option.
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 12 +++++++++---
|
||||||
|
third_party/CMakeLists.txt | 2 +-
|
||||||
|
2 files changed, 10 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index f16f09660d..40065905d3 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -66,6 +66,7 @@ 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_FREETYPE "Use shared FreeType library" off)
|
||||||
|
option(USE_SHARED_HARFBUZZ "Use shared HarfBuzz library" off)
|
||||||
|
+option(USE_SHARED_WEBP "Use your installed copy of webp" off)
|
||||||
|
option(ENABLE_ASEPRITE_EXE "Compile main Aseprite executable" on)
|
||||||
|
option(ENABLE_MEMLEAK "Enable memory-leaks detector (only for developers)" off)
|
||||||
|
option(ENABLE_NEWS "Enable the news in Home tab" on)
|
||||||
|
@@ -229,9 +230,17 @@ add_definitions(-DPNG_NO_MMX_CODE) # Do not use MMX optimizations in PNG code
|
||||||
|
|
||||||
|
# libwebp
|
||||||
|
if(WITH_WEBP_SUPPORT)
|
||||||
|
- set(WEBP_LIBRARIES webp webpdemux libwebpmux)
|
||||||
|
- set(WEBP_INCLUDE_DIR ${LIBWEBP_DIR}/src)
|
||||||
|
- include_directories(${WEBP_INCLUDE_DIR})
|
||||||
|
+ if(USE_SHARED_WEBP)
|
||||||
|
+ find_library(WEBP_LIBRARY NAMES webp)
|
||||||
|
+ find_library(WEBPDEMUX_LIBRARY NAMES webpdemux)
|
||||||
|
+ find_library(WEBPMUX_LIBRARY NAMES webpmux)
|
||||||
|
+ set(WEBP_LIBRARIES ${WEBP_LIBRARY} ${WEBPDEMUX_LIBRARY} ${WEBPMUX_LIBRARY})
|
||||||
|
+ find_path(WEBP_INCLUDE_DIRS NAMES decode.h PATH_SUFFIXES webp)
|
||||||
|
+ 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 4839d4097c..e8c3e83cbc 100644
|
||||||
|
--- a/third_party/CMakeLists.txt
|
||||||
|
+++ b/third_party/CMakeLists.txt
|
||||||
|
@@ -32,7 +32,7 @@ if(NOT USE_SHARED_GIFLIB)
|
||||||
|
add_subdirectory(giflib)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
-if(WITH_WEBP_SUPPORT)
|
||||||
|
+if(WITH_WEBP_SUPPORT AND NOT USE_SHARED_WEBP)
|
||||||
|
set(WEBP_BUILD_EXTRAS OFF CACHE BOOL "Build extras.")
|
||||||
|
add_subdirectory(libwebp)
|
||||||
|
endif()
|
Loading…
x
Reference in New Issue
Block a user