commit: 6e428d13d6870832812748de67e48f170cbce6a5 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> AuthorDate: Mon Mar 11 04:46:09 2019 +0000 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> CommitDate: Mon Mar 11 04:51:16 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e428d13
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 <gyakovlev <AT> gentoo.org> dev-lang/rust-bin/rust-bin-1.32.0.ebuild | 13 ++++++++++++- dev-lang/rust-bin/rust-bin-1.33.0.ebuild | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) 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 a2af32c2885..170a05bf814 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 a2af32c2885..170a05bf814 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}
