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-emulation/wine-staging/, app-emulation/wine-staging/files/
Date: Tue, 01 Nov 2022 03:15:11
Message-Id: 1667272489.317b136b67a725efeeb7e34c686b2b1cdb8ac831.ionen@gentoo
1 commit: 317b136b67a725efeeb7e34c686b2b1cdb8ac831
2 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 1 02:44:45 2022 +0000
4 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 1 03:14:49 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=317b136b
7
8 app-emulation/wine-staging: add 7.20
9
10 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
11
12 app-emulation/wine-staging/Manifest | 2 +
13 .../files/wine-staging-7.20-unwind.patch | 36 +++
14 .../wine-staging/wine-staging-7.20.ebuild | 352 +++++++++++++++++++++
15 3 files changed, 390 insertions(+)
16
17 diff --git a/app-emulation/wine-staging/Manifest b/app-emulation/wine-staging/Manifest
18 index 60758f8a9079..97906c6ea882 100644
19 --- a/app-emulation/wine-staging/Manifest
20 +++ b/app-emulation/wine-staging/Manifest
21 @@ -1,6 +1,8 @@
22 DIST wine-7.17.tar.xz 28379876 BLAKE2B 536af8f1ac9c4dd8bae2d16cba226c99c45cd64f0a9a2569022baefee61556801d3ee15f480fd18445baecb6c78dd7950f98542dc88a3282ee5d457d0e4ddfb1 SHA512 fd8017e6174db0047a3957db3045b2ad9024e07b1e2f81800521f0b7e7f7660add6a08e09bc60e3d140816cec70aae8324fe15643bd05e541f22f66ffda52508
23 DIST wine-7.18.tar.xz 28412876 BLAKE2B 1f25c8669a2afbead142923a39913b3f21df641e446a6136e7ecd282f6c31bc70578036e83f3dd28d22516d987ddca179198f76effb5c9aca089f4755ffa873e SHA512 e651b18cef73b4619e953b746d0c207c0220279003560aaf195c2569a22308af129e1460651a246e6a87dcfbcfcff08f52f970734035eb55ab45d8970fd56a02
24 DIST wine-7.19.tar.xz 28502612 BLAKE2B b7b270656955c7a1e1d84e8bbc7e3e8abff5aedadb5e8a458f0b1109d746875a359f3d2f53b1c9c6caae65d17fd1d205466cd3a884034a8bad6afe9456f13b5d SHA512 f76dbda97cccad4c0f249b5dd4e8d48afa832134f1704ae228650bb73ee82823e628b23bd53a3f8729e06a8933597ff2fffa5551f156fc9c9181b67c066747d5
25 +DIST wine-7.20.tar.xz 28534920 BLAKE2B 2e0cd49a7820f0c885a2a6dbcded6ebbdb5e1ea5576b03dedb7ee066f74f8c675193450cdd45bf5e0224bd588a890138e47a15f513edbfde1eabf1b65c9abe31 SHA512 6e2e65fba2336985df93165050f0f46b752d6aa94fc1581451c58969e2003748378be4b9e16b647ca2922fbdff77920311b12a17bda630a7bccfc7ee8f03b453
26 DIST wine-staging-7.17.tar.gz 9558133 BLAKE2B ef56bae5168da021688766e1cfbc8bd510a18b0de670b0baab631389665d52230e4f9ecda2edff1f50cbd444098d33236fd0f685183e9074efc6d048665c6931 SHA512 2e9c260b56293d86a54833d128d98b2408f61a5601f0ef58db6ff02a9c5cb091d3e9acf7f6a616d7d065d9c02127936da6bdc30e6ee11b116d24aab579f512fb
27 DIST wine-staging-7.18.tar.gz 9535819 BLAKE2B b7157493c8362bce4683f0cd8847e41b812fa4150cee476a5598bd5b42a95686de0a25073082f513c42d618e53538e14cb5a8ce982c731f3880fb3356f4656f0 SHA512 fce34941f53f649035b9581f3612f0e47bcbb7e52d2edd33deba9123870cf69c237d10c820c8cbe1b9a784fe6e688af8690cc9ea6d71d4fc596f94ebd1a932a9
28 DIST wine-staging-7.19.tar.gz 9523048 BLAKE2B e53fd47af493cbdc4542f908a39557324d70ad67ff2e06c80296c006a63518e43988750cab2f4d3d9197fc9c8a1e61ed4d96bcc310b82b6cfc8ec12b941f1c5c SHA512 c51cb18c4ae00eccf414f5edda18ebf363674ba7cfa95da135b3a43b7c012c086d454d6ac32b22d98e611bb87e55c3e1ee95571a4a0c9713028b5ac38e8aed3f
29 +DIST wine-staging-7.20.tar.gz 9521481 BLAKE2B 5a264460e72ac96d50d23492100c465eeb0b933306200710aa085bd37bb79df3c6ef03aeb5ba2c4c196befb231938457aa9584b9edf938edfd754d06e7cdb574 SHA512 538bf60e760254f3130fe8b6bf07598287e567c0f34d6be2ed04fde10007283d4c675a6f27a0a13d3ce77e833559d5ef853a89f2f96dc5f8cc818bdc3570474a
30
31 diff --git a/app-emulation/wine-staging/files/wine-staging-7.20-unwind.patch b/app-emulation/wine-staging/files/wine-staging-7.20-unwind.patch
32 new file mode 100644
33 index 000000000000..f130ef5c23b3
34 --- /dev/null
35 +++ b/app-emulation/wine-staging/files/wine-staging-7.20-unwind.patch
36 @@ -0,0 +1,36 @@
37 +Fix build with llvm-libunwind, and also fix for non-llvm libunwind
38 +when using clang+bfd given clang doesn't have _Unwind_Find_FDE in
39 +its rtlib and expects it from llvm-libunwind.
40 +
41 +The _CONFIG_H_ check is for <llvm-libunwind-15 (adds _VERSION).
42 +--- a/dlls/ntdll/unix/dwarf.h
43 ++++ b/dlls/ntdll/unix/dwarf.h
44 +@@ -255,5 +255,7 @@
45 + };
46 +
47 ++#if defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__) || !defined(__clang__)
48 + extern const struct dwarf_fde *_Unwind_Find_FDE (void *, struct dwarf_eh_bases *);
49 ++#endif
50 +
51 + static unsigned char dwarf_get_u1( const unsigned char **p )
52 +--- a/dlls/ntdll/unix/signal_x86_64.c
53 ++++ b/dlls/ntdll/unix/signal_x86_64.c
54 +@@ -632,5 +632,5 @@
55 + int rc;
56 +
57 +-#ifdef __APPLE__
58 ++#if defined(__APPLE__) || defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__)
59 + rc = unw_getcontext( &unw_context );
60 + if (rc == UNW_ESUCCESS)
61 +@@ -755,4 +755,5 @@
62 + {
63 + struct dwarf_eh_bases bases;
64 ++#if defined(_LIBUNWIND_VERSION) || defined(____LIBUNWIND_CONFIG_H__) || !defined(__clang__)
65 + const struct dwarf_fde *fde = _Unwind_Find_FDE( (void *)(context->Rip - 1), &bases );
66 +
67 +@@ -760,4 +761,5 @@
68 + return dwarf_virtual_unwind( context->Rip, &dispatch->EstablisherFrame, context, fde,
69 + &bases, &dispatch->LanguageHandler, &dispatch->HandlerData );
70 ++#endif
71 + #ifdef HAVE_LIBUNWIND
72 + return libunwind_virtual_unwind( context->Rip, &dispatch->EstablisherFrame, context,
73
74 diff --git a/app-emulation/wine-staging/wine-staging-7.20.ebuild b/app-emulation/wine-staging/wine-staging-7.20.ebuild
75 new file mode 100644
76 index 000000000000..e2826938342d
77 --- /dev/null
78 +++ b/app-emulation/wine-staging/wine-staging-7.20.ebuild
79 @@ -0,0 +1,352 @@
80 +# Copyright 2022 Gentoo Authors
81 +# Distributed under the terms of the GNU General Public License v2
82 +
83 +EAPI=8
84 +
85 +MULTILIB_COMPAT=( abi_x86_{32,64} )
86 +inherit autotools flag-o-matic multilib multilib-build toolchain-funcs wrapper
87 +
88 +WINE_GECKO=2.47.3
89 +WINE_MONO=7.4.0
90 +
91 +if [[ ${PV} == *9999 ]]; then
92 + inherit git-r3
93 + EGIT_REPO_URI="https://github.com/wine-staging/wine-staging.git"
94 + WINE_EGIT_REPO_URI="https://gitlab.winehq.org/wine/wine.git"
95 +else
96 + (( $(ver_cut 2) )) && WINE_SDIR=$(ver_cut 1).x || WINE_SDIR=$(ver_cut 1).0
97 + SRC_URI="
98 + https://dl.winehq.org/wine/source/${WINE_SDIR}/wine-${PV}.tar.xz
99 + https://github.com/wine-staging/wine-staging/archive/v${PV}.tar.gz -> ${P}.tar.gz"
100 + KEYWORDS="-* ~amd64 ~x86"
101 +fi
102 +S="${WORKDIR}/wine-${PV}"
103 +
104 +DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset"
105 +HOMEPAGE="https://www.winehq.org/"
106 +
107 +LICENSE="LGPL-2.1+ BSD-2 IJG MIT ZLIB gsm libpng2 libtiff"
108 +SLOT="${PV}"
109 +IUSE="
110 + +X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups dos
111 + llvm-libunwind debug custom-cflags +fontconfig +gecko gphoto2
112 + +gstreamer kerberos ldap +mingw +mono netapi nls odbc openal
113 + opencl +opengl osmesa pcap perl pulseaudio samba scanner +sdl
114 + selinux +ssl +truetype udev udisks +unwind usb v4l +vulkan
115 + +xcomposite xinerama"
116 +REQUIRED_USE="
117 + X? ( truetype )
118 + crossdev-mingw? ( mingw )" # bug #551124 for truetype
119 +
120 +# tests are non-trivial to run, can hang easily, don't play well with
121 +# sandbox, and several need real opengl/vulkan or network access
122 +RESTRICT="test"
123 +
124 +# `grep WINE_CHECK_SONAME configure.ac` + if not directly linked
125 +WINE_DLOPEN_DEPEND="
126 + X? (
127 + x11-libs/libXcursor[${MULTILIB_USEDEP}]
128 + x11-libs/libXfixes[${MULTILIB_USEDEP}]
129 + x11-libs/libXi[${MULTILIB_USEDEP}]
130 + x11-libs/libXrandr[${MULTILIB_USEDEP}]
131 + x11-libs/libXrender[${MULTILIB_USEDEP}]
132 + x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
133 + opengl? (
134 + media-libs/libglvnd[X,${MULTILIB_USEDEP}]
135 + osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] )
136 + )
137 + xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
138 + xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
139 + )
140 + cups? ( net-print/cups[${MULTILIB_USEDEP}] )
141 + fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] )
142 + kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
143 + netapi? ( net-fs/samba[${MULTILIB_USEDEP}] )
144 + odbc? ( dev-db/unixODBC[${MULTILIB_USEDEP}] )
145 + sdl? ( media-libs/libsdl2[haptic,joystick,${MULTILIB_USEDEP}] )
146 + ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
147 + truetype? ( media-libs/freetype[${MULTILIB_USEDEP}] )
148 + udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
149 + v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
150 + vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )"
151 +WINE_COMMON_DEPEND="
152 + ${WINE_DLOPEN_DEPEND}
153 + X? (
154 + x11-libs/libX11[${MULTILIB_USEDEP}]
155 + x11-libs/libXext[${MULTILIB_USEDEP}]
156 + )
157 + alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
158 + capi? ( net-libs/libcapi:=[${MULTILIB_USEDEP}] )
159 + gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
160 + gstreamer? (
161 + dev-libs/glib:2[${MULTILIB_USEDEP}]
162 + media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}]
163 + media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
164 + )
165 + ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
166 + openal? ( media-libs/openal[${MULTILIB_USEDEP}] )
167 + opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
168 + pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
169 + pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] )
170 + scanner? ( media-gfx/sane-backends[${MULTILIB_USEDEP}] )
171 + udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
172 + unwind? (
173 + llvm-libunwind? ( sys-libs/llvm-libunwind[${MULTILIB_USEDEP}] )
174 + !llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] )
175 + )
176 + usb? ( dev-libs/libusb:1[${MULTILIB_USEDEP}] )"
177 +RDEPEND="
178 + ${WINE_COMMON_DEPEND}
179 + app-emulation/wine-desktop-common
180 + dos? ( games-emulation/dosbox )
181 + gecko? ( app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}] )
182 + gstreamer? ( media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] )
183 + mono? ( app-emulation/wine-mono:${WINE_MONO} )
184 + perl? (
185 + dev-lang/perl
186 + dev-perl/XML-LibXML
187 + )
188 + samba? ( net-fs/samba[winbind] )
189 + selinux? ( sec-policy/selinux-wine )
190 + udisks? ( sys-fs/udisks:2 )"
191 +DEPEND="
192 + ${WINE_COMMON_DEPEND}
193 + sys-kernel/linux-headers
194 + X? ( x11-base/xorg-proto )"
195 +BDEPEND="
196 + dev-lang/perl
197 + sys-devel/bison
198 + sys-devel/flex
199 + virtual/pkgconfig
200 + mingw? ( !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] ) )
201 + nls? ( sys-devel/gettext )"
202 +IDEPEND="app-eselect/eselect-wine"
203 +
204 +QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext
205 +
206 +PATCHES=(
207 + "${FILESDIR}"/${PN}-7.17-noexecstack.patch
208 + "${FILESDIR}"/${PN}-7.20-unwind.patch
209 +)
210 +
211 +pkg_pretend() {
212 + [[ ${MERGE_TYPE} == binary ]] && return
213 +
214 + if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
215 + local mingw=-w64-mingw32
216 + for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do
217 + if ! type -P ${mingw}-gcc >/dev/null; then
218 + eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain"
219 + eerror "yourself by installing sys-devel/crossdev then running:"
220 + eerror
221 + eerror " crossdev --target ${mingw}"
222 + eerror
223 + eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw"
224 + die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found"
225 + fi
226 + done
227 + fi
228 +}
229 +
230 +src_unpack() {
231 + if [[ ${PV} == *9999 ]]; then
232 + EGIT_CHECKOUT_DIR=${WORKDIR}/${P}
233 + git-r3_src_unpack
234 +
235 + EGIT_COMMIT=$(<"${EGIT_CHECKOUT_DIR}"/staging/upstream-commit) || die
236 + EGIT_REPO_URI=${WINE_EGIT_REPO_URI}
237 + EGIT_CHECKOUT_DIR=${S}
238 + einfo "Fetching Wine commit matching the current patchset by default (${EGIT_COMMIT})"
239 + git-r3_src_unpack
240 + else
241 + default
242 + fi
243 +}
244 +
245 +src_prepare() {
246 + local staging=(
247 + ./patchinstall.sh DESTDIR="${S}"
248 + --all
249 + --backend=eapply
250 + --no-autoconf
251 + -W winemenubuilder-Desktop_Icon_Path #652176
252 + ${MY_WINE_STAGING_CONF}
253 + )
254 +
255 + # source patcher in a subshell so can use eapply as a backend
256 + ebegin "Running ${staging[*]}"
257 + ( cd ../${P}/patches && . "${staging[@]}" )
258 + eend ${?} || die "Failed to apply the patchset"
259 +
260 + # sanity check, bumping these has a history of oversights
261 + local geckomono=$(sed -En '/^#define (GECKO|MONO)_VER/{s/[^0-9.]//gp}' \
262 + dlls/appwiz.cpl/addons.c || die)
263 + if [[ ${WINE_GECKO}$'\n'${WINE_MONO} != "${geckomono}" ]]; then
264 + local gmfatal=
265 + [[ ${PV} == *9999 ]] && gmfatal=nonfatal
266 + ${gmfatal} die -n "gecko/mono mismatch in ebuild, has: " ${geckomono} " (please file a bug)"
267 + fi
268 +
269 + default
270 +
271 + # ensure .desktop calls this variant + slot
272 + sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die
273 +
274 + # always update for patches (including user's wrt #432348)
275 + eautoreconf
276 + tools/make_requests || die # perl
277 +}
278 +
279 +src_configure() {
280 + WINE_PREFIX=/usr/lib/${P}
281 + WINE_DATADIR=/usr/share/${P}
282 +
283 + local conf=(
284 + --prefix="${EPREFIX}"${WINE_PREFIX}
285 + --datadir="${EPREFIX}"${WINE_DATADIR}
286 + --includedir="${EPREFIX}"/usr/include/${P}
287 + --libdir="${EPREFIX}"${WINE_PREFIX}
288 + --mandir="${EPREFIX}"${WINE_DATADIR}/man
289 + $(use_enable gecko mshtml)
290 + $(use_enable mono mscoree)
291 + --disable-tests
292 + $(use_with X x)
293 + $(use_with alsa)
294 + $(use_with capi)
295 + $(use_with cups)
296 + $(use_with fontconfig)
297 + $(use_with gphoto2 gphoto)
298 + $(use_with gstreamer)
299 + $(use_with kerberos gssapi)
300 + $(use_with kerberos krb5)
301 + $(use_with ldap)
302 + $(use_with mingw)
303 + $(use_with netapi)
304 + $(use_with nls gettext)
305 + $(use_with openal)
306 + $(use_with opencl)
307 + $(use_with opengl)
308 + $(use_with osmesa)
309 + --without-oss # media-sound/oss is not packaged (OSSv4)
310 + $(use_with pcap)
311 + $(use_with pulseaudio pulse)
312 + $(use_with scanner sane)
313 + $(use_with sdl)
314 + $(use_with ssl gnutls)
315 + $(use_with truetype freetype)
316 + $(use_with udev)
317 + $(use_with udisks dbus) # dbus is only used for udisks
318 + $(use_with unwind)
319 + $(use_with usb)
320 + $(use_with v4l v4l2)
321 + $(use_with vulkan)
322 + $(use_with xcomposite)
323 + $(use_with xinerama)
324 + $(usev !odbc ac_cv_lib_soname_odbc=)
325 + )
326 +
327 + tc-ld-force-bfd #867097
328 + use custom-cflags || strip-flags # can break in obscure ways, also no lto
329 + use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
330 +
331 + # build using upstream's way (--with-wine64)
332 + # order matters: configure+compile 64->32, install 32->64
333 + local -i bits
334 + for bits in $(usev abi_x86_64 64) $(usev abi_x86_32 32); do
335 + (
336 + einfo "Configuring ${PN} for ${bits}bits in ${WORKDIR}/build${bits} ..."
337 +
338 + mkdir ../build${bits} || die
339 + cd ../build${bits} || die
340 +
341 + # CROSSCC_amd64/x86 are unused by Wine, but recognized here for users
342 + if (( bits == 64 )); then
343 + : "${CROSSCC:=${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}}"
344 + conf+=( --enable-win64 )
345 + elif use amd64; then
346 + conf+=(
347 + $(usev abi_x86_64 --with-wine64=../build64)
348 + TARGETFLAGS=-m32 # for widl
349 + )
350 + # _setup is optional, but use over Wine's auto-detect (+#472038)
351 + multilib_toolchain_setup x86
352 + fi
353 + : "${CROSSCC:=${CROSSCC_x86:-i686-w64-mingw32-gcc}}"
354 +
355 + # use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu)
356 + if use mingw; then
357 + : "${CROSSCFLAGS:=$(
358 + filter-flags '-fstack-clash-protection' #758914
359 + filter-flags '-fstack-protector*' #870136
360 + filter-flags '-mfunction-return=thunk*' #878849
361 + CC=${CROSSCC} test-flags-CC ${CFLAGS:--O2})}"
362 + : "${CROSSLDFLAGS:=$(
363 + filter-flags '-fuse-ld=*'
364 + CC=${CROSSCC} test-flags-CCLD ${LDFLAGS})}"
365 + export CROSS{CC,{C,LD}FLAGS}
366 + fi
367 +
368 + ECONF_SOURCE=${S} econf "${conf[@]}"
369 + )
370 + done
371 +}
372 +
373 +src_compile() {
374 + use abi_x86_64 && emake -C ../build64 # do first
375 + use abi_x86_32 && emake -C ../build32
376 +}
377 +
378 +src_install() {
379 + use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install
380 + use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last
381 +
382 + # symlink for plain 'wine' and install its man pages if 64bit-only #404331
383 + if use abi_x86_64 && use !abi_x86_32; then
384 + dosym wine64 ${WINE_PREFIX}/bin/wine
385 + dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader
386 + local man
387 + for man in ../build64/loader/wine.*man; do
388 + : "${man##*/wine}"
389 + : "${_%.*}"
390 + insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1
391 + newins ${man} wine.1
392 + done
393 + fi
394 +
395 + use perl || rm "${ED}"${WINE_DATADIR}/man/man1/wine{dump,maker}.1 \
396 + "${ED}"${WINE_PREFIX}/bin/{function_grep.pl,wine{dump,maker}} || die
397 +
398 + # create variant wrappers for eselect-wine
399 + local bin
400 + for bin in "${ED}"${WINE_PREFIX}/bin/*; do
401 + make_wrapper "${bin##*/}-${P#wine-}" "${bin#"${ED}"}"
402 + done
403 +
404 + # don't let portage try to strip PE files with the wrong
405 + # strip executable and instead handle it here (saves ~120MB)
406 + if use mingw; then
407 + dostrip -x ${WINE_PREFIX}/wine/{i386,x86_64}-windows
408 + use debug ||
409 + find "${ED}"${WINE_PREFIX}/wine/*-windows -regex '.*\.\(a\|dll\|exe\)' \
410 + -exec $(usex abi_x86_64 x86_64 i686)-w64-mingw32-strip --strip-unneeded {} + || die
411 + fi
412 +
413 + dodoc ANNOUNCE AUTHORS README* documentation/README*
414 +}
415 +
416 +wine-eselect() {
417 + ebegin "${1^}ing ${P} using eselect-wine"
418 + eselect wine ${1} ${P} &&
419 + eselect wine ${1} --${PN#wine-} ${P} &&
420 + eselect wine update --if-unset &&
421 + eselect wine update --${PN#wine-} --if-unset
422 + eend ${?} || die -n "eselect failed, may need to manually handle ${P}"
423 +}
424 +
425 +pkg_postinst() {
426 + wine-eselect register
427 +}
428 +
429 +pkg_prerm() {
430 + nonfatal wine-eselect deregister
431 +}