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