dart: Convert `tar-path.patch` into sed script

This commit is contained in:
Tee KOBAYASHI 2022-01-13 13:00:38 +09:00 committed by Leonid Pliushch
parent 6ac70124d6
commit e5956508f8
2 changed files with 6 additions and 18 deletions

View File

@ -32,6 +32,12 @@ termux_step_get_source() {
gclient sync -D --force --reset
}
termux_step_pre_configure() {
sed -i -e 's:\([^A-Za-z0-9_]\)/usr/bin:\1'$TERMUX_PREFIX'/local/bin:g' \
-e 's:\([^A-Za-z0-9_]\)/bin:\1'$TERMUX_PREFIX'/bin:g' \
"$TERMUX_PKG_SRCDIR/sdk/third_party/pkg/pub/lib/src/io.dart"
}
termux_step_make() {
:
}

View File

@ -1,18 +0,0 @@
--- ./sdk/third_party/pkg/pub/lib/src/io.dart.orig 2021-04-14 05:29:00.606101795 +0000
+++ ./sdk/third_party/pkg/pub/lib/src/io.dart 2021-04-14 05:29:41.712685487 +0000
@@ -797,13 +797,13 @@
///
/// [1]: https://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.pdf
String _findTarPath() {
- for (final file in ['/bin/tar', '/usr/bin/tar']) {
+ for (final file in ['@TERMUX_PREFIX@/bin/tar', '@TERMUX_PREFIX@/local/bin/tar']) {
if (fileExists(file)) {
return file;
}
}
log.warning(
- 'Could not find a system `tar` installed in /bin/tar or /usr/bin/tar, '
+ 'Could not find a system `tar` installed in @TERMUX_PREFIX@/tar or @TERMUX_PREFIX@/local/bin/tar, '
'attempting to use tar from PATH');
return 'tar';
}