testing/flutter: upgrade to 3.27.0

This commit is contained in:
LN Liberda 2024-11-26 23:11:00 +01:00 committed by Kevin Daudt
parent 690dc24789
commit 0495bee75f
5 changed files with 177 additions and 32 deletions

View File

@ -2,13 +2,13 @@
# Maintainer: lauren n. liberda <lauren@selfisekai.rocks>
pkgname=flutter
# upgrade checklist: https://md.sdomi.pl/Q-ECZTJ2Qqyp3ahfJuYSBw
pkgver=3.24.3
pkgver=3.27.0
pkgrel=0
pkgdesc="Cross-platform apps, built in Omelas"
url="https://flutter.dev/"
arch="aarch64 x86_64" # officially supported for linux desktop
license="BSD-3-Clause"
_dartver=3.5.4
_dartver=3.6.0
_depends_common="
bash
clang
@ -47,17 +47,17 @@ subpackages="
case "$pkgver" in
*.*.*_alpha*)
_canonver="${pkgver/_alpha/-}"
_canonver="${_canonver/-r/.}.dev"
_canonver="${_canonver/_p/.}.dev"
_channel=master
;;
*.*.*_beta*)
_canonver="${pkgver/_beta/-}"
_canonver="${_canonver/-r/.}.beta"
_canonver="${_canonver/_p/.}.beta"
_channel=beta
;;
*.*.*_pre*)
_canonver="${pkgver/_pre/-}"
_canonver="${_canonver/-r/.}.pre"
_canonver="${_canonver/_p/.}.pre"
_channel=master
;;
*.*.*)
@ -69,25 +69,24 @@ esac
case "$_dartver" in
*.*.*_alpha*)
_dartcanonver="${_dartver/_alpha/-}"
_dartcanonver="${_dartcanonver/-r/.}.dev"
_dartcanonver="${_dartcanonver/_p/.}.dev"
;;
*.*.*_beta*)
_dartcanonver="${_dartver/_beta/-}"
_dartcanonver="${_dartcanonver/-r/.}.beta"
_dartcanonver="${_dartcanonver/_p/.}.beta"
;;
*.*.*)
_dartcanonver="$_dartver"
;;
esac
_enginever=36335019a8eab588c3c2ea783c618d90505be233
_enginever=83bacfc52569459a4a654727cad2546820cb0d6a
_materialfontsver=3012db47f3130e62f7cc0beabff968a33cbec8d8
_gradlewver=fd5c1f2c013565a3bea56ada6df9d2b8e96d56aa
options="!check" # idk no attempt to build tests even with --enable-unittests
source="
https://github.com/flutter/flutter/archive/refs/tags/$_canonver/flutter-$_canonver.tar.gz
https://ab-sn.lnl.gay/flutter-engine-$_enginever.tar.zst
https://ab-sn.lnl.gay/dart-sdk-$_dartcanonver.tar.zst
fonts-$_materialfontsver.zip.noauto::https://storage.googleapis.com/flutter_infra_release/flutter/fonts/$_materialfontsver/fonts.zip
gradle-wrapper-$_gradlewver.tar.gz.noauto::https://storage.googleapis.com/flutter_infra_release/gradle-wrapper/$_gradlewver/gradle-wrapper.tgz
@ -109,8 +108,12 @@ source="
no-vpython.patch.engine
shared-libcxx.patch.engine
libstdc++13.patch.engine
libstdc++14.patch.engine
system-icu.patch.engine
unbundle.patch.engine
unbundle-icu.patch.engine
unbundle-icu.patch.dart
flutter
"
@ -147,7 +150,7 @@ solutions = [{
'url': 'https://github.com/flutter/engine.git@$_enginever',
'custom_vars': {
'download_android_deps': False,
'download_dart_sdk': False,
'download_dart_sdk': True,
},
}]
target_cpu = ['x64', 'arm', 'arm64', 'riscv64']
@ -166,7 +169,6 @@ target_cpu_only = True
tar -cf flutter-engine-$_enginever.tar \
--exclude="ChangeLog*" \
--exclude=".build-id" \
--exclude="third_party/dart" \
--exclude-backups \
--exclude-caches-all \
--exclude-vcs \
@ -188,6 +190,10 @@ prepare() {
msg "$x"
patch -p1 -i "$srcdir"/$x -d "$srcdir"/flutter-engine-$_enginever
;;
*.patch.dart)
msg "$x"
patch -p1 -i "$srcdir"/$x -d "$srcdir"/flutter-engine-$_enginever/flutter/third_party/dart
;;
esac
done
@ -203,17 +209,14 @@ prepare() {
(
cd "$srcdir"/flutter-engine-$_enginever
# bind dart source code
rm -rf flutter/third_party/dart
ln -s "$srcdir"/dart-sdk-$_dartcanonver flutter/third_party/dart
# bind dart build
mkdir -p flutter/third_party/dart/tools/sdks/dart-sdk/
ln -s /usr/lib/dart/bin flutter/third_party/dart/tools/sdks/dart-sdk/bin
mkdir -p flutter/prebuilts/linux-$_flutter_arch/dart-sdk/
ln -s /usr/lib/dart/bin flutter/prebuilts/linux-$_flutter_arch/dart-sdk/bin
ln -sv /usr/lib/dart/bin flutter/third_party/dart/tools/sdks/dart-sdk/bin
rm -r flutter/prebuilts/linux-$_flutter_arch/dart-sdk/bin
ln -sv /usr/lib/dart/bin flutter/prebuilts/linux-$_flutter_arch/dart-sdk/bin
mkdir -p flutter/third_party/gn/
ln -s /usr/bin/gn flutter/third_party/gn/gn
ln -sv /usr/bin/gn flutter/third_party/gn/gn
# https://github.com/dart-lang/sdk/issues/52295
mkdir -p flutter/third_party/dart/.git/logs
@ -264,6 +267,7 @@ build() {
# shellcheck disable=2089
local gn_args="
dart_embed_icu_data=false
host_libc=\"musl\"
target_libc=\"musl\"
use_custom_libcxx=false
@ -478,9 +482,8 @@ tool_developer() {
}
sha512sums="
cd208254bbda68d6df93652f2b631bab53fcf5ad21f233e180eeb0f8606b31c2b6c069aeae1e6a70dabc0ec8a951d125070d225bc5541b7da5b337c5ded1a047 flutter-3.24.3.tar.gz
74f4127697131531ac73ac0e7faad80a15480f418148c56b19b05741cb1a5df44b20b3de75977198a5c533b1842529928667f88c5d2bc40fec01b286885a28d1 flutter-engine-36335019a8eab588c3c2ea783c618d90505be233.tar.zst
c01619fb0b9608dae28a19766784a10442deef416eefb5ab6442dfc3a2f20745d358d893a114e6c2e310fc7c5808cdac9aea3763cd760e92b6604e505f744951 dart-sdk-3.5.4.tar.zst
07ae6b92b2bef7d79a3432e895c0600b57f563a562d78218404ebdcac68ea8e87e1c9104838f11ac2ebf36e9c899ce4ba982fa40a9639e61b846698b4231510b flutter-3.27.0.tar.gz
f02933bdf5985b5ec004f91f9964221f40260e80e393aef83cbba79d5cb9d6cb245e1aca288d4f37a569ab104d977f73b99dbbdd7055b7be4acec02274a1f715 flutter-engine-83bacfc52569459a4a654727cad2546820cb0d6a.tar.zst
604f9a256fb1ec8c1b3eb6636baa97f195012b89b68197aef28104ed59dbcb70bde4fc1c7e154018999beabda160b60fa1378bcc1cd1ebe71c79071f40ebb26f fonts-3012db47f3130e62f7cc0beabff968a33cbec8d8.zip.noauto
fcce6b1659f3a4ee7849bf7f65a9b8e9b3046fc0cfae70d364efabbff2d6c1ed41e6e9009e5fabc522117cbd2f92c5c664f64426e2606fce6b69d9960dd6ca63 gradle-wrapper-fd5c1f2c013565a3bea56ada6df9d2b8e96d56aa.tar.gz.noauto
a7d6e459a8884bd2b7083b15e6d113576e454c68feba8fcf467c6d288e6abca656a1e669eee2b9973d0b30a1dfbbd736d8ee65292d42bbd832059703b7067dd8 alpine-target.patch
@ -498,8 +501,11 @@ d2c55af9dc64c380905cd5d9bc792cec2e37063265cc84643b77995f9787d2239fe34f596a575ac6
5794a5f9f8532dc6615bc7c89c2f5953ad09a4e8cc1ef7618c9fa8a7816488714ab972b83fef0ff87da797404e182c516975d3376493b906be067edcda015914 musl-no-mallinfo.patch.engine
6634043f5618835dd9f33a3ec473cdf11bfae2456ee670e2ea24c14f8f1f9d45f9dc273dcb035400d18404e74833c4df1d57e78a00de8010aa7e1e68099db6cd no-vpython.patch.engine
e138d2b393db3aa1328199fc4d1ac4b2e0ef8384faf04bf077c6fd97ef9813f94b7f25fccbe5fed4919d7ec0bbd800289b5d3a9b8bc654cbe5c5574fb6bee329 shared-libcxx.patch.engine
a56c70c79a6eda69bfbafc60402c246e8baea9158452e1b1d0d6129ce5df15aa9483822e0831a4556915c96e5b53f0a2162c77c856437e31008e0d85ba838975 libstdc++13.patch.engine
320536968ff51cf0c1db0d10b22ea58163367b061fe24150e4c06b0bd5e0115c9cdb6e4eb0d5281141aad2424f0d05c4377a478df2de20bcd40edcaf44683631 libstdc++13.patch.engine
df6b2a752a4f9ea9769dac70eda9552a51ed23ec89e3a0ff4153804ba21a9c81c21bd12dcb3b83c2cc87975a5adf0badf993b66e9c07e8898bcfd68dc6dbfdf7 libstdc++14.patch.engine
56ab8c8ee82be1e39698605888b71a829ac59e309d1d02f932794b0ed4b0f2e8e7382e4530217723234733509a7a0c65e0e7627084c88687f00ab464cdd307c1 system-icu.patch.engine
160813c47cc3d12b2623208566b81be167781d2f16b1e57493ba565a0efc8b78b30c9af1f2962cfa7e9e96b61bf0357427af38f9130e219875528bdcd1588c66 unbundle.patch.engine
705168c45fc1f85fc5f6a12925d355d9e33191df37777738beb47dc675901a8e1e3b71f75f8393aebfe683140079700c5dd388134b4a0b5acd465fd3096ff443 unbundle-icu.patch.engine
bceba58975e827995344bb417e830201ffc809851869629758fc3d2162cf9d94c4c0a99413b1ec7b8cf52eb61646ceab40de9fc9417b5a6c162a6c7a855850cf unbundle-icu.patch.dart
38e6484b18cff811be30da4f770b281cbffccbcbd813121d55eb869edfca7e4ff751d59e6bfcc79c23d427d021d0fd363a7eff26bbc11a5dc90de2be1a153c4e flutter
"

View File

@ -131,13 +131,3 @@ missing libstdc++13 includes
#include <vector>
#include "flutter/fml/logging.h"
--- ./flutter/impeller/entity/geometry/vertices_geometry.cc.orig
+++ ./flutter/impeller/entity/geometry/vertices_geometry.cc
@@ -5,6 +5,7 @@
#include "impeller/entity/geometry/vertices_geometry.h"
#include <cstdint>
+#include <cstring>
#include <utility>
#include "impeller/core/buffer_view.h"

View File

@ -0,0 +1,10 @@
--- ./flutter/fml/synchronization/sync_switch.cc.orig
+++ ./flutter/fml/synchronization/sync_switch.cc
@@ -5,6 +5,7 @@
#include "flutter/fml/synchronization/sync_switch.h"
#include <algorithm>
+#include <mutex>
namespace fml {

View File

@ -0,0 +1,64 @@
From 0d936b3e64e1e629bd29fa4dd84240f5c5344092 Mon Sep 17 00:00:00 2001
From: LN Liberda <lauren@selfisekai.rocks>
Date: Tue, 26 Nov 2024 19:28:59 +0100
Subject: [PATCH] build: option to not embed icu data
Bug: none
---
runtime/bin/BUILD.gn | 11 ++++++++---
runtime/runtime_args.gni | 3 +++
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn
index 90dc09a0c02..8f88873dc18 100644
--- a/runtime/bin/BUILD.gn
+++ b/runtime/bin/BUILD.gn
@@ -795,7 +795,6 @@ template("dart_executable") {
}
deps = [
":crashpad",
- ":icudtl_cc",
"//third_party/boringssl",
"//third_party/icu:icui18n",
"//third_party/icu:icuuc",
@@ -804,7 +803,11 @@ template("dart_executable") {
if (is_fuchsia) {
deps += [ "$fuchsia_sdk/pkg/fdio" ]
}
- defines = [ "DART_EMBED_ICU_DATA" ] + extra_defines
+ defines = extra_defines
+ if (dart_embed_icu_data) {
+ defines += [ "DART_EMBED_ICU_DATA" ]
+ deps += [ ":icudtl_cc" ]
+ }
if (exclude_kernel_service) {
defines += [ "EXCLUDE_CFE_AND_KERNEL_PLATFORM" ]
}
@@ -911,10 +911,12 @@
"..:add_empty_macho_section_config",
]
extra_deps = [
- ":icudtl_cc",
"..:libdart_precompiled_runtime",
"../platform:libdart_platform_precompiled_runtime",
]
+ if (dart_embed_icu_data) {
+ extra_deps += [ ":icudtl_cc" ]
+ }
if (dart_runtime_mode != "release") {
extra_deps += [ "../observatory:standalone_observatory_archive" ]
}
diff --git a/runtime/runtime_args.gni b/runtime/runtime_args.gni
index fbcfeb157fb..061e8f74a5c 100644
--- a/runtime/runtime_args.gni
+++ b/runtime/runtime_args.gni
@@ -77,6 +77,9 @@ declare_args() {
# Whether to support dynamic loading and interpretation of Dart bytecode.
dart_dynamic_modules = false
+
+ # Whether to embed ICU data inside the runtime binary.
+ dart_embed_icu_data = true
}
declare_args() {

View File

@ -0,0 +1,75 @@
--- ./flutter/shell/platform/embedder/BUILD.gn.orig
+++ ./flutter/shell/platform/embedder/BUILD.gn
@@ -458,13 +458,6 @@
]
}
- copy("copy_icu") {
- visibility = [ ":*" ]
- sources = [ "//flutter/third_party/icu/flutter/icudtl.dat" ]
- outputs =
- [ "$_flutter_embedder_framework_dir/Versions/A/Resources/icudtl.dat" ]
- }
-
action("copy_info_plist") {
script = "//flutter/build/copy_info_plist.py"
visibility = [ ":*" ]
@@ -522,7 +515,6 @@
deps = [
":copy_dylib",
":copy_framework_headers",
- ":copy_icu",
":copy_info_plist",
":copy_module_map",
]
diff --git a/flutter/impeller/toolkit/interop/BUILD.gn b/flutter/impeller/toolkit/interop/BUILD.gn
index 500410359d..a78c1fa418 100644
--- a/flutter/impeller/toolkit/interop/BUILD.gn
+++ b/flutter/impeller/toolkit/interop/BUILD.gn
@@ -5,14 +5,6 @@
import("//flutter/build/zip_bundle.gni")
import("//flutter/impeller/tools/impeller.gni")
-embed_blob("embedded_icu_data") {
- symbol_name = "embedded_icu_data"
- blob = "//flutter/third_party/icu/flutter/icudtl.dat"
- hdr = "$target_gen_dir/embedded_icu_data.h"
- cc = "$target_gen_dir/embedded_icu_data.cc"
- deps = []
-}
-
impeller_component("interop") {
sources = [
"color_filter.cc",
@@ -67,8 +59,6 @@ impeller_component("interop") {
"//flutter/fml",
"//flutter/third_party/txt",
]
-
- deps = [ ":embedded_icu_data" ]
}
impeller_component("library") {
diff --git a/flutter/impeller/toolkit/interop/typography_context.cc b/flutter/impeller/toolkit/interop/typography_context.cc
index ed863fa61e..737d087907 100644
--- a/flutter/impeller/toolkit/interop/typography_context.cc
+++ b/flutter/impeller/toolkit/interop/typography_context.cc
@@ -7,7 +7,6 @@
#include <mutex>
#include "flutter/fml/icu_util.h"
-#include "impeller/toolkit/interop/embedded_icu_data.h"
namespace impeller::interop {
@@ -15,9 +14,7 @@
: collection_(std::make_shared<txt::FontCollection>()) {
static std::once_flag sICUInitOnceFlag;
std::call_once(sICUInitOnceFlag, []() {
- auto icu_data = std::make_unique<fml::NonOwnedMapping>(
- impeller_embedded_icu_data_data, impeller_embedded_icu_data_length);
- fml::icu::InitializeICUFromMapping(std::move(icu_data));
+ fml::icu::InitializeICU("/usr/lib/flutter/icudtl.dat");
});
collection_->SetupDefaultFontManager(0u);
}