Gentoo Archives: gentoo-commits

From: Ionen Wolkens <ionen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-eselect/eselect-wine/
Date: Tue, 29 Nov 2022 00:27:12
Message-Id: 1669681576.06de42a09142d4bc632638bf63fa21c55c4a2dbb.ionen@gentoo
1 commit: 06de42a09142d4bc632638bf63fa21c55c4a2dbb
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 29 00:25:56 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 29 00:26:16 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06de42a0
7
8 app-eselect/eselect-wine: add 2.0.1
9
10 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
11
12 app-eselect/eselect-wine/Manifest | 1 +
13 app-eselect/eselect-wine/eselect-wine-2.0.1.ebuild | 92 ++++++++++++++++++++++
14 2 files changed, 93 insertions(+)
15
16 diff --git a/app-eselect/eselect-wine/Manifest b/app-eselect/eselect-wine/Manifest
17 index 311d29dba343..e4b17b5785bf 100644
18 --- a/app-eselect/eselect-wine/Manifest
19 +++ b/app-eselect/eselect-wine/Manifest
20 @@ -1,2 +1,3 @@
21 DIST eselect-wine-1.2.2.tar.gz 4712 BLAKE2B 6ce92654cf2a5197c18bc84f8db52a11f198f81f0a8116f1986e74a1795ad475d22ff5a7cb9e9e31ce8ca813059b33cfbc52763110238cb378b15bebeb4b4271 SHA512 39f4d91461f72aeb07292dc7479c5cb7fc080b843bac57dec85c43d8751227e6953d32d52d4a14387d398b73120a32b79370d686c823f230dfd1d8b32ac8113a
22 DIST eselect-wine-2.0.0.tar.bz2 7336 BLAKE2B facbad9bb4a937a310b1f81c5eb9fd1e29ce1a04cf524f7fd1f6322715d15e639fa27e99220cfc5b3659932d5ee57864a4615523e2dc5142da8ad7e9b49290fc SHA512 ec89b4b2fb3bf60e00983f7dd2c2aaa4c797005516f03573000482c5efa1f62e73d0bc149bb9203c5186a7a0a259d7461e95f077deadfd6791ea8d5bc5cb3c00
23 +DIST eselect-wine-2.0.1.tar.bz2 7391 BLAKE2B 646b4f07988448c70d2bdb0057b4b5e4a36fbd8f6dd1475cb131c26b4d10afb1a274c53aba0f705497f840f45b53fda4307882c588b69bcf5e8754ad153ea4de SHA512 a90da162bfd80a9f2f9a688e765152e1b03f5d27742f67a8485546cb663547f2f6eea302e857454e3cf00632967b8d83e9578f6be36171178f7e78aa3adf3838
24
25 diff --git a/app-eselect/eselect-wine/eselect-wine-2.0.1.ebuild b/app-eselect/eselect-wine/eselect-wine-2.0.1.ebuild
26 new file mode 100644
27 index 000000000000..92c25353de07
28 --- /dev/null
29 +++ b/app-eselect/eselect-wine/eselect-wine-2.0.1.ebuild
30 @@ -0,0 +1,92 @@
31 +# Copyright 2022 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +DESCRIPTION="Manage active Wine slots and variants"
37 +HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Wine"
38 +SRC_URI="https://gitweb.gentoo.org/proj/eselect-wine.git/snapshot/${P}.tar.bz2"
39 +
40 +LICENSE="GPL-2+"
41 +SLOT="0"
42 +KEYWORDS="~amd64 ~x86"
43 +
44 +RDEPEND="app-admin/eselect"
45 +
46 +pkg_pretend() {
47 + # /usr/bin/wine and /usr/include/wine are removed by pkg_preinst's unset,
48 + # but portage currently checks collisions and errors out /before/ preinst
49 + if has_version '<app-eselect/eselect-wine-2' &&
50 + has collision-protect ${FEATURES}
51 + then
52 + eerror
53 + eerror "!Warning! will likely need to either disable FEATURES=collision-protect or"
54 + eerror "delete ${EROOT}/usr/bin/wine and ${EROOT}/usr/include/wine to merge ${P}"
55 + eerror "(these files should be orphaned, so default FEATURES=protect-owned is fine)"
56 + eerror
57 + fi
58 +}
59 +
60 +src_install() {
61 + insinto /usr/share/eselect/modules
62 + doins wine.eselect
63 +
64 + keepdir /etc/eselect/wine
65 +
66 + newenvd - 60${PN} <<-EOF
67 + PATH="${EPREFIX}/etc/eselect/wine/bin"
68 + MANPATH="${EPREFIX}/etc/eselect/wine/share/man"
69 + XDG_DATA_DIRS="${EPREFIX}/etc/eselect/wine/share"
70 + EOF
71 +
72 + # links for building, e.g. wineasio (bug #657748)
73 + dosym -r /etc/eselect/wine/wine /usr/lib/wine
74 + dosym -r /etc/eselect/wine/include /usr/include/wine
75 +
76 + # not required, but useful for e.g. binfmt that's not looking in PATH
77 + # (not doing this for everything as it gets troublesome to track)
78 + dosym -r /etc/eselect/wine/bin/wine /usr/bin/wine
79 +
80 + einstalldocs
81 +}
82 +
83 +pkg_preinst() {
84 + if has_version '<app-eselect/eselect-wine-2'; then
85 + # keep copy of still-set 'active' to auto-select same slots
86 + [[ ! -e ${EROOT}/etc/eselect/wine/active ]] ||
87 + cp "${EROOT}"/etc/eselect/wine/{active,eselect-wine-migration} || die
88 +
89 + # managed differently, need cleanup
90 + eselect wine unset --all || die
91 + rm -f "${EROOT}"/etc/eselect/wine/{active,installed,links/{any,vanilla,staging,proton,wine}} || die
92 + rmdir "${EROOT}"/etc/eselect/wine/links 2>/dev/null
93 +
94 + # some rare man dirs were created by old eselect, cleanup if now empty
95 + rmdir "${EROOT}"/usr/share/man/{de,fr,pl}.UTF-8{/man1,} 2>/dev/null
96 + fi
97 +
98 + # lacking QA_BROKEN_SYMLINK, and rather avoid live /usr changes wrt
99 + # bug #632576, nor create "owned" placeholders that will be clobbered
100 + [[ -e ${EROOT}/etc/eselect/wine/bin/wine ]] ||
101 + eqawarn "QA Note: broken symlinks QA is normal on first merge, targets created after"
102 +}
103 +
104 +pkg_postinst() {
105 + eselect wine update --if-unset || die
106 +
107 + rm -f "${EROOT}"/etc/eselect/wine/eselect-wine-migration || die # see preinst
108 +
109 + if [[ ! ${REPLACING_VERSIONS##* } ]] ||
110 + ver_test ${REPLACING_VERSIONS##* } -lt 2; then
111 + elog
112 + if [[ ${REPLACING_VERSIONS} ]]; then
113 + elog "${PN} changed a bit, suggest reviewing 'eselect wine help' (and list)."
114 + elog "Note: if seen bin/wine or include/wine merge collisions, they are harmless."
115 + fi
116 + elog "Please run '. ${EROOT}/etc/profile' to update PATH in current shells."
117 + fi
118 +}
119 +
120 +pkg_prerm() {
121 + [[ ${REPLACED_BY_VERSION} ]] || eselect wine update --reset # no die
122 +}