Gentoo Archives: gentoo-commits

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