From: Georgy Yakovlev Date: Mon, 11 Mar 2019 04:46:09 +0000 (-0700) Subject: dev-lang/rust-bin: fix cargo on ppc64 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=6e428d13d6870832812748de67e48f170cbce6a5;p=gentoo.git dev-lang/rust-bin: fix cargo on ppc64 Bug: https://bugs.gentoo.org/679806 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Georgy Yakovlev --- diff --git a/dev-lang/rust-bin/rust-bin-1.32.0.ebuild b/dev-lang/rust-bin/rust-bin-1.32.0.ebuild index a2af32c2885b..170a05bf8146 100644 --- a/dev-lang/rust-bin/rust-bin-1.32.0.ebuild +++ b/dev-lang/rust-bin/rust-bin-1.32.0.ebuild @@ -76,7 +76,18 @@ src_install() { dosym "../../opt/${P}/bin/${rustlldb}" "/usr/bin/${rustlldb}" local cargo=cargo-bin-${PV} - mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die + # ugly hack for https://bugs.gentoo.org/679806 + if use ppc64; then + mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}".bin || die + sed -i 's/getentropy/gEtEnTrOpY/g' "${D}/opt/${P}/bin/${cargo}".bin || die + cat <<- 'EOF' > "${D}/opt/${P}/bin/${cargo}" + #!/bin/sh + OPENSSL_ppccap=0 $(realpath $0).bin "${@}" + EOF + fperms +x "/opt/${P}/bin/${cargo}" + else + mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die + fi dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}" if use clippy; then local clippy_driver=clippy-driver-bin-${PV} diff --git a/dev-lang/rust-bin/rust-bin-1.33.0.ebuild b/dev-lang/rust-bin/rust-bin-1.33.0.ebuild index a2af32c2885b..170a05bf8146 100644 --- a/dev-lang/rust-bin/rust-bin-1.33.0.ebuild +++ b/dev-lang/rust-bin/rust-bin-1.33.0.ebuild @@ -76,7 +76,18 @@ src_install() { dosym "../../opt/${P}/bin/${rustlldb}" "/usr/bin/${rustlldb}" local cargo=cargo-bin-${PV} - mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die + # ugly hack for https://bugs.gentoo.org/679806 + if use ppc64; then + mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}".bin || die + sed -i 's/getentropy/gEtEnTrOpY/g' "${D}/opt/${P}/bin/${cargo}".bin || die + cat <<- 'EOF' > "${D}/opt/${P}/bin/${cargo}" + #!/bin/sh + OPENSSL_ppccap=0 $(realpath $0).bin "${@}" + EOF + fperms +x "/opt/${P}/bin/${cargo}" + else + mv "${D}/opt/${P}/bin/cargo" "${D}/opt/${P}/bin/${cargo}" || die + fi dosym "../../opt/${P}/bin/${cargo}" "/usr/bin/${cargo}" if use clippy; then local clippy_driver=clippy-driver-bin-${PV}