use fvm instead of flutter package
This commit is contained in:
@@ -7,9 +7,7 @@ pkgbase = nipaplay-reload
|
|||||||
arch = aarch64
|
arch = aarch64
|
||||||
license = MIT
|
license = MIT
|
||||||
makedepends = git
|
makedepends = git
|
||||||
makedepends = flutter
|
makedepends = fvm
|
||||||
makedepends = flutter-target-linux
|
|
||||||
makedepends = flutter-target-web
|
|
||||||
makedepends = rustup
|
makedepends = rustup
|
||||||
makedepends = java-environment
|
makedepends = java-environment
|
||||||
makedepends = clang
|
makedepends = clang
|
||||||
|
|||||||
@@ -24,9 +24,7 @@ depends=(
|
|||||||
# it again. The binary is able to run on glibc malloc, hence no mimalloc dependency here.
|
# it again. The binary is able to run on glibc malloc, hence no mimalloc dependency here.
|
||||||
makedepends=(
|
makedepends=(
|
||||||
'git'
|
'git'
|
||||||
'flutter'
|
'fvm' # upstream pins its Flutter SDK in .fvmrc, and the repos ship no flutter
|
||||||
'flutter-target-linux'
|
|
||||||
'flutter-target-web' # embedded web remote UI; the build script skips it when absent
|
|
||||||
'rustup' # cargokit hard-requires `rustup run <toolchain> cargo build`
|
'rustup' # cargokit hard-requires `rustup run <toolchain> cargo build`
|
||||||
'java-environment' # the jni plugin's linux CMake needs the JNI headers
|
'java-environment' # the jni plugin's linux CMake needs the JNI headers
|
||||||
'clang'
|
'clang'
|
||||||
@@ -71,21 +69,31 @@ prepare() {
|
|||||||
-e 's|^Icon=.*|Icon=io.github.MCDFSteve.NipaPlay-Reload|' \
|
-e 's|^Icon=.*|Icon=io.github.MCDFSteve.NipaPlay-Reload|' \
|
||||||
assets/linux/io.github.MCDFSteve.NipaPlay-Reload.desktop
|
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() {
|
build() {
|
||||||
cd "${pkgname}"
|
cd "${pkgname}"
|
||||||
|
|
||||||
|
export FVM_CACHE_PATH="${srcdir}/fvm"
|
||||||
|
export FVM_USE_GIT_CACHE=false
|
||||||
export FLUTTER_SUPPRESS_ANALYTICS=true
|
export FLUTTER_SUPPRESS_ANALYTICS=true
|
||||||
# Match upstream CI: fvp takes its deps from the latest mdk-sdk release
|
# 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_URL='https://github.com/wang-bin/mdk-sdk/releases/latest/download/'
|
||||||
export FVP_DEPS_LATEST=1
|
export FVP_DEPS_LATEST=1
|
||||||
|
|
||||||
# Build the embedded web remote UI into assets/web/ (the script degrades on failure)
|
# Build the embedded web remote UI into assets/web/ (the script degrades on failure).
|
||||||
bash build_and_copy_web.sh
|
# 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() {
|
package() {
|
||||||
|
|||||||
Reference in New Issue
Block a user