commit:     e95136ce6a2fba26b53505fad7d82b630dc463dc
Author:     Andreas K. Huettel (dilfridge) <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 14 21:13:03 2015 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sat Nov 14 21:13:03 2015 +0000
URL:        https://gitweb.gentoo.org/proj/vmware.git/commit/?id=e95136ce

app-emulation/vmware-workstation: add untested rpath logic

Package-Manager: portage-2.2.24

 .../vmware-workstation-11.1.2.2780323-r3.ebuild      | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git 
a/app-emulation/vmware-workstation/vmware-workstation-11.1.2.2780323-r3.ebuild 
b/app-emulation/vmware-workstation/vmware-workstation-11.1.2.2780323-r3.ebuild
index c17809b..986b5a5 100644
--- 
a/app-emulation/vmware-workstation/vmware-workstation-11.1.2.2780323-r3.ebuild
+++ 
b/app-emulation/vmware-workstation/vmware-workstation-11.1.2.2780323-r3.ebuild
@@ -29,6 +29,14 @@ RESTRICT="mirror strip"
 
 BUNDLED_LIBS_DIR=/opt/vmware/lib/vmware/lib
 
+BUNDLED_LIBS_PATCH="
+       libvmplayer.so
+       libvmware-enter-serial.so
+       libvmware-fuseUI.so
+       libgcr.so.0
+       libgksu2.so.0
+"
+
 BUNDLED_LIBS="
        libXau.so.6
        libXcomposite.so.1
@@ -131,6 +139,8 @@ RDEPEND="
 PDEPEND="~app-emulation/vmware-modules-304.${PV_MINOR}
        vmware-tools? ( app-emulation/vmware-tools )"
 
+DEPEND="dev-util/patchelf"
+
 S=${WORKDIR}
 VM_INSTALL_DIR="/opt/vmware"
 VM_DATA_STORE_DIR="/var/lib/vmware/Shared VMs"
@@ -177,6 +187,15 @@ clean_bundled_libs() {
        done
 }
 
+patch_bundled_libs() {
+       for libname in ${BUNDLED_LIBS_PATCH} ; do
+               if [[ -f "${S}"/lib/lib/${libname}/${libname} ]]; then 
+                       einfo "Setting RPATH of ${libname}"
+                       patchelf --set-rpath "${VM_INSTALL_DIR}"/lib/vmware/lib 
"${S}"/lib/lib/${libname}/${libname} || die "Failed patching ${libname}"
+               fi
+       done
+}
+
 src_prepare() {
        rm -f  bin/vmware-modconfig
        rm -rf lib/modules/binary
@@ -192,6 +211,7 @@ src_prepare() {
        if ! use bundled-libs ; then
                clean_bundled_libs
        fi
+       patch_bundled_libs
 
        DOC_CONTENTS="
 /etc/env.d is updated during ${PN} installation. Please run:\n

Reply via email to