From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 5BDD215800A for ; Mon, 14 Aug 2023 16:39:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7CACB2BC01F; Mon, 14 Aug 2023 16:39:56 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6267C2BC018 for ; Mon, 14 Aug 2023 16:39:56 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A3614335CF5 for ; Mon, 14 Aug 2023 16:39:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3E541FA0 for ; Mon, 14 Aug 2023 16:39:54 +0000 (UTC) From: "Ionen Wolkens" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ionen Wolkens" Message-ID: <1692031164.34c8f499d948e594a22ed16bb05db007e7f77d6f.ionen@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine-staging/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-emulation/wine-staging/wine-staging-8.13.ebuild app-emulation/wine-staging/wine-staging-9999.ebuild X-VCS-Directories: app-emulation/wine-staging/ X-VCS-Committer: ionen X-VCS-Committer-Name: Ionen Wolkens X-VCS-Revision: 34c8f499d948e594a22ed16bb05db007e7f77d6f X-VCS-Branch: master Date: Mon, 14 Aug 2023 16:39:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4bc2736f-0123-4607-af7a-d4c7a9f19574 X-Archives-Hash: 486f8f4dd58f0bcde1796b0f99cfd394 commit: 34c8f499d948e594a22ed16bb05db007e7f77d6f Author: Ionen Wolkens gentoo org> AuthorDate: Mon Aug 14 12:30:39 2023 +0000 Commit: Ionen Wolkens gentoo org> CommitDate: Mon Aug 14 16:39:24 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34c8f499 app-emulation/wine-staging: more solid wine{64,} symlink handling To ensure potential situations where the wine binary would be overwritten by a symlink don't happen. Current layout worked but future changes or EXTRA_ECONF can make it rather fragile. Only changing in 8.13/9999 given wow64 is what complexified this further. For the record: abi_x86_64 -abi_x86_32 -wow64 = wine64-only abi_x86_64 -abi_x86_32 wow64 = wine-only -abi_x86_64 abi_x86_32 -wow64 = wine-only abi_x86_64 abi_x86_32 -wow64 = wine and wine64 Could argue that having "wine64" is not really useful, but lot of scripts and users still expect it and other distros like Alpine are making the symlink with wow64 too. Signed-off-by: Ionen Wolkens gentoo.org> .../wine-staging/wine-staging-8.13.ebuild | 37 ++++++++++++---------- .../wine-staging/wine-staging-9999.ebuild | 37 ++++++++++++---------- 2 files changed, 42 insertions(+), 32 deletions(-) diff --git a/app-emulation/wine-staging/wine-staging-8.13.ebuild b/app-emulation/wine-staging/wine-staging-8.13.ebuild index 9f7c5dfd6147..7141425288ae 100644 --- a/app-emulation/wine-staging/wine-staging-8.13.ebuild +++ b/app-emulation/wine-staging/wine-staging-8.13.ebuild @@ -384,22 +384,27 @@ src_install() { use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last - if use wow64; then - # compat symlinks, albeit ideally no one should call "wine64" - dosym wine ${WINE_PREFIX}/bin/wine64 - dosym wine-preloader ${WINE_PREFIX}/bin/wine64-preloader - elif use abi_x86_64 && use !abi_x86_32; then - # if no 32bit support it instead only installs "wine64" which may - # come as unexpected, so provide "wine" alongside its man page - dosym wine64 ${WINE_PREFIX}/bin/wine - dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader - local man - for man in ../build64/loader/wine.*man; do - : "${man##*/wine}" - : "${_%.*}" - insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1 - newins ${man} wine.1 - done + # Ensure both wine64 and wine are available if USE=abi_x86_64 (wow64, + # -abi_x86_32, and/or EXTRA_ECONF could cause varying scenarios where + # one or the other could be missing and that is unexpected for users + # and some tools like winetricks) + if use abi_x86_64; then + if [[ -e ${ED}${WINE_PREFIX}/bin/wine64 && ! -e ${ED}${WINE_PREFIX}/bin/wine ]]; then + dosym wine64 ${WINE_PREFIX}/bin/wine + dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader + + # also install wine(1) man pages (incl. translations) + local man + for man in ../build64/loader/wine.*man; do + : "${man##*/wine}" + : "${_%.*}" + insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1 + newins ${man} wine.1 + done + elif [[ ! -e ${ED}${WINE_PREFIX}/bin/wine64 && -e ${ED}${WINE_PREFIX}/bin/wine ]]; then + dosym wine ${WINE_PREFIX}/bin/wine64 + dosym wine-preloader ${WINE_PREFIX}/bin/wine64-preloader + fi fi use perl || rm "${ED}"${WINE_DATADIR}/man/man1/wine{dump,maker}.1 \ diff --git a/app-emulation/wine-staging/wine-staging-9999.ebuild b/app-emulation/wine-staging/wine-staging-9999.ebuild index 9f7c5dfd6147..7141425288ae 100644 --- a/app-emulation/wine-staging/wine-staging-9999.ebuild +++ b/app-emulation/wine-staging/wine-staging-9999.ebuild @@ -384,22 +384,27 @@ src_install() { use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last - if use wow64; then - # compat symlinks, albeit ideally no one should call "wine64" - dosym wine ${WINE_PREFIX}/bin/wine64 - dosym wine-preloader ${WINE_PREFIX}/bin/wine64-preloader - elif use abi_x86_64 && use !abi_x86_32; then - # if no 32bit support it instead only installs "wine64" which may - # come as unexpected, so provide "wine" alongside its man page - dosym wine64 ${WINE_PREFIX}/bin/wine - dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader - local man - for man in ../build64/loader/wine.*man; do - : "${man##*/wine}" - : "${_%.*}" - insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1 - newins ${man} wine.1 - done + # Ensure both wine64 and wine are available if USE=abi_x86_64 (wow64, + # -abi_x86_32, and/or EXTRA_ECONF could cause varying scenarios where + # one or the other could be missing and that is unexpected for users + # and some tools like winetricks) + if use abi_x86_64; then + if [[ -e ${ED}${WINE_PREFIX}/bin/wine64 && ! -e ${ED}${WINE_PREFIX}/bin/wine ]]; then + dosym wine64 ${WINE_PREFIX}/bin/wine + dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader + + # also install wine(1) man pages (incl. translations) + local man + for man in ../build64/loader/wine.*man; do + : "${man##*/wine}" + : "${_%.*}" + insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1 + newins ${man} wine.1 + done + elif [[ ! -e ${ED}${WINE_PREFIX}/bin/wine64 && -e ${ED}${WINE_PREFIX}/bin/wine ]]; then + dosym wine ${WINE_PREFIX}/bin/wine64 + dosym wine-preloader ${WINE_PREFIX}/bin/wine64-preloader + fi fi use perl || rm "${ED}"${WINE_DATADIR}/man/man1/wine{dump,maker}.1 \