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: Sat, 01 Sep 2018 16:26:15
Message-Id: 1535819139.713600f6b03ece99cd66d652fcd7ae83a44bd1d3.sarnex@gentoo
1 commit: 713600f6b03ece99cd66d652fcd7ae83a44bd1d3
2 Author: Lucian Poston <lucianposton <AT> pm <DOT> me>
3 AuthorDate: Sat Sep 1 16:15:22 2018 +0000
4 Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 1 16:25:39 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/wine.git/commit/?id=713600f6
7
8 app-emulation/wine-any: Bump to 3.14
9
10 Closes: https://github.com/gentoo/repo-proj-wine/pull/8
11
12 Package-Manager: Portage-2.3.40, Repoman-2.3.9
13
14 app-emulation/wine-any/Manifest | 3 +
15 app-emulation/wine-any/wine-any-3.14.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 0da9cad..3ad3d3e 100644
20 --- a/app-emulation/wine-any/Manifest
21 +++ b/app-emulation/wine-any/Manifest
22 @@ -25,6 +25,7 @@ DIST wine-3.10.tar.xz 20485784 BLAKE2B 3a5e9ca948880a3bc979c33e797296d156425438c
23 DIST wine-3.11.tar.xz 20501100 BLAKE2B 793fe0a83ed13f4ca436c710198ffcbde5e0109d9890551a410b1d836d79adf4060f0cc7e20861eb806878db79f8003023821ac1b0d72a0710235412863c4576 SHA512 8f7226364648ec30eb77f1848ee6bf01be2445fd96f902309575ac1f6ece31bf54d415516fcda76ae438010a36a9d4846d22cc37365aac4a230701376f9589d7
24 DIST wine-3.12.tar.xz 20516708 BLAKE2B 6ff32f8d471492c1ca42db434b16c0273e98cd15215d2f67e3d8e34e298d36620f55409bb781687f3ab11e6a44bd95eaa033e642fdb0d7aae90319ac2ddd2fb6 SHA512 afc76e8975ea780f664de27a17128f730bcbe72a9fad0c01bfe6dcc98c2f98729ccde32e97fe4df2cf98f5d1b254b28f0e7cd380855148c5cfb41dd88f3012a1
25 DIST wine-3.13.tar.xz 20551460 BLAKE2B 2f8b1c2f72761b3c5541b8760be3009295dc9482257539edce83aa9d6022b2e8a25e1cee4fe56b69808e51e338fd330db5da17dec5dea4ba7684b5d7eb7e77d5 SHA512 a07a3d2a19261f9251f165ca4c14871e6ebda4d3f99da16f9fc41f06e80cae3fb50aeab96628c7a739e635e896dbb31c55df8b42c4637a058f9035c664c93a59
26 +DIST wine-3.14.tar.xz 20583696 BLAKE2B 5e9410c5dadd0c08cbe0e52b0170840492890784dbd1afc8f01ab50caac8443513133575fa6f64143276ce315dde8614f5ece4b3cd5568c224a3379c85619b63 SHA512 50dbbf8a832abfa01247b9d170c6e1fe4f722cc8868659512df7bc17efd7e9d618db10283baf1eda0f1e4abbcdd130be16dbdb8d5a91b155c2c441e50e2b43f1
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 @@ -58,6 +59,7 @@ DIST wine-d3d9-3.10.tar.gz 50540 BLAKE2B c9127e5504cbf0d0fe338645bc2d8ed6f71db11
31 DIST wine-d3d9-3.11.tar.gz 50540 BLAKE2B c9c6469fb0dfff9be5cf50796f47a747d02c736a22b186ec561c0dcc3715a0da1cfce24e852da075685ea3047131d98cf506810ab7d555fd91ca334dbf8c315c SHA512 57ebadc6764c36a925c8e9130b3b436513795bb53e96566a88c22337b37a8c3efcb84aada19d3e5dd6ae2eb24f64b46a33376027600cb7863254369b4555de05
32 DIST wine-d3d9-3.12.tar.gz 50544 BLAKE2B 68c58a8800facf910b72e07f8be77d260060175da25583d3e6562cbe18c4fa1cf2fe0f5d109747e6901677231483adf02a0f1d76105e66733faf1e932c75e876 SHA512 9beb98528600b6699a6112abaf037d73a7cd0e791de04dee2c1874075b9b99a24438df92421802eb89e1285e1235e6a36b6cd7260757fc43d7f8cb3b913296ad
33 DIST wine-d3d9-3.13.tar.gz 50546 BLAKE2B 2773503ad2c952c47982258c8b7d7486b5822bfd759a96aa138996aed5ac16d7e3c7add7700f4394292f6154fdd8d58dbfabad1faf8b5013fb88f68ed7657521 SHA512 c3da30c0ce7fca433a703e42213c4a4f6c7a1f8a2d7744555a385641e5c344772dfd142779978d131bf42e79cddb4925b9926fd96e7e1497e173a755f1ec6ce5
34 +DIST wine-d3d9-3.14.tar.gz 50546 BLAKE2B 47169741d0330902a006ce4a7663de317b221cfaa3e19abfbb3af2ff886e2a42a1185151531c2b67b57bdafc5646c10f57cd4ff11faf1d2f36c9f269f382637d SHA512 921bd096aa039d002b0f3c5f856668063a34164ad097cee696f45af7d148e80a78b05dfb879f91337fea2cb6e06dd99be2d199b5186c9cd7726dc72f31ddd1ea
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 @@ -91,6 +93,7 @@ DIST wine-staging-3.10.tar.gz 9943542 BLAKE2B 412319529e6fe9bb21a4629e1ae1896fe4
39 DIST wine-staging-3.11.tar.gz 9950753 BLAKE2B bffc6a86b652695d9ed4e0e2ce6f165e45fc2f6fb7e898704fd22624b1b0497ae35319b2444b49ee62eb8d0e308dd32148af64e38f480ce4408170aa2c91a828 SHA512 811a8668c3747f02850928a99bc66612937c38d98068dddec47bffe427d00c7c83b172f12807e1cb609d83c00e978949f913877bfbf5d8443a5ad29011c03545
40 DIST wine-staging-3.12.tar.gz 9936375 BLAKE2B 5c48fb1037d39ce6ab78c03a002b2edfc2fc434c0f661bb6def050becd7411998b9ae763db99bda3b5190e3e6ab355699806d976d01f813904080c6156dafb7e SHA512 166f991f7c8f59df656f3fb28150a8e26e48d1ff6906b3eccd31cb84524e28efe7e7df00eadc21881940308ccc4b4edebcb2a71bdd03ba3de5beb1cf42e2f058
41 DIST wine-staging-3.13.tar.gz 9936353 BLAKE2B f5791c6f1bc43395860ea938cfadefe88e6839e44d6e3a8c5b9474e1ec17654645145459a2a9c32adbec6a5cd6441f754b0121958ff4c12e424262bb61c18358 SHA512 0124950cc18d566daecc532a432bce27d712f48eaaa9b37bf930e056b460e30a8fb1806aa179f72b44a95dc56963a3dc063b4acb71affb7b8ddff3001fe59b9a
42 +DIST wine-staging-3.14.tar.gz 9938677 BLAKE2B 0f801298ad23d24688d072236bfa5b9fc549e1ecb964912f90029efd71fab27a38661df27433b52d1356a2b800c9a7c39d91ae08f60eb2deaf211d97a1ba60b7 SHA512 f998baac6be3fece1ae6d4e924f883befea43f849d678c987e9fe4d102cf22fde7b4a0fa728294c46d70c7d29caa037022fb9e33ce4b4fac0e49c94d25cdfa66
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.14.ebuild b/app-emulation/wine-any/wine-any-3.14.ebuild
48 new file mode 100644
49 index 0000000..66208fb
50 --- /dev/null
51 +++ b/app-emulation/wine-any/wine-any-3.14.ebuild
52 @@ -0,0 +1,641 @@
53 +# Copyright 1999-2018 Gentoo Foundation
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 +}