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