From eebb196cbec08042daaa2c46d1430be53d7ede08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D9=85=D9=87=D8=AF=D9=8A=20=D8=B4=D9=8A=D9=86=D9=88=D9=86?= =?UTF-8?q?=20=28Mehdi=20Chinoune=29?= Date: Sat, 5 Apr 2025 21:21:08 +0100 Subject: [PATCH] skia: Fix build against clang-20 and Fix depends() It has only static libraries, no runtime dependencies needed. --- .../0007-delete-experimental-sktext.patch | 56 +++++++++++++++++++ mingw-w64-skia/PKGBUILD | 35 +++++++----- 2 files changed, 77 insertions(+), 14 deletions(-) create mode 100644 mingw-w64-skia/0007-delete-experimental-sktext.patch diff --git a/mingw-w64-skia/0007-delete-experimental-sktext.patch b/mingw-w64-skia/0007-delete-experimental-sktext.patch new file mode 100644 index 0000000000..a3a20f1a20 --- /dev/null +++ b/mingw-w64-skia/0007-delete-experimental-sktext.patch @@ -0,0 +1,56 @@ +--- a/BUILD.gn ++++ b/BUILD.gn +@@ -1612,10 +1612,6 @@ + } + } + +-group("experimental") { +- deps = [ "experimental/sktext" ] +-} +- + config("our_vulkan_headers") { + include_dirs = [ "include/third_party/vulkan" ] + } +@@ -2162,7 +2158,6 @@ + ":skia", + ":test", + ":tool_utils", +- "experimental/sktext:tests", + "modules/skottie:tests", + "modules/skparagraph:tests", + "modules/sksg:tests", +@@ -2222,7 +2217,6 @@ + ":flags", + ":gpu_tool_utils", + ":xml", +- "experimental/sktext:samples", + "modules/audioplayer", + "modules/skparagraph:samples", + "modules/skshaper", +@@ -2651,7 +2645,6 @@ + deps = [ + ":sk_app", + ":skia", +- "experimental/sktext:sktext", + "modules/skottie:skottie", + ] + } +@@ -2899,7 +2892,6 @@ + ":skia", + ":tool_utils", + ":trace", +- "experimental/sktext", + "modules/audioplayer", + "modules/particles", + "modules/skottie", +@@ -2968,10 +2960,6 @@ + is_shared_library = is_android + deps = [ "modules/skplaintexteditor:editor_app" ] + } +- test_app("text_editor") { +- is_shared_library = is_android +- deps = [ "experimental/sktext:text_editor" ] +- } + } + + skia_executable("image_diff_metric") { diff --git a/mingw-w64-skia/PKGBUILD b/mingw-w64-skia/PKGBUILD index c08df6db94..f2cb45ba60 100644 --- a/mingw-w64-skia/PKGBUILD +++ b/mingw-w64-skia/PKGBUILD @@ -8,11 +8,12 @@ pkgver=108.0.5359.95 # see https://omahaproxy.appspot.com/all.json?os=win&channel=stable # for the commit _commit="7c55be996a81ff9c5c66984c9d4ef85d12a44c8c" -pkgrel=3 +pkgrel=4 pkgdesc="Skia is a complete 2D graphic library for drawing Text, Geometries, and Images. (mingw-w64)" arch=('any') mingw_arch=('mingw64' 'ucrt64' 'clang64') url="https://skia.org" +msys2_repository_url="https://github.com/google/skia" license=("spdx:BSD-3-Clause") makedepends=( "${MINGW_PACKAGE_PREFIX}-cc" @@ -20,16 +21,14 @@ makedepends=( "${MINGW_PACKAGE_PREFIX}-ninja" "${MINGW_PACKAGE_PREFIX}-pkgconf" "${MINGW_PACKAGE_PREFIX}-python" - "git" -) -depends=( "${MINGW_PACKAGE_PREFIX}-expat" - "${MINGW_PACKAGE_PREFIX}-libpng" - "${MINGW_PACKAGE_PREFIX}-zlib" - "${MINGW_PACKAGE_PREFIX}-libwebp" - "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" "${MINGW_PACKAGE_PREFIX}-harfbuzz" "${MINGW_PACKAGE_PREFIX}-icu" + "${MINGW_PACKAGE_PREFIX}-libpng" + "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo" + "${MINGW_PACKAGE_PREFIX}-libwebp" + "${MINGW_PACKAGE_PREFIX}-zlib" + "git" ) source=("${_realname}-${pkgver}.tar.gz::https://github.com/google/skia/archive/${_commit}.tar.gz" "bare-clones/build::git+https://chromium.googlesource.com/chromium/src/build.git#commit=fd86d60f33cbc794537c4da2ef7e298d7f81138e" @@ -39,6 +38,7 @@ source=("${_realname}-${pkgver}.tar.gz::https://github.com/google/skia/archive/$ "0004-add-mingw-toolchain-build.patch" "0005-dont-undef-CLSID_WICImagingFactory-on-mingw.patch" "0006-fix-std-max.patch" + "0007-delete-experimental-sktext.patch" "harfbuzz.gn" "icu.gn" "zlib.gn" @@ -46,13 +46,14 @@ source=("${_realname}-${pkgver}.tar.gz::https://github.com/google/skia/archive/$ ) noextract=("${_realname}-${pkgver}.tar.gz") sha256sums=('48ff8b020d2e54b97ddf7cfc54bb483492aef3dc7b3e61629c8a86bc89995643' - 'SKIP' + '96aa5af1b27ec32e2a874b08c7249dcea7289029e035ae58f521d1d22e0ed4b3' '5df0992b78f7f6bedba8cef110c73c723513d032015e9b756decb0a06a99a2f6' '518166cb8c4848deee114c0f38c0c80289f6d170a31dbaacd0455a573599cd5b' '76592221a23555a29debc77df7e2429d52e2b7db1c103e0785bb7a4c669b9e03' '63f35c12168fcb5f025db2cb3a4bc693cb4546ce561dc95e45d10c1579daf786' '7883ff95984f5eac3002d8205257666f38538e0907046ef17e4850a36103a12c' '96b98caea6c426ff0b4f85ced7b45d4b40777396ac7b12bb6490b9d387c1b3c8' + '43848882c4674b8b520af49cb82e4ea90f1c08c54b899b522d7e099c0e4d566d' '7bd0b8cff2f1ec6822c74b731664007f598c3b442718060c499df7ba19141563' '36d32b737f87a676f5c4da9b7ae14193e6c1913ddb6508b979effdba2b80ea83' 'b99874ea904724911528a5530c14f3051c358805bd36df9d205df31458ebf8b9' @@ -71,7 +72,8 @@ prepare() { echo "Syncing all dependencies" cd "${srcdir}/skia" - apply_patch_with_msg 0001-Don-t-download-prebuild-gn-and-emsdk.patch + apply_patch_with_msg \ + 0001-Don-t-download-prebuild-gn-and-emsdk.patch sed "s|linebender/piet-gpu|linebender/vello|g" -i DEPS python "${srcdir}"/skia/tools/git-sync-deps @@ -85,10 +87,15 @@ prepare() { echo "Preparing Skia Source" cd "${srcdir}"/skia - apply_patch_with_msg 0002-add-mingw-toolchain-skia.patch - apply_patch_with_msg 0003-fix-dwrite-function-mingw.patch - apply_patch_with_msg 0005-dont-undef-CLSID_WICImagingFactory-on-mingw.patch - apply_patch_with_msg 0006-fix-std-max.patch + apply_patch_with_msg \ + 0002-add-mingw-toolchain-skia.patch \ + 0003-fix-dwrite-function-mingw.patch \ + 0005-dont-undef-CLSID_WICImagingFactory-on-mingw.patch \ + 0006-fix-std-max.patch + # Delete experimental/sktext https://github.com/google/skia/commit/4594e2ef + apply_patch_with_msg \ + 0007-delete-experimental-sktext.patch + rm -r experimental/sktext cp "${srcdir}/harfbuzz.gn" "${srcdir}/skia/third_party/harfbuzz/BUILD.gn" cp "${srcdir}/icu.gn" "${srcdir}/skia/third_party/icu/BUILD.gn" cp "${srcdir}/zlib.gn" "${srcdir}/skia/third_party/zlib/BUILD.gn"