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