pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/rust



Module Name:    pkgsrc
Committed By:   adam
Date:           Wed Jun  9 13:42:30 UTC 2021

Modified Files:
        pkgsrc/lang/rust: distinfo
        pkgsrc/lang/rust/patches:
            patch-src_tools_rust-installer_install-template.sh

Log Message:
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


To generate a diff of this commit:
cvs rdiff -u -r1.134 -r1.135 pkgsrc/lang/rust/distinfo
cvs rdiff -u -r1.4 -r1.5 \
    pkgsrc/lang/rust/patches/patch-src_tools_rust-installer_install-template.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/rust/distinfo
diff -u pkgsrc/lang/rust/distinfo:1.134 pkgsrc/lang/rust/distinfo:1.135
--- pkgsrc/lang/rust/distinfo:1.134     Mon May 31 10:17:53 2021
+++ pkgsrc/lang/rust/distinfo   Wed Jun  9 13:42:30 2021
@@ -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_co
 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

Index: pkgsrc/lang/rust/patches/patch-src_tools_rust-installer_install-template.sh
diff -u pkgsrc/lang/rust/patches/patch-src_tools_rust-installer_install-template.sh:1.4 pkgsrc/lang/rust/patches/patch-src_tools_rust-installer_install-template.sh:1.5
--- pkgsrc/lang/rust/patches/patch-src_tools_rust-installer_install-template.sh:1.4     Wed May 26 09:21:39 2021
+++ pkgsrc/lang/rust/patches/patch-src_tools_rust-installer_install-template.sh Wed Jun  9 13:42:30 2021
@@ -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
 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")"



Home | Main Index | Thread Index | Old Index