summarylogtreecommitdiffstats
path: root/shared-libarchive.patch
diff options
context:
space:
mode:
authorEldred Habert2022-01-06 00:52:22 +0100
committerImperatorStorm2022-01-05 15:55:41 -0800
commit4bf904749f9c121eabc9e32d6be61290699ab138 (patch)
tree58963b842a8c5bdb710d257c55b0d7ec54fe3095 /shared-libarchive.patch
parente576abc19c528662b9361f4a969c35705b3a51a0 (diff)
downloadaur-4bf904749f9c121eabc9e32d6be61290699ab138.tar.gz
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>
Diffstat (limited to 'shared-libarchive.patch')
-rw-r--r--shared-libarchive.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/shared-libarchive.patch b/shared-libarchive.patch
new file mode 100644
index 000000000000..481ff374175a
--- /dev/null
+++ b/shared-libarchive.patch
@@ -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)