testing/flutter: upgrade to 3.29.0

This commit is contained in:
LN Liberda 2025-02-13 10:53:49 +01:00 committed by Patrycja Rosa
parent c6acd8a69f
commit 5491e52fbd
13 changed files with 216 additions and 310 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.27.0
pkgver=3.29.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.6.0
_dartver=3.7.0
_depends_common="
bash
clang
@ -80,13 +80,12 @@ case "$_dartver" in
;;
esac
_enginever=83bacfc52569459a4a654727cad2546820cb0d6a
_enginever=f73bfc4522dd0bc87bbcdb4bb3088082755c5e87
_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/flutter-$_canonver.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
@ -101,14 +100,15 @@ source="
pmos-if-touch-is-a-mouse-then-mouse-is-touch.patch
geometry-floats.patch.engine
git-revision.patch.engine
target-musl.patch.engine
musl-no-execinfo.patch.engine
musl-no-mallinfo.patch.engine
not-in-git.patch.engine
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
@ -128,7 +128,7 @@ case "$CARCH" in
x86_64) _flutter_arch="x64" ;;
aarch64) _flutter_arch="arm64" ;;
esac
_out="$srcdir"/flutter-engine-$_enginever/out
_out="$builddir"/engine/src/out
_modes='release profile debug'
_release_out="$_out"/linux_release_$_flutter_arch
_debug_out="$_out"/linux_debug_$_flutter_arch
@ -140,14 +140,17 @@ snapshot() {
cd "$srcdir"
rm -rf src
rm -rf flutter-engine-$_enginever
rm -f flutter-engine-$_enginever.tar
rm -f flutter-engine-$_enginever.tar.zst
rm -rf flutter-$_canonver
rm -f flutter-$_canonver.tar
rm -f flutter-$_canonver.tar.zst
mkdir flutter-$_canonver
cd flutter-$_canonver
echo "
solutions = [{
'name': 'src/flutter',
'url': 'https://github.com/flutter/engine.git@$_enginever',
'name': '.',
'url': 'https://github.com/flutter/flutter.git@$_canonver',
'custom_vars': {
'download_android_deps': False,
'download_dart_sdk': True,
@ -159,27 +162,27 @@ target_cpu_only = True
gclient sync --no-history --nohooks --tpot-cipd-ignore-platformed
for elf in $(scanelf -RA -F "%F" src); do
for elf in $(scanelf -RA -F "%F" .); do
rm -f "$elf"
done
mv src flutter-engine-$_enginever
cd ..
msg "generating tarball.."
tar -cf flutter-engine-$_enginever.tar \
tar -cf flutter-$_canonver.tar \
--exclude="ChangeLog*" \
--exclude=".build-id" \
--exclude-backups \
--exclude-caches-all \
--exclude-vcs \
flutter-engine-$_enginever
flutter-$_canonver
zstd --auto-threads=logical --ultra --long -22 -T"${ZSTD_LIMIT:-0}" -vv flutter-engine-$_enginever.tar -o "$SRCDEST"/flutter-engine-$_enginever.tar.zst
mcli cp "$SRCDEST"/flutter-engine-$_enginever.tar.zst "$_distbucket"
zstd --auto-threads=logical --ultra --long -22 -T"${ZSTD_LIMIT:-0}" -vv flutter-$_canonver.tar -o "$SRCDEST"/flutter-$_canonver.tar.zst
mcli cp "$SRCDEST"/flutter-$_canonver.tar.zst "$_distbucket"
}
prepare() {
dos2unix "$srcdir"/flutter-engine-$_enginever/flutter/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h
dos2unix engine/src/flutter/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h
default_prepare
@ -188,11 +191,11 @@ prepare() {
case "$x" in
*.patch.engine)
msg "$x"
patch -p1 -i "$srcdir"/$x -d "$srcdir"/flutter-engine-$_enginever
patch -p1 -i "$srcdir"/$x -d engine/src
;;
*.patch.dart)
msg "$x"
patch -p1 -i "$srcdir"/$x -d "$srcdir"/flutter-engine-$_enginever/flutter/third_party/dart
patch -p1 -i "$srcdir"/$x -d engine/src/flutter/third_party/dart
;;
esac
done
@ -207,7 +210,7 @@ prepare() {
mkdir bin/cache
(
cd "$srcdir"/flutter-engine-$_enginever
cd engine/src
# bind dart build
mkdir -p flutter/third_party/dart/tools/sdks/dart-sdk/
@ -263,7 +266,7 @@ prepare() {
build() {
(
cd "$srcdir"/flutter-engine-$_enginever
cd engine/src
# shellcheck disable=2089
local gn_args="
@ -318,7 +321,7 @@ build() {
check() {
(
cd "$srcdir"/flutter-engine-$_enginever
cd engine/src
ln -s ./linux_debug_$_flutter_arch ./out/linux_debug_unopt
@ -337,7 +340,7 @@ package() {
# our dart
mkdir -p "$pkgdir"/usr/lib/flutter/bin/cache/
ln -s ../../../dart "$pkgdir"/usr/lib/flutter/bin/cache/dart-sdk
_devtoolsver="$(grep 'devtools_rev' "$srcdir/dart-sdk-$_dartcanonver/DEPS" | head -n1 | awk -F\" '{ print $4 }')"
_devtoolsver="$(grep 'devtools_rev' engine/src/flutter/third_party/dart/DEPS | head -n1 | awk -F\" '{ print $4 }')"
cat > "$pkgdir"/usr/lib/flutter/bin/cache/flutter.version.json <<EOF
{
"frameworkVersion": "$_canonver",
@ -482,30 +485,30 @@ tool_developer() {
}
sha512sums="
07ae6b92b2bef7d79a3432e895c0600b57f563a562d78218404ebdcac68ea8e87e1c9104838f11ac2ebf36e9c899ce4ba982fa40a9639e61b846698b4231510b flutter-3.27.0.tar.gz
f02933bdf5985b5ec004f91f9964221f40260e80e393aef83cbba79d5cb9d6cb245e1aca288d4f37a569ab104d977f73b99dbbdd7055b7be4acec02274a1f715 flutter-engine-83bacfc52569459a4a654727cad2546820cb0d6a.tar.zst
cbd492129a9468ee3966dd06095fc3c8ca9cc91309c940f39c93a75fc48e36a5c0aecf8a8b8efa8ecfce96e734e0dd33fcfe9724c6f194996084d8b32b5f66bf flutter-3.29.0.tar.zst
604f9a256fb1ec8c1b3eb6636baa97f195012b89b68197aef28104ed59dbcb70bde4fc1c7e154018999beabda160b60fa1378bcc1cd1ebe71c79071f40ebb26f fonts-3012db47f3130e62f7cc0beabff968a33cbec8d8.zip.noauto
fcce6b1659f3a4ee7849bf7f65a9b8e9b3046fc0cfae70d364efabbff2d6c1ed41e6e9009e5fabc522117cbd2f92c5c664f64426e2606fce6b69d9960dd6ca63 gradle-wrapper-fd5c1f2c013565a3bea56ada6df9d2b8e96d56aa.tar.gz.noauto
a7d6e459a8884bd2b7083b15e6d113576e454c68feba8fcf467c6d288e6abca656a1e669eee2b9973d0b30a1dfbbd736d8ee65292d42bbd832059703b7067dd8 alpine-target.patch
a9db5df026cf641728f744ffd3428db9cf3918718233c707fd154a88b321c4a7af8e41ac6c3b08f1f4614c6b49e0689653b3b01e35c1e3ff3c5c9e7920fdd8d4 doctor.patch
69a6df90f67f03a73a3e5d334b4f31188e2084775e1fe53744eb9cac89314355ba1bff33d93cbf6d2ac231d9a2511a71d9abd57878c2ff4d48e75725452556e4 alpine-target.patch
cec69e02f72084f29ea27c9d3c5301091016f69f2f63055138bc09d7ba87a7e8709e15b9b0541a0afebe28ce966dda09e712e5acc8e2e7c86f68ac768037f1d0 doctor.patch
f47f3bb1e97c79bdaf5fdd3b466936a335d80d48bffafa7c015a32d97a665d5450e63a33fd5eb0560215de57d556721eaa92db05848257427dd582b10543adda no-lock.patch
b2705a855163660cc3c472f6416d5839d9d4947164e2ea0ed97e93645255f27b7b513e7dc7de196cae5685b5e328b35ebd65b614be9b32f2fddd1fc8053a3963 no-runtime-download.patch
55a4973e001b425d65b419f92cfe9880a86a47b357e11b82da10d4c27eb8d12b72fbbcf28e25d555dd4e91eeb263089c7ea7a407491691ae591a362d1e314255 no-runtime-download.patch
91e598d9da383519f107c75669d8ec71f85afea38fa9e9a89e2f6c6088ce27f3107ab57e68931c5b27aec73788c9cd81123bcfae87152d878a170465aec9a193 opt-in-analytics.patch
b07b662c9647a21fdc7dbd2842436a53b4ce5b369a4641bf1fd8ab4bd0235f3e7d8cc0e9f2bd0bb5e2c871b3f9696505a6eedecf20cd93833949c081eb356525 system-dart.patch
9855cf075781e1d1032f6a8dcc160cdcfc4d360875bc4fe005c83ca87dec767f1ce15e7c55d653688f1f2f0cb6b0b0328ccfd826e18ececc50d5d41d8b5b89d2 unbundle.patch
5b4dc7cdfe6476748c458a0f61267f75a3ce959fff73327e4b9083e1291d46f59000ff5d853d34ecfaa55ecc317d002754653528566ca5a8fc9126b20148a0e5 version.patch
d3a31d863d3ded51484d67d7874e0776709dc42e70d2240bf093218ad1d45703e9be2fd25a3c6d58d684226527745d3e9490d9453abcb1aa90a7fc1781d61baf system-dart.patch
a809cc1ad8598a4f8fe0cef01116b521c3aa8171c9099bb7eb2c0048c1d4283481b7495a125eafb9318f6a92e7bbfd7c5a59f30b925fd8c72fb367473ff3719d unbundle.patch
9af7c6e68c891dfdcb794cd7bd3090b1035c0f6a5c8edd13aeb08a268a103f4a6b99600a2a34d0897a958363f9fbc6d9a23cb0bb9823703204f167f2d5766fc7 version.patch
38673902256ee546c45cefd8e82f310ab7207ac50a038efcbf34c67dee04d626fa37462456729e7725729495ecd4ed7c0b16b72967ef768153d189d7b10c7439 pmos-if-touch-is-a-mouse-then-mouse-is-touch.patch
49afc6fb142680d42a27716a1f2fcb39a1240934a02d04117ec7cc6bf1da29a960f3bd25215da1211664da48c2cf5a3fda9d684197eee9606ddc76c36801b17e geometry-floats.patch.engine
2c74f25be53500f1b91bd920751dae72913167f7c45aa5aeec28a1712cc723ae469957ebbae60c230439af15483d5186052cef8e4f0e2caf3111d5b73234ed0d git-revision.patch.engine
d60578a06001d3c6393b4f429f8cf32d50289c34b5157404ddb945d4e52c7c6733f4659128b3dfce9dc02efd9b498b75c1f3ec7533ccceaab9496577a5d628f8 target-musl.patch.engine
d2c55af9dc64c380905cd5d9bc792cec2e37063265cc84643b77995f9787d2239fe34f596a575ac6aa9eae5d82cd55dcd1ed20d59f58c631291064a8c9ae47c0 musl-no-execinfo.patch.engine
5794a5f9f8532dc6615bc7c89c2f5953ad09a4e8cc1ef7618c9fa8a7816488714ab972b83fef0ff87da797404e182c516975d3376493b906be067edcda015914 musl-no-mallinfo.patch.engine
592e4d2239162f7c8f34a54b80d9d67fecd1d65924e06f23851362d6fecd6eed6f6ade18f463b5b9197641bdbf30be6717f19466d8c4a2b831d766cb68822dff not-in-git.patch.engine
6634043f5618835dd9f33a3ec473cdf11bfae2456ee670e2ea24c14f8f1f9d45f9dc273dcb035400d18404e74833c4df1d57e78a00de8010aa7e1e68099db6cd no-vpython.patch.engine
e138d2b393db3aa1328199fc4d1ac4b2e0ef8384faf04bf077c6fd97ef9813f94b7f25fccbe5fed4919d7ec0bbd800289b5d3a9b8bc654cbe5c5574fb6bee329 shared-libcxx.patch.engine
320536968ff51cf0c1db0d10b22ea58163367b061fe24150e4c06b0bd5e0115c9cdb6e4eb0d5281141aad2424f0d05c4377a478df2de20bcd40edcaf44683631 libstdc++13.patch.engine
df6b2a752a4f9ea9769dac70eda9552a51ed23ec89e3a0ff4153804ba21a9c81c21bd12dcb3b83c2cc87975a5adf0badf993b66e9c07e8898bcfd68dc6dbfdf7 libstdc++14.patch.engine
1c7c06470881151ecd899b79e9ca5fb7661183c3124cfcfb711ceacbc8527ee50ba943307346db31dc72d3e8c102de690327730399887543cc5ca41ac2c41159 libstdc++13.patch.engine
56ab8c8ee82be1e39698605888b71a829ac59e309d1d02f932794b0ed4b0f2e8e7382e4530217723234733509a7a0c65e0e7627084c88687f00ab464cdd307c1 system-icu.patch.engine
160813c47cc3d12b2623208566b81be167781d2f16b1e57493ba565a0efc8b78b30c9af1f2962cfa7e9e96b61bf0357427af38f9130e219875528bdcd1588c66 unbundle.patch.engine
705168c45fc1f85fc5f6a12925d355d9e33191df37777738beb47dc675901a8e1e3b71f75f8393aebfe683140079700c5dd388134b4a0b5acd465fd3096ff443 unbundle-icu.patch.engine
bceba58975e827995344bb417e830201ffc809851869629758fc3d2162cf9d94c4c0a99413b1ec7b8cf52eb61646ceab40de9fc9417b5a6c162a6c7a855850cf unbundle-icu.patch.dart
897df86c37e8d42296141e13da646b35a135391bdf78c922479d1e4f7af849e47213bc0bcc65415828c9ef794b855d4c5832c6ad781c78efb6c57bda8a7669de unbundle-icu.patch.engine
04478a0927c4f1c316346fc0e53386a841493b1e5c7facb4e2a2fffd11b5110a3779bca8bc5a33510964d320f24e883b6afc653c48849380c5b9097611a3eb55 unbundle-icu.patch.dart
38e6484b18cff811be30da4f770b281cbffccbcbd813121d55eb869edfca7e4ff751d59e6bfcc79c23d427d021d0fd363a7eff26bbc11a5dc90de2be1a153c4e flutter
"

View File

@ -1,14 +1,13 @@
--- ./packages/flutter_tools/lib/src/linux/build_linux.dart.orig
+++ ./packages/flutter_tools/lib/src/linux/build_linux.dart
@@ -135,9 +135,9 @@
if (needCrossBuild)
'-DFLUTTER_TARGET_PLATFORM_SYSROOT=$targetSysroot',
if (needCrossBuildOptionsForArm64)
- '-DCMAKE_C_COMPILER_TARGET=aarch64-linux-gnu',
+ '-DCMAKE_C_COMPILER_TARGET=aarch64-alpine-linux-musl',
if (needCrossBuildOptionsForArm64)
- '-DCMAKE_CXX_COMPILER_TARGET=aarch64-linux-gnu',
+ '-DCMAKE_CXX_COMPILER_TARGET=aarch64-alpine-linux-musl',
@@ -173,8 +173,8 @@
// Support cross-building for arm64 targets on x64 hosts.
// (Cross-building for x64 on arm64 hosts isn't supported now.)
if (needCrossBuild) '-DFLUTTER_TARGET_PLATFORM_SYSROOT=$targetSysroot',
- if (needCrossBuildOptionsForArm64) '-DCMAKE_C_COMPILER_TARGET=aarch64-linux-gnu',
- if (needCrossBuildOptionsForArm64) '-DCMAKE_CXX_COMPILER_TARGET=aarch64-linux-gnu',
+ if (needCrossBuildOptionsForArm64) '-DCMAKE_C_COMPILER_TARGET=aarch64-alpine-linux-musl',
+ if (needCrossBuildOptionsForArm64) '-DCMAKE_CXX_COMPILER_TARGET=aarch64-alpine-linux-musl',
sourceDir.path,
],
workingDirectory: buildDir.path,

View File

@ -1,12 +1,13 @@
--- a/packages/flutter_tools/lib/src/doctor.dart
+++ b/packages/flutter_tools/lib/src/doctor.dart
@@ -621,14 +621,6 @@
--- ./packages/flutter_tools/lib/src/doctor.dart.orig
+++ ./packages/flutter_tools/lib/src/doctor.dart
@@ -694,15 +694,6 @@
'$flutterBinDir to your path.',
);
}
- final String resolvedFlutterPath = flutterBin.resolveSymbolicLinksSync();
- if (!_filePathContainsDirPath(flutterRoot, resolvedFlutterPath)) {
- final String hint = 'Warning: `$binary` on your path resolves to '
- final String hint =
- 'Warning: `$binary` on your path resolves to '
- '$resolvedFlutterPath, which is not inside your current Flutter '
- 'SDK checkout at $flutterRoot. Consider adding $flutterBinDir to '
- 'the front of your path.';

View File

@ -0,0 +1,11 @@
--- ./flutter/impeller/entity/geometry/round_superellipse_geometry.cc.orig
+++ ./flutter/impeller/entity/geometry/round_superellipse_geometry.cc
@@ -419,7 +419,7 @@
Point pointM{size / 2 - g, size / 2 - g};
Point pointS{s, s};
Point pointJ =
- Point{pow(abs(sinf(thetaJ)), 2 / n), pow(abs(cosf(thetaJ)), 2 / n)} * a +
+ Point{std::powf(std::fabs(sinf(thetaJ)), 2 / n), std::powf(std::fabs(cosf(thetaJ)), 2 / n)} * a +
pointS;
Matrix translationS = Matrix::MakeTranslation(pointS);

View File

@ -10,124 +10,3 @@ missing libstdc++13 includes
#include <cstdlib>
#include <cstring>
#include <utility>
--- ./flutter/third_party/tonic/filesystem/filesystem/file.h.orig
+++ ./flutter/third_party/tonic/filesystem/filesystem/file.h
@@ -5,6 +5,7 @@
#ifndef FILESYSTEM_FILE_H_
#define FILESYSTEM_FILE_H_
+#include <stdint.h>
#include <string>
#include <vector>
--- ./flutter/impeller/geometry/size.h.orig
+++ ./flutter/impeller/geometry/size.h
@@ -6,6 +6,7 @@
#include <algorithm>
#include <cmath>
+#include <cstdint>
#include <limits>
#include <ostream>
#include <string>
--- ./flutter/runtime/dart_service_isolate.h.orig
+++ ./flutter/runtime/dart_service_isolate.h
@@ -6,6 +6,7 @@
#define FLUTTER_RUNTIME_DART_SERVICE_ISOLATE_H_
#include <functional>
+#include <memory>
#include <mutex>
#include <set>
#include <string>
--- ./flutter/flow/paint_region.h.orig
+++ ./flutter/flow/paint_region.h
@@ -5,6 +5,7 @@
#ifndef FLUTTER_FLOW_PAINT_REGION_H_
#define FLUTTER_FLOW_PAINT_REGION_H_
+#include <memory>
#include <utility>
#include <vector>
#include "flutter/fml/logging.h"
--- ./flutter/vulkan/vulkan_surface.h.orig
+++ ./flutter/vulkan/vulkan_surface.h
@@ -5,6 +5,8 @@
#ifndef FLUTTER_VULKAN_VULKAN_SURFACE_H_
#define FLUTTER_VULKAN_VULKAN_SURFACE_H_
+#include <memory>
+
#include "flutter/fml/macros.h"
#include "flutter/vulkan/procs/vulkan_handle.h"
#include "third_party/skia/include/core/SkSize.h"
--- ./flutter/shell/platform/glfw/flutter_glfw.cc.orig
+++ ./flutter/shell/platform/glfw/flutter_glfw.cc
@@ -7,6 +7,7 @@
#include <GLFW/glfw3.h>
#include <algorithm>
+#include <atomic>
#include <cassert>
#include <chrono>
#include <cstdlib>
--- ./flutter/fml/cpu_affinity.cc.orig
+++ ./flutter/fml/cpu_affinity.cc
@@ -5,6 +5,7 @@
#include "flutter/fml/cpu_affinity.h"
#include "flutter/fml/build_config.h"
+#include <cstdint>
#include <fstream>
#include <optional>
#include <string>
--- ./flutter/fml/cpu_affinity.h.orig
+++ ./flutter/fml/cpu_affinity.h
@@ -4,6 +4,7 @@
#pragma once
+#include <cstdint>
#include <optional>
#include <string>
#include <vector>
--- ./flutter/impeller/geometry/path.h.orig
+++ ./flutter/impeller/geometry/path.h
@@ -6,6 +6,7 @@
#define FLUTTER_IMPELLER_GEOMETRY_PATH_H_
#include <functional>
+#include <memory>
#include <optional>
#include <set>
#include <tuple>
--- ./flutter/impeller/core/runtime_types.h.orig
+++ ./flutter/impeller/core/runtime_types.h
@@ -6,6 +6,7 @@
#define FLUTTER_IMPELLER_CORE_RUNTIME_TYPES_H_
#include <cstddef>
+#include <cstdint>
#include <optional>
#include <string>
#include <vector>
--- ./flutter/impeller/typographer/rectangle_packer.h.orig
+++ ./flutter/impeller/typographer/rectangle_packer.h
@@ -9,6 +9,7 @@
#include "impeller/geometry/scalar.h"
#include <cstdint>
+#include <memory>
namespace impeller {
--- ./flutter/impeller/typographer/rectangle_packer.cc.orig
+++ ./flutter/impeller/typographer/rectangle_packer.cc
@@ -5,6 +5,7 @@
#include "impeller/typographer/rectangle_packer.h"
#include <algorithm>
+#include <memory>
#include <vector>
#include "flutter/fml/logging.h"

View File

@ -1,10 +0,0 @@
--- ./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

@ -1,6 +1,6 @@
--- a/packages/flutter_tools/lib/src/cache.dart
+++ b/packages/flutter_tools/lib/src/cache.dart
@@ -926,26 +926,6 @@
@@ -1009,31 +1010,6 @@
}
Future<bool> checkForArtifacts(String? engineVersion) async {
@ -9,7 +9,10 @@
-
- bool exists = false;
- for (final String pkgName in getPackageDirs()) {
- exists = await cache.doesRemoteExist('Checking package $pkgName is available...', Uri.parse('$url$pkgName.zip'));
- exists = await cache.doesRemoteExist(
- 'Checking package $pkgName is available...',
- Uri.parse('$url$pkgName.zip'),
- );
- if (!exists) {
- return false;
- }
@ -18,8 +21,10 @@
- for (final List<String> toolsDir in getBinaryDirs()) {
- final String cacheDir = toolsDir[0];
- final String urlPath = toolsDir[1];
- exists = await cache.doesRemoteExist('Checking $cacheDir tools are available...',
- Uri.parse(url + urlPath));
- exists = await cache.doesRemoteExist(
- 'Checking $cacheDir tools are available...',
- Uri.parse(url + urlPath),
- );
- if (!exists) {
- return false;
- }
@ -27,12 +32,3 @@
return true;
}
@@ -1036,6 +1016,8 @@
Directory location,
void Function(File, Directory) extractor,
) async {
+ throwToolExit('Tried to download $url. Report on aports.');
+
final String downloadPath = flattenNameSubdirs(url, _fileSystem);
final File tempFile = _createDownloadFile(downloadPath);
Status status;

View File

@ -0,0 +1,13 @@
--- ./flutter/tools/pub_get_offline.py.orig
+++ ./flutter/tools/pub_get_offline.py
@@ -148,10 +148,6 @@
SRC_ROOT, 'flutter', 'third_party', 'dart', 'tools', 'sdks', 'dart-sdk', 'bin'
)
- # Delete all package_config.json files. These may be stale.
- # Required ones will be regenerated fresh below.
- delete_config_files()
-
# Ensure all relevant packages are listed in ALL_PACKAGES.
unlisted = find_unlisted_packages()
if len(unlisted) > 0:

View File

@ -1,21 +1,15 @@
Thanks a lot, Braid
--- ./packages/flutter_tools/bin/tool_backend.dart.orig
+++ ./packages/flutter_tools/bin/tool_backend.dart
@@ -69,12 +69,9 @@
@@ -73,7 +73,7 @@
exit(1);
}
final String flutterExecutable = pathJoin(<String>[
- flutterRoot,
+ '/usr',
'bin',
- if (Platform.isWindows)
- 'flutter.bat'
- else
- 'flutter',
+ 'flutter',
if (Platform.isWindows) 'flutter.bat' else 'flutter',
]);
final String bundlePlatform = targetPlatform.startsWith('windows') ? 'windows' : targetPlatform;
final String target = '${buildMode}_bundle_${bundlePlatform}_assets';
--- ./packages/flutter_tools/bin/tool_backend.sh.orig
+++ ./packages/flutter_tools/bin/tool_backend.sh
@@ -3,7 +3,4 @@
@ -43,15 +37,15 @@ Thanks a lot, Braid
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+import 'dart:io' as io show Platform;
+
import 'package:file/memory.dart';
import 'package:meta/meta.dart';
import 'package:process/process.dart';
@@ -1176,50 +1176,7 @@
@@ -1463,60 +1465,9 @@
}
String _getDartSdkPath() {
- final String builtPath = _fileSystem.path.join(_hostEngineOutPath, 'dart-sdk');
- if (_fileSystem.isDirectorySync(_fileSystem.path.join(builtPath, 'bin'))) {
@ -59,16 +53,25 @@ Thanks a lot, Braid
- }
-
- // If we couldn't find a built dart sdk, let's look for a prebuilt one.
- final String prebuiltPath = _fileSystem.path.join(_getFlutterPrebuiltsPath(), _getPrebuiltTarget(), 'dart-sdk');
- final String prebuiltPath = _fileSystem.path.join(
- _getFlutterPrebuiltsPath(),
- _getPrebuiltTarget(),
- 'dart-sdk',
- );
- if (_fileSystem.isDirectorySync(prebuiltPath)) {
- return prebuiltPath;
- }
-
- throw ToolExit('Unable to find a built dart sdk at: "$builtPath" or a prebuilt dart sdk at: "$prebuiltPath"');
- }
-
- throwToolExit(
- 'Unable to find a built dart sdk at: "$builtPath" or a prebuilt dart sdk at: "$prebuiltPath"',
- );
+ return io.Platform.environment['DART_ROOT'] ?? '/usr/lib/dart';
}
- String _getFlutterPrebuiltsPath() {
- final String engineSrcPath = _fileSystem.path.dirname(_fileSystem.path.dirname(_hostEngineOutPath));
- final String engineSrcPath = _fileSystem.path.dirname(
- _fileSystem.path.dirname(_hostEngineOutPath),
- );
- return _fileSystem.path.join(engineSrcPath, 'flutter', 'prebuilts');
- }
-
@ -97,18 +100,19 @@ Thanks a lot, Braid
- case TargetPlatform.tester:
- throwToolExit('Unsupported host platform: $hostPlatform');
- }
+ return io.Platform.environment['DART_ROOT'] ?? '/usr/lib/dart';
}
- }
-
String _getFlutterWebSdkPath() {
@@ -1382,7 +1343,7 @@
return _fileSystem.path.join(localEngineInfo.targetOutPath, 'flutter_web_sdk');
}
@@ -1889,7 +1840,7 @@
/// Locate the Dart SDK.
String _dartSdkPath(Cache cache) {
- return cache.getRoot().childDirectory('dart-sdk').path;
+ return io.Platform.environment['DART_ROOT'] ?? '/usr/lib/dart';
}
class _TestArtifacts implements Artifacts {
--- ./packages/flutter_tools/lib/src/cache.dart.orig
+++ ./packages/flutter_tools/lib/src/cache.dart
@ -177,18 +181,24 @@ Thanks a lot, Braid
+++ ./packages/flutter_tools/lib/src/dart/language_version.dart
@@ -3,6 +3,7 @@
// found in the LICENSE file.
import 'dart:async';
+import 'dart:io' as io show Platform;
import 'package:file/file.dart';
import 'package:package_config/package_config.dart';
@@ -26,7 +27,7 @@
}
@@ -27,7 +28,13 @@
// Either reading the file or parsing the version could fail on a corrupt Dart SDK.
// let it crash so it shows up in crash logging.
- final File versionFile = fileSystem.file(fileSystem.path.join(flutterRoot, 'bin', 'cache', 'dart-sdk', 'version'));
+ final File versionFile = fileSystem.file(io.Platform.environment['DART_ROOT'] ?? '/usr/lib/dart');
final File versionFile = fileSystem.file(
- fileSystem.path.join(flutterRoot, 'bin', 'cache', 'dart-sdk', 'version'),
+ fileSystem.path.join(
+ io.Platform.environment['DART_ROOT'] ?? '/usr/lib/dart',
+ 'bin',
+ 'cache',
+ 'dart-sdk',
+ 'version',
+ ),
);
if (!versionFile.existsSync() && _inUnitTest()) {
return LanguageVersion(2, 12);
}

View File

@ -39,8 +39,8 @@ index 90dc09a0c02..8f88873dc18 100644
]
extra_deps = [
- ":icudtl_cc",
"..:libdart_precompiled_runtime",
"../platform:libdart_platform_precompiled_runtime",
"..:libdart_aotruntime",
"../platform:libdart_platform_aotruntime",
]
+ if (dart_embed_icu_data) {
+ extra_deps += [ ":icudtl_cc" ]

View File

@ -54,15 +54,15 @@ diff --git a/flutter/impeller/toolkit/interop/typography_context.cc b/flutter/im
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>
@@ -9,7 +9,6 @@
#include "flutter/fml/icu_util.h"
#include "flutter/third_party/txt/src/txt/platform.h"
#include "impeller/base/validation.h"
-#include "impeller/toolkit/interop/embedded_icu_data.h"
namespace impeller::interop {
@@ -15,9 +14,7 @@
@@ -17,9 +16,7 @@
: collection_(std::make_shared<txt::FontCollection>()) {
static std::once_flag sICUInitOnceFlag;
std::call_once(sICUInitOnceFlag, []() {
@ -71,5 +71,5 @@ index ed863fa61e..737d087907 100644
- fml::icu::InitializeICUFromMapping(std::move(icu_data));
+ fml::icu::InitializeICU("/usr/lib/flutter/icudtl.dat");
});
// The fallback for all fonts. Looks in platform specific locations.
collection_->SetupDefaultFontManager(0u);
}

View File

@ -1,21 +1,22 @@
--- a/packages/flutter_tools/lib/src/build_system/targets/linux.dart
+++ b/packages/flutter_tools/lib/src/build_system/targets/linux.dart
@@ -19,7 +19,6 @@
@@ -18,7 +18,7 @@
import 'native_assets.dart';
/// The only files/subdirectories we care out.
const List<String> _kLinuxArtifacts = <String>[
- 'libflutter_linux_gtk.so',
];
-const List<String> _kLinuxArtifacts = <String>['libflutter_linux_gtk.so'];
+const List<String> _kLinuxArtifacts = <String>[];
const String _kLinuxDepfile = 'linux_engine_sources.d';
@@ -79,10 +78,6 @@
@@ -76,10 +76,6 @@
outputDirectory: outputDirectory,
artifacts: _kLinuxArtifacts,
clientSourcePaths: <String>[headersPath],
- icuDataPath: environment.artifacts.getArtifactPath(
- Artifact.icuData,
- platform: targetPlatform,
- )
- ),
);
final DepfileService depfileService = DepfileService(
fileSystem: environment.fileSystem,
environment.depFileService.writeToFile(depfile, environment.buildDir.childFile(_kLinuxDepfile));
}

View File

@ -1,6 +1,6 @@
--- ./packages/flutter_tools/lib/src/version.dart.orig
+++ ./packages/flutter_tools/lib/src/version.dart
@@ -91,7 +91,7 @@
@@ -76,7 +76,7 @@
}) {
final File versionFile = getVersionFile(fs, flutterRoot);
@ -9,7 +9,7 @@
final _FlutterVersionFromFile? version = _FlutterVersionFromFile.tryParseFromFile(
versionFile,
flutterRoot: flutterRoot,
@@ -110,11 +110,7 @@
@@ -95,11 +95,7 @@
}
}
@ -22,16 +22,17 @@
return FlutterVersion.fromRevision(
clock: clock,
@@ -145,7 +141,7 @@
@@ -127,7 +123,8 @@
workingDirectory: flutterRoot,
fetchTags: fetchTags,
);
- final String frameworkVersion = gitTagVersion.frameworkVersionFor(frameworkRevision);
+ final String frameworkVersion = globals.fs.file(globals.fs.path.join(Cache.flutterRoot!, 'version')).readAsStringSync();
+ final String frameworkVersion =
+ globals.fs.file(globals.fs.path.join(Cache.flutterRoot!, 'version')).readAsStringSync();
return _FlutterVersionGit._(
clock: clock,
flutterRoot: flutterRoot,
@@ -217,11 +213,7 @@
@@ -192,11 +189,7 @@
// TODO(fujino): calculate this relative to frameworkCommitDate for
// _FlutterVersionFromFile so we don't need a git call.
String get frameworkAge {
@ -44,12 +45,15 @@
}
void ensureVersionFile();
@@ -301,43 +293,7 @@
@@ -281,44 +274,7 @@
/// Returns null if the cached version is out-of-date or missing, and we are
/// unable to reach the server to get the latest version.
Future<DateTime?> _getLatestAvailableFlutterDate() async {
- globals.cache.checkLockAcquired();
- final VersionCheckStamp versionCheckStamp = await VersionCheckStamp.load(globals.cache, globals.logger);
- final VersionCheckStamp versionCheckStamp = await VersionCheckStamp.load(
- globals.cache,
- globals.logger,
- );
-
- final DateTime now = _clock.now();
- if (versionCheckStamp.lastTimeVersionWasChecked != null) {
@ -80,16 +84,14 @@
- globals.printTrace('Failed to check Flutter version in the remote repository: $error');
- // Still update the timestamp to avoid us hitting the server on every single
- // command if for some reason we cannot connect (eg. we may be offline).
- await versionCheckStamp.store(
- newTimeVersionWasChecked: now,
- );
- await versionCheckStamp.store(newTimeVersionWasChecked: now);
- return null;
- }
+ return null;
}
/// The date of the latest framework commit in the remote repository.
@@ -421,32 +377,13 @@
@@ -404,30 +360,13 @@
bool lenient = false,
required String? workingDirectory,
}) {
@ -103,94 +105,95 @@
- try {
- // Don't plumb 'lenient' through directly so that we can print an error
- // if something goes wrong.
- return _runSync(
- args,
- lenient: false,
- workingDirectory: workingDirectory,
- );
- return _runSync(args, lenient: false, workingDirectory: workingDirectory);
- } on VersionCheckError catch (e) {
- if (lenient) {
- final DateTime dummyDate = DateTime.fromMillisecondsSinceEpoch(0);
- globals.printError('Failed to find the latest git commit date: $e\n'
- 'Returning $dummyDate instead.');
- globals.printError(
- 'Failed to find the latest git commit date: $e\n'
- 'Returning $dummyDate instead.',
- );
- // Return something that DateTime.parse() can parse.
- return dummyDate.toString();
- } else {
- rethrow;
- }
- }
+ final File versionFile = globals.fs.file(globals.fs.path.join(workingDirectory!, 'bin', 'cache', 'flutter.version.json'));
+ final File versionFile = globals.fs.file(
+ globals.fs.path.join(workingDirectory!, 'bin', 'cache', 'flutter.version.json'),
+ );
+
+ final _FlutterVersionFromFile version = _FlutterVersionFromFile.tryParseFromFile(
+ versionFile,
+ flutterRoot: workingDirectory,
+ )!;
+ final _FlutterVersionFromFile version =
+ _FlutterVersionFromFile.tryParseFromFile(versionFile, flutterRoot: workingDirectory)!;
+ return version.frameworkCommitDate;
}
class _FlutterVersionFromFile extends FlutterVersion {
@@ -472,11 +472,6 @@
@@ -513,9 +452,7 @@
final String devToolsVersion;
@override
void ensureVersionFile() {
- _ensureLegacyVersionFile(
- fs: fs,
- flutterRoot: flutterRoot,
- frameworkVersion: frameworkVersion,
- );
}
- void ensureVersionFile() {
- _ensureLegacyVersionFile(fs: fs, flutterRoot: flutterRoot, frameworkVersion: frameworkVersion);
- }
+ void ensureVersionFile() {}
}
@@ -544,17 +539,6 @@
class _FlutterVersionGit extends FlutterVersion {
@@ -586,27 +523,14 @@
}
@override
void ensureVersionFile() {
- _ensureLegacyVersionFile(
- fs: fs,
- flutterRoot: flutterRoot,
- frameworkVersion: frameworkVersion,
- );
- void ensureVersionFile() {
- _ensureLegacyVersionFile(fs: fs, flutterRoot: flutterRoot, frameworkVersion: frameworkVersion);
-
- const JsonEncoder encoder = JsonEncoder.withIndent(' ');
- final File newVersionFile = FlutterVersion.getVersionFile(fs, flutterRoot);
- if (!newVersionFile.existsSync()) {
- newVersionFile.writeAsStringSync(encoder.convert(toJson()));
- }
}
- }
+ void ensureVersionFile() {}
}
@@ -563,10 +547,6 @@
void _ensureLegacyVersionFile({
required FileSystem fs,
required String flutterRoot,
required String frameworkVersion,
}) {
-}) {
- final File legacyVersionFile = fs.file(fs.path.join(flutterRoot, 'version'));
- if (!legacyVersionFile.existsSync()) {
- legacyVersionFile.writeAsStringSync(frameworkVersion);
- }
}
-}
+}) {}
/// Checks if the provided [version] is tracking a standard remote.
@@ -639,49 +566,7 @@
///
@@ -632,52 +556,6 @@
///
/// Returns [VersionCheckError] if the tracking remote is not standard.
VersionCheckError? run(){
VersionCheckError? run() {
- final String? flutterGit = platform.environment['FLUTTER_GIT_URL'];
- final String? repositoryUrl = version.repositoryUrl;
-
- if (repositoryUrl == null) {
- return VersionCheckError(
- 'The tool could not determine the remote upstream which is being '
- 'tracked by the SDK.'
- 'tracked by the SDK.',
- );
- }
-
- // Strip `.git` suffix before comparing the remotes
- final List<String> sanitizedStandardRemotes = <String>[
- // If `FLUTTER_GIT_URL` is set, use that as standard remote.
- if (flutterGit != null) flutterGit
- // Else use the predefined standard remotes.
- else ..._standardRemotes,
- ].map((String remote) => stripDotGit(remote)).toList();
- final List<String> sanitizedStandardRemotes =
- <String>[
- // If `FLUTTER_GIT_URL` is set, use that as standard remote.
- if (flutterGit != null)
- flutterGit
- // Else use the predefined standard remotes.
- else
- ..._standardRemotes,
- ].map((String remote) => stripDotGit(remote)).toList();
-
- final String sanitizedRepositoryUrl = stripDotGit(repositoryUrl);
-
@ -205,7 +208,7 @@
- 'Either remove "FLUTTER_GIT_URL" from the environment or set it to '
- '"$repositoryUrl". '
- 'If this is intentional, it is recommended to use "git" directly to '
- 'manage the SDK.'
- 'manage the SDK.',
- );
- }
- // If `FLUTTER_GIT_URL` is unset, inform to set the environment variable.
@ -214,26 +217,22 @@
- 'Set the environment variable "FLUTTER_GIT_URL" to '
- '"$repositoryUrl". '
- 'If this is intentional, it is recommended to use "git" directly to '
- 'manage the SDK.'
- 'manage the SDK.',
- );
- }
+ // the worse shit any code says about us, the worse for that code.
return null;
}
@@ -853,10 +738,7 @@
@@ -844,7 +722,7 @@
}
String _runGit(String command, ProcessUtils processUtils, String? workingDirectory) {
- return processUtils.runSync(
- command.split(' '),
- workingDirectory: workingDirectory,
- ).stdout.trim();
- return processUtils.runSync(command.split(' '), workingDirectory: workingDirectory).stdout.trim();
+ return '';
}
/// Runs [command] in the root of the Flutter installation and returns the
@@ -880,7 +762,7 @@
@@ -871,7 +749,7 @@
if (revision == null) {
return '';
}
@ -242,22 +241,30 @@
}
/// Version of Flutter SDK parsed from Git.
@@ -941,42 +823,10 @@
@@ -932,46 +810,10 @@
bool fetchTags = false,
String gitRef = 'HEAD'
String gitRef = 'HEAD',
}) {
- if (fetchTags) {
- final String channel = _runGit('git symbolic-ref --short HEAD', processUtils, workingDirectory);
- final String channel = _runGit(
- 'git symbolic-ref --short HEAD',
- processUtils,
- workingDirectory,
- );
- if (!kDevelopmentChannels.contains(channel) && kOfficialChannels.contains(channel)) {
- globals.printTrace('Skipping request to fetchTags - on well known channel $channel.');
- } else {
- final String flutterGit = platform.environment['FLUTTER_GIT_URL'] ?? 'https://github.com/flutter/flutter.git';
- final String flutterGit =
- platform.environment['FLUTTER_GIT_URL'] ?? 'https://github.com/flutter/flutter.git';
- _runGit('git fetch $flutterGit --tags -f', processUtils, workingDirectory);
- }
- }
- // find all tags attached to the given [gitRef]
- final List<String> tags = _runGit(
- 'git tag --points-at $gitRef', processUtils, workingDirectory).trim().split('\n');
- 'git tag --points-at $gitRef',
- processUtils,
- workingDirectory,
- ).trim().split('\n');
-
- // Check first for a stable tag
- final RegExp stableTagPattern = RegExp(r'^\d+\.\d+\.\d+$');
@ -277,12 +284,8 @@
// If we're not currently on a tag, use git describe to find the most
// recent tag and number of commits past.
return parse(
- _runGit(
- 'git describe --match *.*.* --long --tags $gitRef',
- processUtils,
- workingDirectory,
- )
+ globals.fs.file(globals.fs.path.join(Cache.flutterRoot!, 'version')).readAsStringSync()
- _runGit('git describe --match *.*.* --long --tags $gitRef', processUtils, workingDirectory),
+ globals.fs.file(globals.fs.path.join(Cache.flutterRoot!, 'version')).readAsStringSync(),
);
}