summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoradam <adam@pkgsrc.org>2021-06-09 13:42:30 +0000
committeradam <adam@pkgsrc.org>2021-06-09 13:42:30 +0000
commita28b8668f013acfcf27e758ede131002224b7462 (patch)
tree59351130e0a49f4bbea393fe68cde835d9ac7bd5
parent306f6fedd53d7c50acee3d5434d632b54c643737 (diff)
downloadpkgsrc-a28b8668f013acfcf27e758ede131002224b7462.tar.gz
rust: fix patch for src/tools/rust-installer/install-template.sh
Better patch for src/tools/rust-installer/install-template.sh - remove one path component after share/doc/ as the original code does - do not change spacing for HACK: section
-rw-r--r--lang/rust/distinfo4
-rw-r--r--lang/rust/patches/patch-src_tools_rust-installer_install-template.sh54
2 files changed, 23 insertions, 35 deletions
diff --git a/lang/rust/distinfo b/lang/rust/distinfo
index 00dd190d7c7..21df453411b 100644
--- a/lang/rust/distinfo
+++ b/lang/rust/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.134 2021/05/31 10:17:53 he Exp $
+$NetBSD: distinfo,v 1.135 2021/06/09 13:42:30 adam Exp $
SHA1 (rust-1.51.0-aarch64-apple-darwin.tar.gz) = 4780de680bb5641ee9e0554bf554c9774b77a3df
RMD160 (rust-1.51.0-aarch64-apple-darwin.tar.gz) = 8bb65e59163f56afb82443c917cf2f0f34d1122b
@@ -152,7 +152,7 @@ SHA1 (patch-src_tools_cargo_src_cargo_core_profiles.rs) = 3aac5d54a6fe96b9559552
SHA1 (patch-src_tools_cargo_tests_testsuite_build.rs) = 10e6c1253adac0262b000aec7636fa0d2ebb666c
SHA1 (patch-src_tools_rls_rls_src_cmd.rs) = fade3e60fecac5c4e4d4ee5bee82659b4eb385b7
SHA1 (patch-src_tools_rls_rls_src_server_io.rs) = 51af64526db55abcf6b4b3165df314a16cf62e34
-SHA1 (patch-src_tools_rust-installer_install-template.sh) = 9f93da54d9a126390d1ec9d1430241f876c8ba3f
+SHA1 (patch-src_tools_rust-installer_install-template.sh) = 0eb45efc0928000649026d4317fe5f95b5f6dd4a
SHA1 (patch-vendor_cc-1.0.60_src_lib.rs) = 42ddba7dfbec922e5ef948b97ff8c70bae1b0113
SHA1 (patch-vendor_cc_src_lib.rs) = 27d8b8b6d9a607362152069a206298854f517460
SHA1 (patch-vendor_libc_src_unix_solarish_mod.rs) = 804ea03be546fef0d2bd37d7f8abb26d38a7892b
diff --git a/lang/rust/patches/patch-src_tools_rust-installer_install-template.sh b/lang/rust/patches/patch-src_tools_rust-installer_install-template.sh
index efde185b51c..da1c76d0588 100644
--- a/lang/rust/patches/patch-src_tools_rust-installer_install-template.sh
+++ b/lang/rust/patches/patch-src_tools_rust-installer_install-template.sh
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_tools_rust-installer_install-template.sh,v 1.4 2021/05/26 09:21:39 he Exp $
+$NetBSD: patch-src_tools_rust-installer_install-template.sh,v 1.5 2021/06/09 13:42:30 adam Exp $
No logging to 'install.log'.
Do not create 'uninstall.sh'.
@@ -8,7 +8,7 @@ pattern matching and substitution in the install phase using "grep"
and "sed" when shell builtin "case" and "omit shortest match" ops
should do just fine.
---- src/tools/rust-installer/install-template.sh.orig 2021-03-23 16:15:29.000000000 +0000
+--- src/tools/rust-installer/install-template.sh.orig 2021-05-09 02:52:58.000000000 +0000
+++ src/tools/rust-installer/install-template.sh
@@ -15,20 +15,12 @@ set -u
init_logging() {
@@ -53,7 +53,7 @@ should do just fine.
# Sanity checks
if [ ! -n "$_command" ]; then critical_err "malformed installation directive"; fi
-@@ -559,54 +551,45 @@ install_components() {
+@@ -559,36 +551,24 @@ install_components() {
# Decide the destination of the file
local _file_install_path="$_dest_prefix/$_file"
@@ -86,6 +86,7 @@ should do just fine.
- local _f="$(echo "$_file" | sed 's/^share\/man\///')"
- _file_install_path="$CFG_MANDIR/$_f"
- fi
+-
+ case "$_file" in
+ etc/*)
+ local _f=${_file#"etc/"}
@@ -104,18 +105,23 @@ should do just fine.
+ _file_install_path="$CFG_MANDIR/$_f"
+ ;;
+ share/doc/*)
-+ # HACK: Try to support overriding --docdir. Paths with the form
-+ # "share/doc/$product/" can be redirected to a single --docdir
-+ # path. If the following detects that --docdir has been specified
-+ # then it will replace everything preceeding the "$product" path
-+ # component. The problem here is that the combined rust installer
-+ # contains two "products": rust and cargo; so the contents of those
-+ # directories will both be dumped into the same directory; and the
-+ # contents of those directories are _not_ disjoint. Since this feature
-+ # is almost entirely to support 'make install' anyway I don't expect
-+ # this problem to be a big deal in practice.
+ # HACK: Try to support overriding --docdir. Paths with the form
+ # "share/doc/$product/" can be redirected to a single --docdir
+ # path. If the following detects that --docdir has been specified
+@@ -599,14 +579,17 @@ install_components() {
+ # contents of those directories are _not_ disjoint. Since this feature
+ # is almost entirely to support 'make install' anyway I don't expect
+ # this problem to be a big deal in practice.
+- if [ "$CFG_DOCDIR" != "<default>" ]
+- then
+- if echo "$_file" | grep "^share/doc/" > /dev/null
+- then
+- local _f="$(echo "$_file" | sed 's/^share\/doc\/[^/]*\///')"
+- _file_install_path="$CFG_DOCDIR/$_f"
+- fi
+- fi
+ if [ "$CFG_DOCDIR" != "<default>" ]; then
-+ local _f=${_file#"share/doc/"}
++ local _f=${_file#"share/doc/"*/}
+ _file_install_path="$CFG_DOCDIR/$_f"
+ fi
+ ;;
@@ -124,25 +130,7 @@ should do just fine.
+ _file_install_path="$CFG_DATADIR/$_f"
+ ;;
+ esac
-
-- # HACK: Try to support overriding --docdir. Paths with the form
-- # "share/doc/$product/" can be redirected to a single --docdir
-- # path. If the following detects that --docdir has been specified
-- # then it will replace everything preceeding the "$product" path
-- # component. The problem here is that the combined rust installer
-- # contains two "products": rust and cargo; so the contents of those
-- # directories will both be dumped into the same directory; and the
-- # contents of those directories are _not_ disjoint. Since this feature
-- # is almost entirely to support 'make install' anyway I don't expect
-- # this problem to be a big deal in practice.
-- if [ "$CFG_DOCDIR" != "<default>" ]
-- then
-- if echo "$_file" | grep "^share/doc/" > /dev/null
-- then
-- local _f="$(echo "$_file" | sed 's/^share\/doc\/[^/]*\///')"
-- _file_install_path="$CFG_DOCDIR/$_f"
-- fi
-- fi
++
# Make sure there's a directory for it
make_dir_recursive "$(dirname "$_file_install_path")"