projects/aports·blob master · refs

137 lines · 4.5 KiB

1--- ./pub_cache/hosted/pub.dev/flutter_vodozemac-0.2.2/cargokit/build_tool/lib/src/target.dart.orig
2+++ ./pub_cache/hosted/pub.dev/flutter_vodozemac-0.2.2/cargokit/build_tool/lib/src/target.dart
3@@ -47,11 +47,11 @@
4 flutter: 'windows-x64',
5 ),
6 Target(
7- rust: 'x86_64-unknown-linux-gnu',
8+ rust: 'x86_64-alpine-linux-musl',
9 flutter: 'linux-x64',
10 ),
11 Target(
12- rust: 'aarch64-unknown-linux-gnu',
13+ rust: 'aarch64-alpine-linux-musl',
14 flutter: 'linux-arm64',
15 ),
16 Target(
17@@ -111,9 +111,9 @@
18 // the host target.
19 final arch = runCommand('arch', []).stdout as String;
20 if (arch.trim() == 'aarch64') {
21- return [Target.forRustTriple('aarch64-unknown-linux-gnu')!];
22+ return [Target.forRustTriple('aarch64-alpine-linux-musl')!];
23 } else {
24- return [Target.forRustTriple('x86_64-unknown-linux-gnu')!];
25+ return [Target.forRustTriple('x86_64-alpine-linux-musl')!];
26 }
27 }
28 return all.where((target) {
29--- ./pub_cache/hosted/pub.dev/flutter_vodozemac-0.2.2/cargokit/build_tool/lib/src/rustup.dart.orig
30+++ ./pub_cache/hosted/pub.dev/flutter_vodozemac-0.2.2/cargokit/build_tool/lib/src/rustup.dart
31@@ -26,7 +26,6 @@
32
33 void installToolchain(String toolchain) {
34 log.info("Installing Rust toolchain: $toolchain");
35- runCommand("rustup", ['toolchain', 'install', toolchain]);
36 _installedToolchains
37 .add(_Toolchain(toolchain, _getInstalledTargets(toolchain)));
38 }
39@@ -36,13 +35,6 @@
40 required String toolchain,
41 }) {
42 log.info("Installing Rust target: $target");
43- runCommand("rustup", [
44- 'target',
45- 'add',
46- '--toolchain',
47- toolchain,
48- target,
49- ]);
50 _installedTargets(toolchain)?.add(target);
51 }
52
53@@ -62,13 +54,10 @@
54 return parts[0];
55 }
56
57- final res = runCommand("rustup", ['toolchain', 'list']);
58-
59 // To list all non-custom toolchains, we need to filter out lines that
60 // don't start with "stable", "beta", or "nightly".
61 Pattern nonCustom = RegExp(r"^(stable|beta|nightly)");
62- final lines = res.stdout
63- .toString()
64+ final lines = "stable-${Platform.environment['CTARGET']!}"
65 .split('\n')
66 .where((e) => e.isNotEmpty && e.startsWith(nonCustom))
67 .map(extractToolchainName)
68@@ -85,15 +74,7 @@
69 }
70
71 static List<String> _getInstalledTargets(String toolchain) {
72- final res = runCommand("rustup", [
73- 'target',
74- 'list',
75- '--toolchain',
76- toolchain,
77- '--installed',
78- ]);
79- final lines = res.stdout
80- .toString()
81+ final lines = Platform.environment['CTARGET']!
82 .split('\n')
83 .where((e) => e.isNotEmpty)
84 .toList(growable: true);
85@@ -107,14 +88,11 @@
86 return;
87 }
88 // Useful for -Z build-std
89- runCommand(
90- "rustup",
91- ['component', 'add', 'rust-src', '--toolchain', 'nightly'],
92- );
93 _didInstallRustSrcForNightly = true;
94 }
95
96 static String? executablePath() {
97+ return null;
98 final envPath = Platform.environment['PATH'];
99 final envPathSeparator = Platform.isWindows ? ';' : ':';
100 final home = Platform.isWindows
101--- ./pub_cache/hosted/pub.dev/flutter_vodozemac-0.2.2/cargokit/build_tool/lib/src/util.dart.orig
102+++ ./pub_cache/hosted/pub.dev/flutter_vodozemac-0.2.2/cargokit/build_tool/lib/src/util.dart
103@@ -160,6 +160,7 @@
104 }
105
106 String _resolveExecutable(String executable) {
107+ return executable;
108 if (executable == 'rustup') {
109 final resolved = Rustup.executablePath();
110 if (resolved != null) {
111--- ./pub_cache/hosted/pub.dev/flutter_vodozemac-0.2.2/cargokit/build_tool/lib/src/options.dart.orig
112+++ ./pub_cache/hosted/pub.dev/flutter_vodozemac-0.2.2/cargokit/build_tool/lib/src/options.dart
113@@ -234,7 +234,7 @@
114 // When Rustup is installed always build locally unless user opts into
115 // using precompiled binaries.
116 static bool defaultUsePrecompiledBinaries() {
117- return Rustup.executablePath() == null;
118+ return false;
119 }
120
121 CargokitUserOptions({
122--- ./pub_cache/hosted/pub.dev/flutter_vodozemac-0.2.2/cargokit/build_tool/lib/src/builder.dart.orig
123+++ ./pub_cache/hosted/pub.dev/flutter_vodozemac-0.2.2/cargokit/build_tool/lib/src/builder.dart
124@@ -140,11 +140,9 @@
125 final extraArgs = _buildOptions?.flags ?? [];
126 final manifestPath = path.join(environment.manifestDir, 'Cargo.toml');
127 runCommand(
128- 'rustup',
129+ 'cargo',
130 [
131- 'run',
132- _toolchain,
133- 'cargo',
134+ 'auditable',
135 'build',
136 ...extraArgs,
137 '--manifest-path',