1 |
commit: 99ef76018adf18ba73dcc7ae4cd34b5e0cf655fe |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 29 16:20:37 2022 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 29 20:28:52 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99ef7601 |
7 |
|
8 |
app-emulation/wine-staging: drop 7.20, 7.21-r1 |
9 |
|
10 |
Both versions had several quirks and shouldn't be worthwhile |
11 |
to keep, try 7.19 instead if 7.22 is not suitable (7.19 was |
12 |
before some more major changes). |
13 |
|
14 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
15 |
|
16 |
app-emulation/wine-staging/Manifest | 4 - |
17 |
.../files/wine-staging-7.21-crossflags.patch | 29 -- |
18 |
.../files/wine-staging-7.21-opengl32.patch | 73 ----- |
19 |
.../wine-staging/wine-staging-7.20.ebuild | 351 -------------------- |
20 |
.../wine-staging/wine-staging-7.21-r1.ebuild | 358 --------------------- |
21 |
5 files changed, 815 deletions(-) |
22 |
|
23 |
diff --git a/app-emulation/wine-staging/Manifest b/app-emulation/wine-staging/Manifest |
24 |
index ece56f286ed3..f3dbaed773c9 100644 |
25 |
--- a/app-emulation/wine-staging/Manifest |
26 |
+++ b/app-emulation/wine-staging/Manifest |
27 |
@@ -1,8 +1,4 @@ |
28 |
DIST wine-7.19.tar.xz 28502612 BLAKE2B b7b270656955c7a1e1d84e8bbc7e3e8abff5aedadb5e8a458f0b1109d746875a359f3d2f53b1c9c6caae65d17fd1d205466cd3a884034a8bad6afe9456f13b5d SHA512 f76dbda97cccad4c0f249b5dd4e8d48afa832134f1704ae228650bb73ee82823e628b23bd53a3f8729e06a8933597ff2fffa5551f156fc9c9181b67c066747d5 |
29 |
-DIST wine-7.20.tar.xz 28534920 BLAKE2B 2e0cd49a7820f0c885a2a6dbcded6ebbdb5e1ea5576b03dedb7ee066f74f8c675193450cdd45bf5e0224bd588a890138e47a15f513edbfde1eabf1b65c9abe31 SHA512 6e2e65fba2336985df93165050f0f46b752d6aa94fc1581451c58969e2003748378be4b9e16b647ca2922fbdff77920311b12a17bda630a7bccfc7ee8f03b453 |
30 |
-DIST wine-7.21.tar.xz 28703308 BLAKE2B 8902ded32b9e635f8ccf659ca4055e9ad45d3659f3ad48d0c218dc5a7a334df456ea0e9441dcaff58e8cac0bbd65140b20e61180acaa06230bc70e28a8382c7e SHA512 15c0c9efda972b84890886fd4b1fb18dd462373ba490f5e607004a5436caba9823f643369ceb5abbc2d2d0e26d7ce002e00136299d9984c0a27f729f3ac129c1 |
31 |
DIST wine-7.22.tar.xz 28974052 BLAKE2B c86466964817b916ee8f7b687f193eda8bdd3fb17152ab1565971e36f43b12b540033ac1c5fa5d15576041febd32cf1ea2955732c5386debcbda46fb3acca0f1 SHA512 bf58a5b98bef5b291aff1eca3f94c28da95990e4c8da9af5e9e28b9480d57163d088b501b0c1bca5b568bf586dd9933cdc1ea1f371b78d95c94e2d25d0a65efc |
32 |
DIST wine-staging-7.19.tar.gz 9523048 BLAKE2B e53fd47af493cbdc4542f908a39557324d70ad67ff2e06c80296c006a63518e43988750cab2f4d3d9197fc9c8a1e61ed4d96bcc310b82b6cfc8ec12b941f1c5c SHA512 c51cb18c4ae00eccf414f5edda18ebf363674ba7cfa95da135b3a43b7c012c086d454d6ac32b22d98e611bb87e55c3e1ee95571a4a0c9713028b5ac38e8aed3f |
33 |
-DIST wine-staging-7.20.tar.gz 9521481 BLAKE2B 5a264460e72ac96d50d23492100c465eeb0b933306200710aa085bd37bb79df3c6ef03aeb5ba2c4c196befb231938457aa9584b9edf938edfd754d06e7cdb574 SHA512 538bf60e760254f3130fe8b6bf07598287e567c0f34d6be2ed04fde10007283d4c675a6f27a0a13d3ce77e833559d5ef853a89f2f96dc5f8cc818bdc3570474a |
34 |
-DIST wine-staging-7.21.tar.gz 9530737 BLAKE2B a80476dbc957a9cda1554262777c63276f9b66a5ccd1389a006327810b0b960a600f78dfabc0d8df4ce816cdd7c4c3c29c26bea9b63219fa90dff60142d41da1 SHA512 1261267fe82a25d74dbf3f8cd1926339356eac3cd432667517c2ca65656c1b733c2866a48c1e4ad116ac8094d9079366a07f6a7814b8bde27246d654a792e9ec |
35 |
DIST wine-staging-7.22.tar.gz 9528424 BLAKE2B e41f24f924117259715505f4f9998ef23a657bca5b0e285feb7f9fd732e6b566a495f48ec59af09b1d4d51db522b051028f6cbba748256e939929fbf978f0e44 SHA512 5fdac19ec290c67767fac71abe07d9350ec431919c67a0f2d2df18ced20f1d3dddb921b3d5586d03add187c6281e1a691cc220e8d2d5ad4eeb94015721479d65 |
36 |
|
37 |
diff --git a/app-emulation/wine-staging/files/wine-staging-7.21-crossflags.patch b/app-emulation/wine-staging/files/wine-staging-7.21-crossflags.patch |
38 |
deleted file mode 100644 |
39 |
index bdf5aeefb5bf..000000000000 |
40 |
--- a/app-emulation/wine-staging/files/wine-staging-7.21-crossflags.patch |
41 |
+++ /dev/null |
42 |
@@ -1,29 +0,0 @@ |
43 |
-Restore CROSSLDFLAGS and ensure tested flags are saved in |
44 |
-{arch}_*FLAGS (e.g. -fno-strict-aliasing) |
45 |
- |
46 |
-quickfix, odds are this will be revamped upstream |
47 |
---- a/configure.ac |
48 |
-+++ b/configure.ac |
49 |
-@@ -919,9 +919,9 @@ |
50 |
- saved_CC=$CC |
51 |
- saved_CFLAGS=$CFLAGS |
52 |
-+ saved_LDFLAGS=$LDFLAGS |
53 |
- |
54 |
- CFLAGS=${CROSSCFLAGS:-"-g -O2"} |
55 |
-+ LDFLAGS=${CROSSLDFLAGS:-} |
56 |
- AS_VAR_COPY([CC],[${wine_arch}_CC]) |
57 |
-- AS_VAR_COPY([${wine_arch}_CFLAGS],[CFLAGS]) |
58 |
-- AS_VAR_COPY([${wine_arch}_LDFLAGS],[LDFLAGS]) |
59 |
- AS_VAR_SET([${wine_arch}_EXTRACFLAGS],["-D__WINE_PE_BUILD -Wall"]) |
60 |
- |
61 |
-@@ -1052,6 +1052,10 @@ |
62 |
- AS_VAR_APPEND([${wine_arch}_LDFLAGS],[" -Wl,--build-id"])]) |
63 |
- |
64 |
-+ AS_VAR_COPY([${wine_arch}_CFLAGS],[CFLAGS]) |
65 |
-+ AS_VAR_COPY([${wine_arch}_LDFLAGS],[LDFLAGS]) |
66 |
-+ |
67 |
- CC=$saved_CC |
68 |
- CFLAGS=$saved_CFLAGS |
69 |
-+ LDFLAGS=$saved_LDFLAGS |
70 |
- done |
71 |
- |
72 |
|
73 |
diff --git a/app-emulation/wine-staging/files/wine-staging-7.21-opengl32.patch b/app-emulation/wine-staging/files/wine-staging-7.21-opengl32.patch |
74 |
deleted file mode 100644 |
75 |
index 9411e05e96fd..000000000000 |
76 |
--- a/app-emulation/wine-staging/files/wine-staging-7.21-opengl32.patch |
77 |
+++ /dev/null |
78 |
@@ -1,73 +0,0 @@ |
79 |
-Fixes PE opengl32.dll failing to initialize. |
80 |
- |
81 |
-https://gitlab.winehq.org/wine/wine/-/commit/34099bba6cb |
82 |
-From: Rémi Bernon <rbernon@×××××××××××.com> |
83 |
-Date: Mon, 14 Nov 2022 11:55:51 +0100 |
84 |
-Subject: [PATCH] ntdll: Delay loading unixlibs until the functions are |
85 |
- requested. |
86 |
- |
87 |
-Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53909 |
88 |
---- a/dlls/ntdll/unix/virtual.c |
89 |
-+++ b/dlls/ntdll/unix/virtual.c |
90 |
-@@ -98,6 +98,7 @@ struct builtin_module |
91 |
- unsigned int refcount; |
92 |
- void *handle; |
93 |
- void *module; |
94 |
-+ char *unix_path; |
95 |
- void *unix_handle; |
96 |
- }; |
97 |
- |
98 |
-@@ -583,6 +584,7 @@ static void add_builtin_module( void *module, void *handle ) |
99 |
- builtin->handle = handle; |
100 |
- builtin->module = module; |
101 |
- builtin->refcount = 1; |
102 |
-+ builtin->unix_path = NULL; |
103 |
- builtin->unix_handle = NULL; |
104 |
- list_add_tail( &builtin_modules, &builtin->entry ); |
105 |
- } |
106 |
-@@ -603,6 +605,7 @@ void release_builtin_module( void *module ) |
107 |
- list_remove( &builtin->entry ); |
108 |
- if (builtin->handle) dlclose( builtin->handle ); |
109 |
- if (builtin->unix_handle) dlclose( builtin->unix_handle ); |
110 |
-+ free( builtin->unix_path ); |
111 |
- free( builtin ); |
112 |
- } |
113 |
- break; |
114 |
-@@ -652,6 +655,8 @@ static NTSTATUS get_builtin_unix_funcs( void *module, BOOL wow, const void **fun |
115 |
- LIST_FOR_EACH_ENTRY( builtin, &builtin_modules, struct builtin_module, entry ) |
116 |
- { |
117 |
- if (builtin->module != module) continue; |
118 |
-+ if (builtin->unix_path && !builtin->unix_handle) |
119 |
-+ builtin->unix_handle = dlopen( builtin->unix_path, RTLD_NOW ); |
120 |
- if (builtin->unix_handle) |
121 |
- { |
122 |
- *funcs = dlsym( builtin->unix_handle, ptr_name ); |
123 |
-@@ -669,26 +674,19 @@ static NTSTATUS get_builtin_unix_funcs( void *module, BOOL wow, const void **fun |
124 |
- */ |
125 |
- NTSTATUS load_builtin_unixlib( void *module, const char *name ) |
126 |
- { |
127 |
-- void *handle; |
128 |
- sigset_t sigset; |
129 |
-- NTSTATUS status = STATUS_DLL_NOT_FOUND; |
130 |
-+ NTSTATUS status = STATUS_SUCCESS; |
131 |
- struct builtin_module *builtin; |
132 |
- |
133 |
-- if (!(handle = dlopen( name, RTLD_NOW ))) return status; |
134 |
- server_enter_uninterrupted_section( &virtual_mutex, &sigset ); |
135 |
- LIST_FOR_EACH_ENTRY( builtin, &builtin_modules, struct builtin_module, entry ) |
136 |
- { |
137 |
- if (builtin->module != module) continue; |
138 |
-- if (!builtin->unix_handle) |
139 |
-- { |
140 |
-- builtin->unix_handle = handle; |
141 |
-- status = STATUS_SUCCESS; |
142 |
-- } |
143 |
-+ if (!builtin->unix_path) builtin->unix_path = strdup( name ); |
144 |
- else status = STATUS_IMAGE_ALREADY_LOADED; |
145 |
- break; |
146 |
- } |
147 |
- server_leave_uninterrupted_section( &virtual_mutex, &sigset ); |
148 |
-- if (status) dlclose( handle ); |
149 |
- return status; |
150 |
- } |
151 |
- |
152 |
|
153 |
diff --git a/app-emulation/wine-staging/wine-staging-7.20.ebuild b/app-emulation/wine-staging/wine-staging-7.20.ebuild |
154 |
deleted file mode 100644 |
155 |
index 4d5a4afb6acc..000000000000 |
156 |
--- a/app-emulation/wine-staging/wine-staging-7.20.ebuild |
157 |
+++ /dev/null |
158 |
@@ -1,351 +0,0 @@ |
159 |
-# Copyright 2022 Gentoo Authors |
160 |
-# Distributed under the terms of the GNU General Public License v2 |
161 |
- |
162 |
-EAPI=8 |
163 |
- |
164 |
-MULTILIB_COMPAT=( abi_x86_{32,64} ) |
165 |
-inherit autotools flag-o-matic multilib multilib-build toolchain-funcs wrapper |
166 |
- |
167 |
-WINE_GECKO=2.47.3 |
168 |
-WINE_MONO=7.4.0 |
169 |
- |
170 |
-if [[ ${PV} == *9999 ]]; then |
171 |
- inherit git-r3 |
172 |
- EGIT_REPO_URI="https://github.com/wine-staging/wine-staging.git" |
173 |
- WINE_EGIT_REPO_URI="https://gitlab.winehq.org/wine/wine.git" |
174 |
-else |
175 |
- (( $(ver_cut 2) )) && WINE_SDIR=$(ver_cut 1).x || WINE_SDIR=$(ver_cut 1).0 |
176 |
- SRC_URI=" |
177 |
- https://dl.winehq.org/wine/source/${WINE_SDIR}/wine-${PV}.tar.xz |
178 |
- https://github.com/wine-staging/wine-staging/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
179 |
- KEYWORDS="-* ~amd64 ~x86" |
180 |
-fi |
181 |
-S="${WORKDIR}/wine-${PV}" |
182 |
- |
183 |
-DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset" |
184 |
-HOMEPAGE="https://wiki.winehq.org/Wine-Staging" |
185 |
- |
186 |
-LICENSE="LGPL-2.1+ BSD-2 IJG MIT ZLIB gsm libpng2 libtiff" |
187 |
-SLOT="${PV}" |
188 |
-IUSE=" |
189 |
- +X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups dos |
190 |
- llvm-libunwind debug custom-cflags +fontconfig +gecko gphoto2 |
191 |
- +gstreamer kerberos ldap +mingw +mono netapi nls odbc openal |
192 |
- opencl +opengl osmesa pcap perl pulseaudio samba scanner +sdl |
193 |
- selinux +ssl +truetype udev udisks +unwind usb v4l +vulkan |
194 |
- +xcomposite xinerama" |
195 |
-REQUIRED_USE=" |
196 |
- X? ( truetype ) |
197 |
- crossdev-mingw? ( mingw )" # bug #551124 for truetype |
198 |
- |
199 |
-# tests are non-trivial to run, can hang easily, don't play well with |
200 |
-# sandbox, and several need real opengl/vulkan or network access |
201 |
-RESTRICT="test" |
202 |
- |
203 |
-# `grep WINE_CHECK_SONAME configure.ac` + if not directly linked |
204 |
-WINE_DLOPEN_DEPEND=" |
205 |
- X? ( |
206 |
- x11-libs/libXcursor[${MULTILIB_USEDEP}] |
207 |
- x11-libs/libXfixes[${MULTILIB_USEDEP}] |
208 |
- x11-libs/libXi[${MULTILIB_USEDEP}] |
209 |
- x11-libs/libXrandr[${MULTILIB_USEDEP}] |
210 |
- x11-libs/libXrender[${MULTILIB_USEDEP}] |
211 |
- x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
212 |
- opengl? ( |
213 |
- media-libs/libglvnd[X,${MULTILIB_USEDEP}] |
214 |
- osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] ) |
215 |
- ) |
216 |
- xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
217 |
- xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
218 |
- ) |
219 |
- cups? ( net-print/cups[${MULTILIB_USEDEP}] ) |
220 |
- fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] ) |
221 |
- kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] ) |
222 |
- netapi? ( net-fs/samba[${MULTILIB_USEDEP}] ) |
223 |
- odbc? ( dev-db/unixODBC[${MULTILIB_USEDEP}] ) |
224 |
- sdl? ( media-libs/libsdl2[haptic,joystick,${MULTILIB_USEDEP}] ) |
225 |
- ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
226 |
- truetype? ( media-libs/freetype[${MULTILIB_USEDEP}] ) |
227 |
- udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
228 |
- v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
229 |
- vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )" |
230 |
-WINE_COMMON_DEPEND=" |
231 |
- ${WINE_DLOPEN_DEPEND} |
232 |
- X? ( |
233 |
- x11-libs/libX11[${MULTILIB_USEDEP}] |
234 |
- x11-libs/libXext[${MULTILIB_USEDEP}] |
235 |
- ) |
236 |
- alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
237 |
- capi? ( net-libs/libcapi:=[${MULTILIB_USEDEP}] ) |
238 |
- gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
239 |
- gstreamer? ( |
240 |
- dev-libs/glib:2[${MULTILIB_USEDEP}] |
241 |
- media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}] |
242 |
- media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
243 |
- ) |
244 |
- ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
245 |
- openal? ( media-libs/openal[${MULTILIB_USEDEP}] ) |
246 |
- opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
247 |
- pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
248 |
- pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] ) |
249 |
- scanner? ( media-gfx/sane-backends[${MULTILIB_USEDEP}] ) |
250 |
- udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
251 |
- unwind? ( |
252 |
- llvm-libunwind? ( sys-libs/llvm-libunwind[${MULTILIB_USEDEP}] ) |
253 |
- !llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] ) |
254 |
- ) |
255 |
- usb? ( dev-libs/libusb:1[${MULTILIB_USEDEP}] )" |
256 |
-RDEPEND=" |
257 |
- ${WINE_COMMON_DEPEND} |
258 |
- app-emulation/wine-desktop-common |
259 |
- dos? ( games-emulation/dosbox ) |
260 |
- gecko? ( app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}] ) |
261 |
- gstreamer? ( media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] ) |
262 |
- mono? ( app-emulation/wine-mono:${WINE_MONO} ) |
263 |
- perl? ( |
264 |
- dev-lang/perl |
265 |
- dev-perl/XML-LibXML |
266 |
- ) |
267 |
- samba? ( net-fs/samba[winbind] ) |
268 |
- selinux? ( sec-policy/selinux-wine ) |
269 |
- udisks? ( sys-fs/udisks:2 )" |
270 |
-DEPEND=" |
271 |
- ${WINE_COMMON_DEPEND} |
272 |
- sys-kernel/linux-headers |
273 |
- X? ( x11-base/xorg-proto )" |
274 |
-BDEPEND=" |
275 |
- dev-lang/perl |
276 |
- sys-devel/binutils |
277 |
- sys-devel/bison |
278 |
- sys-devel/flex |
279 |
- virtual/pkgconfig |
280 |
- mingw? ( !crossdev-mingw? ( dev-util/mingw64-toolchain[${MULTILIB_USEDEP}] ) ) |
281 |
- nls? ( sys-devel/gettext )" |
282 |
-IDEPEND=">=app-eselect/eselect-wine-2" |
283 |
- |
284 |
-QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext |
285 |
- |
286 |
-PATCHES=( |
287 |
- "${FILESDIR}"/${PN}-7.17-noexecstack.patch |
288 |
- "${FILESDIR}"/${PN}-7.20-unwind.patch |
289 |
-) |
290 |
- |
291 |
-pkg_pretend() { |
292 |
- [[ ${MERGE_TYPE} == binary ]] && return |
293 |
- |
294 |
- if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then |
295 |
- local mingw=-w64-mingw32 |
296 |
- for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do |
297 |
- if ! type -P ${mingw}-gcc >/dev/null; then |
298 |
- eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain" |
299 |
- eerror "yourself by installing sys-devel/crossdev then running:" |
300 |
- eerror |
301 |
- eerror " crossdev --target ${mingw}" |
302 |
- eerror |
303 |
- eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw" |
304 |
- die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found" |
305 |
- fi |
306 |
- done |
307 |
- fi |
308 |
-} |
309 |
- |
310 |
-src_unpack() { |
311 |
- if [[ ${PV} == *9999 ]]; then |
312 |
- EGIT_CHECKOUT_DIR=${WORKDIR}/${P} |
313 |
- git-r3_src_unpack |
314 |
- |
315 |
- EGIT_COMMIT=$(<"${EGIT_CHECKOUT_DIR}"/staging/upstream-commit) || die |
316 |
- EGIT_REPO_URI=${WINE_EGIT_REPO_URI} |
317 |
- EGIT_CHECKOUT_DIR=${S} |
318 |
- einfo "Fetching Wine commit matching the current patchset by default (${EGIT_COMMIT})" |
319 |
- git-r3_src_unpack |
320 |
- else |
321 |
- default |
322 |
- fi |
323 |
-} |
324 |
- |
325 |
-src_prepare() { |
326 |
- local staging=( |
327 |
- ./patchinstall.sh DESTDIR="${S}" |
328 |
- --all |
329 |
- --backend=eapply |
330 |
- --no-autoconf |
331 |
- -W winemenubuilder-Desktop_Icon_Path #652176 |
332 |
- ${MY_WINE_STAGING_CONF} |
333 |
- ) |
334 |
- |
335 |
- # source patcher in a subshell so can use eapply as a backend |
336 |
- ebegin "Running ${staging[*]}" |
337 |
- ( cd ../${P}/patches && . "${staging[@]}" ) |
338 |
- eend ${?} || die "Failed to apply the patchset" |
339 |
- |
340 |
- # sanity check, bumping these has a history of oversights |
341 |
- local geckomono=$(sed -En '/^#define (GECKO|MONO)_VER/{s/[^0-9.]//gp}' \ |
342 |
- dlls/appwiz.cpl/addons.c || die) |
343 |
- if [[ ${WINE_GECKO}$'\n'${WINE_MONO} != "${geckomono}" ]]; then |
344 |
- local gmfatal= |
345 |
- [[ ${PV} == *9999 ]] && gmfatal=nonfatal |
346 |
- ${gmfatal} die -n "gecko/mono mismatch in ebuild, has: " ${geckomono} " (please file a bug)" |
347 |
- fi |
348 |
- |
349 |
- default |
350 |
- |
351 |
- # ensure .desktop calls this variant + slot |
352 |
- sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die |
353 |
- |
354 |
- # always update for patches (including user's wrt #432348) |
355 |
- eautoreconf |
356 |
- tools/make_requests || die # perl |
357 |
-} |
358 |
- |
359 |
-src_configure() { |
360 |
- WINE_PREFIX=/usr/lib/${P} |
361 |
- WINE_DATADIR=/usr/share/${P} |
362 |
- |
363 |
- local conf=( |
364 |
- --prefix="${EPREFIX}"${WINE_PREFIX} |
365 |
- --datadir="${EPREFIX}"${WINE_DATADIR} |
366 |
- --includedir="${EPREFIX}"/usr/include/${P} |
367 |
- --libdir="${EPREFIX}"${WINE_PREFIX} |
368 |
- --mandir="${EPREFIX}"${WINE_DATADIR}/man |
369 |
- $(use_enable gecko mshtml) |
370 |
- $(use_enable mono mscoree) |
371 |
- --disable-tests |
372 |
- $(use_with X x) |
373 |
- $(use_with alsa) |
374 |
- $(use_with capi) |
375 |
- $(use_with cups) |
376 |
- $(use_with fontconfig) |
377 |
- $(use_with gphoto2 gphoto) |
378 |
- $(use_with gstreamer) |
379 |
- $(use_with kerberos gssapi) |
380 |
- $(use_with kerberos krb5) |
381 |
- $(use_with ldap) |
382 |
- $(use_with mingw) |
383 |
- $(use_with netapi) |
384 |
- $(use_with nls gettext) |
385 |
- $(use_with openal) |
386 |
- $(use_with opencl) |
387 |
- $(use_with opengl) |
388 |
- $(use_with osmesa) |
389 |
- --without-oss # media-sound/oss is not packaged (OSSv4) |
390 |
- $(use_with pcap) |
391 |
- $(use_with pulseaudio pulse) |
392 |
- $(use_with scanner sane) |
393 |
- $(use_with sdl) |
394 |
- $(use_with ssl gnutls) |
395 |
- $(use_with truetype freetype) |
396 |
- $(use_with udev) |
397 |
- $(use_with udisks dbus) # dbus is only used for udisks |
398 |
- $(use_with unwind) |
399 |
- $(use_with usb) |
400 |
- $(use_with v4l v4l2) |
401 |
- $(use_with vulkan) |
402 |
- $(use_with xcomposite) |
403 |
- $(use_with xinerama) |
404 |
- $(usev !odbc ac_cv_lib_soname_odbc=) |
405 |
- ) |
406 |
- |
407 |
- tc-ld-force-bfd # builds with non-bfd but broken at runtime (bug #867097) |
408 |
- filter-lto # build failure |
409 |
- use mingw || filter-flags -fno-plt # build failure |
410 |
- use custom-cflags || strip-flags # can break in obscure ways at runtime |
411 |
- use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} |
412 |
- |
413 |
- # temporary workaround for tc-ld-force-bfd not yet enforcing with mold |
414 |
- # https://github.com/gentoo/gentoo/pull/28355 |
415 |
- [[ $($(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) == mold* ]] && |
416 |
- append-ldflags -fuse-ld=bfd |
417 |
- |
418 |
- # build using upstream's way (--with-wine64) |
419 |
- # order matters: configure+compile 64->32, install 32->64 |
420 |
- local -i bits |
421 |
- for bits in $(usev abi_x86_64 64) $(usev abi_x86_32 32); do |
422 |
- ( |
423 |
- einfo "Configuring ${PN} for ${bits}bits in ${WORKDIR}/build${bits} ..." |
424 |
- |
425 |
- mkdir ../build${bits} || die |
426 |
- cd ../build${bits} || die |
427 |
- |
428 |
- # CROSSCC_amd64/x86 are unused by Wine, but recognized here for users |
429 |
- if (( bits == 64 )); then |
430 |
- : "${CROSSCC:=${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}}" |
431 |
- conf+=( --enable-win64 ) |
432 |
- elif use amd64; then |
433 |
- conf+=( |
434 |
- $(usev abi_x86_64 --with-wine64=../build64) |
435 |
- TARGETFLAGS=-m32 # for widl |
436 |
- ) |
437 |
- # _setup is optional, but use over Wine's auto-detect (+#472038) |
438 |
- multilib_toolchain_setup x86 |
439 |
- fi |
440 |
- : "${CROSSCC:=${CROSSCC_x86:-i686-w64-mingw32-gcc}}" |
441 |
- |
442 |
- # use *FLAGS for mingw, but strip unsupported (e.g. --hash-style=gnu) |
443 |
- if use mingw; then |
444 |
- : "${CROSSCFLAGS:=$( |
445 |
- filter-flags '-fstack-clash-protection' #758914 |
446 |
- filter-flags '-fstack-protector*' #870136 |
447 |
- filter-flags '-mfunction-return=thunk*' #878849 |
448 |
- CC=${CROSSCC} test-flags-CC ${CFLAGS:--O2})}" |
449 |
- : "${CROSSLDFLAGS:=$( |
450 |
- filter-flags '-fuse-ld=*' |
451 |
- CC=${CROSSCC} test-flags-CCLD ${LDFLAGS})}" |
452 |
- export CROSS{CC,{C,LD}FLAGS} |
453 |
- fi |
454 |
- |
455 |
- ECONF_SOURCE=${S} econf "${conf[@]}" |
456 |
- ) |
457 |
- done |
458 |
-} |
459 |
- |
460 |
-src_compile() { |
461 |
- use abi_x86_64 && emake -C ../build64 # do first |
462 |
- use abi_x86_32 && emake -C ../build32 |
463 |
-} |
464 |
- |
465 |
-src_install() { |
466 |
- use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install |
467 |
- use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last |
468 |
- |
469 |
- # symlink for plain 'wine' and install its man pages if 64bit-only #404331 |
470 |
- if use abi_x86_64 && use !abi_x86_32; then |
471 |
- dosym wine64 ${WINE_PREFIX}/bin/wine |
472 |
- dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader |
473 |
- local man |
474 |
- for man in ../build64/loader/wine.*man; do |
475 |
- : "${man##*/wine}" |
476 |
- : "${_%.*}" |
477 |
- insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1 |
478 |
- newins ${man} wine.1 |
479 |
- done |
480 |
- fi |
481 |
- |
482 |
- use perl || rm "${ED}"${WINE_DATADIR}/man/man1/wine{dump,maker}.1 \ |
483 |
- "${ED}"${WINE_PREFIX}/bin/{function_grep.pl,wine{dump,maker}} || die |
484 |
- |
485 |
- # create variant wrappers for eselect-wine |
486 |
- local bin |
487 |
- for bin in "${ED}"${WINE_PREFIX}/bin/*; do |
488 |
- make_wrapper "${bin##*/}-${P#wine-}" "${bin#"${ED}"}" |
489 |
- done |
490 |
- |
491 |
- # don't let portage try to strip PE files with the wrong |
492 |
- # strip executable and instead handle it here (saves ~120MB) |
493 |
- if use mingw; then |
494 |
- dostrip -x ${WINE_PREFIX}/wine/{i386,x86_64}-windows |
495 |
- use debug || |
496 |
- find "${ED}"${WINE_PREFIX}/wine/*-windows -regex '.*\.\(a\|dll\|exe\)' \ |
497 |
- -exec $(usex abi_x86_64 x86_64 i686)-w64-mingw32-strip --strip-unneeded {} + || die |
498 |
- fi |
499 |
- |
500 |
- dodoc ANNOUNCE AUTHORS README* documentation/README* |
501 |
-} |
502 |
- |
503 |
-pkg_postinst() { |
504 |
- eselect wine update --if-unset || die |
505 |
-} |
506 |
- |
507 |
-pkg_postrm() { |
508 |
- eselect wine update --if-unset || die |
509 |
-} |
510 |
|
511 |
diff --git a/app-emulation/wine-staging/wine-staging-7.21-r1.ebuild b/app-emulation/wine-staging/wine-staging-7.21-r1.ebuild |
512 |
deleted file mode 100644 |
513 |
index e8506e11fcba..000000000000 |
514 |
--- a/app-emulation/wine-staging/wine-staging-7.21-r1.ebuild |
515 |
+++ /dev/null |
516 |
@@ -1,358 +0,0 @@ |
517 |
-# Copyright 2022 Gentoo Authors |
518 |
-# Distributed under the terms of the GNU General Public License v2 |
519 |
- |
520 |
-EAPI=8 |
521 |
- |
522 |
-MULTILIB_COMPAT=( abi_x86_{32,64} ) |
523 |
-inherit autotools flag-o-matic multilib multilib-build toolchain-funcs wrapper |
524 |
- |
525 |
-WINE_GECKO=2.47.3 |
526 |
-WINE_MONO=7.4.0 |
527 |
- |
528 |
-if [[ ${PV} == *9999 ]]; then |
529 |
- inherit git-r3 |
530 |
- EGIT_REPO_URI="https://github.com/wine-staging/wine-staging.git" |
531 |
- WINE_EGIT_REPO_URI="https://gitlab.winehq.org/wine/wine.git" |
532 |
-else |
533 |
- (( $(ver_cut 2) )) && WINE_SDIR=$(ver_cut 1).x || WINE_SDIR=$(ver_cut 1).0 |
534 |
- SRC_URI=" |
535 |
- https://dl.winehq.org/wine/source/${WINE_SDIR}/wine-${PV}.tar.xz |
536 |
- https://github.com/wine-staging/wine-staging/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
537 |
- KEYWORDS="-* ~amd64 ~x86" |
538 |
-fi |
539 |
-S="${WORKDIR}/wine-${PV}" |
540 |
- |
541 |
-DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset" |
542 |
-HOMEPAGE="https://wiki.winehq.org/Wine-Staging" |
543 |
- |
544 |
-LICENSE="LGPL-2.1+ BSD-2 IJG MIT ZLIB gsm libpng2 libtiff" |
545 |
-SLOT="${PV}" |
546 |
-IUSE=" |
547 |
- +X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups dos |
548 |
- llvm-libunwind debug custom-cflags +fontconfig +gecko gphoto2 |
549 |
- +gstreamer kerberos ldap +mingw +mono netapi nls odbc opencl |
550 |
- +opengl osmesa pcap perl pulseaudio samba scanner +sdl selinux |
551 |
- +ssl +truetype udev udisks +unwind usb v4l +vulkan +xcomposite |
552 |
- xinerama" |
553 |
-REQUIRED_USE=" |
554 |
- X? ( truetype ) |
555 |
- crossdev-mingw? ( mingw )" # bug #551124 for truetype |
556 |
- |
557 |
-# tests are non-trivial to run, can hang easily, don't play well with |
558 |
-# sandbox, and several need real opengl/vulkan or network access |
559 |
-RESTRICT="test" |
560 |
- |
561 |
-# `grep WINE_CHECK_SONAME configure.ac` + if not directly linked |
562 |
-WINE_DLOPEN_DEPEND=" |
563 |
- X? ( |
564 |
- x11-libs/libXcursor[${MULTILIB_USEDEP}] |
565 |
- x11-libs/libXfixes[${MULTILIB_USEDEP}] |
566 |
- x11-libs/libXi[${MULTILIB_USEDEP}] |
567 |
- x11-libs/libXrandr[${MULTILIB_USEDEP}] |
568 |
- x11-libs/libXrender[${MULTILIB_USEDEP}] |
569 |
- x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
570 |
- opengl? ( |
571 |
- media-libs/libglvnd[X,${MULTILIB_USEDEP}] |
572 |
- osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] ) |
573 |
- ) |
574 |
- xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
575 |
- xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
576 |
- ) |
577 |
- cups? ( net-print/cups[${MULTILIB_USEDEP}] ) |
578 |
- fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] ) |
579 |
- kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] ) |
580 |
- netapi? ( net-fs/samba[${MULTILIB_USEDEP}] ) |
581 |
- odbc? ( dev-db/unixODBC[${MULTILIB_USEDEP}] ) |
582 |
- sdl? ( media-libs/libsdl2[haptic,joystick,${MULTILIB_USEDEP}] ) |
583 |
- ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
584 |
- truetype? ( media-libs/freetype[${MULTILIB_USEDEP}] ) |
585 |
- udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
586 |
- v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
587 |
- vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )" |
588 |
-WINE_COMMON_DEPEND=" |
589 |
- ${WINE_DLOPEN_DEPEND} |
590 |
- X? ( |
591 |
- x11-libs/libX11[${MULTILIB_USEDEP}] |
592 |
- x11-libs/libXext[${MULTILIB_USEDEP}] |
593 |
- ) |
594 |
- alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
595 |
- capi? ( net-libs/libcapi:=[${MULTILIB_USEDEP}] ) |
596 |
- gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
597 |
- gstreamer? ( |
598 |
- dev-libs/glib:2[${MULTILIB_USEDEP}] |
599 |
- media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}] |
600 |
- media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
601 |
- ) |
602 |
- ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
603 |
- opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
604 |
- pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
605 |
- pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] ) |
606 |
- scanner? ( media-gfx/sane-backends[${MULTILIB_USEDEP}] ) |
607 |
- udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
608 |
- unwind? ( |
609 |
- llvm-libunwind? ( sys-libs/llvm-libunwind[${MULTILIB_USEDEP}] ) |
610 |
- !llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] ) |
611 |
- ) |
612 |
- usb? ( dev-libs/libusb:1[${MULTILIB_USEDEP}] )" |
613 |
-RDEPEND=" |
614 |
- ${WINE_COMMON_DEPEND} |
615 |
- app-emulation/wine-desktop-common |
616 |
- dos? ( games-emulation/dosbox ) |
617 |
- gecko? ( app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}] ) |
618 |
- gstreamer? ( media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] ) |
619 |
- mono? ( app-emulation/wine-mono:${WINE_MONO} ) |
620 |
- perl? ( |
621 |
- dev-lang/perl |
622 |
- dev-perl/XML-LibXML |
623 |
- ) |
624 |
- samba? ( net-fs/samba[winbind] ) |
625 |
- selinux? ( sec-policy/selinux-wine ) |
626 |
- udisks? ( sys-fs/udisks:2 )" |
627 |
-DEPEND=" |
628 |
- ${WINE_COMMON_DEPEND} |
629 |
- sys-kernel/linux-headers |
630 |
- X? ( x11-base/xorg-proto )" |
631 |
-BDEPEND=" |
632 |
- dev-lang/perl |
633 |
- sys-devel/binutils |
634 |
- sys-devel/bison |
635 |
- sys-devel/flex |
636 |
- virtual/pkgconfig |
637 |
- mingw? ( !crossdev-mingw? ( |
638 |
- >=dev-util/mingw64-toolchain-10.0.0_p1-r2[${MULTILIB_USEDEP}] |
639 |
- ) ) |
640 |
- nls? ( sys-devel/gettext )" |
641 |
-IDEPEND=">=app-eselect/eselect-wine-2" |
642 |
- |
643 |
-QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext |
644 |
- |
645 |
-PATCHES=( |
646 |
- "${FILESDIR}"/${PN}-7.17-noexecstack.patch |
647 |
- "${FILESDIR}"/${PN}-7.20-unwind.patch |
648 |
- "${FILESDIR}"/${P}-crossflags.patch |
649 |
- "${FILESDIR}"/${P}-opengl32.patch |
650 |
-) |
651 |
- |
652 |
-pkg_pretend() { |
653 |
- [[ ${MERGE_TYPE} == binary ]] && return |
654 |
- |
655 |
- if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then |
656 |
- local mingw=-w64-mingw32 |
657 |
- for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do |
658 |
- if ! type -P ${mingw}-gcc >/dev/null; then |
659 |
- eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain" |
660 |
- eerror "yourself by installing sys-devel/crossdev then running:" |
661 |
- eerror |
662 |
- eerror " crossdev --target ${mingw}" |
663 |
- eerror |
664 |
- eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw" |
665 |
- die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found" |
666 |
- fi |
667 |
- done |
668 |
- fi |
669 |
-} |
670 |
- |
671 |
-src_unpack() { |
672 |
- if [[ ${PV} == *9999 ]]; then |
673 |
- EGIT_CHECKOUT_DIR=${WORKDIR}/${P} |
674 |
- git-r3_src_unpack |
675 |
- |
676 |
- EGIT_COMMIT=$(<"${EGIT_CHECKOUT_DIR}"/staging/upstream-commit) || die |
677 |
- EGIT_REPO_URI=${WINE_EGIT_REPO_URI} |
678 |
- EGIT_CHECKOUT_DIR=${S} |
679 |
- einfo "Fetching Wine commit matching the current patchset by default (${EGIT_COMMIT})" |
680 |
- git-r3_src_unpack |
681 |
- else |
682 |
- default |
683 |
- fi |
684 |
-} |
685 |
- |
686 |
-src_prepare() { |
687 |
- local staging=( |
688 |
- ./patchinstall.sh DESTDIR="${S}" |
689 |
- --all |
690 |
- --backend=eapply |
691 |
- --no-autoconf |
692 |
- -W winemenubuilder-Desktop_Icon_Path #652176 |
693 |
- ${MY_WINE_STAGING_CONF} |
694 |
- ) |
695 |
- |
696 |
- # source patcher in a subshell so can use eapply as a backend |
697 |
- ebegin "Running ${staging[*]}" |
698 |
- ( cd ../${P}/patches && . "${staging[@]}" ) |
699 |
- eend ${?} || die "Failed to apply the patchset" |
700 |
- |
701 |
- # sanity check, bumping these has a history of oversights |
702 |
- local geckomono=$(sed -En '/^#define (GECKO|MONO)_VER/{s/[^0-9.]//gp}' \ |
703 |
- dlls/appwiz.cpl/addons.c || die) |
704 |
- if [[ ${WINE_GECKO}$'\n'${WINE_MONO} != "${geckomono}" ]]; then |
705 |
- local gmfatal= |
706 |
- [[ ${PV} == *9999 ]] && gmfatal=nonfatal |
707 |
- ${gmfatal} die -n "gecko/mono mismatch in ebuild, has: " ${geckomono} " (please file a bug)" |
708 |
- fi |
709 |
- |
710 |
- default |
711 |
- |
712 |
- # ensure .desktop calls this variant + slot |
713 |
- sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die |
714 |
- |
715 |
- # always update for patches (including user's wrt #432348) |
716 |
- eautoreconf |
717 |
- tools/make_requests || die # perl |
718 |
-} |
719 |
- |
720 |
-src_configure() { |
721 |
- WINE_PREFIX=/usr/lib/${P} |
722 |
- WINE_DATADIR=/usr/share/${P} |
723 |
- |
724 |
- local conf=( |
725 |
- --prefix="${EPREFIX}"${WINE_PREFIX} |
726 |
- --datadir="${EPREFIX}"${WINE_DATADIR} |
727 |
- --includedir="${EPREFIX}"/usr/include/${P} |
728 |
- --libdir="${EPREFIX}"${WINE_PREFIX} |
729 |
- --mandir="${EPREFIX}"${WINE_DATADIR}/man |
730 |
- $(use_enable gecko mshtml) |
731 |
- $(use_enable mono mscoree) |
732 |
- --disable-tests |
733 |
- $(use_with X x) |
734 |
- $(use_with alsa) |
735 |
- $(use_with capi) |
736 |
- $(use_with cups) |
737 |
- $(use_with fontconfig) |
738 |
- $(use_with gphoto2 gphoto) |
739 |
- $(use_with gstreamer) |
740 |
- $(use_with kerberos gssapi) |
741 |
- $(use_with kerberos krb5) |
742 |
- $(use_with ldap) |
743 |
- $(use_with mingw) |
744 |
- $(use_with netapi) |
745 |
- $(use_with nls gettext) |
746 |
- $(use_with opencl) |
747 |
- $(use_with opengl) |
748 |
- $(use_with osmesa) |
749 |
- --without-oss # media-sound/oss is not packaged (OSSv4) |
750 |
- $(use_with pcap) |
751 |
- $(use_with pulseaudio pulse) |
752 |
- $(use_with scanner sane) |
753 |
- $(use_with sdl) |
754 |
- $(use_with ssl gnutls) |
755 |
- $(use_with truetype freetype) |
756 |
- $(use_with udev) |
757 |
- $(use_with udisks dbus) # dbus is only used for udisks |
758 |
- $(use_with unwind) |
759 |
- $(use_with usb) |
760 |
- $(use_with v4l v4l2) |
761 |
- $(use_with vulkan) |
762 |
- $(use_with xcomposite) |
763 |
- $(use_with xinerama) |
764 |
- $(usev !odbc ac_cv_lib_soname_odbc=) |
765 |
- ) |
766 |
- |
767 |
- tc-ld-force-bfd # builds with non-bfd but broken at runtime (bug #867097) |
768 |
- filter-lto # build failure |
769 |
- use mingw || filter-flags -fno-plt # build failure |
770 |
- use custom-cflags || strip-flags # can break in obscure ways at runtime |
771 |
- use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} |
772 |
- |
773 |
- # temporary workaround for tc-ld-force-bfd not yet enforcing with mold |
774 |
- # https://github.com/gentoo/gentoo/pull/28355 |
775 |
- [[ $($(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) == mold* ]] && |
776 |
- append-ldflags -fuse-ld=bfd |
777 |
- |
778 |
- # build using upstream's way (--with-wine64) |
779 |
- # order matters: configure+compile 64->32, install 32->64 |
780 |
- local -i bits |
781 |
- for bits in $(usev abi_x86_64 64) $(usev abi_x86_32 32); do |
782 |
- ( |
783 |
- einfo "Configuring ${PN} for ${bits}bits in ${WORKDIR}/build${bits} ..." |
784 |
- |
785 |
- mkdir ../build${bits} || die |
786 |
- cd ../build${bits} || die |
787 |
- |
788 |
- pe_arch=i386 |
789 |
- if (( bits == 64 )); then |
790 |
- pe_arch=x86_64 |
791 |
- : "${CROSSCC:=${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}}" |
792 |
- conf+=( --enable-win64 ) |
793 |
- elif use amd64; then |
794 |
- conf+=( |
795 |
- $(usev abi_x86_64 --with-wine64=../build64) |
796 |
- TARGETFLAGS=-m32 # for widl |
797 |
- ) |
798 |
- # _setup is optional, but use over Wine's auto-detect (+#472038) |
799 |
- multilib_toolchain_setup x86 |
800 |
- fi |
801 |
- : "${CROSSCC:=${CROSSCC_x86:-i686-w64-mingw32-gcc}}" |
802 |
- |
803 |
- if use mingw; then |
804 |
- # CROSSCC is no longer recognized by Wine, but still use for now |
805 |
- # (future handling for CROSS* variables is subject to changes) |
806 |
- conf+=( ac_cv_prog_${pe_arch}_CC="${CROSSCC}" ) |
807 |
- |
808 |
- # use *FLAGS for mingw, but strip unsupported |
809 |
- : "${CROSSCFLAGS:=$( |
810 |
- filter-flags '-fstack-clash-protection' #758914 |
811 |
- filter-flags '-fstack-protector*' #870136 |
812 |
- filter-flags '-mfunction-return=thunk*' #878849 |
813 |
- CC=${CROSSCC} test-flags-CC ${CFLAGS:--O2})}" |
814 |
- : "${CROSSLDFLAGS:=$( |
815 |
- filter-flags '-fuse-ld=*' |
816 |
- CC=${CROSSCC} test-flags-CCLD ${LDFLAGS})}" |
817 |
- export CROSS{C,LD}FLAGS |
818 |
- fi |
819 |
- |
820 |
- ECONF_SOURCE=${S} econf "${conf[@]}" |
821 |
- ) |
822 |
- done |
823 |
-} |
824 |
- |
825 |
-src_compile() { |
826 |
- use abi_x86_64 && emake -C ../build64 # do first |
827 |
- use abi_x86_32 && emake -C ../build32 |
828 |
-} |
829 |
- |
830 |
-src_install() { |
831 |
- use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install |
832 |
- use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last |
833 |
- |
834 |
- # symlink for plain 'wine' and install its man pages if 64bit-only #404331 |
835 |
- if use abi_x86_64 && use !abi_x86_32; then |
836 |
- dosym wine64 ${WINE_PREFIX}/bin/wine |
837 |
- dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader |
838 |
- local man |
839 |
- for man in ../build64/loader/wine.*man; do |
840 |
- : "${man##*/wine}" |
841 |
- : "${_%.*}" |
842 |
- insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1 |
843 |
- newins ${man} wine.1 |
844 |
- done |
845 |
- fi |
846 |
- |
847 |
- use perl || rm "${ED}"${WINE_DATADIR}/man/man1/wine{dump,maker}.1 \ |
848 |
- "${ED}"${WINE_PREFIX}/bin/{function_grep.pl,wine{dump,maker}} || die |
849 |
- |
850 |
- # create variant wrappers for eselect-wine |
851 |
- local bin |
852 |
- for bin in "${ED}"${WINE_PREFIX}/bin/*; do |
853 |
- make_wrapper "${bin##*/}-${P#wine-}" "${bin#"${ED}"}" |
854 |
- done |
855 |
- |
856 |
- # don't let portage try to strip PE files with the wrong |
857 |
- # strip executable and instead handle it here (saves ~120MB) |
858 |
- if use mingw; then |
859 |
- dostrip -x ${WINE_PREFIX}/wine/{i386,x86_64}-windows |
860 |
- use debug || |
861 |
- find "${ED}"${WINE_PREFIX}/wine/*-windows -regex '.*\.\(a\|dll\|exe\)' \ |
862 |
- -exec $(usex abi_x86_64 x86_64 i686)-w64-mingw32-strip --strip-unneeded {} + || die |
863 |
- fi |
864 |
- |
865 |
- dodoc ANNOUNCE AUTHORS README* documentation/README* |
866 |
-} |
867 |
- |
868 |
-pkg_postinst() { |
869 |
- eselect wine update --if-unset || die |
870 |
-} |
871 |
- |
872 |
-pkg_postrm() { |
873 |
- eselect wine update --if-unset || die |
874 |
-} |