From 599b4d6cc61b40e2319534293c89e6e3acad74ea Mon Sep 17 00:00:00 2001 From: eroen Date: Thu, 22 Jan 2015 22:52:21 +0100 Subject: symlink lib stuff --- wine.eselect | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/wine.eselect b/wine.eselect index 3d29c37..33fda2f 100644 --- a/wine.eselect +++ b/wine.eselect @@ -2,6 +2,8 @@ # Copyright 2005-2014 Gentoo Foundation # Distributed under the terms of the GNU GPL version 2 or later +inherit multilib tests + DESCRIPTION="Manage active wine version" MAINTAINER="" @@ -72,6 +74,16 @@ remove_symlinks() { if [[ -L ${EROOT}/usr/include/wine ]]; then rm "${EROOT}/usr/include/wine" || return 1 fi + for d in $(list_libdirs); do + local ld=/usr/$d + [[ -L $ld ]] && continue + for f in "$ld"/libwine.so*; do + rm -f "$f" || return 1 + done + if [[ -L ${ld}/wine ]]; then + rm -f "${ld}/wine" || return 1 + fi + done desktop_database_update @@ -115,6 +127,18 @@ set_symlinks() { ln -s "${EROOT}${PREFIXDIR}/${target}/include/wine" "${EROOT}/usr/include/wine" || return 1 fi + for d in $(list_libdirs); do + local ld=/usr/$d + [[ -L $ld ]] && continue + local wined=${EROOT}${PREFIXDIR}/${target}/${d} + for f in "${wined}"/libwine.so*; do + ln -s "$f" "$ld"/ || return 1 + done + if [[ -d ${wined}/wine ]]; then + ln -s "${wined}/wine" "$ld"/wine || return 1 + fi + done + else die -q "Target \"$1\" doesn't appear to be valid!" fi -- cgit v1.2.3-65-gdbad