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