use fvm instead of flutter package

This commit is contained in:
2026-08-01 15:45:53 +02:00
parent c96a354709
commit cf79036e7a
2 changed files with 16 additions and 10 deletions
+1 -3
View File
@@ -7,9 +7,7 @@ pkgbase = nipaplay-reload
arch = aarch64
license = MIT
makedepends = git
makedepends = flutter
makedepends = flutter-target-linux
makedepends = flutter-target-web
makedepends = fvm
makedepends = rustup
makedepends = java-environment
makedepends = clang
+15 -7
View File
@@ -24,9 +24,7 @@ depends=(
# it again. The binary is able to run on glibc malloc, hence no mimalloc dependency here.
makedepends=(
'git'
'flutter'
'flutter-target-linux'
'flutter-target-web' # embedded web remote UI; the build script skips it when absent
'fvm' # upstream pins its Flutter SDK in .fvmrc, and the repos ship no flutter
'rustup' # cargokit hard-requires `rustup run <toolchain> cargo build`
'java-environment' # the jni plugin's linux CMake needs the JNI headers
'clang'
@@ -71,21 +69,31 @@ prepare() {
-e 's|^Icon=.*|Icon=io.github.MCDFSteve.NipaPlay-Reload|' \
assets/linux/io.github.MCDFSteve.NipaPlay-Reload.desktop
flutter pub get
# Fetch the Flutter SDK pinned in .fvmrc. Keep fvm's cache inside $srcdir instead
# of the builder's home, and skip the local git mirror -- it only pays off when
# juggling several SDK versions, and here it would just be a few hundred MB extra.
export FVM_CACHE_PATH="${srcdir}/fvm"
export FVM_USE_GIT_CACHE=false
fvm install
fvm flutter pub get
}
build() {
cd "${pkgname}"
export FVM_CACHE_PATH="${srcdir}/fvm"
export FVM_USE_GIT_CACHE=false
export FLUTTER_SUPPRESS_ANALYTICS=true
# Match upstream CI: fvp takes its deps from the latest mdk-sdk release
export FVP_DEPS_URL='https://github.com/wang-bin/mdk-sdk/releases/latest/download/'
export FVP_DEPS_LATEST=1
# Build the embedded web remote UI into assets/web/ (the script degrades on failure)
bash build_and_copy_web.sh
# Build the embedded web remote UI into assets/web/ (the script degrades on failure).
# It invokes a bare `flutter`, so it needs the pinned SDK on PATH.
fvm exec bash build_and_copy_web.sh
flutter build linux --release
fvm flutter build linux --release
}
package() {