1 |
commit: c95d8a238fc88e2e2ee647e6a0cd17179ea46b15 |
2 |
Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 28 18:50:38 2018 +0000 |
4 |
Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Apr 30 01:31:19 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/wine.git/commit/?id=c95d8a23 |
7 |
|
8 |
app-emulation/wine-vanilla: Bump to 3.4 |
9 |
|
10 |
Package-Manager: Portage-2.3.31, Repoman-2.3.9 |
11 |
|
12 |
app-emulation/wine-vanilla/Manifest | 1 + |
13 |
app-emulation/wine-vanilla/wine-vanilla-3.4.ebuild | 529 +++++++++++++++++++++ |
14 |
2 files changed, 530 insertions(+) |
15 |
|
16 |
diff --git a/app-emulation/wine-vanilla/Manifest b/app-emulation/wine-vanilla/Manifest |
17 |
index d8cab25..ad9a2c7 100644 |
18 |
--- a/app-emulation/wine-vanilla/Manifest |
19 |
+++ b/app-emulation/wine-vanilla/Manifest |
20 |
@@ -30,3 +30,4 @@ DIST wine-3.0.tar.xz 19712932 BLAKE2B 4478c6781bb171ecca426d1fdc85e0d0bbe13b62b6 |
21 |
DIST wine-3.1.tar.xz 19730700 BLAKE2B 287cc42474a9cc57eb7f4b5db2ba79ac5ec8742dffb5367c189f19465cc69bcf78b10fe62ffe6f84ae1360f639a899a7f19128e30e1d9a5b8bbd63deb85e7650 SHA512 49c30d820b8f4028935b4d90dd6251c881cb8cd41bde8833db2782f04111a3d111e24605a87b2d70e419d54cfb6bb42d941f4593f9b381812e3602bf1307c545 |
22 |
DIST wine-3.2.tar.xz 19793180 BLAKE2B 014256734f4c1d70c81115ba6c470f8264746b57be663d81f7e54593fb328a548da00c5e52438af75d923a3c6c5d3997097bd76cf1856b99f0f921f36e5151da SHA512 94b4903d628bf7aacd712a2bf566b53161880bf28311611106776df222222f592edb212d491f02e4c1b0c60d88e4b4a126981d445d1e18018238ff993c6c3092 |
23 |
DIST wine-3.3.tar.xz 19891048 BLAKE2B be77224e7add585f6bba77f436faa8bc9da4f4416d07e2fc67e29d5f9553b03ae8cef12fcb8dee917d84bb5a1c66af16d3140b17b195f2db58464ffe86ff7d9e SHA512 c9e4c75e94d745837208bf877b19c4e4e46df1e78082d21e716f52c9f9d93eaabbec8bf34783cda68e4275f53e37929b81ac128e5b8a13c1e5035223b2621d6a |
24 |
+DIST wine-3.4.tar.xz 19932472 BLAKE2B 8cac5d2c8b3cfb7377f8c3b0aaac6326afd1bda5a9203c9705ea473c43483475d80b23a53e40f2c17af256f523ad759525701b20ac8d600b662b34845ea9414b SHA512 5787bf3fa13d363302ee26f86b96ed728b2b06184572021efdbb00b2c8ebd088056c6d9e22c6c78f0edc0a0b12e26facccc51f08970c8c5eaab4309e86b4286c |
25 |
|
26 |
diff --git a/app-emulation/wine-vanilla/wine-vanilla-3.4.ebuild b/app-emulation/wine-vanilla/wine-vanilla-3.4.ebuild |
27 |
new file mode 100644 |
28 |
index 0000000..9bebca2 |
29 |
--- /dev/null |
30 |
+++ b/app-emulation/wine-vanilla/wine-vanilla-3.4.ebuild |
31 |
@@ -0,0 +1,529 @@ |
32 |
+# Copyright 1999-2018 Gentoo Foundation |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=6 |
36 |
+ |
37 |
+PLOCALES="ar 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 sk sl sr_RS@cyrillic sr_RS@latin sv te th tr uk wa zh_CN zh_TW" |
38 |
+PLOCALE_BACKUP="en" |
39 |
+ |
40 |
+inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils |
41 |
+ |
42 |
+MY_PN="${PN%%-*}" |
43 |
+MY_P="${MY_PN}-${PV}" |
44 |
+ |
45 |
+if [[ ${PV} == "9999" ]] ; then |
46 |
+ EGIT_REPO_URI="https://source.winehq.org/git/wine.git" |
47 |
+ EGIT_BRANCH="master" |
48 |
+ inherit git-r3 |
49 |
+ SRC_URI="" |
50 |
+ #KEYWORDS="" |
51 |
+else |
52 |
+ MAJOR_V=$(get_version_component_range 1) |
53 |
+ SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz" |
54 |
+ KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd" |
55 |
+fi |
56 |
+S="${WORKDIR}/${MY_P}" |
57 |
+ |
58 |
+GWP_V="20180120" |
59 |
+PATCHDIR="${WORKDIR}/gentoo-wine-patches" |
60 |
+ |
61 |
+DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets" |
62 |
+HOMEPAGE="https://www.winehq.org/" |
63 |
+SRC_URI="${SRC_URI} |
64 |
+ https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz |
65 |
+" |
66 |
+ |
67 |
+LICENSE="LGPL-2.1" |
68 |
+SLOT="${PV}" |
69 |
+IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags dos elibc_glibc +fontconfig +gecko gphoto2 gsm gssapi gstreamer +jpeg kerberos kernel_FreeBSD +lcms ldap +mono mp3 ncurses netapi nls odbc openal opencl +opengl osmesa oss +perl pcap +png prelink pulseaudio +realtime +run-exes samba scanner sdl selinux +ssl test +threads +truetype udev +udisks v4l vulkan +X +xcomposite xinerama +xml" |
70 |
+REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 ) |
71 |
+ X? ( truetype ) |
72 |
+ elibc_glibc? ( threads ) |
73 |
+ osmesa? ( opengl ) |
74 |
+ test? ( abi_x86_32 )" # osmesa-opengl #286560 # X-truetype #551124 |
75 |
+ |
76 |
+# FIXME: the test suite is unsuitable for us; many tests require net access |
77 |
+# or fail due to Xvfb's opengl limitations. |
78 |
+RESTRICT="test" |
79 |
+ |
80 |
+COMMON_DEPEND=" |
81 |
+ X? ( |
82 |
+ x11-libs/libXcursor[${MULTILIB_USEDEP}] |
83 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
84 |
+ x11-libs/libXfixes[${MULTILIB_USEDEP}] |
85 |
+ x11-libs/libXrandr[${MULTILIB_USEDEP}] |
86 |
+ x11-libs/libXi[${MULTILIB_USEDEP}] |
87 |
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
88 |
+ ) |
89 |
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
90 |
+ capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] ) |
91 |
+ cups? ( net-print/cups:=[${MULTILIB_USEDEP}] ) |
92 |
+ fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] ) |
93 |
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
94 |
+ gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] ) |
95 |
+ gssapi? ( virtual/krb5[${MULTILIB_USEDEP}] ) |
96 |
+ gstreamer? ( |
97 |
+ media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
98 |
+ media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] |
99 |
+ ) |
100 |
+ jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] ) |
101 |
+ kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] ) |
102 |
+ lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] ) |
103 |
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
104 |
+ mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] ) |
105 |
+ ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] ) |
106 |
+ netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] ) |
107 |
+ nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] ) |
108 |
+ odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] ) |
109 |
+ openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] ) |
110 |
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
111 |
+ opengl? ( |
112 |
+ virtual/glu[${MULTILIB_USEDEP}] |
113 |
+ virtual/opengl[${MULTILIB_USEDEP}] |
114 |
+ ) |
115 |
+ osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] ) |
116 |
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
117 |
+ png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] ) |
118 |
+ pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] ) |
119 |
+ scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] ) |
120 |
+ sdl? ( media-libs/libsdl2:=[haptic,joystick,${MULTILIB_USEDEP}] ) |
121 |
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
122 |
+ truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] ) |
123 |
+ udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
124 |
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
125 |
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
126 |
+ vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] ) |
127 |
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
128 |
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
129 |
+ xml? ( |
130 |
+ dev-libs/libxml2[${MULTILIB_USEDEP}] |
131 |
+ dev-libs/libxslt[${MULTILIB_USEDEP}] |
132 |
+ )" |
133 |
+ |
134 |
+RDEPEND="${COMMON_DEPEND} |
135 |
+ app-emulation/wine-desktop-common |
136 |
+ >app-eselect/eselect-wine-0.3 |
137 |
+ !app-emulation/wine:0 |
138 |
+ dos? ( >=games-emulation/dosbox-0.74_p20160629 ) |
139 |
+ gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] ) |
140 |
+ mono? ( app-emulation/wine-mono:4.7.1 ) |
141 |
+ perl? ( |
142 |
+ dev-lang/perl |
143 |
+ dev-perl/XML-Simple |
144 |
+ ) |
145 |
+ pulseaudio? ( |
146 |
+ realtime? ( sys-auth/rtkit ) |
147 |
+ ) |
148 |
+ samba? ( >=net-fs/samba-3.0.25[winbind] ) |
149 |
+ selinux? ( sec-policy/selinux-wine ) |
150 |
+ udisks? ( sys-fs/udisks:2 )" |
151 |
+ |
152 |
+# tools/make_requests requires perl |
153 |
+DEPEND="${COMMON_DEPEND} |
154 |
+ sys-devel/flex |
155 |
+ >=sys-kernel/linux-headers-2.6 |
156 |
+ virtual/pkgconfig |
157 |
+ virtual/yacc |
158 |
+ X? ( x11-base/xorg-proto ) |
159 |
+ prelink? ( sys-devel/prelink ) |
160 |
+ xinerama? ( x11-base/xorg-proto )" |
161 |
+ |
162 |
+# These use a non-standard "Wine" category, which is provided by |
163 |
+# /etc/xdg/applications-merged/wine.menu |
164 |
+QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop |
165 |
+usr/share/applications/wine-notepad.desktop |
166 |
+usr/share/applications/wine-uninstaller.desktop |
167 |
+usr/share/applications/wine-winecfg.desktop" |
168 |
+ |
169 |
+PATCHES=( |
170 |
+ "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726 |
171 |
+ "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615 |
172 |
+ "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508 |
173 |
+ "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611 |
174 |
+) |
175 |
+PATCHES_BIN=() |
176 |
+ |
177 |
+# https://bugs.gentoo.org/show_bug.cgi?id=635222 |
178 |
+if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then |
179 |
+ DEPEND+=" dev-util/patchbin" |
180 |
+fi |
181 |
+ |
182 |
+wine_compiler_check() { |
183 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
184 |
+ |
185 |
+ # GCC-specific bugs |
186 |
+ if tc-is-gcc; then |
187 |
+ # bug #549768 |
188 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then |
189 |
+ ebegin "Checking for gcc-5 ms_abi compiler bug" |
190 |
+ $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die |
191 |
+ # Run in subshell to prevent "Aborted" message |
192 |
+ ( "${T}"/pr66838 || false ) >/dev/null 2>&1 |
193 |
+ if ! eend $?; then |
194 |
+ eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0" |
195 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild," |
196 |
+ eerror "or use gcc-config to select a different compiler version." |
197 |
+ eerror "See https://bugs.gentoo.org/549768" |
198 |
+ eerror |
199 |
+ return 1 |
200 |
+ fi |
201 |
+ fi |
202 |
+ # bug #574044 |
203 |
+ if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then |
204 |
+ ebegin "Checking for gcc-5-3 stack realignment compiler bug" |
205 |
+ # Compile in subshell to prevent "Aborted" message |
206 |
+ ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1 |
207 |
+ if ! eend $?; then |
208 |
+ eerror "Wine cannot be built with this version of gcc-5.3" |
209 |
+ eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild," |
210 |
+ eerror "or use gcc-config to select a different compiler version." |
211 |
+ eerror "See https://bugs.gentoo.org/574044" |
212 |
+ eerror |
213 |
+ return 1 |
214 |
+ fi |
215 |
+ fi |
216 |
+ fi |
217 |
+ |
218 |
+ # Ensure compiler support |
219 |
+ if use abi_x86_64; then |
220 |
+ ebegin "Checking for 64-bit compiler with builtin_ms_va_list support" |
221 |
+ # Compile in subshell to prevent "Aborted" message |
222 |
+ ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1) |
223 |
+ if ! eend $?; then |
224 |
+ eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine" |
225 |
+ eerror |
226 |
+ eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine" |
227 |
+ eerror |
228 |
+ return 1 |
229 |
+ fi |
230 |
+ fi |
231 |
+} |
232 |
+ |
233 |
+wine_build_environment_check() { |
234 |
+ [[ ${MERGE_TYPE} = "binary" ]] && return 0 |
235 |
+ |
236 |
+ if use abi_x86_64; then |
237 |
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then |
238 |
+ eerror "You need gcc-4.4+ to compile 64-bit wine" |
239 |
+ die |
240 |
+ elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then |
241 |
+ eerror "You need clang-3.8+ to compile 64-bit wine" |
242 |
+ die |
243 |
+ fi |
244 |
+ fi |
245 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then |
246 |
+ ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by" |
247 |
+ ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in" |
248 |
+ ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4" |
249 |
+ fi |
250 |
+ if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then |
251 |
+ if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then |
252 |
+ ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work" |
253 |
+ ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine." |
254 |
+ ewarn "See package.env in man 5 portage for more information on how to do this." |
255 |
+ ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details" |
256 |
+ fi |
257 |
+ fi |
258 |
+ |
259 |
+ if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then |
260 |
+ eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only." |
261 |
+ eerror "See https://bugs.gentoo.org/487864 for more details." |
262 |
+ eerror |
263 |
+ return 1 |
264 |
+ fi |
265 |
+} |
266 |
+ |
267 |
+wine_env_vcs_vars() { |
268 |
+ local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT" |
269 |
+ local pn_live_val="${pn_live_var}" |
270 |
+ eval pn_live_val='$'${pn_live_val} |
271 |
+ if [[ ! -z ${EGIT_COMMIT} ]]; then |
272 |
+ eerror "Commits must now be specified using the environmental variables" |
273 |
+ eerror "WINE_COMMIT" |
274 |
+ eerror |
275 |
+ return 1 |
276 |
+ fi |
277 |
+} |
278 |
+ |
279 |
+pkg_pretend() { |
280 |
+ wine_build_environment_check || die |
281 |
+ |
282 |
+ # Verify OSS support |
283 |
+ if use oss && ! use kernel_FreeBSD; then |
284 |
+ if ! has_version ">=media-sound/oss-4"; then |
285 |
+ eerror "You cannot build wine with USE=oss without having support from a" |
286 |
+ eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)" |
287 |
+ eerror |
288 |
+ die |
289 |
+ fi |
290 |
+ fi |
291 |
+} |
292 |
+ |
293 |
+pkg_setup() { |
294 |
+ wine_build_environment_check || die |
295 |
+ wine_env_vcs_vars || die |
296 |
+ |
297 |
+ WINE_VARIANT="${PN#wine}-${PV}" |
298 |
+ WINE_VARIANT="${WINE_VARIANT#-}" |
299 |
+ |
300 |
+ MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}" |
301 |
+ MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}" |
302 |
+ MY_DATADIR="${MY_DATAROOTDIR}" |
303 |
+ MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}" |
304 |
+ MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}" |
305 |
+ MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}" |
306 |
+ MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}" |
307 |
+ MY_MANDIR="${MY_DATADIR}/man" |
308 |
+} |
309 |
+ |
310 |
+src_unpack() { |
311 |
+ if [[ ${PV} == "9999" ]] ; then |
312 |
+ EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack |
313 |
+ fi |
314 |
+ |
315 |
+ default |
316 |
+ |
317 |
+ l10n_find_plocales_changes "${S}/po" "" ".po" |
318 |
+} |
319 |
+ |
320 |
+src_prepare() { |
321 |
+ |
322 |
+ eapply_bin(){ |
323 |
+ local patch |
324 |
+ for patch in ${PATCHES_BIN[@]}; do |
325 |
+ patchbin --nogit < "${patch}" || die |
326 |
+ done |
327 |
+ } |
328 |
+ |
329 |
+ local md5="$(md5sum server/protocol.def)" |
330 |
+ |
331 |
+ default |
332 |
+ eapply_bin |
333 |
+ eautoreconf |
334 |
+ |
335 |
+ # Modification of the server protocol requires regenerating the server requests |
336 |
+ if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then |
337 |
+ einfo "server/protocol.def was patched; running tools/make_requests" |
338 |
+ tools/make_requests || die #432348 |
339 |
+ fi |
340 |
+ sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die |
341 |
+ if ! use run-exes; then |
342 |
+ sed -i '/^MimeType/d' loader/wine.desktop || die #117785 |
343 |
+ fi |
344 |
+ |
345 |
+ # Edit wine.desktop to work for specific variant |
346 |
+ sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die |
347 |
+ |
348 |
+ # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652 |
349 |
+ cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die |
350 |
+ |
351 |
+ l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS |
352 |
+ |
353 |
+ # Fix manpage generation for locales #469418 and abi_x86_64 #617864 |
354 |
+ |
355 |
+ # Duplicate manpages input files for wine64 |
356 |
+ local f |
357 |
+ for f in loader/*.man.in; do |
358 |
+ cp ${f} ${f/wine/wine64} || die |
359 |
+ done |
360 |
+ # Add wine64 manpages to Makefile |
361 |
+ if use abi_x86_64; then |
362 |
+ sed -i "/wine.man.in/i \ |
363 |
+ \\\twine64.man.in \\\\" loader/Makefile.in || die |
364 |
+ sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\ |
365 |
+\164\2/' loader/Makefile.in || die |
366 |
+ fi |
367 |
+ |
368 |
+ rm_man_file(){ |
369 |
+ local file="${1}" |
370 |
+ loc=${2} |
371 |
+ sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die |
372 |
+ } |
373 |
+ |
374 |
+ while read f; do |
375 |
+ l10n_for_each_disabled_locale_do rm_man_file "${f}" |
376 |
+ done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print) |
377 |
+} |
378 |
+ |
379 |
+src_configure() { |
380 |
+ wine_compiler_check || die |
381 |
+ |
382 |
+ export LDCONFIG=/bin/true |
383 |
+ use custom-cflags || strip-flags |
384 |
+ |
385 |
+ multilib-minimal_src_configure |
386 |
+} |
387 |
+ |
388 |
+multilib_src_configure() { |
389 |
+ local myconf=( |
390 |
+ --prefix="${MY_PREFIX}" |
391 |
+ --datarootdir="${MY_DATAROOTDIR}" |
392 |
+ --datadir="${MY_DATADIR}" |
393 |
+ --docdir="${MY_DOCDIR}" |
394 |
+ --includedir="${MY_INCLUDEDIR}" |
395 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}" |
396 |
+ --libexecdir="${MY_LIBEXECDIR}" |
397 |
+ --localstatedir="${MY_LOCALSTATEDIR}" |
398 |
+ --mandir="${MY_MANDIR}" |
399 |
+ --sysconfdir=/etc/wine |
400 |
+ $(use_with alsa) |
401 |
+ $(use_with capi) |
402 |
+ $(use_with lcms cms) |
403 |
+ $(use_with cups) |
404 |
+ $(use_with ncurses curses) |
405 |
+ $(use_with udisks dbus) |
406 |
+ $(use_with fontconfig) |
407 |
+ $(use_with ssl gnutls) |
408 |
+ $(use_enable gecko mshtml) |
409 |
+ $(use_with gphoto2 gphoto) |
410 |
+ $(use_with gsm) |
411 |
+ $(use_with gssapi) |
412 |
+ $(use_with gstreamer) |
413 |
+ --without-hal |
414 |
+ $(use_with jpeg) |
415 |
+ $(use_with kerberos krb5) |
416 |
+ $(use_with ldap) |
417 |
+ $(use_enable mono mscoree) |
418 |
+ $(use_with mp3 mpg123) |
419 |
+ $(use_with netapi) |
420 |
+ $(use_with nls gettext) |
421 |
+ $(use_with openal) |
422 |
+ $(use_with opencl) |
423 |
+ $(use_with opengl) |
424 |
+ $(use_with osmesa) |
425 |
+ $(use_with oss) |
426 |
+ $(use_with pcap) |
427 |
+ $(use_with png) |
428 |
+ $(use_with pulseaudio pulse) |
429 |
+ $(use_with threads pthread) |
430 |
+ $(use_with scanner sane) |
431 |
+ $(use_with sdl) |
432 |
+ $(use_enable test tests) |
433 |
+ $(use_with truetype freetype) |
434 |
+ $(use_with udev) |
435 |
+ $(use_with v4l) |
436 |
+ $(use_with vulkan) |
437 |
+ $(use_with X x) |
438 |
+ $(use_with X xfixes) |
439 |
+ $(use_with xcomposite) |
440 |
+ $(use_with xinerama) |
441 |
+ $(use_with xml) |
442 |
+ $(use_with xml xslt) |
443 |
+ ) |
444 |
+ |
445 |
+ local PKG_CONFIG AR RANLIB |
446 |
+ # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038 |
447 |
+ # set AR and RANLIB to make QA scripts happy; #483342 |
448 |
+ tc-export PKG_CONFIG AR RANLIB |
449 |
+ |
450 |
+ if use amd64; then |
451 |
+ if [[ ${ABI} == amd64 ]]; then |
452 |
+ myconf+=( --enable-win64 ) |
453 |
+ else |
454 |
+ myconf+=( --disable-win64 ) |
455 |
+ fi |
456 |
+ |
457 |
+ # Note: using --with-wine64 results in problems with multilib.eclass |
458 |
+ # CC/LD hackery. We're using separate tools instead. |
459 |
+ fi |
460 |
+ |
461 |
+ ECONF_SOURCE=${S} \ |
462 |
+ econf "${myconf[@]}" |
463 |
+ emake depend |
464 |
+} |
465 |
+ |
466 |
+multilib_src_test() { |
467 |
+ # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader" |
468 |
+ if [[ ${ABI} == x86 ]]; then |
469 |
+ if [[ $(id -u) == 0 ]]; then |
470 |
+ ewarn "Skipping tests since they cannot be run under the root user." |
471 |
+ ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf" |
472 |
+ return |
473 |
+ fi |
474 |
+ |
475 |
+ WINEPREFIX="${T}/.wine-${ABI}" \ |
476 |
+ Xemake test |
477 |
+ fi |
478 |
+} |
479 |
+ |
480 |
+multilib_src_install_all() { |
481 |
+ local DOCS=( ANNOUNCE AUTHORS README ) |
482 |
+ add_locale_docs() { |
483 |
+ local locale_doc="documentation/README.$1" |
484 |
+ [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} ) |
485 |
+ } |
486 |
+ l10n_for_each_locale_do add_locale_docs |
487 |
+ |
488 |
+ einstalldocs |
489 |
+ prune_libtool_files --all |
490 |
+ |
491 |
+ if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script |
492 |
+ rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \ |
493 |
+ "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die |
494 |
+ fi |
495 |
+ |
496 |
+ # Remove wineconsole if neither backend is installed #551124 |
497 |
+ if ! use X && ! use ncurses; then |
498 |
+ rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die |
499 |
+ rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die |
500 |
+ rm_wineconsole() { |
501 |
+ rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die |
502 |
+ } |
503 |
+ multilib_foreach_abi rm_wineconsole |
504 |
+ fi |
505 |
+ |
506 |
+ use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055 |
507 |
+ use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader} |
508 |
+ |
509 |
+ if use abi_x86_64 && ! use abi_x86_32; then |
510 |
+ dosym wine64 "${MY_PREFIX}"/bin/wine # 404331 |
511 |
+ dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader |
512 |
+ fi |
513 |
+ |
514 |
+ # Failglob for binloops, shouldn't be necessary, but including to stay safe |
515 |
+ eshopts_push -s failglob #615218 |
516 |
+ # Make wrappers for binaries for handling multiple variants |
517 |
+ # Note: wrappers instead of symlinks because some are shell which use basename |
518 |
+ local b |
519 |
+ for b in "${D%/}${MY_PREFIX}"/bin/*; do |
520 |
+ make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}" |
521 |
+ done |
522 |
+ eshopts_pop |
523 |
+} |
524 |
+ |
525 |
+pkg_postinst() { |
526 |
+ eselect wine register ${P} |
527 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
528 |
+ eselect wine register --vanilla ${P} || die |
529 |
+ fi |
530 |
+ |
531 |
+ eselect wine update --all --if-unset || die |
532 |
+ |
533 |
+ xdg_desktop_database_update |
534 |
+ |
535 |
+ if ! use gecko; then |
536 |
+ ewarn "Without Wine Gecko, wine prefixes will not have a default" |
537 |
+ ewarn "implementation of iexplore. Many older windows applications" |
538 |
+ ewarn "rely upon the existence of an iexplore implementation, so" |
539 |
+ ewarn "you will likely need to install an external one, like via winetricks" |
540 |
+ fi |
541 |
+ if ! use mono; then |
542 |
+ ewarn "Without Wine Mono, wine prefixes will not have a default" |
543 |
+ ewarn "implementation of .NET. Many windows applications rely upon" |
544 |
+ ewarn "the existence of a .NET implementation, so you will likely need" |
545 |
+ ewarn "to install an external one, like via winetricks" |
546 |
+ fi |
547 |
+} |
548 |
+ |
549 |
+pkg_prerm() { |
550 |
+ eselect wine deregister ${P} |
551 |
+ if [[ ${PN} == "wine-vanilla" ]]; then |
552 |
+ eselect wine deregister --vanilla ${P} || die |
553 |
+ fi |
554 |
+ |
555 |
+ eselect wine update --all --if-unset || die |
556 |
+} |
557 |
+ |
558 |
+pkg_postrm() { |
559 |
+ xdg_desktop_database_update |
560 |
+} |