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