Gentoo Archives: gentoo-commits

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