Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 384424 Details for
Bug 310611
app-emulation/wine would be nice to be slotted
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
wine.eselect
wine.eselect (text/plain), 5.02 KB, created by
eroen
on 2014-09-08 22:09:38 UTC
(
hide
)
Description:
wine.eselect
Filename:
MIME Type:
Creator:
eroen
Created:
2014-09-08 22:09:38 UTC
Size:
5.02 KB
patch
obsolete
># -*-eselect-*- vim: ft=eselect ># Copyright 2005-2014 Gentoo Foundation ># Distributed under the terms of the GNU GPL version 2 or later > >DESCRIPTION="Manage active wine version" >MAINTAINER="" > >PREFIXDIR=/usr/lib >BINDIR=/usr/bin >EXECUTABLES=(msiexec notepad regedit regsvr32 widl wine wine64 wine64-preloader >wineboot winebuild winecfg wineconsole winecpp winedbg winefile wineg++ winegcc >winemine winepath wine-preloader wineserver wmc wrc) >MANDIR=/usr/share/man >MANPAGES=(man1/widl.1 man1/winebuild.1 man1/winegcc.1 man1/wineg++.1 >man1/winecpp.1 man1/wineserver.1 man1/wine.1 man1/wmc.1 man1/wrc.1 >man1/msiexec.1 man1/notepad.1 man1/regedit.1 man1/regsvr32.1 man1/wineboot.1 >man1/winecfg.1 man1/wineconsole.1 man1/winedbg.1 man1/winefile.1 >man1/winemine.1 man1/winepath.1) >DESKTOPFILES=(wine.desktop) >DESKTOPDIR=/usr/share/applications > ># TODO: ># sort function for kernel versions, to be used in a pipe >sort_kernel_versions() { > local vsort="sort --version-sort" > # Test if our sort supports the --version-sort option > # (should be GNU sort, since the kernel module is GNU/Linux specific) > ${vsort} </dev/null &>/dev/null || vsort=sort > > # We sort kernel versions as follows: > # 1. Run sed to prepend the version string by the numeric version > # and an additional rank indicator that is 0 for release candidates > # or 1 otherwise. After this step we have, for example: > # 2.6.29 1 linux-2.6.29 > # 2.6.29 0 linux-2.6.29-rc8 > # 2. sort --version-sort > # 3. Run sed again to remove the prepended keys from step 1. > sed -e 's/^\(wine-\)\?\([[:digit:].]\+\)[-_]rc/\2 0 &/' \ > -e 't;s/^\(wine-\)\?\([[:digit:].]\+\)/\2 1 &/' \ > | LC_ALL=C ${vsort} | sed 's/.* //' >} > ># find a list of installed wine versions >find_targets() { > local f > for f in "${EROOT}${PREFIXDIR}"/wine-*; do > [[ -f ${f}/bin/wine ]] && basename "${f}" > done | sort_kernel_versions >} > ># remove wine symlinks >remove_symlinks() { > for exe in "${EXECUTABLES[@]}"; do > if [[ -L ${EROOT}${BINDIR}/${exe} ]]; then > rm "${EROOT}${BINDIR}/${exe}" || return 1 > fi > done > > for page in "${MANPAGES[@]}"; do > if [[ -L ${EROOT}/${MANDIR}/${page} ]]; then > rm "${EROOT}/${MANDIR}/${page}" || return 1 > fi > done > for d in "${DESKTOPFILES[@]}"; do > if [[ -L ${EROOT}/${DESKTOPDIR}/${d} ]]; then > rm "${EROOT}/${DESKTOPDIR}/${d}" || return 1 > fi > done > > return 0 >} > ># set wine symlinks >set_symlinks() { > local target=$1 > > if is_number "${target}"; then > local targets=( $(find_targets) ) > target=${targets[target-1]} > fi > > if [[ -z ${target} ]]; then > die -q "Target \"$1\" doesn't appear to be valid!" > elif [[ -f ${EROOT}${PREFIXDIR}/${target}/bin/wine ]]; then > > for exe in "${EXECUTABLES[@]}"; do > local tgtexe="${exe}"-"${target#wine-}" > if [[ -f ${EROOT}${BINDIR}/${tgtexe} ]] || [[ -L ${EROOT}${BINDIR}/${tgtexe} ]]; then > ln -s "${tgtexe}" "${EROOT}${BINDIR}/${exe}" || return 1 > fi > done > > for page in "${MANPAGES[@]}"; do > if [[ -f ${EROOT}${PREFIXDIR}/${target}/man/${page} ]]; then > ln -s "${EROOT}${PREFIXDIR}/${target}/man/${page}" "${EROOT}/${MANDIR}/${page}" || return 1 > fi > done > > for d in "${DESKTOPFILES[@]}"; do > if [[ -f ${EROOT}${PREFIXDIR}/${target}/applications/${d} ]]; then > ln -s "${EROOT}${PREFIXDIR}/${target}/applications/${d}" "${EROOT}/${DESKTOPDIR}/${d}" || return 1 > fi > done > > else > die -q "Target \"$1\" doesn't appear to be valid!" > fi > > return 0 >} > >### show action ### > >describe_show() { > echo "Show the active wine version" >} > >do_show() { > write_list_start "Active wine version:" > if [[ -L ${EROOT}${BINDIR}/wine ]]; then > local wine=$(canonicalise "${EROOT}${BINDIR}/wine") > winedir=${EROOT}${PREFIXDIR}/${wine##*/} > write_kv_list_entry "${winedir%/}" "" > [[ -f ${winedir}/bin/wine ]] \ > || write_warning_msg "Symlink target doesn't appear to be valid!" > else > write_kv_list_entry "(unset)" "" > fi >} > >### list action ### > >describe_list() { > echo "List available wine versions" >} > >do_list() { > local i targets=( $(find_targets) ) > > write_list_start "Available wine versions:" > for (( i = 0; i < ${#targets[@]}; i++ )); do > [[ ${targets[i]} = \ > $(basename "$(canonicalise "${EROOT}${BINDIR}/wine")") ]] \ > && targets[i]=$(highlight_marker "${targets[i]}") > done > write_numbered_list -m "(none found)" "${targets[@]}" >} > >### remove action ### > >describe_remove() { > echo "Remove wine symlinks" >} > >do_remove() { > remove_symlinks || die -q "Couldn't remove existing symlinks" >} > >### set action ### > >describe_set() { > echo "Set a new wine version" >} > >describe_set_parameters() { > echo "<target>" >} > >describe_set_options() { > echo "target : Target name or number (from 'list' action)" >} > >do_set() { > [[ -z $1 ]] && die -q "You didn't tell me what version to symlink" > [[ $# -gt 1 ]] && die -q "Too many parameters" > > for exe in "${EXECUTABLES[@]}"; do > if [[ -L ${EROOT}/usr/bin/${exe} ]]; then > continue > elif [[ -e ${EROOT}/usr/bin/${exe} ]]; then > # we have something strange > die -q "${EROOT}/usr/bin/${exe} exists but is not a symlink" > fi > done > > remove_symlinks || die -q "Couldn't remove existing symlinks" > set_symlinks "$1" || die -q "Couldn't set a new symlinks" >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 310611
:
384422
|
384424
|
384432
|
384582
|
384584
|
384586
|
384588
|
386100