1 |
commit: e6b12aa5a6b4a81dbca4c35df05cf6b676ab0ffe |
2 |
Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jan 31 18:51:35 2021 +0000 |
4 |
Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 31 18:52:25 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6b12aa5 |
7 |
|
8 |
app-emulation/wine-staging: Sync with ::wine |
9 |
|
10 |
Package-Manager: Portage-3.0.14, Repoman-3.0.2 |
11 |
Signed-off-by: Nick Sarnie <sarnex <AT> gentoo.org> |
12 |
|
13 |
app-emulation/wine-staging/Manifest | 2 + |
14 |
app-emulation/wine-staging/wine-staging-6.1.ebuild | 667 +++++++++++++++++++++ |
15 |
2 files changed, 669 insertions(+) |
16 |
|
17 |
diff --git a/app-emulation/wine-staging/Manifest b/app-emulation/wine-staging/Manifest |
18 |
index 16eae340c6e..b6998a2cec3 100644 |
19 |
--- a/app-emulation/wine-staging/Manifest |
20 |
+++ b/app-emulation/wine-staging/Manifest |
21 |
@@ -3,7 +3,9 @@ DIST wine-5.20.tar.xz 24177960 BLAKE2B 50169bc00497feef91f5cf7fd56bce8f7784f70d2 |
22 |
DIST wine-5.21.tar.xz 24178740 BLAKE2B 9d6b2766536fb019d69dbffc8dbae0004eeb6d5b3d3f57d0577b4952159b9a5388d1f767d982b3837d713175ac7baec47c7b017e21f4fb586d3d97707491066e SHA512 0879e4edeca60880799736ac831f8ae28c6e5156dde161685aa84a5d8bd20c4f3a51a178fa2b130a9e8af44432bb239160a04829fcef5d8332e2bbf829d2bc18 |
23 |
DIST wine-5.22.tar.xz 24214812 BLAKE2B 7bc093501cb20fbe52e277aadb867e4f55abc9898ae570aebf3496c2f7938129498e6ad8b6de7f8efe28ccffee734c94754da703e0c5d6bad6c1293cefb42c0e SHA512 9e86a1f74a142513121c155ffa5e1dd863ecc00092952878f44185725e81793fd7291e0e3c93275cd0d083d17af99eb1d8feba1c96e8607f44919b9045737271 |
24 |
DIST wine-6.0.tar.xz 24192280 BLAKE2B baf0eee582190ede8d210390b51d330c1879cb442100bc2e957052898fbd84bcc047a885065f9bf96ac4f072f92eee44f0e1c3baddc68937286e7cc6f976bd4e SHA512 c0732fbab1da8737d595a876b28ce87eef1440c317746e798642b59b44b34e890de562e0c0cc674e97096f39db82f8e9c3b1cc1ba9edc246b7266a0f7cb00057 |
25 |
+DIST wine-6.1.tar.xz 24227160 BLAKE2B 968405fb8a4060732a6070687e28aecc9169692bf18e058d358e859a2626281b5adb67b94d849628ecbfa87ad772a367f62fd3c5f45aecdf7d0a7e7aa8167c33 SHA512 49ee77c41e2fb1c4f22417117b26f8a467ec6c99583fca66f147003f776fcaf5ca42227153c7ca3325dfe70141ae9bfb88e3eb6e4cf25dd31a5ba5115d2685d0 |
26 |
DIST wine-staging-5.20.tar.gz 10378427 BLAKE2B 75910b198ca5b79f41f4aa115a962cb01a4dd208512feffc2ef9bc327d9c82d0c0babd543ea011917257c5dfd7c5f2f2815dae81d553dd4b239b627bafba1635 SHA512 64913c3af44890a959593c610c713113f068811a8fe79e234a61f262af963d194d1d71d336361c6a473ad0f3f64fc5a88cee36facdc0824cea6856fc74da9634 |
27 |
DIST wine-staging-5.21.tar.gz 10362610 BLAKE2B 41f40c33b7d0853c63b81da863145f242b640a0e491b3ee92e1c687d33b85344676e764ae93921f00643b4bd3247e9c9aef4ba92cf80aa43785db1f762eac8cc SHA512 079a7fccd66d886b3498c45057b1bb215d3897e44e0c8d6afb56174fad583e8a578ea888d70d62a18da1566bb9649fdefd08227efecd21fc71b0b3d739dab636 |
28 |
DIST wine-staging-5.22.tar.gz 10342905 BLAKE2B 9f59a0d8c06f29b52fec71cc09915c8a7a23a1ad9945cedeced179657645970048846517f4eced051989b0ef1ee555c9f8176de073a66b3633f3fe1fd90e0836 SHA512 0ce0314b470e90c741fd02ede522b6dd754fb69595b527e3ad5ac62d944bc7eca43eca88aa2b85d99a9945fbad05872cdcd2ac87ed809dcd41a9ce56bfcc1147 |
29 |
DIST wine-staging-6.0.tar.gz 9863425 BLAKE2B b51e0c3dc426c637de4ee89ee7d519847edcb04b1fb160f5f196e5560ce570ced682165ac74958433de79e104765d4811f004d323f357b753cf56108b9a631bb SHA512 33845e398e9c3d4bacbd9cd369983e72517fd648747433eabd933b446f9d86f1d61660959ff4e05cb661cf4038550b3df3384f588f3f5504b1f8056196ca3c38 |
30 |
+DIST wine-staging-6.1.tar.gz 9855125 BLAKE2B e5bd41294b7f17cd283d4ab90cce4f362740c2b3de2a867ef50c44639f5472392b3c11e199a66da63018f18df2f2a99579b50f27d6dd0163bd989efe1e7983e2 SHA512 50bf3f07cf8008731cee131852cbce43c5ec44219e8e96fb70a0fc82954b0a2a9d25ee8b25b7c62b47abd131591ca8fe0461214287601465edccda80be6d598f |
31 |
|
32 |
diff --git a/app-emulation/wine-staging/wine-staging-6.1.ebuild b/app-emulation/wine-staging/wine-staging-6.1.ebuild |
33 |
new file mode 100644 |
34 |
index 00000000000..28716e74fdc |
35 |
--- /dev/null |
36 |
+++ b/app-emulation/wine-staging/wine-staging-6.1.ebuild |
37 |
@@ -0,0 +1,667 @@ |
38 |
+# Copyright 1999-2021 Gentoo Authors |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI=6 |
42 |
+ |
43 |
+PLOCALES="ar ast bg ca cs da de el en en_US eo es fa fi fr he hi hr hu it ja ko lt ml nb_NO nl or pa pl pt_BR pt_PT rm ro ru si sk sl sr_RS@cyrillic sr_RS@latin sv ta te th tr uk wa zh_CN zh_TW" |
44 |
+PLOCALE_BACKUP="en" |
45 |
+ |
46 |
+inherit autotools eapi7-ver estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx xdg-utils |
47 |
+MY_PN="${PN%%-*}" |
48 |
+MY_PV="${PV/_/-}" |
49 |
+MY_P="${MY_PN}-${MY_PV}" |
50 |
+ |
51 |
+if [[ ${MY_PV} == "9999" ]] ; then |
52 |
+ EGIT_REPO_URI="https://source.winehq.org/git/wine.git" |
53 |
+ EGIT_BRANCH="master" |
54 |
+ inherit git-r3 |
55 |
+ SRC_URI="" |
56 |
+ #KEYWORDS="" |
57 |
+else |
58 |
+ MAJOR_V=$(ver_cut 1) |
59 |
+ MINOR_V=$(ver_cut 2) |
60 |
+ if [[ ${MINOR_V} != "0" ]] ; then |
61 |
+ MINOR_V="x" |
62 |
+ fi |
63 |
+ SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.${MINOR_V}/${MY_P}.tar.xz" |
64 |
+ KEYWORDS="-* ~amd64 ~x86" |
65 |
+fi |
66 |
+S="${WORKDIR}/${MY_P}" |
67 |
+ |
68 |
+STAGING_P="wine-staging-${MY_PV}" |
69 |
+STAGING_DIR="${WORKDIR}/${STAGING_P}" |
70 |
+GWP_V="20200523" |
71 |
+PATCHDIR="${WORKDIR}/gentoo-wine-patches" |
72 |
+ |
73 |
+DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset" |
74 |
+HOMEPAGE="https://www.winehq.org/" |
75 |
+SRC_URI="${SRC_URI} |
76 |
+ https://dev.gentoo.org/~sarnex/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz |
77 |
+" |
78 |
+ |
79 |
+if [[ ${MY_PV} == "9999" ]] ; then |
80 |
+ STAGING_EGIT_REPO_URI="https://github.com/wine-staging/wine-staging.git" |
81 |
+else |
82 |
+ SRC_URI="${SRC_URI} |
83 |
+ staging? ( https://github.com/wine-staging/wine-staging/archive/v${MY_PV}.tar.gz -> ${STAGING_P}.tar.gz )" |
84 |
+fi |
85 |
+ |
86 |
+LICENSE="LGPL-2.1" |
87 |
+SLOT="${MY_PV}" |
88 |
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +faudio +fontconfig +gcrypt +gecko gphoto2 gsm gssapi gstreamer +jpeg kerberos kernel_FreeBSD +lcms ldap mingw +mono mp3 netapi nls odbc openal opencl +opengl osmesa oss +perl pcap pipelight +png prelink pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl staging test themes +threads +truetype udev +udisks +unwind usb v4l vaapi vkd3d vulkan +X +xcomposite xinerama +xml" |
89 |
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
90 |
+ X? ( truetype ) |
91 |
+ elibc_glibc? ( threads ) |
92 |
+ osmesa? ( opengl ) |
93 |
+ pipelight? ( staging ) |
94 |
+ test? ( abi_x86_32 ) |
95 |
+ themes? ( staging ) |
96 |
+ vaapi? ( staging ) |
97 |
+ vkd3d? ( vulkan )" # osmesa-opengl #286560 # X-truetype #551124 |
98 |
+ |
99 |
+# FIXME: the test suite is unsuitable for us; many tests require net access |
100 |
+# or fail due to Xvfb's opengl limitations. |
101 |
+RESTRICT="test" |
102 |
+ |
103 |
+COMMON_DEPEND=" |
104 |
+ X? ( |
105 |
+ x11-libs/libXcursor[${MULTILIB_USEDEP}] |
106 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
107 |
+ x11-libs/libXfixes[${MULTILIB_USEDEP}] |
108 |
+ x11-libs/libXrandr[${MULTILIB_USEDEP}] |
109 |
+ x11-libs/libXi[${MULTILIB_USEDEP}] |
110 |
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
111 |
+ ) |
112 |
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
113 |
+ capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
114 |
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
115 |
+ faudio? ( app-emulation/faudio:=[${MULTILIB_USEDEP}] ) |
116 |
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
117 |
+ gcrypt? ( dev-libs/libgcrypt:=[${MULTILIB_USEDEP}] ) |
118 |
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
119 |
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
120 |
+ gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] ) |
121 |
+ gstreamer? ( |
122 |
+ media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
123 |
+ media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
124 |
+ ) |
125 |
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
126 |
+ kerberos? ( virtual/krb5:0=[${MULTILIB_USEDEP}] ) |
127 |
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
128 |
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
129 |
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
130 |
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
131 |
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
132 |
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
133 |
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
134 |
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
135 |
+ opengl? ( |
136 |
+ virtual/glu[${MULTILIB_USEDEP}] |
137 |
+ virtual/opengl[${MULTILIB_USEDEP}] |
138 |
+ ) |
139 |
+ osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) |
140 |
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
141 |
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
142 |
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
143 |
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
144 |
+ sdl? ( media-libs/libsdl2:=[haptic,joystick,${MULTILIB_USEDEP}] ) |
145 |
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
146 |
+ staging? ( sys-apps/attr[${MULTILIB_USEDEP}] ) |
147 |
+ themes? ( |
148 |
+ dev-libs/glib:2[${MULTILIB_USEDEP}] |
149 |
+ x11-libs/cairo[${MULTILIB_USEDEP}] |
150 |
+ x11-libs/gtk+:3[${MULTILIB_USEDEP}] |
151 |
+ ) |
152 |
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
153 |
+ udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
154 |
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
155 |
+ unwind? ( sys-libs/libunwind[${MULTILIB_USEDEP}] ) |
156 |
+ usb? ( virtual/libusb:1[${MULTILIB_USEDEP}] ) |
157 |
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
158 |
+ vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] ) |
159 |
+ vkd3d? ( >=app-emulation/vkd3d-1.2[${MULTILIB_USEDEP}] ) |
160 |
+ vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] ) |
161 |
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
162 |
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
163 |
+ xml? ( |
164 |
+ dev-libs/libxml2[${MULTILIB_USEDEP}] |
165 |
+ dev-libs/libxslt[${MULTILIB_USEDEP}] |
166 |
+ )" |
167 |
+ |
168 |
+RDEPEND="${COMMON_DEPEND} |
169 |
+ app-emulation/wine-desktop-common |
170 |
+ >app-eselect/eselect-wine-0.3 |
171 |
+ !app-emulation/wine:0 |
172 |
+ dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
173 |
+ gecko? ( app-emulation/wine-gecko:2.47.2[abi_x86_32?,abi_x86_64?] ) |
174 |
+ mono? ( app-emulation/wine-mono:5.1.1 ) |
175 |
+ perl? ( |
176 |
+ dev-lang/perl |
177 |
+ dev-perl/XML-Simple |
178 |
+ ) |
179 |
+ pulseaudio? ( |
180 |
+ realtime? ( sys-auth/rtkit ) |
181 |
+ ) |
182 |
+ samba? ( >=net-fs/samba-3.0.25[winbind] ) |
183 |
+ selinux? ( sec-policy/selinux-wine ) |
184 |
+ udisks? ( sys-fs/udisks:2 )" |
185 |
+ |
186 |
+# tools/make_requests requires perl |
187 |
+DEPEND="${COMMON_DEPEND} |
188 |
+ sys-devel/flex |
189 |
+ >=sys-kernel/linux-headers-2.6 |
190 |
+ virtual/pkgconfig |
191 |
+ virtual/yacc |
192 |
+ X? ( x11-base/xorg-proto ) |
193 |
+ prelink? ( sys-devel/prelink ) |
194 |
+ staging? ( |
195 |
+ dev-lang/perl |
196 |
+ dev-perl/XML-Simple |
197 |
+ ) |
198 |
+ xinerama? ( x11-base/xorg-proto )" |
199 |
+ |
200 |
+# These use a non-standard "Wine" category, which is provided by |
201 |
+# /etc/xdg/applications-merged/wine.menu |
202 |
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
203 |
+usr/share/applications/wine-notepad.desktop |
204 |
+usr/share/applications/wine-uninstaller.desktop |
205 |
+usr/share/applications/wine-winecfg.desktop" |
206 |
+ |
207 |
+PATCHES=( |
208 |
+ "${PATCHDIR}/patches/${MY_PN}-5.0-winegcc.patch" #260726 |
209 |
+ "${PATCHDIR}/patches/${MY_PN}-4.7-multilib-portage.patch" #395615 |
210 |
+ "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611 |
211 |
+ "${PATCHDIR}/patches/${MY_PN}-5.9-Revert-makedep-Install-also-generated-typelib-for-in.patch" |
212 |
+) |
213 |
+PATCHES_BIN=() |
214 |
+ |
215 |
+# https://bugs.gentoo.org/show_bug.cgi?id=635222 |
216 |
+if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${MY_PV} == 9999 ]]; then |
217 |
+ DEPEND+=" dev-util/patchbin" |
218 |
+fi |
219 |
+ |
220 |
+wine_compiler_check() { |
221 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
222 |
+ |
223 |
+ # GCC-specific bugs |
224 |
+ if tc-is-gcc; then |
225 |
+ # bug #549768 |
226 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
227 |
+ ebegin "Checking for gcc-5 ms_abi compiler bug" |
228 |
+ $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die |
229 |
+ # Run in subshell to prevent "Aborted" message |
230 |
+ ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
231 |
+ if ! eend $?; then |
232 |
+ eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
233 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
234 |
+ eerror "or use gcc-config to select a different compiler version." |
235 |
+ eerror "See https://bugs.gentoo.org/549768" |
236 |
+ eerror |
237 |
+ return 1 |
238 |
+ fi |
239 |
+ fi |
240 |
+ # bug #574044 |
241 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
242 |
+ ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
243 |
+ # Compile in subshell to prevent "Aborted" message |
244 |
+ ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 |
245 |
+ if ! eend $?; then |
246 |
+ eerror "Wine cannot be built with this version of gcc-5.3" |
247 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
248 |
+ eerror "or use gcc-config to select a different compiler version." |
249 |
+ eerror "See https://bugs.gentoo.org/574044" |
250 |
+ eerror |
251 |
+ return 1 |
252 |
+ fi |
253 |
+ fi |
254 |
+ fi |
255 |
+ |
256 |
+ # Ensure compiler support |
257 |
+ if use abi_x86_64; then |
258 |
+ ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
259 |
+ # Compile in subshell to prevent "Aborted" message |
260 |
+ ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
261 |
+ if ! eend $?; then |
262 |
+ eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
263 |
+ eerror |
264 |
+ eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
265 |
+ eerror |
266 |
+ return 1 |
267 |
+ fi |
268 |
+ fi |
269 |
+} |
270 |
+ |
271 |
+wine_build_environment_check() { |
272 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
273 |
+ |
274 |
+ if use abi_x86_64; then |
275 |
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
276 |
+ eerror "You need gcc-4.4+ to compile 64-bit wine" |
277 |
+ die |
278 |
+ elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
279 |
+ eerror "You need clang-3.8+ to compile 64-bit wine" |
280 |
+ die |
281 |
+ fi |
282 |
+ fi |
283 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
284 |
+ ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
285 |
+ ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
286 |
+ ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
287 |
+ fi |
288 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
289 |
+ if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
290 |
+ ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
291 |
+ ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
292 |
+ ewarn "See package.env in man 5 portage for more information on how to do this." |
293 |
+ ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
294 |
+ fi |
295 |
+ fi |
296 |
+ |
297 |
+ if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
298 |
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
299 |
+ eerror "See https://bugs.gentoo.org/487864 for more details." |
300 |
+ eerror |
301 |
+ return 1 |
302 |
+ fi |
303 |
+} |
304 |
+ |
305 |
+wine_env_vcs_vars() { |
306 |
+ local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
307 |
+ local pn_live_val="${pn_live_var}" |
308 |
+ eval pn_live_val='$'${pn_live_val} |
309 |
+ if [[ ! -z ${pn_live_val} ]]; then |
310 |
+ if use staging; then |
311 |
+ eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}" |
312 |
+ eerror "cannot be used to set the commit. Instead, you may use the" |
313 |
+ eerror "environment variables:" |
314 |
+ eerror " EGIT_OVERRIDE_COMMIT_WINE" |
315 |
+ eerror " EGIT_OVERRIDE_COMMIT_WINE_STAGING_WINE_STAGING" |
316 |
+ eerror |
317 |
+ return 1 |
318 |
+ fi |
319 |
+ fi |
320 |
+ if [[ ! -z ${EGIT_COMMIT} ]]; then |
321 |
+ eerror "Commits must now be specified using the environment variables:" |
322 |
+ eerror " EGIT_OVERRIDE_COMMIT_WINE" |
323 |
+ eerror " EGIT_OVERRIDE_COMMIT_WINE_STAGING_WINE_STAGING" |
324 |
+ eerror |
325 |
+ return 1 |
326 |
+ fi |
327 |
+} |
328 |
+ |
329 |
+pkg_pretend() { |
330 |
+ if [[ ${MERGE_TYPE} != binary ]] ; then |
331 |
+ wine_build_environment_check || die |
332 |
+ |
333 |
+ # Verify OSS support |
334 |
+ if use oss && ! use kernel_FreeBSD; then |
335 |
+ if ! has_version ">=media-sound/oss-4"; then |
336 |
+ eerror "You cannot build wine with USE=oss without having support from a" |
337 |
+ eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
338 |
+ eerror |
339 |
+ die |
340 |
+ fi |
341 |
+ fi |
342 |
+ |
343 |
+ if use mingw && use abi_x86_32 && ! has_version "cross-i686-w64-mingw32/gcc"; then |
344 |
+ eerror |
345 |
+ eerror "USE=\"mingw\" is currently experimental, and requires the" |
346 |
+ eerror "'cross-i686-w64-mingw32' compiler and its runtime for 32-bit builds." |
347 |
+ eerror |
348 |
+ eerror "These can be installed by using 'sys-devel/crossdev':" |
349 |
+ eerror |
350 |
+ eerror "crossdev --target i686-w64-mingw32" |
351 |
+ eerror |
352 |
+ eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw" |
353 |
+ eerror |
354 |
+ die "MinGW build was enabled, but no compiler to support it was found." |
355 |
+ fi |
356 |
+ |
357 |
+ if use mingw && use abi_x86_64 && ! has_version "cross-x86_64-w64-mingw32/gcc"; then |
358 |
+ eerror |
359 |
+ eerror "USE=\"mingw\" is currently experimental, and requires the" |
360 |
+ eerror "'cross-x86_64-w64-mingw32' compiler and its runtime for 64-bit builds." |
361 |
+ eerror |
362 |
+ eerror "These can be installed by using 'sys-devel/crossdev':" |
363 |
+ eerror |
364 |
+ eerror "crossdev --target x86_64-w64-mingw32" |
365 |
+ eerror |
366 |
+ eerror "For more information on setting up MinGW, see: https://wiki.gentoo.org/wiki/Mingw" |
367 |
+ eerror |
368 |
+ die "MinGW build was enabled, but no compiler to support it was found." |
369 |
+ fi |
370 |
+ fi |
371 |
+} |
372 |
+ |
373 |
+pkg_setup() { |
374 |
+ wine_build_environment_check || die |
375 |
+ wine_env_vcs_vars || die |
376 |
+ |
377 |
+ WINE_VARIANT="${PN#wine}-${MY_PV}" |
378 |
+ WINE_VARIANT="${WINE_VARIANT#-}" |
379 |
+ |
380 |
+ MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
381 |
+ MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
382 |
+ MY_DATADIR="${MY_DATAROOTDIR}" |
383 |
+ MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
384 |
+ MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
385 |
+ MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
386 |
+ MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
387 |
+ MY_MANDIR="${MY_DATADIR}/man" |
388 |
+} |
389 |
+ |
390 |
+src_unpack() { |
391 |
+ if [[ ${MY_PV} == "9999" ]] ; then |
392 |
+ EGIT_CHECKOUT_DIR="${S}" git-r3_src_unpack |
393 |
+ if use staging; then |
394 |
+ local CURRENT_WINE_COMMIT=${EGIT_VERSION} |
395 |
+ |
396 |
+ EGIT_CHECKOUT_DIR="${STAGING_DIR}" EGIT_REPO_URI="${STAGING_EGIT_REPO_URI}" git-r3_src_unpack |
397 |
+ |
398 |
+ local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die |
399 |
+ |
400 |
+ if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then |
401 |
+ einfo "The current Staging patchset is not guaranteed to apply on this WINE commit." |
402 |
+ einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT." |
403 |
+ einfo "Example: EGIT_OVERRIDE_COMMIT_WINE=${COMPAT_WINE_COMMIT} emerge -1 wine" |
404 |
+ fi |
405 |
+ fi |
406 |
+ fi |
407 |
+ |
408 |
+ default |
409 |
+ |
410 |
+ l10n_find_plocales_changes "${S}/po" "" ".po" |
411 |
+} |
412 |
+ |
413 |
+src_prepare() { |
414 |
+ |
415 |
+ eapply_bin(){ |
416 |
+ local patch |
417 |
+ for patch in ${PATCHES_BIN[@]}; do |
418 |
+ patchbin --nogit < "${patch}" || die |
419 |
+ done |
420 |
+ } |
421 |
+ |
422 |
+ local md5="$(md5sum server/protocol.def)" |
423 |
+ |
424 |
+ if use staging; then |
425 |
+ ewarn "Applying the Wine-Staging patchset. Any bug reports to the" |
426 |
+ ewarn "Wine bugzilla should explicitly state that staging was used." |
427 |
+ |
428 |
+ local STAGING_EXCLUDE="-W winemenubuilder-Desktop_Icon_Path" #652176 |
429 |
+ use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight" |
430 |
+ |
431 |
+ # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches |
432 |
+ ebegin "Running Wine-Staging patch installer" |
433 |
+ ( |
434 |
+ set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE} |
435 |
+ cd "${STAGING_DIR}/patches" |
436 |
+ source "${STAGING_DIR}/patches/patchinstall.sh" |
437 |
+ ) |
438 |
+ eend $? || die "Failed to apply Wine-Staging patches" |
439 |
+ fi |
440 |
+ |
441 |
+ default |
442 |
+ eapply_bin |
443 |
+ eautoreconf |
444 |
+ |
445 |
+ # Modification of the server protocol requires regenerating the server requests |
446 |
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
447 |
+ einfo "server/protocol.def was patched; running tools/make_requests" |
448 |
+ tools/make_requests || die #432348 |
449 |
+ fi |
450 |
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
451 |
+ if ! use run-exes; then |
452 |
+ sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
453 |
+ fi |
454 |
+ |
455 |
+ # Edit wine.desktop to work for specific variant |
456 |
+ sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
457 |
+ |
458 |
+ # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 |
459 |
+ cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die |
460 |
+ |
461 |
+ l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
462 |
+ |
463 |
+ # Fix manpage generation for locales #469418 and abi_x86_64 #617864 |
464 |
+ |
465 |
+ # Duplicate manpages input files for wine64 |
466 |
+ local f |
467 |
+ for f in loader/*.man.in; do |
468 |
+ cp ${f} ${f/wine/wine64} || die |
469 |
+ done |
470 |
+ # Add wine64 manpages to Makefile |
471 |
+ if use abi_x86_64; then |
472 |
+ sed -i "/wine.man.in/i \ |
473 |
+ \\\twine64.man.in \\\\" loader/Makefile.in || die |
474 |
+ sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\ |
475 |
+\164\2/' loader/Makefile.in || die |
476 |
+ fi |
477 |
+ |
478 |
+ rm_man_file(){ |
479 |
+ local file="${1}" |
480 |
+ loc=${2} |
481 |
+ sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die |
482 |
+ } |
483 |
+ |
484 |
+ while read f; do |
485 |
+ l10n_for_each_disabled_locale_do rm_man_file "${f}" |
486 |
+ done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print) |
487 |
+} |
488 |
+ |
489 |
+src_configure() { |
490 |
+ wine_compiler_check || die |
491 |
+ |
492 |
+ export LDCONFIG=/bin/true |
493 |
+ use custom-cflags || strip-flags |
494 |
+ if use mingw; then |
495 |
+ export CROSSCFLAGS="${CFLAGS}" |
496 |
+ fi |
497 |
+ |
498 |
+ multilib-minimal_src_configure |
499 |
+} |
500 |
+ |
501 |
+multilib_src_configure() { |
502 |
+ local myconf=( |
503 |
+ --prefix="${MY_PREFIX}" |
504 |
+ --datarootdir="${MY_DATAROOTDIR}" |
505 |
+ --datadir="${MY_DATADIR}" |
506 |
+ --docdir="${MY_DOCDIR}" |
507 |
+ --includedir="${MY_INCLUDEDIR}" |
508 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
509 |
+ --libexecdir="${MY_LIBEXECDIR}" |
510 |
+ --localstatedir="${MY_LOCALSTATEDIR}" |
511 |
+ --mandir="${MY_MANDIR}" |
512 |
+ --sysconfdir="${EPREFIX}/etc/wine" |
513 |
+ $(use_with alsa) |
514 |
+ $(use_with capi) |
515 |
+ $(use_with lcms cms) |
516 |
+ $(use_with cups) |
517 |
+ $(use_with udisks dbus) |
518 |
+ $(use_with faudio) |
519 |
+ $(use_with fontconfig) |
520 |
+ $(use_with ssl gnutls) |
521 |
+ $(use_enable gecko mshtml) |
522 |
+ $(use_with gcrypt) |
523 |
+ $(use_with gphoto2 gphoto) |
524 |
+ $(use_with gsm) |
525 |
+ $(use_with gssapi) |
526 |
+ $(use_with gstreamer) |
527 |
+ --without-hal |
528 |
+ $(use_with jpeg) |
529 |
+ $(use_with kerberos krb5) |
530 |
+ $(use_with ldap) |
531 |
+ # TODO: Will bug 685172 still need special handling? |
532 |
+ $(use_with mingw) |
533 |
+ $(use_enable mono mscoree) |
534 |
+ $(use_with mp3 mpg123) |
535 |
+ $(use_with netapi) |
536 |
+ $(use_with nls gettext) |
537 |
+ $(use_with openal) |
538 |
+ $(use_with opencl) |
539 |
+ $(use_with opengl) |
540 |
+ $(use_with osmesa) |
541 |
+ $(use_with oss) |
542 |
+ $(use_with pcap) |
543 |
+ $(use_with png) |
544 |
+ $(use_with pulseaudio pulse) |
545 |
+ $(use_with threads pthread) |
546 |
+ $(use_with scanner sane) |
547 |
+ $(use_with sdl) |
548 |
+ $(use_enable test tests) |
549 |
+ $(use_with truetype freetype) |
550 |
+ $(use_with udev) |
551 |
+ $(use_with unwind) |
552 |
+ $(use_with usb) |
553 |
+ $(use_with v4l v4l2) |
554 |
+ $(use_with vkd3d) |
555 |
+ $(use_with vulkan) |
556 |
+ $(use_with X x) |
557 |
+ $(use_with X xfixes) |
558 |
+ $(use_with xcomposite) |
559 |
+ $(use_with xinerama) |
560 |
+ $(use_with xml) |
561 |
+ $(use_with xml xslt) |
562 |
+ ) |
563 |
+ |
564 |
+ use staging && myconf+=( |
565 |
+ --with-xattr |
566 |
+ $(use_with themes gtk3) |
567 |
+ $(use_with vaapi va) |
568 |
+ ) |
569 |
+ |
570 |
+ local PKG_CONFIG AR RANLIB |
571 |
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
572 |
+ # set AR and RANLIB to make QA scripts happy; #483342 |
573 |
+ tc-export PKG_CONFIG AR RANLIB |
574 |
+ |
575 |
+ if use amd64; then |
576 |
+ if [[ ${ABI} == amd64 ]]; then |
577 |
+ myconf+=( --enable-win64 ) |
578 |
+ else |
579 |
+ myconf+=( --disable-win64 ) |
580 |
+ fi |
581 |
+ |
582 |
+ # Note: using --with-wine64 results in problems with multilib.eclass |
583 |
+ # CC/LD hackery. We're using separate tools instead. |
584 |
+ fi |
585 |
+ |
586 |
+ ECONF_SOURCE=${S} \ |
587 |
+ econf "${myconf[@]}" |
588 |
+ emake depend |
589 |
+} |
590 |
+ |
591 |
+multilib_src_test() { |
592 |
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
593 |
+ if [[ ${ABI} == x86 ]]; then |
594 |
+ if [[ $(id -u) == 0 ]]; then |
595 |
+ ewarn "Skipping tests since they cannot be run under the root user." |
596 |
+ ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
597 |
+ return |
598 |
+ fi |
599 |
+ |
600 |
+ WINEPREFIX="${T}/.wine-${ABI}" \ |
601 |
+ Xemake test |
602 |
+ fi |
603 |
+} |
604 |
+ |
605 |
+multilib_src_install_all() { |
606 |
+ local DOCS=( ANNOUNCE AUTHORS README ) |
607 |
+ add_locale_docs() { |
608 |
+ local locale_doc="documentation/README.$1" |
609 |
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
610 |
+ } |
611 |
+ l10n_for_each_locale_do add_locale_docs |
612 |
+ |
613 |
+ einstalldocs |
614 |
+ prune_libtool_files --all |
615 |
+ |
616 |
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
617 |
+ rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
618 |
+ "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
619 |
+ fi |
620 |
+ |
621 |
+ # Remove wineconsole if neither backend is installed #551124 |
622 |
+ if ! use X; then |
623 |
+ rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
624 |
+ rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
625 |
+ |
626 |
+ if ! use mingw; then |
627 |
+ rm_wineconsole() { |
628 |
+ rm "${D%/}/usr/$(get_libdir)/wine-${WINE_VARIANT}"/wine/{,fakedlls/}wineconsole.exe* || die |
629 |
+ } |
630 |
+ else |
631 |
+ rm_wineconsole() { |
632 |
+ rm "${D%/}/usr/$(get_libdir)/wine-${WINE_VARIANT}"/wine/wineconsole.exe* || die |
633 |
+ } |
634 |
+ fi |
635 |
+ |
636 |
+ multilib_foreach_abi rm_wineconsole |
637 |
+ fi |
638 |
+ |
639 |
+ use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
640 |
+ use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
641 |
+ |
642 |
+ # Avoid double prefix from dosym and make_wrapper |
643 |
+ MY_PREFIX=${MY_PREFIX#${EPREFIX}} |
644 |
+ |
645 |
+ if use abi_x86_64 && ! use abi_x86_32; then |
646 |
+ dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 |
647 |
+ dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader |
648 |
+ fi |
649 |
+ |
650 |
+ # Failglob for binloops, shouldn't be necessary, but including to stay safe |
651 |
+ eshopts_push -s failglob #615218 |
652 |
+ # Make wrappers for binaries for handling multiple variants |
653 |
+ # Note: wrappers instead of symlinks because some are shell which use basename |
654 |
+ local b |
655 |
+ for b in "${ED%/}${MY_PREFIX}"/bin/*; do |
656 |
+ make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" |
657 |
+ done |
658 |
+ eshopts_pop |
659 |
+} |
660 |
+ |
661 |
+pkg_postinst() { |
662 |
+ eselect wine register ${PN}-${MY_PV} |
663 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
664 |
+ eselect wine register --vanilla ${PN}-${MY_PV} || die |
665 |
+ else |
666 |
+ if use staging; then |
667 |
+ eselect wine register --staging ${PN}-${MY_PV} || die |
668 |
+ fi |
669 |
+ fi |
670 |
+ |
671 |
+ eselect wine update --all --if-unset || die |
672 |
+ |
673 |
+ xdg_desktop_database_update |
674 |
+ |
675 |
+ if ! use gecko; then |
676 |
+ ewarn "Without Wine Gecko, wine prefixes will not have a default" |
677 |
+ ewarn "implementation of iexplore. Many older windows applications" |
678 |
+ ewarn "rely upon the existence of an iexplore implementation, so" |
679 |
+ ewarn "you will likely need to install an external one, like via winetricks" |
680 |
+ fi |
681 |
+ if ! use mono; then |
682 |
+ ewarn "Without Wine Mono, wine prefixes will not have a default" |
683 |
+ ewarn "implementation of .NET. Many windows applications rely upon" |
684 |
+ ewarn "the existence of a .NET implementation, so you will likely need" |
685 |
+ ewarn "to install an external one, like via winetricks" |
686 |
+ fi |
687 |
+} |
688 |
+ |
689 |
+pkg_prerm() { |
690 |
+ eselect wine deregister ${PN}-${MY_PV} |
691 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
692 |
+ eselect wine deregister --vanilla ${PN}-${MY_PV} || die |
693 |
+ else |
694 |
+ if use staging; then |
695 |
+ eselect wine deregister --staging ${PN}-${MY_PV}|| die |
696 |
+ fi |
697 |
+ fi |
698 |
+ |
699 |
+ eselect wine update --all --if-unset || die |
700 |
+} |
701 |
+ |
702 |
+pkg_postrm() { |
703 |
+ xdg_desktop_database_update |
704 |
+} |