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