pkgsrc-WIP-changes archive

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

wip/rust: pull over patch for install template from lang/rust.



Module Name:	pkgsrc-wip
Committed By:	Havard Eidnes <he%NetBSD.org@localhost>
Pushed By:	he
Date:		Sun Jun 13 14:15:49 2021 +0200
Changeset:	0e78852c31e7448ee7214b3509d61cc9dfbd5aaf

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

Log Message:
wip/rust: pull over patch for install template from lang/rust.

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

Bump PKGREVISION.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=0e78852c31e7448ee7214b3509d61cc9dfbd5aaf

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

diffstat:
 rust/Makefile                                      |  2 +-
 rust/distinfo                                      |  2 +-
 ...ch-src_tools_rust-installer_install-template.sh | 54 +++++++++-------------
 3 files changed, 23 insertions(+), 35 deletions(-)

diffs:
diff --git a/rust/Makefile b/rust/Makefile
index c01f707d32..a3c5c3054e 100644
--- a/rust/Makefile
+++ b/rust/Makefile
@@ -2,7 +2,7 @@
 
 DISTNAME=	rustc-1.52.1-src
 PKGNAME=	${DISTNAME:S/rustc/rust/:S/-src//}
-PKGREVISION=	3
+PKGREVISION=	4
 CATEGORIES=	lang
 MASTER_SITES=	https://static.rust-lang.org/dist/
 
diff --git a/rust/distinfo b/rust/distinfo
index 3d1ef4fd82..0e4779da2b 100644
--- a/rust/distinfo
+++ b/rust/distinfo
@@ -128,7 +128,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) = fc185ca05e376da4548ec6ed1019a4f799f9b4f3
+SHA1 (patch-src_tools_rust-installer_install-template.sh) = f2533c2ae0d45d48b5ebea5d36842b4a1b9009af
 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/rust/patches/patch-src_tools_rust-installer_install-template.sh b/rust/patches/patch-src_tools_rust-installer_install-template.sh
index 43e008289c..03dff1a1d8 100644
--- a/rust/patches/patch-src_tools_rust-installer_install-template.sh
+++ b/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.3 2018/11/27 15:45:23 adam 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_DESTDIR_PREFIX/$PKGMANDIR/$_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