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