diff options
Diffstat (limited to 'app-eselect/eselect-wine')
-rw-r--r-- | app-eselect/eselect-wine/Manifest | 1 | ||||
-rw-r--r-- | app-eselect/eselect-wine/eselect-wine-2.0.2-r1.ebuild | 95 |
2 files changed, 96 insertions, 0 deletions
diff --git a/app-eselect/eselect-wine/Manifest b/app-eselect/eselect-wine/Manifest index 6952578c3012..8a86ae5d9839 100644 --- a/app-eselect/eselect-wine/Manifest +++ b/app-eselect/eselect-wine/Manifest @@ -1,3 +1,4 @@ DIST eselect-wine-2.0.2.tar.bz2 7449 BLAKE2B ce933920a7b6d1df0c0e5f5ae27b1ad1c7467489bd2d35c977b1d9894012b6bcb52d2830c3ebcef9228de40c6f31650e78d40051c82badf959c51339fe6bfa10 SHA512 c49c08e25d7e15c04205608118ea38e970db31f394534efd44070eec5c2148463c09d2b2787a9bb9c1b5f29010e99b4769d3f219b3ae826ceae56757aab596d1 +EBUILD eselect-wine-2.0.2-r1.ebuild 3296 BLAKE2B 38600efc70b5293a7ee976c7d9616095163e85da1f006a9f52e7ff1f7a8d6a80a695307e8bb92304480e46ea57e008c31488508b0149e02b48a935949b0385ca SHA512 dd57d0237c6089b159ab2c2b284dfd129a30a62d36c0c6d22d0c703ef292bfd1653bbb094823a21ffd65f41448fd12a8d6fe797d979522b94a14bd1554868f99 EBUILD eselect-wine-2.0.2.ebuild 2604 BLAKE2B 8132089785f2e13accdd1666e1f6c45b4506d0311f6265f948049b66fddc02802d37cf9a2fa233fe1d0edf115cfe69517e0c9f3e57b16729411a1c2456f2f904 SHA512 a2d1afc85ba070bc4e26c8bbaa1c100f6840d6e7c4db2ea999be71699eccad4f075d4711ea5720fa77280bd7121b2c184fe0745c5a903ef7249addd7f3336b67 MISC metadata.xml 494 BLAKE2B 8b6b0225e0825473ffab8dd707a6ebfa1f491da865a8975eeeab8062537650e06d4703201af59bd775870f04f7422e6da1eab6e2a874faa24776a26c1bb48d19 SHA512 22a330313d9f4408b89dde624ce9e94601257d3650e25df6bc803ca10c52a7fb7c6723fc6b9527429eaea528431e89e985b16249252a0298b6f76c77ce3feb33 diff --git a/app-eselect/eselect-wine/eselect-wine-2.0.2-r1.ebuild b/app-eselect/eselect-wine/eselect-wine-2.0.2-r1.ebuild new file mode 100644 index 000000000000..8abf0116e6e0 --- /dev/null +++ b/app-eselect/eselect-wine/eselect-wine-2.0.2-r1.ebuild @@ -0,0 +1,95 @@ +# Copyright 2022-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Manage active Wine slots and variants" +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Wine" +SRC_URI="https://gitweb.gentoo.org/proj/eselect-wine.git/snapshot/${P}.tar.bz2" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+xdg" + +# xdg-utils needed for bug #884077 +RDEPEND=" + app-admin/eselect + xdg? ( x11-misc/xdg-utils ) +" + +src_install() { + insinto /usr/share/eselect/modules + doins wine.eselect + + keepdir /etc/eselect/wine + + newenvd - 95${PN} <<-EOF + PATH="${EPREFIX}/etc/eselect/wine/bin" + MANPATH="${EPREFIX}/etc/eselect/wine/share/man"$(usev xdg " + XDG_DATA_DIRS=\"${EPREFIX}/etc/eselect/wine/share\"") + EOF + + # links for building, e.g. wineasio (bug #657748), albeit this + # should be rarely used directly nowadays and could be removable + # (removing would also solve the one-time QA issue described below) + dosym -r /etc/eselect/wine/wine /usr/lib/wine + dosym -r /etc/eselect/wine/include /usr/include/wine + + einstalldocs +} + +pkg_preinst() { + if has_version '<app-eselect/eselect-wine-2'; then + # keep copy of still-set 'active' to auto-select same slots + if [[ -e ${EROOT}/etc/eselect/wine/active && + ! -e ${EROOT}/etc/eselect/wine/eselect-wine-migration ]]; then + cp "${EROOT}"/etc/eselect/wine/{active,eselect-wine-migration} || die + fi + + # managed differently, need cleanup + eselect wine unset --all || die + rm -f "${EROOT}"/etc/eselect/wine/{active,installed,links/{any,vanilla,staging,proton,wine}} || die + rmdir "${EROOT}"/etc/eselect/wine/links 2>/dev/null + + # some rare man dirs were created by old eselect, cleanup if now empty + rmdir "${EROOT}"/usr/share/man/{de,fr,pl}.UTF-8{/man1,} 2>/dev/null + fi + + # lacking QA_BROKEN_SYMLINK, and rather avoid live /usr changes wrt + # bug #632576, nor create "owned" placeholders that will be clobbered + [[ -e ${EROOT}/etc/eselect/wine/bin/wine ]] || + eqawarn "QA Note: broken symlinks QA is normal on first merge, targets created after" +} + +pkg_postinst() { + eselect wine update --if-unset || die + + rm -f "${EROOT}"/etc/eselect/wine/eselect-wine-migration || die # see preinst + + if [[ ! ${REPLACING_VERSIONS##* } ]] || + ver_test ${REPLACING_VERSIONS##* } -lt 2; then + elog + [[ ${REPLACING_VERSIONS} ]] && + elog "${PN} changed a bit, suggest reviewing 'eselect wine help' (and list)." + elog "Please run '. ${EROOT}/etc/profile' to update PATH in current shells" + elog "(PATH should have ':${EPREFIX}/etc/eselect/wine/bin'). Wine can otherwise" + elog "be executed directly from '${EPREFIX}/etc/eselect/wine/bin/wine'." + fi + + if [[ ${REPLACING_VERSIONS##* } ]] && + ver_test ${REPLACING_VERSIONS##* } -lt 2.0.2-r1; then + elog + elog "Be warned that >=${PN}-2.0.2-r1 no longer installs the" + elog "'${EPREFIX}/usr/bin/wine' symbolic link. wine(1) can still be found" + elog "in PATH but, if using the direct location for scripts and/or binfmt," + elog "then please update these to use: '${EPREFIX}/etc/eselect/wine/bin/wine'" + elog + elog "If wine is not found in PATH, please ensure that not overriding the" + elog "default PATH value that should include ':${EPREFIX}/etc/eselect/wine/bin'" + fi +} + +pkg_prerm() { + [[ ${REPLACED_BY_VERSION} ]] || eselect wine update --reset # no die +} |