summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThe one with the braid2024-03-24 23:01:51 +0100
committerThe one with the braid2024-03-24 23:01:51 +0100
commit7216ed6b51d0746620796673871dddad7b704bb2 (patch)
treea57f113593f9b487f15c1e4b077d643b81d9905f
parent2942f591ec73f3a8c132cd77a1331507dc581475 (diff)
downloadaur-7216ed6b51d0746620796673871dddad7b704bb2.tar.gz
refactor: complete package rewrite
Signed-off-by: The one with the braid <info@braid.business>
-rw-r--r--.SRCINFO106
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD286
-rw-r--r--doctor.patch17
-rw-r--r--flutter.csh2
-rw-r--r--flutter.install16
-rwxr-xr-x[-rw-r--r--]flutter.sh26
-rw-r--r--no-lock.patch19
-rw-r--r--no-runtime-download.patch38
-rw-r--r--opt-in-analytics.patch22
-rw-r--r--system-dart.patch162
-rwxr-xr-xupdate-artifact-versions.sh15
-rw-r--r--version.patch298
13 files changed, 956 insertions, 54 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 091007f4c992..50e8afe9a502 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -9,6 +9,9 @@ pkgbase = flutter
license = custom
license = BSD
license = CCPL
+ makedepends = jq
+ depends = dart>=3.3.1
+ depends = gradle
depends = bash
depends = curl
depends = file
@@ -30,14 +33,103 @@ pkgbase = flutter
optdepends = ninja: ninja is required for Linux development
optdepends = pkgconf: pkg-config is required for Linux development
optdepends = gtk3: GTK 3.0 development libraries are required for Linux development
+ noextract = material_fonts.zip
+ noextract = android-arm-profile-linux.zip
+ noextract = android-arm-release-linux.zip
+ noextract = android-arm64-profile-linux.zip
+ noextract = android-arm64-release-linux.zip
+ noextract = android-x64-profile-linux.zip
+ noextract = android-x64-release-linux.zip
+ noextract = android-x86.zip
+ noextract = android-x64.zip
+ noextract = android-arm.zip
+ noextract = android-arm-profile.zip
+ noextract = android-arm-release.zip
+ noextract = android-arm64.zip
+ noextract = android-arm64-profile.zip
+ noextract = android-arm64-release.zip
+ noextract = android-x64-profile.zip
+ noextract = android-x64-release.zip
+ noextract = android-x64-jit-release.zip
+ noextract = flutter_web_sdk.zip
+ noextract = sky_engine.zip
+ noextract = flutter_patched_sdk.zip
+ noextract = flutter_patched_sdk_product.zip
+ noextract = engine-x64.zip
+ noextract = gtk-debug-x64.zip
+ noextract = gtk-profile-x64.zip
+ noextract = gtk-release-x64.zip
+ noextract = font-subset.zip
options = !emptydirs
- backup = opt/flutter/packages/flutter_test/pubspec.yaml
- backup = opt/flutter/packages/flutter/pubspec.yaml
- source = flutter-3.19.3.tar.xz::https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.19.3-stable.tar.xz
+ source = flutter-3.19.3.tar.xz::https://github.com/flutter/flutter/archive/refs/tags/3.19.3.tar.gz
+ source = material_fonts.zip::https://storage.googleapis.com/flutter_infra_release/flutter/fonts/3012db47f3130e62f7cc0beabff968a33cbec8d8/fonts.zip
+ source = android-arm-profile-linux.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/android-arm-profile/linux-x64.zip
+ source = android-arm-release-linux.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/android-arm-release/linux-x64.zip
+ source = android-arm64-profile-linux.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/android-arm64-profile/linux-x64.zip
+ source = android-arm64-release-linux.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/android-arm64-release/linux-x64.zip
+ source = android-x64-profile-linux.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/android-x64-profile/linux-x64.zip
+ source = android-x64-release-linux.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/android-x64-release/linux-x64.zip
+ source = android-x86.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/android-x86/artifacts.zip
+ source = android-x64.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/android-x64/artifacts.zip
+ source = android-arm.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/android-arm/artifacts.zip
+ source = android-arm-profile.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/android-arm-profile/artifacts.zip
+ source = android-arm-release.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/android-arm-release/artifacts.zip
+ source = android-arm64.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/android-arm64/artifacts.zip
+ source = android-arm64-profile.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/android-arm64-profile/artifacts.zip
+ source = android-arm64-release.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/android-arm64-release/artifacts.zip
+ source = android-x64-profile.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/android-x64-profile/artifacts.zip
+ source = android-x64-release.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/android-x64-release/artifacts.zip
+ source = android-x64-jit-release.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/android-x86-jit-release/artifacts.zip
+ source = flutter_web_sdk.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/flutter-web-sdk.zip
+ source = sky_engine.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/sky_engine.zip
+ source = flutter_patched_sdk.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/flutter_patched_sdk.zip
+ source = flutter_patched_sdk_product.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/flutter_patched_sdk_product.zip
+ source = engine-x64.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/linux-x64/artifacts.zip
+ source = gtk-debug-x64.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/linux-x64-debug/linux-x64-flutter-gtk.zip
+ source = gtk-profile-x64.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/linux-x64-profile/linux-x64-flutter-gtk.zip
+ source = gtk-release-x64.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/linux-x64-release/linux-x64-flutter-gtk.zip
+ source = font-subset.zip::https://storage.googleapis.com/flutter_infra_release/flutter/2e4ba9c6fb499ccd4e81420543783cc7267ae406/linux-x64/font-subset.zip
source = flutter.sh
- source = flutter.csh
- sha256sums = ddb712be586281afd51a3f96db3681f99f242278201e0ae3322c03706e4004ad
- sha256sums = 1dea1952d386c43948b9970382c2da5b65b7870684b8ad2ad89124e873aa485a
- sha256sums = 7ef10d753cfaac52d243549764a793f44f8284a1f4b11715ccd2fa915b026a6f
+ source = version.patch
+ source = system-dart.patch
+ source = no-lock.patch
+ source = no-runtime-download.patch
+ source = doctor.patch
+ source = opt-in-analytics.patch
+ sha256sums = f6d9a4300799c0482ae499506ef53361f150fecdb4ef7fd5bb8615a97db09c18
+ sha256sums = e56fa8e9bb4589fde964be3de451f3e5b251e4a1eafb1dc98d94add034dd5a86
+ sha256sums = 9df5519f282add92e9b7e65e8a2d3c1fc59c44501ab9e49b05d8eb9ed88eda22
+ sha256sums = ce428acfd906305009d923110cca685a4d7a53aa01f3c68bc30a46cf7007a53d
+ sha256sums = 9d8f7dc5da13a290ca5268ce422dc229a20a3187144ef7ddf770ef58deccf9f3
+ sha256sums = cdcbab0bc73417699d02eb52d51086cd85a9864befa79367d63ae6f6c4e6b0b9
+ sha256sums = 32c549ebd1bd3f69ae6e06e28a0d15b1c889d3d4853d8c14b3857198a8c810c5
+ sha256sums = 26010429cc90306f30f0228bc93dd672781d6c5812d3d47ebcafbd352a370c34
+ sha256sums = 678b48bbece6258dcea2ad75d77fcf5e2f06a1d36fa574aeb72c533ac5f2d2cb
+ sha256sums = 9f07e8ad3ae060f77a51977f5a8a69046347c91b7a4912f1341fb1cc4931b940
+ sha256sums = da574374daa9426022e1ec8051fd2b70bc19d041ed36fa73f979a2deab542d7d
+ sha256sums = d3977435a04b419f8eeac61400bec1d2fd126767c7efe09906c3020bd2d521fa
+ sha256sums = 710228c4038259f5a1f9d1b185c06e95fb52b843239d8236fb87dfd3dab6de25
+ sha256sums = be3a0590b3154d207e47848c6291bb9dbeb689f8bebece51e20691fde0f45725
+ sha256sums = 1137124ebab42e0ba894fdb61c1f276aa1c3e349acec7e9f8d2df7142c35ef5a
+ sha256sums = 213e3e250fae3e5990e4498991510116d3823c6f76bcc788ff5b00568a7df355
+ sha256sums = 89f11f867aa595e95b66f252ff6d36be5c19b0cc16c1fab1521899557f1607fb
+ sha256sums = d69da3173a9c1e2006d4af5ab4db513b3be37547fab508dcde064438cef853bf
+ sha256sums = 941d88252aaa440f5dcb30e94905af2e5082e687e1a9d8945af272e411cd6cbe
+ sha256sums = e056c8bbe885e311459882428166fdc5cadab58c2d7846c0ac9219de56b9c84b
+ sha256sums = f54dfd037abab488994da87d605c9f0fa2d4286e988d13a3d80b95e0ad43b684
+ sha256sums = b9309b103b4f47d3309c5ca20faac8ae83d62efb08af92429e1109168406181f
+ sha256sums = cfb930fb2c4fff0e6501319b2fda9a4de514ee69de39c3291ff1f99126849a85
+ sha256sums = 3d9e78fd013988741ad4f501e0eca9cf4054a23edc07b3524b4312b8c0a11ab7
+ sha256sums = d2d07ea444cc8b45fa09354978ffb25ddfe4d2d653f799a7095ed2aa98dde36a
+ sha256sums = ceb71fb844b7011a61c7a8294ba616915c6f9c84c72a397f4981aeb0092e6bc6
+ sha256sums = 3657a21f8ad7851c3293eba6701a3c682ad7604aaba9714e6b5877aae7861e46
+ sha256sums = 87c074449d4a76e7e0c1913d7361fca8c9d0573233b3996b56b3fc05d3ba0cf9
+ sha256sums = 54db9347ac6467b806fff70f62b2709276a0ca4d82468ae8357d5520db0ad04a
+ sha256sums = 688a7d6a3c220cf09f7e48af46f1ef1b01d251679962c825eded0b3fa4fc2ab1
+ sha256sums = a5516dda7451eec10a2c0069f5a2e01c6de63a16332c3e2d8a94e27b520f8d9e
+ sha256sums = 544d08716332a9f9358b21010d468b84a9edff0da7bbb1baf0cf4d6322821ea5
+ sha256sums = a5f19e68e9e4790d017dc4988e715f51c44548df5615aae6106d1a0c84fe49f1
+ sha256sums = 04531ee1732c18c933b5b28f5da88ed183d5aa3698b1d1e912c000928b93ec91
+ sha256sums = 1578e819b6ee479b6db7a095bcfa74372d3ff555642c6d6ea7112e97bb6f2027
pkgname = flutter
diff --git a/.gitignore b/.gitignore
index 0be8abaac2f8..a9c60eb9c399 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,6 @@ flutter-*.log
PKGBUILD-namcap.log
pkg/
src/
+*.zip
+*.tar.gz
+*.idea
diff --git a/PKGBUILD b/PKGBUILD
index b76226fb0014..d7f371f7c9b4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,12 +4,21 @@
pkgname=flutter
pkgver=3.19.3
+_dartver=3.3.1
+_enginever=2e4ba9c6fb499ccd4e81420543783cc7267ae406
+_materialfontsver=3012db47f3130e62f7cc0beabff968a33cbec8d8
+_gradlewver=fd5c1f2c013565a3bea56ada6df9d2b8e96d56aa
+_flutterarch=$(uname -m | sed s/aarch64/arm64/ | sed s/x86_64/x64/)
pkgrel=1
pkgdesc="A new mobile app SDK to help developers and designers build modern mobile apps for iOS and Android."
arch=("x86_64" "aarch64")
url="https://${pkgname}.dev"
license=("custom" "BSD" "CCPL")
-depends=( # commands first
+depends=(
+ "dart>=${_dartver}"
+ # instead of bundled Gradle Wrapper
+ "gradle"
+ # commands first
"bash"
"curl"
"file" # base-devel, but runtime dependency
@@ -23,6 +32,7 @@ depends=( # commands first
"glu" # libGLU.so.1 required for flutter test
"libglvnd" # https://github.com/flutter/engine/pull/16924
)
+makedepends=("jq")
optdepends=("android-sdk: develop for Android devices"
"java-environment: develop for Android devices"
"android-studio"
@@ -33,45 +43,263 @@ optdepends=("android-sdk: develop for Android devices"
"ninja: ninja is required for Linux development"
"pkgconf: pkg-config is required for Linux development" # base-devel, but runtime dependency
"gtk3: GTK 3.0 development libraries are required for Linux development")
-backup=("opt/${pkgname}/packages/${pkgname}_test/pubspec.yaml" "opt/${pkgname}/packages/${pkgname}/pubspec.yaml")
options=("!emptydirs")
install="${pkgname}.install"
source=(
- "${pkgname}-${pkgver}.tar.xz::https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/${pkgname}_linux_${pkgver/.hotfix/+hotfix}-stable.tar.xz"
+ "${pkgname}-${pkgver}.tar.xz::https://github.com/${pkgname}/${pkgname}/archive/refs/tags/${pkgver/.hotfix/+hotfix}.tar.gz"
+ # material_fonts
+ "material_fonts.zip::https://storage.googleapis.com/flutter_infra_release/flutter/fonts/${_materialfontsver}/fonts.zip"
+ # gradle_wrapper
+ # we use the arch system gradle to create that one
+ # "gradle_wrapper.tar.gz::https://storage.googleapis.com/flutter_infra_release/gradle-wrapper/${_gradlewver}/gradle-wrapper.tgz"
+
+ # engine/android-arm-profile/linux-x64
+ "android-arm-profile-linux.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/android-arm-profile/linux-x64.zip"
+ # engine/android-arm-release/linux-x64
+ "android-arm-release-linux.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/android-arm-release/linux-x64.zip"
+ # engine/android-arm64-profile/linux-x64
+ "android-arm64-profile-linux.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/android-arm64-profile/linux-x64.zip"
+ # engine/android-arm64-release/linux-x64
+ "android-arm64-release-linux.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/android-arm64-release/linux-x64.zip"
+ # engine/android-x64-profile/linux-x64
+ "android-x64-profile-linux.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/android-x64-profile/linux-x64.zip"
+ # engine/android-x64-release/linux-x64
+ "android-x64-release-linux.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/android-x64-release/linux-x64.zip"
+
+ # engine/android-x86
+ "android-x86.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/android-x86/artifacts.zip"
+ # engine/android-x64
+ "android-x64.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/android-x64/artifacts.zip"
+ # engine/android-arm
+ "android-arm.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/android-arm/artifacts.zip"
+ # engine/android-arm-profile
+ "android-arm-profile.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/android-arm-profile/artifacts.zip"
+ # engine/android-arm-release
+ "android-arm-release.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/android-arm-release/artifacts.zip"
+ # engine/android-arm64
+ "android-arm64.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/android-arm64/artifacts.zip"
+ # engine/android-arm64-profile
+ "android-arm64-profile.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/android-arm64-profile/artifacts.zip"
+ # engine/android-arm64-release
+ "android-arm64-release.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/android-arm64-release/artifacts.zip"
+
+ # engine/android-x64-profile
+ "android-x64-profile.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/android-x64-profile/artifacts.zip"
+ # engine/android-x64-release
+ "android-x64-release.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/android-x64-release/artifacts.zip"
+ # engine/android-x86-jit-release
+ "android-x64-jit-release.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/android-x86-jit-release/artifacts.zip"
+
+ # flutter_web_sdk
+ "flutter_web_sdk.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/flutter-web-sdk.zip"
+ # pkg
+ "sky_engine.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/sky_engine.zip"
+
+ # engine/common
+ "flutter_patched_sdk.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/flutter_patched_sdk.zip"
+ # engine/common
+ "flutter_patched_sdk_product.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/flutter_patched_sdk_product.zip"
+
+ # engine/linux-$ARCH
+ "engine-${_flutterarch}.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/linux-${_flutterarch}/artifacts.zip"
+ # engine/linux-$ARCH
+ "gtk-debug-${_flutterarch}.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/linux-${_flutterarch}-debug/linux-${_flutterarch}-flutter-gtk.zip"
+ # engine/linux-$ARCH-profile
+ "gtk-profile-${_flutterarch}.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/linux-${_flutterarch}-profile/linux-${_flutterarch}-flutter-gtk.zip"
+ # engine/linux-$ARCH-release
+ "gtk-release-${_flutterarch}.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/linux-${_flutterarch}-release/linux-${_flutterarch}-flutter-gtk.zip"
+ # engine/linux-$ARCH
+ "font-subset.zip::https://storage.googleapis.com/flutter_infra_release/flutter/${_enginever}/linux-${_flutterarch}/font-subset.zip"
+
+ # thanks to lauren n. liberda from Alpine for the awesome patchset used here !
"${pkgname}.sh"
- "${pkgname}.csh"
+ "version.patch"
+ "system-dart.patch"
+ "no-lock.patch"
+ "no-runtime-download.patch"
+ "doctor.patch"
+ "opt-in-analytics.patch"
)
-sha256sums=('ddb712be586281afd51a3f96db3681f99f242278201e0ae3322c03706e4004ad'
- '1dea1952d386c43948b9970382c2da5b65b7870684b8ad2ad89124e873aa485a'
- '7ef10d753cfaac52d243549764a793f44f8284a1f4b11715ccd2fa915b026a6f')
+noextract=(
+ "material_fonts.zip"
+ # "gradle_wrapper.tar.gz"
+
+ "android-arm-profile-linux.zip"
+ "android-arm-release-linux.zip"
+ "android-arm64-profile-linux.zip"
+ "android-arm64-release-linux.zip"
+ "android-x64-profile-linux.zip"
+ "android-x64-release-linux.zip"
+
+ "android-x86.zip"
+ "android-x64.zip"
+ "android-arm.zip"
+ "android-arm-profile.zip"
+ "android-arm-release.zip"
+ "android-arm64.zip"
+ "android-arm64-profile.zip"
+ "android-arm64-release.zip"
+
+ "android-x64-profile.zip"
+ "android-x64-release.zip"
+ "android-x64-jit-release.zip"
+
+ "flutter_web_sdk.zip"
+ "sky_engine.zip"
+ "flutter_patched_sdk.zip"
+ "flutter_patched_sdk_product.zip"
+
+ "engine-${_flutterarch}.zip"
+ "gtk-debug-${_flutterarch}.zip"
+ "gtk-profile-${_flutterarch}.zip"
+ "gtk-release-${_flutterarch}.zip"
+ "font-subset.zip"
+)
+sha256sums=('f6d9a4300799c0482ae499506ef53361f150fecdb4ef7fd5bb8615a97db09c18'
+ 'e56fa8e9bb4589fde964be3de451f3e5b251e4a1eafb1dc98d94add034dd5a86'
+ '9df5519f282add92e9b7e65e8a2d3c1fc59c44501ab9e49b05d8eb9ed88eda22'
+ 'ce428acfd906305009d923110cca685a4d7a53aa01f3c68bc30a46cf7007a53d'
+ '9d8f7dc5da13a290ca5268ce422dc229a20a3187144ef7ddf770ef58deccf9f3'
+ 'cdcbab0bc73417699d02eb52d51086cd85a9864befa79367d63ae6f6c4e6b0b9'
+ '32c549ebd1bd3f69ae6e06e28a0d15b1c889d3d4853d8c14b3857198a8c810c5'
+ '26010429cc90306f30f0228bc93dd672781d6c5812d3d47ebcafbd352a370c34'
+ '678b48bbece6258dcea2ad75d77fcf5e2f06a1d36fa574aeb72c533ac5f2d2cb'
+ '9f07e8ad3ae060f77a51977f5a8a69046347c91b7a4912f1341fb1cc4931b940'
+ 'da574374daa9426022e1ec8051fd2b70bc19d041ed36fa73f979a2deab542d7d'
+ 'd3977435a04b419f8eeac61400bec1d2fd126767c7efe09906c3020bd2d521fa'
+ '710228c4038259f5a1f9d1b185c06e95fb52b843239d8236fb87dfd3dab6de25'
+ 'be3a0590b3154d207e47848c6291bb9dbeb689f8bebece51e20691fde0f45725'
+ '1137124ebab42e0ba894fdb61c1f276aa1c3e349acec7e9f8d2df7142c35ef5a'
+ '213e3e250fae3e5990e4498991510116d3823c6f76bcc788ff5b00568a7df355'
+ '89f11f867aa595e95b66f252ff6d36be5c19b0cc16c1fab1521899557f1607fb'
+ 'd69da3173a9c1e2006d4af5ab4db513b3be37547fab508dcde064438cef853bf'
+ '941d88252aaa440f5dcb30e94905af2e5082e687e1a9d8945af272e411cd6cbe'
+ 'e056c8bbe885e311459882428166fdc5cadab58c2d7846c0ac9219de56b9c84b'
+ 'f54dfd037abab488994da87d605c9f0fa2d4286e988d13a3d80b95e0ad43b684'
+ 'b9309b103b4f47d3309c5ca20faac8ae83d62efb08af92429e1109168406181f'
+ 'cfb930fb2c4fff0e6501319b2fda9a4de514ee69de39c3291ff1f99126849a85'
+ '3d9e78fd013988741ad4f501e0eca9cf4054a23edc07b3524b4312b8c0a11ab7'
+ 'd2d07ea444cc8b45fa09354978ffb25ddfe4d2d653f799a7095ed2aa98dde36a'
+ 'ceb71fb844b7011a61c7a8294ba616915c6f9c84c72a397f4981aeb0092e6bc6'
+ '3657a21f8ad7851c3293eba6701a3c682ad7604aaba9714e6b5877aae7861e46'
+ '87c074449d4a76e7e0c1913d7361fca8c9d0573233b3996b56b3fc05d3ba0cf9'
+ '54db9347ac6467b806fff70f62b2709276a0ca4d82468ae8357d5520db0ad04a'
+ '688a7d6a3c220cf09f7e48af46f1ef1b01d251679962c825eded0b3fa4fc2ab1'
+ 'a5516dda7451eec10a2c0069f5a2e01c6de63a16332c3e2d8a94e27b520f8d9e'
+ '544d08716332a9f9358b21010d468b84a9edff0da7bbb1baf0cf4d6322821ea5'
+ 'a5f19e68e9e4790d017dc4988e715f51c44548df5615aae6106d1a0c84fe49f1'
+ '04531ee1732c18c933b5b28f5da88ed183d5aa3698b1d1e912c000928b93ec91'
+ '1578e819b6ee479b6db7a095bcfa74372d3ff555642c6d6ea7112e97bb6f2027')
+
+prepare() {
+ mv "${srcdir}/${pkgname}-${pkgver/.hotfix/+hotfix}" "${srcdir}/${pkgname}"
+ patch -p1 -i "${srcdir}/version.patch" -d "${srcdir}/${pkgname}"
+ patch -p1 -i "${srcdir}/system-dart.patch" -d "${srcdir}/${pkgname}"
+ patch -p1 -i "${srcdir}/no-lock.patch" -d "${srcdir}/${pkgname}"
+ patch -p1 -i "${srcdir}/no-runtime-download.patch" -d "${srcdir}/${pkgname}"
+ patch -p1 -i "${srcdir}/doctor.patch" -d "${srcdir}/${pkgname}"
+ patch -p1 -i "${srcdir}/opt-in-analytics.patch" -d "${srcdir}/${pkgname}"
+
+ echo "${pkgver}" > "${srcdir}/${pkgname}/version"
+ mkdir -p "${srcdir}/${pkgname}/bin/cache/artifacts"
+ cat > "${srcdir}/${pkgname}/bin/cache/flutter.version.json" <<EOF
+{
+ "frameworkVersion": "$pkgver",
+ "channel": "$_channel",
+ "repositoryUrl": "https://github.com/flutter/flutter.git",
+ "frameworkRevision": "archlinuxaur0000000000000000000000000000",
+ "frameworkCommitDate": "2038-01-19 03:14:08",
+ "engineRevision": "$(cat "${srcdir}/${pkgname}/bin/internal/engine.version")",
+ "dartSdkVersion": "$_dartver",
+ "devToolsVersion": $(jq '.version' < /opt/dart-sdk/bin/resources/devtools/version.json),
+ "flutterVersion": "$pkgver"
+}
+EOF
+
+ mkdir "${srcdir}/gradlew"
+ pushd ${srcdir}/gradlew
+ gradle init --use-defaults --type basic --project-name flutter --dsl groovy
+ gradle wrapper
+ popd
+
+ cd "${srcdir}/${pkgname}/bin/cache"
+
+ unzip -o -q "${srcdir}/flutter_web_sdk.zip" -d flutter_web_sdk
+ unzip -o -q "${srcdir}/sky_engine.zip" -d pkg
+
+ cd "${srcdir}/${pkgname}/bin/cache/artifacts"
+
+ # why should we use a pre-build gradle wrapper if we have it in the arch repos ?
+ mkdir -p gradle_wrapper/gradle
+ cp -pr "${srcdir}/gradlew/gradle/wrapper" gradle_wrapper/gradle
+ cp -pr "${srcdir}/gradlew/gradlew" gradle_wrapper
+
+ # mkdir "gradle_wrapper"
+ # tar -xzf "${srcdir}/gradle_wrapper.tar.gz" -C "gradle_wrapper"
+ unzip -o -q "${srcdir}/material_fonts.zip" -d "material_fonts"
+
+ mkdir -p engine/android-arm-profile
+ mkdir -p engine/android-arm64-profile
+ mkdir -p engine/android-x64-profile
+ mkdir -p engine/android-arm-release
+ mkdir -p engine/android-arm64-release
+ mkdir -p engine/android-x64-release
+
+ unzip -o -q "${srcdir}/android-arm-profile-linux.zip" -d engine/android-arm-profile/linux-x64
+ unzip -o -q "${srcdir}/android-arm-release-linux.zip" -d engine/android-arm-release/linux-x64
+ unzip -o -q "${srcdir}/android-arm64-profile-linux.zip" -d engine/android-arm64-profile/linux-x64
+ unzip -o -q "${srcdir}/android-arm64-release-linux.zip" -d engine/android-arm64-release/linux-x64
+ unzip -o -q "${srcdir}/android-x64-profile-linux.zip" -d engine/android-x64-profile/linux-x64
+ unzip -o -q "${srcdir}/android-x64-release-linux.zip" -d engine/android-x64-release/linux-x64
+
+ unzip -o -q "${srcdir}/android-x86.zip" -d engine/android-x86
+ unzip -o -q "${srcdir}/android-x64.zip" -d engine/android-x64
+ unzip -o -q "${srcdir}/android-arm.zip" -d engine/android-arm
+ unzip -o -q "${srcdir}/android-arm-profile.zip" -d engine/android-arm-profile
+ unzip -o -q "${srcdir}/android-arm-release.zip" -d engine/android-arm-release
+ unzip -o -q "${srcdir}/android-arm64.zip" -d engine/android-arm64
+ unzip -o -q "${srcdir}/android-arm64-profile.zip" -d engine/android-arm64-profile
+ unzip -o -q "${srcdir}/android-arm64-release.zip" -d engine/android-arm64-release
+
+ unzip -o -q "${srcdir}/android-x64-profile.zip" -d engine/android-x64-profile
+ unzip -o -q "${srcdir}/android-x64-release.zip" -d engine/android-x64-release
+ unzip -o -q "${srcdir}/android-x64-jit-release.zip" -d engine/android-x86-jit-release
+
+ unzip -o -q "${srcdir}/flutter_patched_sdk.zip" -d engine/common
+ unzip -o -q "${srcdir}/flutter_patched_sdk_product.zip" -d engine/common
+
+ unzip -o -q "${srcdir}/engine-${_flutterarch}.zip" -d engine/linux-${_flutterarch}
+ unzip -o -q "${srcdir}/gtk-debug-${_flutterarch}.zip" -d engine/linux-${_flutterarch}
+ unzip -o -q "${srcdir}/gtk-profile-${_flutterarch}.zip" -d engine/linux-${_flutterarch}-profile
+ unzip -o -q "${srcdir}/gtk-release-${_flutterarch}.zip" -d engine/linux-${_flutterarch}-release
+ unzip -o -q "${srcdir}/font-subset.zip" -d engine/linux-${_flutterarch}
+
+}
build() {
- rm -rf "${srcdir}/${pkgname}/bin/cache" "${srcdir}/${pkgname}/.pub-cache"
- "${srcdir}/${pkgname}/bin/internal/update_dart_sdk.sh"
- "${srcdir}/${pkgname}/bin/flutter" --no-version-check precache
+ export PUB_CACHE="${srcdir}/${pkgname}/pub-cache"
+ cd "${srcdir}/${pkgname}"
+ dart pub get -C "packages/flutter_tools" --no-offline --no-precompile
+ dart --verbosity=error --disable-dart-dev \
+ --snapshot="bin/cache/flutter_tools.snapshot" --snapshot-kind="app-jit" \
+ --packages="packages/flutter_tools/.dart_tool/package_config.json" \
+ --no-enable-mirrors "packages/flutter_tools/bin/flutter_tools.dart" --version
+ cd ../..
+
+ sed -Ei 's|'"$PUB_CACHE"'|/usr/lib/flutter/pub_cache|g' "${srcdir}/${pkgname}/packages/flutter_tools/.dart_tool/package_config.json"
+ find "$PUB_CACHE" -name '*.aot' -delete
}
package() {
install -Dm644 "${srcdir}/${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
- install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/etc/profile.d/${pkgname}.sh"
- install -Dm755 "${srcdir}/${pkgname}.csh" "${pkgdir}/etc/profile.d/${pkgname}.csh"
- install -dm755 "${pkgdir}/opt/${pkgname}"
+ install -dm755 "${pkgdir}/usr/lib/${pkgname}"
install -dm755 "${pkgdir}/usr/bin"
- cp -ra "${srcdir}/${pkgname}" "${pkgdir}/opt/"
-
- # version overriding, something broken; not my fault *grumble*
- echo "${pkgver}" > "${pkgdir}/opt/${pkgname}/version"
- find "${pkgdir}/opt/${pkgname}" -type d -exec chmod a+rx {} +
- find "${pkgdir}/opt/${pkgname}" -type f -exec chmod a+r {} +
-
- # those files *must* be read-write for end-users; not my fault *grumble*
- chmod a+rw "${pkgdir}/opt/${pkgname}" "${pkgdir}/opt/${pkgname}/.pub-preload-cache"
- chmod -R a+rw "${pkgdir}/opt/${pkgname}/version" "${pkgdir}/opt/${pkgname}/bin/cache" "${pkgdir}/opt/${pkgname}/.git" "${pkgdir}/opt/${pkgname}/packages/flutter_tools/gradle"
- find "${pkgdir}/opt/${pkgname}" -name "pubspec.lock" -exec chmod a+rw {} +
- find "${pkgdir}/opt/${pkgname}" -name "package_config.json" -exec chmod a+rw {} +
-
- # fix git ref migrations
- mv "${pkgdir}/opt/${pkgname}/.git" "${pkgdir}/opt/${pkgname}/.git-refs"
+ cp -ra "${srcdir}/${pkgname}" "${pkgdir}/usr/lib"
+ install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/flutter"
- ln -s "/opt/${pkgname}/bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+ # didn't find a workaround other than keeping that one still user writable
+ install -dm777 "${pkgdir}/usr/lib/${pkgname}/packages/flutter_tools/gradle/.gradle"
+ install -dm777 "${pkgdir}/usr/lib/${pkgname}/packages/flutter_tools/gradle/build"
+ touch "${pkgdir}/usr/lib/${pkgname}/packages/flutter_tools/gradle/.gradle/.keep"
+ touch "${pkgdir}/usr/lib/${pkgname}/packages/flutter_tools/gradle/build/.keep"
}
diff --git a/doctor.patch b/doctor.patch
new file mode 100644
index 000000000000..76c51dd516ff
--- /dev/null
+++ b/doctor.patch
@@ -0,0 +1,17 @@
+--- a/packages/flutter_tools/lib/src/doctor.dart
++++ b/packages/flutter_tools/lib/src/doctor.dart
+@@ -621,14 +621,6 @@
+ '$flutterBinDir to your path.',
+ );
+ }
+- final String resolvedFlutterPath = flutterBin.resolveSymbolicLinksSync();
+- if (!_filePathContainsDirPath(flutterRoot, resolvedFlutterPath)) {
+- 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.';
+- return ValidationMessage.hint(hint);
+- }
+ return null;
+ }
+
diff --git a/flutter.csh b/flutter.csh
deleted file mode 100644
index fdb197131b7d..000000000000
--- a/flutter.csh
+++ /dev/null
@@ -1,2 +0,0 @@
-setenv FLUTTER_HOME /opt/flutter
-setenv PATH ${PATH}:${FLUTTER_HOME}/bin:
diff --git a/flutter.install b/flutter.install
index 5c896b72f6a6..87dedc666b11 100644
--- a/flutter.install
+++ b/flutter.install
@@ -1,13 +1,6 @@
pre_upgrade() {
- NEW=$1
- OLD=$2
-
- if [[ "$OLD" == "3.7"* || "$OLD" == "3.6"* ]]; then
- echo "Cleaning up previous flutter installation."
- rm -rf "/opt/flutter"
- fi
-
- rm -rf "/opt/flutter/.git"
+ echo "Cleaning up previous flutter installation."
+ rm -rf "/opt/flutter"
}
post_upgrade() {
@@ -20,10 +13,5 @@ post_upgrade() {
groupdel "flutterusers"
fi
fi
-
- mv "/opt/flutter/.git-refs" "/opt/flutter/.git"
}
-post_install() {
- mv "/opt/flutter/.git-refs" "/opt/flutter/.git"
-}
diff --git a/flutter.sh b/flutter.sh
index 5b3db4b8b9be..5fe85c74e829 100644..100755
--- a/flutter.sh
+++ b/flutter.sh
@@ -1,2 +1,24 @@
-export FLUTTER_HOME=/opt/flutter
-export PATH=${PATH}:${FLUTTER_HOME}/bin
+#!/bin/sh
+# adapted by lnl from project's repo
+
+# To debug the tool, you can pass the following env to enable debug
+# mode and set an observatory port:
+# FLUTTER_TOOL_ARGS="$FLUTTER_TOOL_ARGS --enable-asserts --observe=65432"
+
+set -e
+
+export FLUTTER_ROOT="${FLUTTER_ROOT:-/usr/lib/flutter}"
+
+FLUTTER_TOOLS_DIR="$FLUTTER_ROOT/packages/flutter_tools"
+SNAPSHOT_PATH="$FLUTTER_ROOT/bin/cache/flutter_tools.snapshot"
+
+# Test if running as superuser – but don't warn if running within Docker or CI.
+if [ "$(id -u)" = "0" ] && ! [ -f /.dockerenv ] && [ "$CI" != "true" ] && [ "$BOT" != "true" ] && [ "$CONTINUOUS_INTEGRATION" != "true" ]; then
+ >&2 echo " Woah! You appear to be trying to run flutter as root."
+ >&2 echo " We strongly recommend running the flutter tool without superuser privileges."
+ >&2 echo " /"
+ >&2 echo "📎"
+fi
+
+exec dart --disable-dart-dev --packages="$FLUTTER_TOOLS_DIR/.dart_tool/package_config.json" $FLUTTER_TOOL_ARGS "$SNAPSHOT_PATH" "$@"
+
diff --git a/no-lock.patch b/no-lock.patch
new file mode 100644
index 000000000000..3a82ef894fac
--- /dev/null
+++ b/no-lock.patch
@@ -0,0 +1,19 @@
+--- a/packages/flutter_tools/lib/src/cache.dart
++++ b/packages/flutter_tools/lib/src/cache.dart
+@@ -280,7 +280,7 @@
+ bool useUnsignedMacBinaries = false;
+
+ static RandomAccessFile? _lock;
+- static bool _lockEnabled = true;
++ static bool _lockEnabled = false;
+
+ /// Turn off the [lock]/[releaseLock] mechanism.
+ ///
+@@ -634,7 +634,6 @@
+ }
+
+ void setStampFor(String artifactName, String version) {
+- getStampFileFor(artifactName).writeAsStringSync(version);
+ }
+
+ File getStampFileFor(String artifactName) {
diff --git a/no-runtime-download.patch b/no-runtime-download.patch
new file mode 100644
index 000000000000..8ba81cb9a230
--- /dev/null
+++ b/no-runtime-download.patch
@@ -0,0 +1,38 @@
+--- a/packages/flutter_tools/lib/src/cache.dart
++++ b/packages/flutter_tools/lib/src/cache.dart
+@@ -926,26 +926,6 @@
+ }
+
+ Future<bool> checkForArtifacts(String? engineVersion) async {
+- engineVersion ??= version;
+- final String url = '${cache.storageBaseUrl}/flutter_infra_release/flutter/$engineVersion/';
+-
+- bool exists = false;
+- for (final String pkgName in getPackageDirs()) {
+- exists = await cache.doesRemoteExist('Checking package $pkgName is available...', Uri.parse('$url$pkgName.zip'));
+- if (!exists) {
+- return false;
+- }
+- }
+-
+- 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));
+- if (!exists) {
+- return false;
+- }
+- }
+ return true;
+ }
+
+@@ -1036,6 +1016,8 @@
+ Directory location,
+ void Function(File, Directory) extractor,
+ ) async {
++ throwToolExit('Tried to download $url. Report on aur.');
++
+ final String downloadPath = flattenNameSubdirs(url, _fileSystem);
+ final File tempFile = _createDownloadFile(downloadPath);
+ Status status;
diff --git a/opt-in-analytics.patch b/opt-in-analytics.patch
new file mode 100644
index 000000000000..17fae210fd4c
--- /dev/null
+++ b/opt-in-analytics.patch
@@ -0,0 +1,22 @@
+--- a/packages/flutter_tools/lib/src/reporting/usage.dart
++++ b/packages/flutter_tools/lib/src/reporting/usage.dart
+@@ -218,7 +218,7 @@
+ if (globals.platform.environment.containsKey('FLUTTER_HOST')) {
+ analytics.setSessionValue('aiid', globals.platform.environment['FLUTTER_HOST']);
+ }
+- analytics.analyticsOpt = AnalyticsOpt.optOut;
++ analytics.analyticsOpt = AnalyticsOpt.optIn;
+ }
+
+ return _DefaultUsage._(
+--- a/packages/flutter_tools/lib/src/reporting/first_run.dart
++++ b/packages/flutter_tools/lib/src/reporting/first_run.dart
+@@ -37,6 +37,8 @@
+ ║ See Google's privacy policy: ║
+ ║ https://policies.google.com/privacy ║
+ ╚════════════════════════════════════════════════════════════════════════════╝
++arch linux aur overrides: reporting is disabled by default. Opt-out is not a sent event.
++Run 'flutter config --analytics' to opt in to reports.
+ ''';
+
+ /// The first run messenger determines whether the first run license terms
diff --git a/system-dart.patch b/system-dart.patch
new file mode 100644
index 000000000000..4852236760cb
--- /dev/null
+++ b/system-dart.patch
@@ -0,0 +1,162 @@
+--- ./packages/flutter_tools/bin/tool_backend.dart.orig
++++ ./packages/flutter_tools/bin/tool_backend.dart
+@@ -69,12 +69,9 @@
+ exit(1);
+ }
+ final String flutterExecutable = pathJoin(<String>[
+- flutterRoot,
++ '/usr',
+ 'bin',
+- if (Platform.isWindows)
+- 'flutter.bat'
+- else
+- 'flutter',
++ '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 @@
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+
+-readonly flutter_bin_dir="${FLUTTER_ROOT}/bin"
+-readonly dart_bin_dir="${flutter_bin_dir}/cache/dart-sdk/bin"
+-
+-exec "${dart_bin_dir}/dart" "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.dart" "${@:1}"
++exec "${DART_ROOT:-"/opt/dart-sdk"}/bin/dart" "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.dart" "${@:1}"
+--- ./packages/flutter_tools/gradle/src/main/groovy/flutter.groovy.orig
++++ ./packages/flutter_tools/gradle/src/main/groovy/flutter.groovy
+@@ -264,7 +264,7 @@
+ }
+
+ String flutterExecutableName = Os.isFamily(Os.FAMILY_WINDOWS) ? "flutter.bat" : "flutter"
+- flutterExecutable = Paths.get(flutterRoot.absolutePath, "bin", flutterExecutableName).toFile();
++ flutterExecutable = Paths.get("/usr", "bin", flutterExecutableName).toFile();
+
+ if (project.hasProperty("multidex-enabled") &&
+ project.property("multidex-enabled").toBoolean()) {
+--- ./packages/flutter_tools/lib/src/artifacts.dart.orig
++++ ./packages/flutter_tools/lib/src/artifacts.dart
+@@ -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';
+@@ -1059,48 +1061,7 @@
+ }
+
+ String _getDartSdkPath() {
+- final String builtPath = _fileSystem.path.join(_hostEngineOutPath, 'dart-sdk');
+- if (_fileSystem.isDirectorySync(_fileSystem.path.join(builtPath, 'bin'))) {
+- return builtPath;
+- }
+-
+- // 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');
+- if (_fileSystem.isDirectorySync(prebuiltPath)) {
+- return prebuiltPath;
+- }
+-
+- throw ToolExit('Unable to find a built dart sdk at: "$builtPath" or a prebuilt dart sdk at: "$prebuiltPath"');
+- }
+-
+- String _getFlutterPrebuiltsPath() {
+- final String engineSrcPath = _fileSystem.path.dirname(_fileSystem.path.dirname(_hostEngineOutPath));
+- return _fileSystem.path.join(engineSrcPath, 'flutter', 'prebuilts');
+- }
+-
+- String _getPrebuiltTarget() {
+- final TargetPlatform hostPlatform = _currentHostPlatform(_platform, _operatingSystemUtils);
+- switch (hostPlatform) {
+- case TargetPlatform.darwin:
+- return 'macos-x64';
+- case TargetPlatform.linux_arm64:
+- return 'linux-arm64';
+- case TargetPlatform.linux_x64:
+- return 'linux-x64';
+- case TargetPlatform.windows_x64:
+- return 'windows-x64';
+- case TargetPlatform.ios:
+- case TargetPlatform.android:
+- case TargetPlatform.android_arm:
+- case TargetPlatform.android_arm64:
+- case TargetPlatform.android_x64:
+- case TargetPlatform.android_x86:
+- case TargetPlatform.fuchsia_arm64:
+- case TargetPlatform.fuchsia_x64:
+- case TargetPlatform.web_javascript:
+- case TargetPlatform.tester:
+- throwToolExit('Unsupported host platform: $hostPlatform');
+- }
++ return io.Platform.environment['DART_ROOT'] ?? '/opt/dart-sdk';
+ }
+
+ String _getFlutterWebSdkPath() {
+@@ -1382,7 +1343,7 @@
+
+ /// Locate the Dart SDK.
+ String _dartSdkPath(Cache cache) {
+- return cache.getRoot().childDirectory('dart-sdk').path;
++ return io.Platform.environment['DART_ROOT'] ?? '/opt/dart-sdk';
+ }
+
+ class _TestArtifacts implements Artifacts {
+--- ./packages/flutter_tools/lib/src/cache.dart.orig
++++ ./packages/flutter_tools/lib/src/cache.dart
+@@ -3,6 +3,7 @@
+ // found in the LICENSE file.
+
+ import 'dart:async';
++import 'dart:io' as io show Platform;
+
+ import 'package:crypto/crypto.dart';
+ import 'package:file/memory.dart';
+@@ -380,8 +381,8 @@
+
+ String get devToolsVersion {
+ if (_devToolsVersion == null) {
+- const String devToolsDirPath = 'dart-sdk/bin/resources/devtools';
+- final Directory devToolsDir = getCacheDir(devToolsDirPath, shouldCreate: false);
++ final String dartSdkRoot = io.Platform.environment['DART_ROOT'] ?? '/opt/dart-sdk';
++ final Directory devToolsDir = _fileSystem.directory(dartSdkRoot + 'bin/resources/devtools');
+ if (!devToolsDir.existsSync()) {
+ throw Exception('Could not find directory at ${devToolsDir.path}');
+ }
+--- ./packages/flutter_tools/lib/src/dart/pub.dart.orig
++++ ./packages/flutter_tools/lib/src/dart/pub.dart
+@@ -545,9 +545,7 @@
+ List<String> _computePubCommand() {
+ // TODO(zanderso): refactor to use artifacts.
+ final String sdkPath = _fileSystem.path.joinAll(<String>[
+- Cache.flutterRoot!,
+- 'bin',
+- 'cache',
++ '/opt',
+ 'dart-sdk',
+ 'bin',
+ 'dart',
+--- ./packages/flutter_tools/lib/src/dart/language_version.dart.orig
++++ ./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 @@
+ }
+ // 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'] ?? '/opt/dart-sdk');
+ if (!versionFile.existsSync() && _inUnitTest()) {
+ return LanguageVersion(2, 12);
+ }
diff --git a/update-artifact-versions.sh b/update-artifact-versions.sh
new file mode 100755
index 000000000000..3aa06950bc65
--- /dev/null
+++ b/update-artifact-versions.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+readonly ENGINE_VERSION="$(jq -r .engineRevision src/flutter/bin/cache/flutter.version.json)"
+
+readonly MATERIAL_FONTS_VERSION="$(cat src/flutter/bin/internal/material_fonts.version | cut -d '/' -f4)"
+readonly GRADLE_WRAPPER_VERSION="$(cat src/flutter/bin/internal/gradle_wrapper.version | cut -d '/' -f3)"
+readonly LIBIMOBILEDEVICE_VERSION="$(cat src/flutter/bin/internal/libimobiledevice.version)"
+readonly USBMUXD_VERSION="$(cat src/flutter/bin/internal/usbmuxd.version)"
+readonly LIBPLIST_VERSION="$(cat src/flutter/bin/internal/libplist.version)"
+readonly OPENSSL_VERSION="$(cat src/flutter/bin/internal/openssl.version)"
+readonly IOS_DEPLOY_VERSION="$(cat src/flutter/bin/internal/ios-deploy.version)"
+
+sed -i 's/_enginever=.*/_enginever='"${ENGINE_VERSION}"'/g' PKGBUILD
+sed -i 's/_materialfontsver=.*/_materialfontsver='"${MATERIAL_FONTS_VERSION}"'/g' PKGBUILD
+sed -i 's/_gradlewver=.*/_gradlewver='"${GRADLE_WRAPPER_VERSION}"'/g' PKGBUILD
diff --git a/version.patch b/version.patch
new file mode 100644
index 000000000000..b893edac030d
--- /dev/null
+++ b/version.patch
@@ -0,0 +1,298 @@
+--- ./packages/flutter_tools/lib/src/version.dart.orig
++++ ./packages/flutter_tools/lib/src/version.dart
+@@ -91,7 +91,7 @@
+ }) {
+ final File versionFile = getVersionFile(fs, flutterRoot);
+
+- if (!fetchTags && versionFile.existsSync()) {
++ if (versionFile.existsSync()) {
+ final _FlutterVersionFromFile? version = _FlutterVersionFromFile.tryParseFromFile(
+ versionFile,
+ flutterRoot: flutterRoot,
+@@ -102,19 +102,15 @@
+ }
+
+ // if we are fetching tags, ignore cached versionFile
+- if (fetchTags && versionFile.existsSync()) {
++ /* if (fetchTags && versionFile.existsSync()) {
+ versionFile.deleteSync();
+ final File legacyVersionFile = fs.file(fs.path.join(flutterRoot, 'version'));
+ if (legacyVersionFile.existsSync()) {
+ legacyVersionFile.deleteSync();
+ }
+- }
++ } */
+
+- final String frameworkRevision = _runGit(
+- gitLog(<String>['-n', '1', '--pretty=format:%H']).join(' '),
+- globals.processUtils,
+- flutterRoot,
+- );
++ final String frameworkRevision = "archlinuxaur0000000000000000000000000000";
+
+ return FlutterVersion.fromRevision(
+ clock: clock,
+@@ -145,7 +141,7 @@
+ workingDirectory: flutterRoot,
+ fetchTags: fetchTags,
+ );
+- final String frameworkVersion = gitTagVersion.frameworkVersionFor(frameworkRevision);
++ final String frameworkVersion = globals.fs.file(globals.fs.path.join(flutterRoot, 'version')).readAsStringSync();
+ return _FlutterVersionGit._(
+ clock: clock,
+ flutterRoot: flutterRoot,
+@@ -217,11 +213,7 @@
+ // TODO(fujino): calculate this relative to frameworkCommitDate for
+ // _FlutterVersionFromFile so we don't need a git call.
+ String get frameworkAge {
+- return _frameworkAge ??= _runGit(
+- FlutterVersion.gitLog(<String>['-n', '1', '--pretty=format:%ar']).join(' '),
+- globals.processUtils,
+- flutterRoot,
+- );
++ return _frameworkAge ??= 'unknown (arch linux aur package)';
+ }
+
+ void ensureVersionFile();
+@@ -301,43 +293,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 DateTime now = _clock.now();
+- if (versionCheckStamp.lastTimeVersionWasChecked != null) {
+- final Duration timeSinceLastCheck = now.difference(
+- versionCheckStamp.lastTimeVersionWasChecked!,
+- );
+-
+- // Don't ping the server too often. Return cached value if it's fresh.
+- if (timeSinceLastCheck < VersionFreshnessValidator.checkAgeConsideredUpToDate) {
+- return versionCheckStamp.lastKnownRemoteVersion;
+- }
+- }
+-
+- // Cache is empty or it's been a while since the last server ping. Ping the server.
+- try {
+- final DateTime remoteFrameworkCommitDate = DateTime.parse(
+- await fetchRemoteFrameworkCommitDate(),
+- );
+- await versionCheckStamp.store(
+- newTimeVersionWasChecked: now,
+- newKnownRemoteVersion: remoteFrameworkCommitDate,
+- );
+- return remoteFrameworkCommitDate;
+- } on VersionCheckError catch (error) {
+- // This happens when any of the git commands fails, which can happen when
+- // there's no Internet connectivity. Remote version check is best effort
+- // only. We do not prevent the command from running when it fails.
+- 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,
+- );
+- return null;
+- }
++ return null;
+ }
+
+ /// The date of the latest framework commit in the remote repository.
+@@ -421,32 +377,13 @@
+ bool lenient = false,
+ required String? workingDirectory,
+ }) {
+- final List<String> args = FlutterVersion.gitLog(<String>[
+- gitRef,
+- '-n',
+- '1',
+- '--pretty=format:%ad',
+- '--date=iso',
+- ]);
+- 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,
+- );
+- } 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.');
+- // 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 _FlutterVersionFromFile version = _FlutterVersionFromFile.tryParseFromFile(
++ versionFile,
++ flutterRoot: workingDirectory,
++ )!;
++ return version.frameworkCommitDate;
+ }
+
+ class _FlutterVersionFromFile extends FlutterVersion {
+@@ -472,11 +472,6 @@
+
+ @override
+ void ensureVersionFile() {
+- _ensureLegacyVersionFile(
+- fs: fs,
+- flutterRoot: flutterRoot,
+- frameworkVersion: frameworkVersion,
+- );
+ }
+ }
+
+@@ -544,17 +539,6 @@
+
+ @override
+ 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()));
+- }
+ }
+ }
+
+@@ -563,10 +547,6 @@
+ 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 @@
+ ///
+ /// Returns [VersionCheckError] if the tracking remote is not standard.
+ 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.'
+- );
+- }
+-
+- // 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 String sanitizedRepositoryUrl = stripDotGit(repositoryUrl);
+-
+- if (!sanitizedStandardRemotes.contains(sanitizedRepositoryUrl)) {
+- if (flutterGit != null) {
+- // If `FLUTTER_GIT_URL` is set, inform to either remove the
+- // `FLUTTER_GIT_URL` environment variable or set it to the current
+- // tracking remote.
+- return VersionCheckError(
+- 'The Flutter SDK is tracking "$repositoryUrl" but "FLUTTER_GIT_URL" '
+- 'is set to "$flutterGit".\n'
+- '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.'
+- );
+- }
+- // If `FLUTTER_GIT_URL` is unset, inform to set the environment variable.
+- return VersionCheckError(
+- 'The Flutter SDK is tracking a non-standard remote "$repositoryUrl".\n'
+- 'Set the environment variable "FLUTTER_GIT_URL" to '
+- '"$repositoryUrl". '
+- 'If this is intentional, it is recommended to use "git" directly to '
+- 'manage the SDK.'
+- );
+- }
++ // the worse shit any code says about us, the worse for that code.
+ return null;
+ }
+
+@@ -853,10 +738,7 @@
+ }
+
+ String _runGit(String command, ProcessUtils processUtils, String? workingDirectory) {
+- 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 @@
+ if (revision == null) {
+ return '';
+ }
+- return revision.length > 10 ? revision.substring(0, 10) : revision;
++ return revision.length > 12 ? revision.substring(0, 12) : revision;
+ }
+
+ /// Version of Flutter SDK parsed from Git.
+@@ -941,42 +823,10 @@
+ bool fetchTags = false,
+ String gitRef = 'HEAD'
+ }) {
+- if (fetchTags) {
+- 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';
+- _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');
+-
+- // Check first for a stable tag
+- final RegExp stableTagPattern = RegExp(r'^\d+\.\d+\.\d+$');
+- for (final String tag in tags) {
+- if (stableTagPattern.hasMatch(tag.trim())) {
+- return parse(tag);
+- }
+- }
+- // Next check for a dev tag
+- final RegExp devTagPattern = RegExp(r'^\d+\.\d+\.\d+-\d+\.\d+\.pre$');
+- for (final String tag in tags) {
+- if (devTagPattern.hasMatch(tag.trim())) {
+- return parse(tag);
+- }
+- }
+-
+ // 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()
+ );
+ }
+