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