dev-lang/rust: fix codegen-backends location on x86
authorGeorgy Yakovlev <gyakovlev@gentoo.org>
Mon, 27 May 2019 00:06:35 +0000 (17:06 -0700)
committerGeorgy Yakovlev <gyakovlev@gentoo.org>
Mon, 27 May 2019 00:12:58 +0000 (17:12 -0700)
comitting to stable without revbump so I don't force
all other users to rebuild this beast

Bug: https://bugs.gentoo.org/672816
Package-Manager: Portage-2.3.67, Repoman-2.3.13
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
dev-lang/rust/rust-1.34.2.ebuild

index 6a8ae98793bc749676c2cd3b781283bb91f6d9e7..c0d1a001cbc336b9d04ecce1a3f9d61c8ffe98ec 100644 (file)
@@ -266,6 +266,18 @@ src_install() {
                   "${ED}/usr/${abi_libdir}" || die
        done
 
+       # temp fix for https://bugs.gentoo.org/672816
+       if use x86; then
+               local rust_target wrongdir rightdir
+               rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
+               wrongdir="${ED}/usr/$(get_libdir)/${P}/${P}/rustlib/${rust_target}/codegen-backends"
+               rightdir="${ED}/usr/$(get_libdir)/${P}/rustlib/${rust_target}/codegen-backends"
+               if [[ -e ${wrongdir}/librustc_codegen_llvm-llvm.so ]]; then
+                       mv "${wrongdir}" "${rightdir}" || die
+                       rm -r "${ED}/usr/$(get_libdir)/${P}/${P}" || die
+               fi
+       fi # end temp fix
+
        dodoc COPYRIGHT
 
        # FIXME: