From 535b3b2dee2239e5771a4358a7130427491188e6 Mon Sep 17 00:00:00 2001 From: Huang Rui Date: Thu, 9 Jun 2022 10:22:18 +0800 Subject: [PATCH] app-emulation/deepin-wine6-stable: Set RPATH for libs handling Fix openldap and pcap libs linking Signed-off-by: Huang Rui --- .../deepin-wine6-stable-6.0.0.19-r1.ebuild | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/app-emulation/deepin-wine6-stable/deepin-wine6-stable-6.0.0.19-r1.ebuild b/app-emulation/deepin-wine6-stable/deepin-wine6-stable-6.0.0.19-r1.ebuild index 20e575a4a..25160236b 100644 --- a/app-emulation/deepin-wine6-stable/deepin-wine6-stable-6.0.0.19-r1.ebuild +++ b/app-emulation/deepin-wine6-stable/deepin-wine6-stable-6.0.0.19-r1.ebuild @@ -59,6 +59,8 @@ RDEPEND="${DEPEND} x11-libs/libXi[abi_x86_32(-)] " +BDEPEND="dev-util/patchelf" + S=${WORKDIR} QA_FLAGS_IGNORED=".*" QA_PREBUILT="*" @@ -72,6 +74,31 @@ src_install() { mv "${S}"/usr/lib/i386-linux-gnu/* "${S}"/opt/"${PN}"/lib/ || die mv "${S}"/usr/lib/x86_64-linux-gnu/* "${S}"/opt/"${PN}"/lib64/ || die + # Set RPATH for libs handling + pushd "${S}"/opt/"${PN}"/lib || die + local x + for x in $(find) ; do + # Use \x7fELF header to separate ELF executables and libraries + [[ -f ${x} && $(od -t x1 -N 4 "${x}") == *"7f 45 4c 46"* ]] || continue + local RPATH_ROOT="${EPREFIX}"/opt/"${PN}"/lib + local RPATH_S="${RPATH_ROOT}/" + patchelf --set-rpath "${RPATH_S}" "${x}" || \ + die "patchelf failed on ${x}" + done + popd || die + + pushd "${S}"/opt/"${PN}"/lib64 || die + local x + for x in $(find) ; do + # Use \x7fELF header to separate ELF executables and libraries + [[ -f ${x} && $(od -t x1 -N 4 "${x}") == *"7f 45 4c 46"* ]] || continue + local RPATH_ROOT="${EPREFIX}"/opt/"${PN}"/lib64 + local RPATH_S="${RPATH_ROOT}/" + patchelf --set-rpath "${RPATH_S}" "${x}" || \ + die "patchelf failed on ${x}" + done + popd || die + insinto / doins -r usr opt -- 2.11.4.GIT