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