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