From e5956508f8200863ef3e06964b6d77b66828149b Mon Sep 17 00:00:00 2001 From: Tee KOBAYASHI Date: Thu, 13 Jan 2022 13:00:38 +0900 Subject: [PATCH] dart: Convert `tar-path.patch` into sed script --- packages/dart/build.sh | 6 ++++++ packages/dart/tar-path.patch | 18 ------------------ 2 files changed, 6 insertions(+), 18 deletions(-) delete mode 100644 packages/dart/tar-path.patch diff --git a/packages/dart/build.sh b/packages/dart/build.sh index b283b8b75..d57b3ed49 100644 --- a/packages/dart/build.sh +++ b/packages/dart/build.sh @@ -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() { : } diff --git a/packages/dart/tar-path.patch b/packages/dart/tar-path.patch deleted file mode 100644 index 3d71ef325..000000000 --- a/packages/dart/tar-path.patch +++ /dev/null @@ -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'; - }