Gentoo Archives: gentoo-commits

From: Nick Sarnie <sarnex@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/wine-any/
Date: Tue, 01 May 2018 02:57:44
Message-Id: 1525143452.bd2239e3213d12064691735a7e74884c95010898.sarnex@gentoo
1 commit: bd2239e3213d12064691735a7e74884c95010898
2 Author: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 1 02:53:18 2018 +0000
4 Commit: Nick Sarnie <sarnex <AT> gentoo <DOT> org>
5 CommitDate: Tue May 1 02:57:32 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd2239e3
7
8 app-emulation/wine-any: Drop old
9
10 Package-Manager: Portage-2.3.31, Repoman-2.3.9
11
12 app-emulation/wine-any/Manifest | 9 -
13 app-emulation/wine-any/wine-any-2.19.ebuild | 632 ---------------------------
14 app-emulation/wine-any/wine-any-2.20.ebuild | 634 ----------------------------
15 app-emulation/wine-any/wine-any-2.21.ebuild | 634 ----------------------------
16 4 files changed, 1909 deletions(-)
17
18 diff --git a/app-emulation/wine-any/Manifest b/app-emulation/wine-any/Manifest
19 index 0ac9bb36bdc..2c1ccbf6cbd 100644
20 --- a/app-emulation/wine-any/Manifest
21 +++ b/app-emulation/wine-any/Manifest
22 @@ -1,22 +1,13 @@
23 DIST gentoo-wine-patches-20180120.tar.xz 58672 BLAKE2B 84d621075b65475cec41a06429680b518d7eafb938cefd903f3f8aa71ea3049ac9d8de05af48f9f4f4a1b9172c7ef17784540413e410eb8ec11e8ec4a63858c6 SHA512 5b354a409c7a2b77499aaa593b9248a1d15d755e3687b095755faacc30068bfcdbdd5c2a2a78617cb1a78c46d2931162bd69ec3379b035d81494bea7108263c2
24 DIST wine-2.0.tar.bz2 23662707 BLAKE2B 1d485c1359ce8a0395a9f6378c1f8be33ea2836b80390d1eb1095057a0acedd21708daab16e1851a315391b9f9b0a360879b9d98c73bcc8371c5023e9a8037f5 SHA512 b0a57ba8202d9fc396e5bfb7a7718d6bababbed8f3351e7fdc36afa37f35a871e04903757618f73427aeb71a52b2d323977d79e48f8b38d636f23fd404441186
25 -DIST wine-2.19.tar.xz 19549464 BLAKE2B 86d130cc43d7d674d2f478365952962b2792fd585b8d074564108bc7e9f4f7690337e4758b9a24e54fe8fd60187d3a96496a5ffc454ba674b02ecdde68efd3bb SHA512 83558231bdc592b1f69cfedf6c689063df7bd9fecdfafba6fb7f6a2c7fa7783973efb85a6a49305afc18b1aa268209ee5b9c0655756e05d7550468698dfa51ae
26 -DIST wine-2.20.tar.xz 19597556 BLAKE2B 80a9886fa77e5788b143521288f7d83c92754610c9426e58c759d2c33767bd23f7d2a44a17ceeec0bfe9065264393e0aa1087a0827ea7d438ffd938ba2eb2fb5 SHA512 d8d374d1e690ce9d3964fc81054fb7f4cd56cbae6bc44ebbf80b7dc7f04524baa2bd831e0be8f00de4cb0e14c1cb71780d424f5dcb9851fcaed9fb22f5ce5d23
27 -DIST wine-2.21.tar.xz 19620888 BLAKE2B 26d19c5805db58b53530b80eda3ab229f7961542d398cb0e74155e5341de8b484d301c263653ae50e953588538f6782a9b2200b822ba66f091e65d259e07db8e SHA512 4e33c463debe637827ed65f1118e692832bb5374491f706f9d251b8a2956e20d2df5d90ceba218b9bc9e946de91b8ba1d96b460453f59cdd9d82f070d07e0c43
28 DIST wine-3.5.tar.xz 19963436 BLAKE2B 83d7c0719a088f8c705f7a9d8a6df6b9ee5e0a5ffa57c0a921875097be29298bebb9025222039432c65da32359e187a93413e04a5bb73171f0033911595baf9f SHA512 c1e36f3db862fdedd00c3ac20c84c6eb799b53fe32e959b481a6168baf7d9725ed9bd0a97e7f9b651e3ccfba4f8fb623445369be03fde5010ed0fcb0a53e7d3f
29 DIST wine-3.6.tar.xz 20005240 BLAKE2B 6dd48180b9aed8a3b69c40b3ed7b2ff5adbebfb591860dda6603d2219f9059bc069df000cd2614c80d34911c451388f0124af3dd8a11b806b227ca8e16659d71 SHA512 31d24cc78734bdb743afcec7df05b641ab0625568361401eaf8cd5e217719c8c51a0ef7ed737a560fe42cb9ecd88f10d35e62a98d9df69b966502a5b0dab5a22
30 DIST wine-3.7.tar.xz 20454036 BLAKE2B 04ac94d5679377c5d0bb37a6d3e8e3ec7c09faa300f8422a09a22b14ef4244d2bb14c80a47cfca5e11526506a8064f0cfa4e28868d7f04669f85ab743dbbb36d SHA512 a699418574dd8f407c064421cf6cdfe3923562c8adf9a7749e716f3853291eab05358ea64f0217c303c26c0f8f59d2116024b7b6978f9a52a055147e689a8694
31 DIST wine-d3d9-2.0.tar.gz 48373 BLAKE2B 80370a7519141030a7e54c2ea5db410b2bf1cde8d8389618487c52e4ff40f87cf7b0f9087331bb43fa6436e1b9936de9cc00a02b9ab9ce6528635a245e6a8b3f SHA512 a9e2d1c9f2784128e4c53a8dc923070a5057b5ff3d83c2b536a2d2df0bc8433ac92b8ab1c3cdf34158c0e7bfe497ddb5974605fbc1736a92307639d59450c7a1
32 -DIST wine-d3d9-2.19.tar.gz 48818 BLAKE2B b053ee0ad798a7d8ad53b3daff1757caaa52f095435f2fb89893c7313d490a2359217a5638529e918a1446f13533a746836c1c22218cba875a1420816618408a SHA512 be43435cd53f367ca57080c08218db302a90bf85ec6e917e89375904c456b585b61fb6053f9b4366b7e844f8246cabe83460a9866f614dbb5df3edfb43b2f54a
33 -DIST wine-d3d9-2.20.tar.gz 48822 BLAKE2B b9ae137e05f672990707aa3ae88aa569a517e644579ff545b35393074ca03ac0c6aaea7494a90a4f6c4278f7397e1e5078e90383f5debeb4edfe46c8834446ff SHA512 f1fa4882514d0bbb77a7244448a9153cddd5029fca49c5221783fafc13f30888b606c6be4417ecdf85bd80a659ecf54c57ea5aedd49acb87cdc9b42d98f68dc0
34 -DIST wine-d3d9-2.21.tar.gz 48813 BLAKE2B a83b558682f19a44f62c33c8782f4415250c537373654b36c4b1aa6e078ed09594ec1f0e5b76093d88b835786dac96047a1584aa94953256d6ca2804e08ec3df SHA512 64edab41be95adb1dc81c040b13901fbc7fd54467e1306639e3d459c41521d61ebf09e7028688166af8fd0f238063e125d8985a4fc66b185fade996ed596bb2a
35 DIST wine-d3d9-3.5.tar.gz 50711 BLAKE2B 701f9bcef8f9849c66b567d72b8055522d5a96e4a6581a0da9085df441e9a8907527059e250dfb5630bd605cf451c1f7c60b120f5ce333ff10730f301f7ba70d SHA512 4bde2b510f8726b002dd33af75884eb165b1050338ab553fee071653af343a08d27d338ee42b68600038171d6c645386cde8513fa80c805f8118eb0d9f6c5f4b
36 DIST wine-d3d9-3.6.tar.gz 50706 BLAKE2B 6d7af8e428de4d0b3d7ec5fc5d157801d3e807cbf63603d8334a564e34b411f2eabba49744670840b12c54a341a9350d1a87f0260b963c9c9392bd81526350e5 SHA512 67ce67e99c0e1c53f9a81074520465e4c59b6c4bb9a9921ce477d65f4e25b62ae85aa32314cf14a1d10a647da9efc72944e5b1ef9bab344e0aac500589f24106
37 DIST wine-d3d9-3.7.tar.gz 50699 BLAKE2B 1ab795a0636e7654cc1c96e2a0ba40ff7f89eaa2983d68c4a0eabf3a69355e68e833fee63fbbff67ba840a28d34724a841c1c3c6695ae2d8bcaf38f7fbf4fd16 SHA512 9a02e40bda9c26001857355ddfb1ba68afb518158260b0904c5aaef3991e19587dcc107cc34b01b9fbda7e710be488384b020bbf8d56632cce787ffb299bc3f3
38 DIST wine-staging-2.0.tar.gz 10182575 BLAKE2B 1de645f66fa3e5e0d8ceddf5439fd246510470f63d6331c7029abed7192180b7b8430e43a2e732a30a5fbe0c73ba39b7fafcfc08830c68e679dff90576c3a960 SHA512 51412299259d6e92c8993543d5fdb3239ebe31e0d1d715e0a9e8ce94b3139c0567b08ff1600d41be94f12427cbfccc2f6b6b2ed030535445c95618aaf6578580
39 -DIST wine-staging-2.19.tar.gz 10241240 BLAKE2B e661e3272328988e9a1aacc22fc02f0773804b58777f208c79c6af866032f31b6140a52e2aa5af954e52437db234712863d1369e960e98e2c212d1efc7f6344f SHA512 90916cb096bbfec35514eff4c1b6e2090b6e68e3e7af1164715f5abb1d255c5cfd6411f53c27cb277adcf0982fa6d6e508a7cdbc1404dcca6c2700b05c2c5483
40 -DIST wine-staging-2.20.tar.gz 10240761 BLAKE2B 2a212e59c606f4c53e711b0f975a9527cbb930423061eeeb962c3bba7232890f3f4853e1aa98cba11bcb9c9ba6a37c915ef8df7f4f3d3243da96f625e6d45a57 SHA512 16f55130291ca70487a74d01cee9057f95f3eae3e049d30fb2a9aeb8e425b2020289fb805fdbae860708be0615a86da0502c06ff32cc21536d040088cc13605f
41 -DIST wine-staging-2.21.tar.gz 10229454 BLAKE2B a971b9b96e1e57f658b492e3dd5d6daf5410b6bb6a7df9432d14b48e6ca4b21a4ab62ee362addf370ea5940e4f7a6af05ec6c026124cb9e9b6cc790f7fc8e204 SHA512 701c6352c8bc5745b8078947bcc3b6209e4e6c387905395cc81d42276402243522d7fa543bb34293c74786adcde9a3c50a2cf4cd57e05e0f4c68991a49a00b41
42 DIST wine-staging-3.5.tar.gz 10024748 BLAKE2B b5399bd22fd1edc1e22ee82e19bb9e54d4d12e771cfa0578dfc69d5cc18c0b6c1dba8e9c522ffddd14c187e012f33196738035dd34b45d71f48eac96997fd8b5 SHA512 39ce4fccac408d69c55fe53376744d218d546d09fc3fcaa5c8e87ba070de5ed52128ebdf0ed76cb5e3a5178a79c8fb25a8786b129e8b3eb59156732d7a4bf15c
43 DIST wine-staging-3.6.tar.gz 9958882 BLAKE2B 9f7d3d6d748f7bceb08a584bc93a1ce97c09d13cf5448ed1fbe1981494e0009e4686f047d8005a059522ec78749dd120f29f7c6562da8578a95a5dda91c23895 SHA512 839731fa3dba91cefd9e0f036b4d688c4786fe8cb19143819457fb9e45a6c14ef3a70630b585abdd424a00036312114034a2529700012ea1863527e45fbfac2a
44 DIST wine-staging-3.7.tar.gz 9951654 BLAKE2B 3d6c9a023f3a4f9da6e506a88490365d4f0959231e7f9e375e8ae46006c3cfd82ca4e65af9df79d9c54cf7ee5e53452b10ac5146f2c0de97a7c4946aefac3cd5 SHA512 4a00b7c61121798b6c4e918aadeb71865e359f6471035b9ed33ae242f3fe70f1977b1c0b3628fb244b5ba4942d771d2ee797bcc087d38192fcd9325e1886ed14
45
46 diff --git a/app-emulation/wine-any/wine-any-2.19.ebuild b/app-emulation/wine-any/wine-any-2.19.ebuild
47 deleted file mode 100644
48 index d0b16c47aa1..00000000000
49 --- a/app-emulation/wine-any/wine-any-2.19.ebuild
50 +++ /dev/null
51 @@ -1,632 +0,0 @@
52 -# Copyright 1999-2018 Gentoo Foundation
53 -# Distributed under the terms of the GNU General Public License v2
54 -
55 -EAPI=6
56 -
57 -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"
58 -PLOCALE_BACKUP="en"
59 -
60 -inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
61 -
62 -MY_PN="${PN%%-*}"
63 -MY_P="${MY_PN}-${PV}"
64 -
65 -if [[ ${PV} == "9999" ]] ; then
66 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
67 - EGIT_BRANCH="master"
68 - inherit git-r3
69 - SRC_URI=""
70 - #KEYWORDS=""
71 -else
72 - MAJOR_V=$(get_version_component_range 1)
73 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
74 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
75 -fi
76 -S="${WORKDIR}/${MY_P}"
77 -
78 -STAGING_P="wine-staging-${PV}"
79 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
80 -D3D9_P="wine-d3d9-${PV}"
81 -D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
82 -GWP_V="20180120"
83 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
84 -
85 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with optional external patchsets"
86 -HOMEPAGE="https://www.winehq.org/"
87 -SRC_URI="${SRC_URI}
88 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
89 -"
90 -
91 -if [[ ${PV} == "9999" ]] ; then
92 - STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git"
93 - D3D9_EGIT_REPO_URI="https://github.com/sarnex/wine-d3d9-patches.git"
94 -else
95 - SRC_URI="${SRC_URI}
96 - staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
97 - d3d9? ( https://github.com/sarnex/wine-d3d9-patches/archive/${D3D9_P}.tar.gz )"
98 -fi
99 -
100 -LICENSE="LGPL-2.1"
101 -SLOT="${PV}"
102 -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 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"
103 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
104 - X? ( truetype )
105 - elibc_glibc? ( threads )
106 - osmesa? ( opengl )
107 - pipelight? ( staging )
108 - s3tc? ( staging )
109 - test? ( abi_x86_32 )
110 - themes? ( staging )
111 - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
112 -
113 -# FIXME: the test suite is unsuitable for us; many tests require net access
114 -# or fail due to Xvfb's opengl limitations.
115 -RESTRICT="test"
116 -
117 -COMMON_DEPEND="
118 - X? (
119 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
120 - x11-libs/libXext[${MULTILIB_USEDEP}]
121 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
122 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
123 - x11-libs/libXi[${MULTILIB_USEDEP}]
124 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
125 - )
126 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
127 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
128 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
129 - d3d9? (
130 - media-libs/mesa[d3d9,egl,${MULTILIB_USEDEP}]
131 - x11-libs/libX11[${MULTILIB_USEDEP}]
132 - x11-libs/libXext[${MULTILIB_USEDEP}]
133 - x11-libs/libxcb[${MULTILIB_USEDEP}]
134 - )
135 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
136 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
137 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
138 - gstreamer? (
139 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
140 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
141 - )
142 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
143 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
144 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
145 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
146 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
147 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
148 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
149 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
150 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
151 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
152 - opengl? (
153 - virtual/glu[${MULTILIB_USEDEP}]
154 - virtual/opengl[${MULTILIB_USEDEP}]
155 - )
156 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
157 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
158 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
159 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
160 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
161 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
162 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
163 - themes? (
164 - dev-libs/glib:2[${MULTILIB_USEDEP}]
165 - x11-libs/cairo[${MULTILIB_USEDEP}]
166 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
167 - )
168 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
169 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
170 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
171 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
172 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
173 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
174 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
175 - xml? (
176 - dev-libs/libxml2[${MULTILIB_USEDEP}]
177 - dev-libs/libxslt[${MULTILIB_USEDEP}]
178 - )"
179 -
180 -RDEPEND="${COMMON_DEPEND}
181 - app-emulation/wine-desktop-common
182 - >app-eselect/eselect-wine-0.3
183 - !app-emulation/wine:0
184 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
185 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
186 - mono? ( app-emulation/wine-mono:4.7.1 )
187 - perl? (
188 - dev-lang/perl
189 - dev-perl/XML-Simple
190 - )
191 - pulseaudio? (
192 - realtime? ( sys-auth/rtkit )
193 - )
194 - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
195 - samba? ( >=net-fs/samba-3.0.25[winbind] )
196 - selinux? ( sec-policy/selinux-wine )
197 - udisks? ( sys-fs/udisks:2 )"
198 -
199 -# tools/make_requests requires perl
200 -DEPEND="${COMMON_DEPEND}
201 - sys-devel/flex
202 - >=sys-kernel/linux-headers-2.6
203 - virtual/pkgconfig
204 - virtual/yacc
205 - X? ( x11-base/xorg-proto )
206 - prelink? ( sys-devel/prelink )
207 - staging? (
208 - dev-lang/perl
209 - dev-perl/XML-Simple
210 - )
211 - xinerama? ( x11-base/xorg-proto )"
212 -
213 -# These use a non-standard "Wine" category, which is provided by
214 -# /etc/xdg/applications-merged/wine.menu
215 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
216 -usr/share/applications/wine-notepad.desktop
217 -usr/share/applications/wine-uninstaller.desktop
218 -usr/share/applications/wine-winecfg.desktop"
219 -
220 -PATCHES=(
221 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
222 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
223 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
224 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
225 - "${PATCHDIR}/patches/${MY_PN}-2.0-rearrange-manpages.patch" #469418 #617864
226 -)
227 -PATCHES_BIN=()
228 -
229 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
230 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
231 - DEPEND+=" dev-util/patchbin"
232 -fi
233 -
234 -wine_compiler_check() {
235 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
236 -
237 - # GCC-specific bugs
238 - if tc-is-gcc; then
239 - # bug #549768
240 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
241 - ebegin "Checking for gcc-5 ms_abi compiler bug"
242 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
243 - # Run in subshell to prevent "Aborted" message
244 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
245 - if ! eend $?; then
246 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
247 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
248 - eerror "or use gcc-config to select a different compiler version."
249 - eerror "See https://bugs.gentoo.org/549768"
250 - eerror
251 - return 1
252 - fi
253 - fi
254 - # bug #574044
255 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
256 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
257 - # Compile in subshell to prevent "Aborted" message
258 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
259 - if ! eend $?; then
260 - eerror "Wine cannot be built with this version of gcc-5.3"
261 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
262 - eerror "or use gcc-config to select a different compiler version."
263 - eerror "See https://bugs.gentoo.org/574044"
264 - eerror
265 - return 1
266 - fi
267 - fi
268 - fi
269 -
270 - # Ensure compiler support
271 - if use abi_x86_64; then
272 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
273 - # Compile in subshell to prevent "Aborted" message
274 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
275 - if ! eend $?; then
276 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
277 - eerror
278 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
279 - eerror
280 - return 1
281 - fi
282 - fi
283 -}
284 -
285 -wine_build_environment_check() {
286 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
287 -
288 - if use abi_x86_64; then
289 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
290 - eerror "You need gcc-4.4+ to compile 64-bit wine"
291 - die
292 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
293 - eerror "You need clang-3.8+ to compile 64-bit wine"
294 - die
295 - fi
296 - fi
297 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
298 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
299 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
300 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
301 - fi
302 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
303 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
304 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
305 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
306 - ewarn "See package.env in man 5 portage for more information on how to do this."
307 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
308 - fi
309 - fi
310 -
311 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
312 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
313 - eerror "See https://bugs.gentoo.org/487864 for more details."
314 - eerror
315 - return 1
316 - fi
317 -}
318 -
319 -wine_env_vcs_vars() {
320 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
321 - local pn_live_val="${pn_live_var}"
322 - eval pn_live_val='$'${pn_live_val}
323 - if [[ ! -z ${pn_live_val} ]]; then
324 - if use staging || use d3d9; then
325 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
326 - eerror "cannot be used to set the commit. Instead, you may use the"
327 - eerror "environmental variables WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT."
328 - eerror
329 - return 1
330 - fi
331 - fi
332 - if [[ ! -z ${EGIT_COMMIT} ]]; then
333 - eerror "Commits must now be specified using the environmental variables"
334 - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
335 - eerror
336 - return 1
337 - fi
338 -}
339 -
340 -pkg_pretend() {
341 - wine_build_environment_check || die
342 -
343 - # Verify OSS support
344 - if use oss && ! use kernel_FreeBSD; then
345 - if ! has_version ">=media-sound/oss-4"; then
346 - eerror "You cannot build wine with USE=oss without having support from a"
347 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
348 - eerror
349 - die
350 - fi
351 - fi
352 -}
353 -
354 -pkg_setup() {
355 - wine_build_environment_check || die
356 - wine_env_vcs_vars || die
357 -
358 - WINE_VARIANT="${PN#wine}-${PV}"
359 - WINE_VARIANT="${WINE_VARIANT#-}"
360 -
361 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
362 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
363 - MY_DATADIR="${MY_DATAROOTDIR}"
364 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
365 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
366 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
367 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
368 - MY_MANDIR="${MY_DATADIR}/man"
369 -}
370 -
371 -src_unpack() {
372 - if [[ ${PV} == "9999" ]] ; then
373 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
374 - if use staging; then
375 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
376 -
377 - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
378 - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
379 -
380 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
381 -
382 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
383 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
384 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
385 - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
386 - fi
387 - fi
388 - if use d3d9; then
389 - git-r3_fetch "${D3D9_EGIT_REPO_URI}" "${D3D9_COMMIT}"
390 - git-r3_checkout "${D3D9_EGIT_REPO_URI}" "${D3D9_DIR}"
391 - fi
392 - fi
393 -
394 - default
395 -
396 - l10n_find_plocales_changes "${S}/po" "" ".po"
397 -}
398 -
399 -src_prepare() {
400 -
401 - eapply_bin(){
402 - local patch
403 - for patch in ${PATCHES_BIN[@]}; do
404 - patchbin --nogit < "${patch}" || die
405 - done
406 - }
407 -
408 - local md5="$(md5sum server/protocol.def)"
409 -
410 - if use staging; then
411 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
412 - ewarn "Wine bugzilla should explicitly state that staging was used."
413 -
414 - local STAGING_EXCLUDE=""
415 - STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132
416 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
417 -
418 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
419 - ebegin "Running Wine-Staging patch installer"
420 - (
421 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
422 - cd "${STAGING_DIR}/patches"
423 - source "${STAGING_DIR}/patches/patchinstall.sh"
424 - )
425 - eend $? || die "Failed to apply Wine-Staging patches"
426 - fi
427 - if use d3d9; then
428 - if use staging; then
429 - PATCHES+=( "${D3D9_DIR}/staging-helper.patch" )
430 - else
431 - PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
432 - fi
433 - PATCHES+=( "${D3D9_DIR}/wine-d3d9.patch" )
434 - fi
435 -
436 - default
437 - eapply_bin
438 - eautoreconf
439 -
440 - # Modification of the server protocol requires regenerating the server requests
441 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
442 - einfo "server/protocol.def was patched; running tools/make_requests"
443 - tools/make_requests || die #432348
444 - fi
445 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
446 - if ! use run-exes; then
447 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
448 - fi
449 -
450 - # Edit wine.desktop to work for specific variant
451 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
452 -
453 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
454 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
455 -
456 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
457 -
458 - # Fix manpage generation for locales #469418 and abi_x86_64 #617864
459 - # Requires wine-2.0-rearrange-manpages.patch
460 -
461 - # Duplicate manpages input files for wine64
462 - local f
463 - for f in loader/*.man.in; do
464 - cp ${f} ${f/wine/wine64} || die
465 - done
466 - # Add wine64 manpages to Makefile
467 - if use abi_x86_64; then
468 - sed -i "/wine.man.in/i \
469 - \\\twine64.man.in \\\\" loader/Makefile.in || die
470 - sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\
471 -\164\2/' loader/Makefile.in || die
472 - fi
473 -
474 - rm_man_file(){
475 - local file="${1}"
476 - loc=${2}
477 - sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die
478 - }
479 -
480 - while read f; do
481 - l10n_for_each_disabled_locale_do rm_man_file "${f}"
482 - done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print)
483 -}
484 -
485 -src_configure() {
486 - wine_compiler_check || die
487 -
488 - export LDCONFIG=/bin/true
489 - use custom-cflags || strip-flags
490 -
491 - multilib-minimal_src_configure
492 -}
493 -
494 -multilib_src_configure() {
495 - local myconf=(
496 - --prefix="${MY_PREFIX}"
497 - --datarootdir="${MY_DATAROOTDIR}"
498 - --datadir="${MY_DATADIR}"
499 - --docdir="${MY_DOCDIR}"
500 - --includedir="${MY_INCLUDEDIR}"
501 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
502 - --libexecdir="${MY_LIBEXECDIR}"
503 - --localstatedir="${MY_LOCALSTATEDIR}"
504 - --mandir="${MY_MANDIR}"
505 - --sysconfdir=/etc/wine
506 - $(use_with alsa)
507 - $(use_with capi)
508 - $(use_with lcms cms)
509 - $(use_with cups)
510 - $(use_with ncurses curses)
511 - $(use_with udisks dbus)
512 - $(use_with fontconfig)
513 - $(use_with ssl gnutls)
514 - $(use_enable gecko mshtml)
515 - $(use_with gphoto2 gphoto)
516 - $(use_with gsm)
517 - $(use_with gstreamer)
518 - --without-hal
519 - $(use_with jpeg)
520 - $(use_with ldap)
521 - $(use_enable mono mscoree)
522 - $(use_with mp3 mpg123)
523 - $(use_with netapi)
524 - $(use_with nls gettext)
525 - $(use_with openal)
526 - $(use_with opencl)
527 - $(use_with opengl)
528 - $(use_with osmesa)
529 - $(use_with oss)
530 - $(use_with pcap)
531 - $(use_with png)
532 - $(use_with pulseaudio pulse)
533 - $(use_with threads pthread)
534 - $(use_with scanner sane)
535 - $(use_enable test tests)
536 - $(use_with truetype freetype)
537 - $(use_with udev)
538 - $(use_with v4l)
539 - $(use_with X x)
540 - $(use_with X xfixes)
541 - $(use_with xcomposite)
542 - $(use_with xinerama)
543 - $(use_with xml)
544 - $(use_with xml xslt)
545 - )
546 -
547 - use staging && myconf+=(
548 - --with-xattr
549 - $(use_with themes gtk3)
550 - $(use_with vaapi va)
551 - )
552 - use d3d9 && myconf+=( $(use_with d3d9 d3d9-nine) )
553 -
554 - local PKG_CONFIG AR RANLIB
555 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
556 - # set AR and RANLIB to make QA scripts happy; #483342
557 - tc-export PKG_CONFIG AR RANLIB
558 -
559 - if use amd64; then
560 - if [[ ${ABI} == amd64 ]]; then
561 - myconf+=( --enable-win64 )
562 - else
563 - myconf+=( --disable-win64 )
564 - fi
565 -
566 - # Note: using --with-wine64 results in problems with multilib.eclass
567 - # CC/LD hackery. We're using separate tools instead.
568 - fi
569 -
570 - ECONF_SOURCE=${S} \
571 - econf "${myconf[@]}"
572 - emake depend
573 -}
574 -
575 -multilib_src_test() {
576 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
577 - if [[ ${ABI} == x86 ]]; then
578 - if [[ $(id -u) == 0 ]]; then
579 - ewarn "Skipping tests since they cannot be run under the root user."
580 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
581 - return
582 - fi
583 -
584 - WINEPREFIX="${T}/.wine-${ABI}" \
585 - Xemake test
586 - fi
587 -}
588 -
589 -multilib_src_install_all() {
590 - local DOCS=( ANNOUNCE AUTHORS README )
591 - add_locale_docs() {
592 - local locale_doc="documentation/README.$1"
593 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
594 - }
595 - l10n_for_each_locale_do add_locale_docs
596 -
597 - einstalldocs
598 - prune_libtool_files --all
599 -
600 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
601 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
602 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
603 - fi
604 -
605 - # Remove wineconsole if neither backend is installed #551124
606 - if ! use X && ! use ncurses; then
607 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
608 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
609 - rm_wineconsole() {
610 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
611 - }
612 - multilib_foreach_abi rm_wineconsole
613 - fi
614 -
615 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
616 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
617 -
618 - if use abi_x86_64 && ! use abi_x86_32; then
619 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
620 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
621 - fi
622 -
623 - # Failglob for binloops, shouldn't be necessary, but including to stay safe
624 - eshopts_push -s failglob #615218
625 - # Make wrappers for binaries for handling multiple variants
626 - # Note: wrappers instead of symlinks because some are shell which use basename
627 - local b
628 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
629 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
630 - done
631 - eshopts_pop
632 -}
633 -
634 -pkg_postinst() {
635 - eselect wine register ${P}
636 - if [[ ${PN} == "wine-vanilla" ]]; then
637 - eselect wine register --vanilla ${P} || die
638 - else
639 - if use staging; then
640 - eselect wine register --staging ${P} || die
641 - fi
642 - if use d3d9; then
643 - eselect wine register --d3d9 ${P} || die
644 - fi
645 - fi
646 -
647 - eselect wine update --all --if-unset || die
648 -
649 - xdg_desktop_database_update
650 -
651 - if ! use gecko; then
652 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
653 - ewarn "implementation of iexplore. Many older windows applications"
654 - ewarn "rely upon the existence of an iexplore implementation, so"
655 - ewarn "you will likely need to install an external one, like via winetricks"
656 - fi
657 - if ! use mono; then
658 - ewarn "Without Wine Mono, wine prefixes will not have a default"
659 - ewarn "implementation of .NET. Many windows applications rely upon"
660 - ewarn "the existence of a .NET implementation, so you will likely need"
661 - ewarn "to install an external one, like via winetricks"
662 - fi
663 -}
664 -
665 -pkg_prerm() {
666 - eselect wine deregister ${P}
667 - if [[ ${PN} == "wine-vanilla" ]]; then
668 - eselect wine deregister --vanilla ${P} || die
669 - else
670 - if use staging; then
671 - eselect wine deregister --staging ${P} || die
672 - fi
673 - if use d3d9; then
674 - eselect wine deregister --d3d9 ${P} || die
675 - fi
676 - fi
677 -
678 - eselect wine update --all --if-unset || die
679 -}
680 -
681 -pkg_postrm() {
682 - xdg_desktop_database_update
683 -}
684
685 diff --git a/app-emulation/wine-any/wine-any-2.20.ebuild b/app-emulation/wine-any/wine-any-2.20.ebuild
686 deleted file mode 100644
687 index 913e3e1528a..00000000000
688 --- a/app-emulation/wine-any/wine-any-2.20.ebuild
689 +++ /dev/null
690 @@ -1,634 +0,0 @@
691 -# Copyright 1999-2018 Gentoo Foundation
692 -# Distributed under the terms of the GNU General Public License v2
693 -
694 -EAPI=6
695 -
696 -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"
697 -PLOCALE_BACKUP="en"
698 -
699 -inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
700 -
701 -MY_PN="${PN%%-*}"
702 -MY_P="${MY_PN}-${PV}"
703 -
704 -if [[ ${PV} == "9999" ]] ; then
705 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
706 - EGIT_BRANCH="master"
707 - inherit git-r3
708 - SRC_URI=""
709 - #KEYWORDS=""
710 -else
711 - MAJOR_V=$(get_version_component_range 1)
712 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
713 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
714 -fi
715 -S="${WORKDIR}/${MY_P}"
716 -
717 -STAGING_P="wine-staging-${PV}"
718 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
719 -D3D9_P="wine-d3d9-${PV}"
720 -D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
721 -GWP_V="20180120"
722 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
723 -
724 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with optional external patchsets"
725 -HOMEPAGE="https://www.winehq.org/"
726 -SRC_URI="${SRC_URI}
727 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
728 -"
729 -
730 -if [[ ${PV} == "9999" ]] ; then
731 - STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git"
732 - D3D9_EGIT_REPO_URI="https://github.com/sarnex/wine-d3d9-patches.git"
733 -else
734 - SRC_URI="${SRC_URI}
735 - staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
736 - d3d9? ( https://github.com/sarnex/wine-d3d9-patches/archive/${D3D9_P}.tar.gz )"
737 -fi
738 -
739 -LICENSE="LGPL-2.1"
740 -SLOT="${PV}"
741 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags d3d9 dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg kerberos 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"
742 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
743 - X? ( truetype )
744 - elibc_glibc? ( threads )
745 - osmesa? ( opengl )
746 - pipelight? ( staging )
747 - s3tc? ( staging )
748 - test? ( abi_x86_32 )
749 - themes? ( staging )
750 - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
751 -
752 -# FIXME: the test suite is unsuitable for us; many tests require net access
753 -# or fail due to Xvfb's opengl limitations.
754 -RESTRICT="test"
755 -
756 -COMMON_DEPEND="
757 - X? (
758 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
759 - x11-libs/libXext[${MULTILIB_USEDEP}]
760 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
761 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
762 - x11-libs/libXi[${MULTILIB_USEDEP}]
763 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
764 - )
765 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
766 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
767 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
768 - d3d9? (
769 - media-libs/mesa[d3d9,egl,${MULTILIB_USEDEP}]
770 - x11-libs/libX11[${MULTILIB_USEDEP}]
771 - x11-libs/libXext[${MULTILIB_USEDEP}]
772 - x11-libs/libxcb[${MULTILIB_USEDEP}]
773 - )
774 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
775 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
776 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
777 - gstreamer? (
778 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
779 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
780 - )
781 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
782 - kerberos? ( virtual/krb5:0=[${MULTILIB_USEDEP}] )
783 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
784 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
785 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
786 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
787 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
788 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
789 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
790 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
791 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
792 - opengl? (
793 - virtual/glu[${MULTILIB_USEDEP}]
794 - virtual/opengl[${MULTILIB_USEDEP}]
795 - )
796 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
797 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
798 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
799 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
800 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
801 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
802 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
803 - themes? (
804 - dev-libs/glib:2[${MULTILIB_USEDEP}]
805 - x11-libs/cairo[${MULTILIB_USEDEP}]
806 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
807 - )
808 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
809 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
810 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
811 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
812 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
813 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
814 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
815 - xml? (
816 - dev-libs/libxml2[${MULTILIB_USEDEP}]
817 - dev-libs/libxslt[${MULTILIB_USEDEP}]
818 - )"
819 -
820 -RDEPEND="${COMMON_DEPEND}
821 - app-emulation/wine-desktop-common
822 - >app-eselect/eselect-wine-0.3
823 - !app-emulation/wine:0
824 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
825 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
826 - mono? ( app-emulation/wine-mono:4.7.1 )
827 - perl? (
828 - dev-lang/perl
829 - dev-perl/XML-Simple
830 - )
831 - pulseaudio? (
832 - realtime? ( sys-auth/rtkit )
833 - )
834 - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
835 - samba? ( >=net-fs/samba-3.0.25[winbind] )
836 - selinux? ( sec-policy/selinux-wine )
837 - udisks? ( sys-fs/udisks:2 )"
838 -
839 -# tools/make_requests requires perl
840 -DEPEND="${COMMON_DEPEND}
841 - sys-devel/flex
842 - >=sys-kernel/linux-headers-2.6
843 - virtual/pkgconfig
844 - virtual/yacc
845 - X? ( x11-base/xorg-proto )
846 - prelink? ( sys-devel/prelink )
847 - staging? (
848 - dev-lang/perl
849 - dev-perl/XML-Simple
850 - )
851 - xinerama? ( x11-base/xorg-proto )"
852 -
853 -# These use a non-standard "Wine" category, which is provided by
854 -# /etc/xdg/applications-merged/wine.menu
855 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
856 -usr/share/applications/wine-notepad.desktop
857 -usr/share/applications/wine-uninstaller.desktop
858 -usr/share/applications/wine-winecfg.desktop"
859 -
860 -PATCHES=(
861 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
862 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
863 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
864 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
865 - "${PATCHDIR}/patches/${MY_PN}-2.0-rearrange-manpages.patch" #469418 #617864
866 -)
867 -PATCHES_BIN=()
868 -
869 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
870 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
871 - DEPEND+=" dev-util/patchbin"
872 -fi
873 -
874 -wine_compiler_check() {
875 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
876 -
877 - # GCC-specific bugs
878 - if tc-is-gcc; then
879 - # bug #549768
880 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
881 - ebegin "Checking for gcc-5 ms_abi compiler bug"
882 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
883 - # Run in subshell to prevent "Aborted" message
884 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
885 - if ! eend $?; then
886 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
887 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
888 - eerror "or use gcc-config to select a different compiler version."
889 - eerror "See https://bugs.gentoo.org/549768"
890 - eerror
891 - return 1
892 - fi
893 - fi
894 - # bug #574044
895 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
896 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
897 - # Compile in subshell to prevent "Aborted" message
898 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
899 - if ! eend $?; then
900 - eerror "Wine cannot be built with this version of gcc-5.3"
901 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
902 - eerror "or use gcc-config to select a different compiler version."
903 - eerror "See https://bugs.gentoo.org/574044"
904 - eerror
905 - return 1
906 - fi
907 - fi
908 - fi
909 -
910 - # Ensure compiler support
911 - if use abi_x86_64; then
912 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
913 - # Compile in subshell to prevent "Aborted" message
914 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
915 - if ! eend $?; then
916 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
917 - eerror
918 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
919 - eerror
920 - return 1
921 - fi
922 - fi
923 -}
924 -
925 -wine_build_environment_check() {
926 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
927 -
928 - if use abi_x86_64; then
929 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
930 - eerror "You need gcc-4.4+ to compile 64-bit wine"
931 - die
932 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
933 - eerror "You need clang-3.8+ to compile 64-bit wine"
934 - die
935 - fi
936 - fi
937 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
938 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
939 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
940 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
941 - fi
942 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
943 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
944 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
945 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
946 - ewarn "See package.env in man 5 portage for more information on how to do this."
947 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
948 - fi
949 - fi
950 -
951 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
952 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
953 - eerror "See https://bugs.gentoo.org/487864 for more details."
954 - eerror
955 - return 1
956 - fi
957 -}
958 -
959 -wine_env_vcs_vars() {
960 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
961 - local pn_live_val="${pn_live_var}"
962 - eval pn_live_val='$'${pn_live_val}
963 - if [[ ! -z ${pn_live_val} ]]; then
964 - if use staging || use d3d9; then
965 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
966 - eerror "cannot be used to set the commit. Instead, you may use the"
967 - eerror "environmental variables WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT."
968 - eerror
969 - return 1
970 - fi
971 - fi
972 - if [[ ! -z ${EGIT_COMMIT} ]]; then
973 - eerror "Commits must now be specified using the environmental variables"
974 - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
975 - eerror
976 - return 1
977 - fi
978 -}
979 -
980 -pkg_pretend() {
981 - wine_build_environment_check || die
982 -
983 - # Verify OSS support
984 - if use oss && ! use kernel_FreeBSD; then
985 - if ! has_version ">=media-sound/oss-4"; then
986 - eerror "You cannot build wine with USE=oss without having support from a"
987 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
988 - eerror
989 - die
990 - fi
991 - fi
992 -}
993 -
994 -pkg_setup() {
995 - wine_build_environment_check || die
996 - wine_env_vcs_vars || die
997 -
998 - WINE_VARIANT="${PN#wine}-${PV}"
999 - WINE_VARIANT="${WINE_VARIANT#-}"
1000 -
1001 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
1002 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
1003 - MY_DATADIR="${MY_DATAROOTDIR}"
1004 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
1005 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
1006 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
1007 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
1008 - MY_MANDIR="${MY_DATADIR}/man"
1009 -}
1010 -
1011 -src_unpack() {
1012 - if [[ ${PV} == "9999" ]] ; then
1013 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
1014 - if use staging; then
1015 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
1016 -
1017 - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
1018 - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
1019 -
1020 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
1021 -
1022 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
1023 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
1024 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
1025 - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
1026 - fi
1027 - fi
1028 - if use d3d9; then
1029 - git-r3_fetch "${D3D9_EGIT_REPO_URI}" "${D3D9_COMMIT}"
1030 - git-r3_checkout "${D3D9_EGIT_REPO_URI}" "${D3D9_DIR}"
1031 - fi
1032 - fi
1033 -
1034 - default
1035 -
1036 - l10n_find_plocales_changes "${S}/po" "" ".po"
1037 -}
1038 -
1039 -src_prepare() {
1040 -
1041 - eapply_bin(){
1042 - local patch
1043 - for patch in ${PATCHES_BIN[@]}; do
1044 - patchbin --nogit < "${patch}" || die
1045 - done
1046 - }
1047 -
1048 - local md5="$(md5sum server/protocol.def)"
1049 -
1050 - if use staging; then
1051 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
1052 - ewarn "Wine bugzilla should explicitly state that staging was used."
1053 -
1054 - local STAGING_EXCLUDE=""
1055 - STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132
1056 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
1057 -
1058 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
1059 - ebegin "Running Wine-Staging patch installer"
1060 - (
1061 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
1062 - cd "${STAGING_DIR}/patches"
1063 - source "${STAGING_DIR}/patches/patchinstall.sh"
1064 - )
1065 - eend $? || die "Failed to apply Wine-Staging patches"
1066 - fi
1067 - if use d3d9; then
1068 - if use staging; then
1069 - PATCHES+=( "${D3D9_DIR}/staging-helper.patch" )
1070 - else
1071 - PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
1072 - fi
1073 - PATCHES+=( "${D3D9_DIR}/wine-d3d9.patch" )
1074 - fi
1075 -
1076 - default
1077 - eapply_bin
1078 - eautoreconf
1079 -
1080 - # Modification of the server protocol requires regenerating the server requests
1081 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
1082 - einfo "server/protocol.def was patched; running tools/make_requests"
1083 - tools/make_requests || die #432348
1084 - fi
1085 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
1086 - if ! use run-exes; then
1087 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
1088 - fi
1089 -
1090 - # Edit wine.desktop to work for specific variant
1091 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
1092 -
1093 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
1094 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
1095 -
1096 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
1097 -
1098 - # Fix manpage generation for locales #469418 and abi_x86_64 #617864
1099 - # Requires wine-2.0-rearrange-manpages.patch
1100 -
1101 - # Duplicate manpages input files for wine64
1102 - local f
1103 - for f in loader/*.man.in; do
1104 - cp ${f} ${f/wine/wine64} || die
1105 - done
1106 - # Add wine64 manpages to Makefile
1107 - if use abi_x86_64; then
1108 - sed -i "/wine.man.in/i \
1109 - \\\twine64.man.in \\\\" loader/Makefile.in || die
1110 - sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\
1111 -\164\2/' loader/Makefile.in || die
1112 - fi
1113 -
1114 - rm_man_file(){
1115 - local file="${1}"
1116 - loc=${2}
1117 - sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die
1118 - }
1119 -
1120 - while read f; do
1121 - l10n_for_each_disabled_locale_do rm_man_file "${f}"
1122 - done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print)
1123 -}
1124 -
1125 -src_configure() {
1126 - wine_compiler_check || die
1127 -
1128 - export LDCONFIG=/bin/true
1129 - use custom-cflags || strip-flags
1130 -
1131 - multilib-minimal_src_configure
1132 -}
1133 -
1134 -multilib_src_configure() {
1135 - local myconf=(
1136 - --prefix="${MY_PREFIX}"
1137 - --datarootdir="${MY_DATAROOTDIR}"
1138 - --datadir="${MY_DATADIR}"
1139 - --docdir="${MY_DOCDIR}"
1140 - --includedir="${MY_INCLUDEDIR}"
1141 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
1142 - --libexecdir="${MY_LIBEXECDIR}"
1143 - --localstatedir="${MY_LOCALSTATEDIR}"
1144 - --mandir="${MY_MANDIR}"
1145 - --sysconfdir=/etc/wine
1146 - $(use_with alsa)
1147 - $(use_with capi)
1148 - $(use_with lcms cms)
1149 - $(use_with cups)
1150 - $(use_with ncurses curses)
1151 - $(use_with udisks dbus)
1152 - $(use_with fontconfig)
1153 - $(use_with ssl gnutls)
1154 - $(use_enable gecko mshtml)
1155 - $(use_with gphoto2 gphoto)
1156 - $(use_with gsm)
1157 - $(use_with gstreamer)
1158 - --without-hal
1159 - $(use_with jpeg)
1160 - $(use_with kerberos krb5)
1161 - $(use_with ldap)
1162 - $(use_enable mono mscoree)
1163 - $(use_with mp3 mpg123)
1164 - $(use_with netapi)
1165 - $(use_with nls gettext)
1166 - $(use_with openal)
1167 - $(use_with opencl)
1168 - $(use_with opengl)
1169 - $(use_with osmesa)
1170 - $(use_with oss)
1171 - $(use_with pcap)
1172 - $(use_with png)
1173 - $(use_with pulseaudio pulse)
1174 - $(use_with threads pthread)
1175 - $(use_with scanner sane)
1176 - $(use_enable test tests)
1177 - $(use_with truetype freetype)
1178 - $(use_with udev)
1179 - $(use_with v4l)
1180 - $(use_with X x)
1181 - $(use_with X xfixes)
1182 - $(use_with xcomposite)
1183 - $(use_with xinerama)
1184 - $(use_with xml)
1185 - $(use_with xml xslt)
1186 - )
1187 -
1188 - use staging && myconf+=(
1189 - --with-xattr
1190 - $(use_with themes gtk3)
1191 - $(use_with vaapi va)
1192 - )
1193 - use d3d9 && myconf+=( $(use_with d3d9 d3d9-nine) )
1194 -
1195 - local PKG_CONFIG AR RANLIB
1196 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
1197 - # set AR and RANLIB to make QA scripts happy; #483342
1198 - tc-export PKG_CONFIG AR RANLIB
1199 -
1200 - if use amd64; then
1201 - if [[ ${ABI} == amd64 ]]; then
1202 - myconf+=( --enable-win64 )
1203 - else
1204 - myconf+=( --disable-win64 )
1205 - fi
1206 -
1207 - # Note: using --with-wine64 results in problems with multilib.eclass
1208 - # CC/LD hackery. We're using separate tools instead.
1209 - fi
1210 -
1211 - ECONF_SOURCE=${S} \
1212 - econf "${myconf[@]}"
1213 - emake depend
1214 -}
1215 -
1216 -multilib_src_test() {
1217 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
1218 - if [[ ${ABI} == x86 ]]; then
1219 - if [[ $(id -u) == 0 ]]; then
1220 - ewarn "Skipping tests since they cannot be run under the root user."
1221 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
1222 - return
1223 - fi
1224 -
1225 - WINEPREFIX="${T}/.wine-${ABI}" \
1226 - Xemake test
1227 - fi
1228 -}
1229 -
1230 -multilib_src_install_all() {
1231 - local DOCS=( ANNOUNCE AUTHORS README )
1232 - add_locale_docs() {
1233 - local locale_doc="documentation/README.$1"
1234 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
1235 - }
1236 - l10n_for_each_locale_do add_locale_docs
1237 -
1238 - einstalldocs
1239 - prune_libtool_files --all
1240 -
1241 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
1242 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
1243 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
1244 - fi
1245 -
1246 - # Remove wineconsole if neither backend is installed #551124
1247 - if ! use X && ! use ncurses; then
1248 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
1249 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
1250 - rm_wineconsole() {
1251 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
1252 - }
1253 - multilib_foreach_abi rm_wineconsole
1254 - fi
1255 -
1256 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
1257 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
1258 -
1259 - if use abi_x86_64 && ! use abi_x86_32; then
1260 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
1261 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
1262 - fi
1263 -
1264 - # Failglob for binloops, shouldn't be necessary, but including to stay safe
1265 - eshopts_push -s failglob #615218
1266 - # Make wrappers for binaries for handling multiple variants
1267 - # Note: wrappers instead of symlinks because some are shell which use basename
1268 - local b
1269 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
1270 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
1271 - done
1272 - eshopts_pop
1273 -}
1274 -
1275 -pkg_postinst() {
1276 - eselect wine register ${P}
1277 - if [[ ${PN} == "wine-vanilla" ]]; then
1278 - eselect wine register --vanilla ${P} || die
1279 - else
1280 - if use staging; then
1281 - eselect wine register --staging ${P} || die
1282 - fi
1283 - if use d3d9; then
1284 - eselect wine register --d3d9 ${P} || die
1285 - fi
1286 - fi
1287 -
1288 - eselect wine update --all --if-unset || die
1289 -
1290 - xdg_desktop_database_update
1291 -
1292 - if ! use gecko; then
1293 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
1294 - ewarn "implementation of iexplore. Many older windows applications"
1295 - ewarn "rely upon the existence of an iexplore implementation, so"
1296 - ewarn "you will likely need to install an external one, like via winetricks"
1297 - fi
1298 - if ! use mono; then
1299 - ewarn "Without Wine Mono, wine prefixes will not have a default"
1300 - ewarn "implementation of .NET. Many windows applications rely upon"
1301 - ewarn "the existence of a .NET implementation, so you will likely need"
1302 - ewarn "to install an external one, like via winetricks"
1303 - fi
1304 -}
1305 -
1306 -pkg_prerm() {
1307 - eselect wine deregister ${P}
1308 - if [[ ${PN} == "wine-vanilla" ]]; then
1309 - eselect wine deregister --vanilla ${P} || die
1310 - else
1311 - if use staging; then
1312 - eselect wine deregister --staging ${P} || die
1313 - fi
1314 - if use d3d9; then
1315 - eselect wine deregister --d3d9 ${P} || die
1316 - fi
1317 - fi
1318 -
1319 - eselect wine update --all --if-unset || die
1320 -}
1321 -
1322 -pkg_postrm() {
1323 - xdg_desktop_database_update
1324 -}
1325
1326 diff --git a/app-emulation/wine-any/wine-any-2.21.ebuild b/app-emulation/wine-any/wine-any-2.21.ebuild
1327 deleted file mode 100644
1328 index 913e3e1528a..00000000000
1329 --- a/app-emulation/wine-any/wine-any-2.21.ebuild
1330 +++ /dev/null
1331 @@ -1,634 +0,0 @@
1332 -# Copyright 1999-2018 Gentoo Foundation
1333 -# Distributed under the terms of the GNU General Public License v2
1334 -
1335 -EAPI=6
1336 -
1337 -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"
1338 -PLOCALE_BACKUP="en"
1339 -
1340 -inherit autotools estack eutils flag-o-matic gnome2-utils l10n multilib multilib-minimal pax-utils toolchain-funcs virtualx versionator xdg-utils
1341 -
1342 -MY_PN="${PN%%-*}"
1343 -MY_P="${MY_PN}-${PV}"
1344 -
1345 -if [[ ${PV} == "9999" ]] ; then
1346 - EGIT_REPO_URI="https://source.winehq.org/git/wine.git"
1347 - EGIT_BRANCH="master"
1348 - inherit git-r3
1349 - SRC_URI=""
1350 - #KEYWORDS=""
1351 -else
1352 - MAJOR_V=$(get_version_component_range 1)
1353 - SRC_URI="https://dl.winehq.org/wine/source/${MAJOR_V}.x/${MY_P}.tar.xz"
1354 - KEYWORDS="-* ~amd64 ~x86 ~x86-fbsd"
1355 -fi
1356 -S="${WORKDIR}/${MY_P}"
1357 -
1358 -STAGING_P="wine-staging-${PV}"
1359 -STAGING_DIR="${WORKDIR}/${STAGING_P}"
1360 -D3D9_P="wine-d3d9-${PV}"
1361 -D3D9_DIR="${WORKDIR}/wine-d3d9-patches-${D3D9_P}"
1362 -GWP_V="20180120"
1363 -PATCHDIR="${WORKDIR}/gentoo-wine-patches"
1364 -
1365 -DESCRIPTION="Free implementation of Windows(tm) on Unix, with optional external patchsets"
1366 -HOMEPAGE="https://www.winehq.org/"
1367 -SRC_URI="${SRC_URI}
1368 - https://dev.gentoo.org/~np-hardass/distfiles/wine/gentoo-wine-patches-${GWP_V}.tar.xz
1369 -"
1370 -
1371 -if [[ ${PV} == "9999" ]] ; then
1372 - STAGING_EGIT_REPO_URI="https://github.com/wine-compholio/wine-staging.git"
1373 - D3D9_EGIT_REPO_URI="https://github.com/sarnex/wine-d3d9-patches.git"
1374 -else
1375 - SRC_URI="${SRC_URI}
1376 - staging? ( https://github.com/wine-compholio/wine-staging/archive/v${PV}.tar.gz -> ${STAGING_P}.tar.gz )
1377 - d3d9? ( https://github.com/sarnex/wine-d3d9-patches/archive/${D3D9_P}.tar.gz )"
1378 -fi
1379 -
1380 -LICENSE="LGPL-2.1"
1381 -SLOT="${PV}"
1382 -IUSE="+abi_x86_32 +abi_x86_64 +alsa capi cups custom-cflags d3d9 dos elibc_glibc +fontconfig +gecko gphoto2 gsm gstreamer +jpeg kerberos 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"
1383 -REQUIRED_USE="|| ( abi_x86_32 abi_x86_64 )
1384 - X? ( truetype )
1385 - elibc_glibc? ( threads )
1386 - osmesa? ( opengl )
1387 - pipelight? ( staging )
1388 - s3tc? ( staging )
1389 - test? ( abi_x86_32 )
1390 - themes? ( staging )
1391 - vaapi? ( staging )" # osmesa-opengl #286560 # X-truetype #551124
1392 -
1393 -# FIXME: the test suite is unsuitable for us; many tests require net access
1394 -# or fail due to Xvfb's opengl limitations.
1395 -RESTRICT="test"
1396 -
1397 -COMMON_DEPEND="
1398 - X? (
1399 - x11-libs/libXcursor[${MULTILIB_USEDEP}]
1400 - x11-libs/libXext[${MULTILIB_USEDEP}]
1401 - x11-libs/libXfixes[${MULTILIB_USEDEP}]
1402 - x11-libs/libXrandr[${MULTILIB_USEDEP}]
1403 - x11-libs/libXi[${MULTILIB_USEDEP}]
1404 - x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
1405 - )
1406 - alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
1407 - capi? ( net-libs/libcapi[${MULTILIB_USEDEP}] )
1408 - cups? ( net-print/cups:=[${MULTILIB_USEDEP}] )
1409 - d3d9? (
1410 - media-libs/mesa[d3d9,egl,${MULTILIB_USEDEP}]
1411 - x11-libs/libX11[${MULTILIB_USEDEP}]
1412 - x11-libs/libXext[${MULTILIB_USEDEP}]
1413 - x11-libs/libxcb[${MULTILIB_USEDEP}]
1414 - )
1415 - fontconfig? ( media-libs/fontconfig:=[${MULTILIB_USEDEP}] )
1416 - gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] )
1417 - gsm? ( media-sound/gsm:=[${MULTILIB_USEDEP}] )
1418 - gstreamer? (
1419 - media-libs/gstreamer:1.0[${MULTILIB_USEDEP}]
1420 - media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}]
1421 - )
1422 - jpeg? ( virtual/jpeg:0=[${MULTILIB_USEDEP}] )
1423 - kerberos? ( virtual/krb5:0=[${MULTILIB_USEDEP}] )
1424 - lcms? ( media-libs/lcms:2=[${MULTILIB_USEDEP}] )
1425 - ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
1426 - mp3? ( >=media-sound/mpg123-1.5.0[${MULTILIB_USEDEP}] )
1427 - ncurses? ( >=sys-libs/ncurses-5.2:0=[${MULTILIB_USEDEP}] )
1428 - netapi? ( net-fs/samba[netapi(+),${MULTILIB_USEDEP}] )
1429 - nls? ( sys-devel/gettext[${MULTILIB_USEDEP}] )
1430 - odbc? ( dev-db/unixODBC:=[${MULTILIB_USEDEP}] )
1431 - openal? ( media-libs/openal:=[${MULTILIB_USEDEP}] )
1432 - opencl? ( virtual/opencl[${MULTILIB_USEDEP}] )
1433 - opengl? (
1434 - virtual/glu[${MULTILIB_USEDEP}]
1435 - virtual/opengl[${MULTILIB_USEDEP}]
1436 - )
1437 - osmesa? ( >=media-libs/mesa-13[osmesa,${MULTILIB_USEDEP}] )
1438 - pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
1439 - png? ( media-libs/libpng:0=[${MULTILIB_USEDEP}] )
1440 - pulseaudio? ( media-sound/pulseaudio[${MULTILIB_USEDEP}] )
1441 - scanner? ( media-gfx/sane-backends:=[${MULTILIB_USEDEP}] )
1442 - ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] )
1443 - staging? ( sys-apps/attr[${MULTILIB_USEDEP}] )
1444 - themes? (
1445 - dev-libs/glib:2[${MULTILIB_USEDEP}]
1446 - x11-libs/cairo[${MULTILIB_USEDEP}]
1447 - x11-libs/gtk+:3[${MULTILIB_USEDEP}]
1448 - )
1449 - truetype? ( >=media-libs/freetype-2.0.0[${MULTILIB_USEDEP}] )
1450 - udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
1451 - udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] )
1452 - v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
1453 - vaapi? ( x11-libs/libva[X,${MULTILIB_USEDEP}] )
1454 - xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
1455 - xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )
1456 - xml? (
1457 - dev-libs/libxml2[${MULTILIB_USEDEP}]
1458 - dev-libs/libxslt[${MULTILIB_USEDEP}]
1459 - )"
1460 -
1461 -RDEPEND="${COMMON_DEPEND}
1462 - app-emulation/wine-desktop-common
1463 - >app-eselect/eselect-wine-0.3
1464 - !app-emulation/wine:0
1465 - dos? ( >=games-emulation/dosbox-0.74_p20160629 )
1466 - gecko? ( app-emulation/wine-gecko:2.47[abi_x86_32?,abi_x86_64?] )
1467 - mono? ( app-emulation/wine-mono:4.7.1 )
1468 - perl? (
1469 - dev-lang/perl
1470 - dev-perl/XML-Simple
1471 - )
1472 - pulseaudio? (
1473 - realtime? ( sys-auth/rtkit )
1474 - )
1475 - s3tc? ( >=media-libs/libtxc_dxtn-1.0.1-r1[${MULTILIB_USEDEP}] )
1476 - samba? ( >=net-fs/samba-3.0.25[winbind] )
1477 - selinux? ( sec-policy/selinux-wine )
1478 - udisks? ( sys-fs/udisks:2 )"
1479 -
1480 -# tools/make_requests requires perl
1481 -DEPEND="${COMMON_DEPEND}
1482 - sys-devel/flex
1483 - >=sys-kernel/linux-headers-2.6
1484 - virtual/pkgconfig
1485 - virtual/yacc
1486 - X? ( x11-base/xorg-proto )
1487 - prelink? ( sys-devel/prelink )
1488 - staging? (
1489 - dev-lang/perl
1490 - dev-perl/XML-Simple
1491 - )
1492 - xinerama? ( x11-base/xorg-proto )"
1493 -
1494 -# These use a non-standard "Wine" category, which is provided by
1495 -# /etc/xdg/applications-merged/wine.menu
1496 -QA_DESKTOP_FILE="usr/share/applications/wine-browsedrive.desktop
1497 -usr/share/applications/wine-notepad.desktop
1498 -usr/share/applications/wine-uninstaller.desktop
1499 -usr/share/applications/wine-winecfg.desktop"
1500 -
1501 -PATCHES=(
1502 - "${PATCHDIR}/patches/${MY_PN}-1.5.26-winegcc.patch" #260726
1503 - "${PATCHDIR}/patches/${MY_PN}-1.9.5-multilib-portage.patch" #395615
1504 - "${PATCHDIR}/patches/${MY_PN}-1.6-memset-O3.patch" #480508
1505 - "${PATCHDIR}/patches/${MY_PN}-2.0-multislot-apploader.patch" #310611
1506 - "${PATCHDIR}/patches/${MY_PN}-2.0-rearrange-manpages.patch" #469418 #617864
1507 -)
1508 -PATCHES_BIN=()
1509 -
1510 -# https://bugs.gentoo.org/show_bug.cgi?id=635222
1511 -if [[ ${#PATCHES_BIN[@]} -ge 1 ]] || [[ ${PV} == 9999 ]]; then
1512 - DEPEND+=" dev-util/patchbin"
1513 -fi
1514 -
1515 -wine_compiler_check() {
1516 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
1517 -
1518 - # GCC-specific bugs
1519 - if tc-is-gcc; then
1520 - # bug #549768
1521 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) -le 2 ]]; then
1522 - ebegin "Checking for gcc-5 ms_abi compiler bug"
1523 - $(tc-getCC) -O2 "${PATCHDIR}/files/pr66838.c" -o "${T}"/pr66838 || die
1524 - # Run in subshell to prevent "Aborted" message
1525 - ( "${T}"/pr66838 || false ) >/dev/null 2>&1
1526 - if ! eend $?; then
1527 - eerror "64-bit wine cannot be built with gcc-5.1 or initial patchset of 5.2.0"
1528 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.2.x ebuild,"
1529 - eerror "or use gcc-config to select a different compiler version."
1530 - eerror "See https://bugs.gentoo.org/549768"
1531 - eerror
1532 - return 1
1533 - fi
1534 - fi
1535 - # bug #574044
1536 - if use abi_x86_64 && [[ $(gcc-major-version) = 5 && $(gcc-minor-version) = 3 ]]; then
1537 - ebegin "Checking for gcc-5-3 stack realignment compiler bug"
1538 - # Compile in subshell to prevent "Aborted" message
1539 - ( $(tc-getCC) -O2 -mincoming-stack-boundary=3 "${PATCHDIR}/files/pr69140.c" -o "${T}"/pr69140 ) >/dev/null 2>&1
1540 - if ! eend $?; then
1541 - eerror "Wine cannot be built with this version of gcc-5.3"
1542 - eerror "due to compiler bugs; please re-emerge the latest gcc-5.3.x ebuild,"
1543 - eerror "or use gcc-config to select a different compiler version."
1544 - eerror "See https://bugs.gentoo.org/574044"
1545 - eerror
1546 - return 1
1547 - fi
1548 - fi
1549 - fi
1550 -
1551 - # Ensure compiler support
1552 - if use abi_x86_64; then
1553 - ebegin "Checking for 64-bit compiler with builtin_ms_va_list support"
1554 - # Compile in subshell to prevent "Aborted" message
1555 - ( $(tc-getCC) -O2 "${PATCHDIR}/files/builtin_ms_va_list.c" -o "${T}"/builtin_ms_va_list >/dev/null 2>&1)
1556 - if ! eend $?; then
1557 - eerror "This version of $(tc-getCC) does not support builtin_ms_va_list, can't enable 64-bit wine"
1558 - eerror
1559 - eerror "You need gcc-4.4+ or clang 3.8+ to build 64-bit wine"
1560 - eerror
1561 - return 1
1562 - fi
1563 - fi
1564 -}
1565 -
1566 -wine_build_environment_check() {
1567 - [[ ${MERGE_TYPE} = "binary" ]] && return 0
1568 -
1569 - if use abi_x86_64; then
1570 - if tc-is-gcc && [[ $(gcc-major-version) -lt 4 || ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 4 ) ]]; then
1571 - eerror "You need gcc-4.4+ to compile 64-bit wine"
1572 - die
1573 - elif tc-is-clang && [[ $(clang-major-version) -lt 3 || ( $(clang-major-version) -eq 3 && $(clang-minor-version) -lt 8 ) ]]; then
1574 - eerror "You need clang-3.8+ to compile 64-bit wine"
1575 - die
1576 - fi
1577 - fi
1578 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -le 3 ]]; then
1579 - ewarn "GCC-5.0-5.3 suffered from compiler bugs and are no longer supported by"
1580 - ewarn "Gentoo's Toolchain Team. If your ebuild fails the compiler checks in"
1581 - ewarn "the configure phase, either update your compiler or switch to <5.0 || >=5.4"
1582 - fi
1583 - if tc-is-gcc && [[ $(gcc-major-version) -eq 5 && $(gcc-minor-version) -eq 4 ]]; then
1584 - if has "-march=i686" ${CFLAGS} && ! has "-mtune=generic" ${CFLAGS}; then
1585 - ewarn "Compilation can hang with CFLAGS=\"-march=i686\". You can temporarily work"
1586 - ewarn "around this by adding \"-mtune=generic\" to your CFLAGS for wine."
1587 - ewarn "See package.env in man 5 portage for more information on how to do this."
1588 - ewarn "See https://bugs.gentoo.org/show_bug.cgi?id=613128 for more details"
1589 - fi
1590 - fi
1591 -
1592 - if use abi_x86_32 && use opencl && [[ "$(eselect opencl show 2> /dev/null)" == "intel" ]]; then
1593 - eerror "You cannot build wine with USE=opencl because intel-ocl-sdk is 64-bit only."
1594 - eerror "See https://bugs.gentoo.org/487864 for more details."
1595 - eerror
1596 - return 1
1597 - fi
1598 -}
1599 -
1600 -wine_env_vcs_vars() {
1601 - local pn_live_var="${PN//[-+]/_}_LIVE_COMMIT"
1602 - local pn_live_val="${pn_live_var}"
1603 - eval pn_live_val='$'${pn_live_val}
1604 - if [[ ! -z ${pn_live_val} ]]; then
1605 - if use staging || use d3d9; then
1606 - eerror "Because of the multi-repo nature of ${MY_PN}, ${pn_live_var}"
1607 - eerror "cannot be used to set the commit. Instead, you may use the"
1608 - eerror "environmental variables WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT."
1609 - eerror
1610 - return 1
1611 - fi
1612 - fi
1613 - if [[ ! -z ${EGIT_COMMIT} ]]; then
1614 - eerror "Commits must now be specified using the environmental variables"
1615 - eerror "WINE_COMMIT, STAGING_COMMIT, and D3D9_COMMIT"
1616 - eerror
1617 - return 1
1618 - fi
1619 -}
1620 -
1621 -pkg_pretend() {
1622 - wine_build_environment_check || die
1623 -
1624 - # Verify OSS support
1625 - if use oss && ! use kernel_FreeBSD; then
1626 - if ! has_version ">=media-sound/oss-4"; then
1627 - eerror "You cannot build wine with USE=oss without having support from a"
1628 - eerror "FreeBSD kernel or >=media-sound/oss-4 (only available through external repos)"
1629 - eerror
1630 - die
1631 - fi
1632 - fi
1633 -}
1634 -
1635 -pkg_setup() {
1636 - wine_build_environment_check || die
1637 - wine_env_vcs_vars || die
1638 -
1639 - WINE_VARIANT="${PN#wine}-${PV}"
1640 - WINE_VARIANT="${WINE_VARIANT#-}"
1641 -
1642 - MY_PREFIX="${EPREFIX}/usr/lib/wine-${WINE_VARIANT}"
1643 - MY_DATAROOTDIR="${EPREFIX}/usr/share/wine-${WINE_VARIANT}"
1644 - MY_DATADIR="${MY_DATAROOTDIR}"
1645 - MY_DOCDIR="${EPREFIX}/usr/share/doc/${PF}"
1646 - MY_INCLUDEDIR="${EPREFIX}/usr/include/wine-${WINE_VARIANT}"
1647 - MY_LIBEXECDIR="${EPREFIX}/usr/libexec/wine-${WINE_VARIANT}"
1648 - MY_LOCALSTATEDIR="${EPREFIX}/var/wine-${WINE_VARIANT}"
1649 - MY_MANDIR="${MY_DATADIR}/man"
1650 -}
1651 -
1652 -src_unpack() {
1653 - if [[ ${PV} == "9999" ]] ; then
1654 - EGIT_CHECKOUT_DIR="${S}" EGIT_COMMIT="${WINE_COMMIT}" git-r3_src_unpack
1655 - if use staging; then
1656 - local CURRENT_WINE_COMMIT=${EGIT_VERSION}
1657 -
1658 - git-r3_fetch "${STAGING_EGIT_REPO_URI}" "${STAGING_COMMIT}"
1659 - git-r3_checkout "${STAGING_EGIT_REPO_URI}" "${STAGING_DIR}"
1660 -
1661 - local COMPAT_WINE_COMMIT=$("${STAGING_DIR}/patches/patchinstall.sh" --upstream-commit) || die
1662 -
1663 - if [[ "${CURRENT_WINE_COMMIT}" != "${COMPAT_WINE_COMMIT}" ]]; then
1664 - einfo "The current Staging patchset is not guaranteed to apply on this WINE commit."
1665 - einfo "If src_prepare fails, try emerging with the env var WINE_COMMIT."
1666 - einfo "Example: WINE_COMMIT=${COMPAT_WINE_COMMIT} emerge -1 wine"
1667 - fi
1668 - fi
1669 - if use d3d9; then
1670 - git-r3_fetch "${D3D9_EGIT_REPO_URI}" "${D3D9_COMMIT}"
1671 - git-r3_checkout "${D3D9_EGIT_REPO_URI}" "${D3D9_DIR}"
1672 - fi
1673 - fi
1674 -
1675 - default
1676 -
1677 - l10n_find_plocales_changes "${S}/po" "" ".po"
1678 -}
1679 -
1680 -src_prepare() {
1681 -
1682 - eapply_bin(){
1683 - local patch
1684 - for patch in ${PATCHES_BIN[@]}; do
1685 - patchbin --nogit < "${patch}" || die
1686 - done
1687 - }
1688 -
1689 - local md5="$(md5sum server/protocol.def)"
1690 -
1691 - if use staging; then
1692 - ewarn "Applying the Wine-Staging patchset. Any bug reports to the"
1693 - ewarn "Wine bugzilla should explicitly state that staging was used."
1694 -
1695 - local STAGING_EXCLUDE=""
1696 - STAGING_EXCLUDE="${STAGING_EXCLUDE} -W winhlp32-Flex_Workaround" # Avoid double patching https://bugs.winehq.org/show_bug.cgi?id=42132
1697 - use pipelight || STAGING_EXCLUDE="${STAGING_EXCLUDE} -W Pipelight"
1698 -
1699 - # Launch wine-staging patcher in a subshell, using eapply as a backend, and gitapply.sh as a backend for binary patches
1700 - ebegin "Running Wine-Staging patch installer"
1701 - (
1702 - set -- DESTDIR="${S}" --backend=eapply --no-autoconf --all ${STAGING_EXCLUDE}
1703 - cd "${STAGING_DIR}/patches"
1704 - source "${STAGING_DIR}/patches/patchinstall.sh"
1705 - )
1706 - eend $? || die "Failed to apply Wine-Staging patches"
1707 - fi
1708 - if use d3d9; then
1709 - if use staging; then
1710 - PATCHES+=( "${D3D9_DIR}/staging-helper.patch" )
1711 - else
1712 - PATCHES+=( "${D3D9_DIR}/d3d9-helper.patch" )
1713 - fi
1714 - PATCHES+=( "${D3D9_DIR}/wine-d3d9.patch" )
1715 - fi
1716 -
1717 - default
1718 - eapply_bin
1719 - eautoreconf
1720 -
1721 - # Modification of the server protocol requires regenerating the server requests
1722 - if [[ "$(md5sum server/protocol.def)" != "${md5}" ]]; then
1723 - einfo "server/protocol.def was patched; running tools/make_requests"
1724 - tools/make_requests || die #432348
1725 - fi
1726 - sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in || die
1727 - if ! use run-exes; then
1728 - sed -i '/^MimeType/d' loader/wine.desktop || die #117785
1729 - fi
1730 -
1731 - # Edit wine.desktop to work for specific variant
1732 - sed -e "/^Exec=/s/wine /wine-${WINE_VARIANT} /" -i loader/wine.desktop || die
1733 -
1734 - # hi-res default icon, #472990, https://bugs.winehq.org/show_bug.cgi?id=24652
1735 - cp "${PATCHDIR}/files/oic_winlogo.ico" dlls/user32/resources/ || die
1736 -
1737 - l10n_get_locales > po/LINGUAS || die # otherwise wine doesn't respect LINGUAS
1738 -
1739 - # Fix manpage generation for locales #469418 and abi_x86_64 #617864
1740 - # Requires wine-2.0-rearrange-manpages.patch
1741 -
1742 - # Duplicate manpages input files for wine64
1743 - local f
1744 - for f in loader/*.man.in; do
1745 - cp ${f} ${f/wine/wine64} || die
1746 - done
1747 - # Add wine64 manpages to Makefile
1748 - if use abi_x86_64; then
1749 - sed -i "/wine.man.in/i \
1750 - \\\twine64.man.in \\\\" loader/Makefile.in || die
1751 - sed -i -E 's/(.*wine)(.*\.UTF-8\.man\.in.*)/&\
1752 -\164\2/' loader/Makefile.in || die
1753 - fi
1754 -
1755 - rm_man_file(){
1756 - local file="${1}"
1757 - loc=${2}
1758 - sed -i "/${loc}\.UTF-8\.man\.in/d" "${file}" || die
1759 - }
1760 -
1761 - while read f; do
1762 - l10n_for_each_disabled_locale_do rm_man_file "${f}"
1763 - done < <(find -name "Makefile.in" -exec grep -q "UTF-8.man.in" "{}" \; -print)
1764 -}
1765 -
1766 -src_configure() {
1767 - wine_compiler_check || die
1768 -
1769 - export LDCONFIG=/bin/true
1770 - use custom-cflags || strip-flags
1771 -
1772 - multilib-minimal_src_configure
1773 -}
1774 -
1775 -multilib_src_configure() {
1776 - local myconf=(
1777 - --prefix="${MY_PREFIX}"
1778 - --datarootdir="${MY_DATAROOTDIR}"
1779 - --datadir="${MY_DATADIR}"
1780 - --docdir="${MY_DOCDIR}"
1781 - --includedir="${MY_INCLUDEDIR}"
1782 - --libdir="${EPREFIX}/usr/$(get_libdir)/wine-${WINE_VARIANT}"
1783 - --libexecdir="${MY_LIBEXECDIR}"
1784 - --localstatedir="${MY_LOCALSTATEDIR}"
1785 - --mandir="${MY_MANDIR}"
1786 - --sysconfdir=/etc/wine
1787 - $(use_with alsa)
1788 - $(use_with capi)
1789 - $(use_with lcms cms)
1790 - $(use_with cups)
1791 - $(use_with ncurses curses)
1792 - $(use_with udisks dbus)
1793 - $(use_with fontconfig)
1794 - $(use_with ssl gnutls)
1795 - $(use_enable gecko mshtml)
1796 - $(use_with gphoto2 gphoto)
1797 - $(use_with gsm)
1798 - $(use_with gstreamer)
1799 - --without-hal
1800 - $(use_with jpeg)
1801 - $(use_with kerberos krb5)
1802 - $(use_with ldap)
1803 - $(use_enable mono mscoree)
1804 - $(use_with mp3 mpg123)
1805 - $(use_with netapi)
1806 - $(use_with nls gettext)
1807 - $(use_with openal)
1808 - $(use_with opencl)
1809 - $(use_with opengl)
1810 - $(use_with osmesa)
1811 - $(use_with oss)
1812 - $(use_with pcap)
1813 - $(use_with png)
1814 - $(use_with pulseaudio pulse)
1815 - $(use_with threads pthread)
1816 - $(use_with scanner sane)
1817 - $(use_enable test tests)
1818 - $(use_with truetype freetype)
1819 - $(use_with udev)
1820 - $(use_with v4l)
1821 - $(use_with X x)
1822 - $(use_with X xfixes)
1823 - $(use_with xcomposite)
1824 - $(use_with xinerama)
1825 - $(use_with xml)
1826 - $(use_with xml xslt)
1827 - )
1828 -
1829 - use staging && myconf+=(
1830 - --with-xattr
1831 - $(use_with themes gtk3)
1832 - $(use_with vaapi va)
1833 - )
1834 - use d3d9 && myconf+=( $(use_with d3d9 d3d9-nine) )
1835 -
1836 - local PKG_CONFIG AR RANLIB
1837 - # Avoid crossdev's i686-pc-linux-gnu-pkg-config if building wine32 on amd64; #472038
1838 - # set AR and RANLIB to make QA scripts happy; #483342
1839 - tc-export PKG_CONFIG AR RANLIB
1840 -
1841 - if use amd64; then
1842 - if [[ ${ABI} == amd64 ]]; then
1843 - myconf+=( --enable-win64 )
1844 - else
1845 - myconf+=( --disable-win64 )
1846 - fi
1847 -
1848 - # Note: using --with-wine64 results in problems with multilib.eclass
1849 - # CC/LD hackery. We're using separate tools instead.
1850 - fi
1851 -
1852 - ECONF_SOURCE=${S} \
1853 - econf "${myconf[@]}"
1854 - emake depend
1855 -}
1856 -
1857 -multilib_src_test() {
1858 - # FIXME: win32-only; wine64 tests fail with "could not find the Wine loader"
1859 - if [[ ${ABI} == x86 ]]; then
1860 - if [[ $(id -u) == 0 ]]; then
1861 - ewarn "Skipping tests since they cannot be run under the root user."
1862 - ewarn "To run the test ${MY_PN} suite, add userpriv to FEATURES in make.conf"
1863 - return
1864 - fi
1865 -
1866 - WINEPREFIX="${T}/.wine-${ABI}" \
1867 - Xemake test
1868 - fi
1869 -}
1870 -
1871 -multilib_src_install_all() {
1872 - local DOCS=( ANNOUNCE AUTHORS README )
1873 - add_locale_docs() {
1874 - local locale_doc="documentation/README.$1"
1875 - [[ ! -e ${locale_doc} ]] || DOCS+=( ${locale_doc} )
1876 - }
1877 - l10n_for_each_locale_do add_locale_docs
1878 -
1879 - einstalldocs
1880 - prune_libtool_files --all
1881 -
1882 - if ! use perl ; then # winedump calls function_grep.pl, and winemaker is a perl script
1883 - rm "${D%/}${MY_PREFIX}"/bin/{wine{dump,maker},function_grep.pl} \
1884 - "${D%/}${MY_MANDIR}"/man1/wine{dump,maker}.1 || die
1885 - fi
1886 -
1887 - # Remove wineconsole if neither backend is installed #551124
1888 - if ! use X && ! use ncurses; then
1889 - rm "${D%/}${MY_PREFIX}"/bin/wineconsole* || die
1890 - rm "${D%/}${MY_MANDIR}"/man1/wineconsole* || die
1891 - rm_wineconsole() {
1892 - rm "${D%/}${MY_PREFIX}/$(get_libdir)"/wine/{,fakedlls/}wineconsole.exe* || die
1893 - }
1894 - multilib_foreach_abi rm_wineconsole
1895 - fi
1896 -
1897 - use abi_x86_32 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine{,-preloader} #255055
1898 - use abi_x86_64 && pax-mark psmr "${D%/}${MY_PREFIX}"/bin/wine64{,-preloader}
1899 -
1900 - if use abi_x86_64 && ! use abi_x86_32; then
1901 - dosym wine64 "${MY_PREFIX}"/bin/wine # 404331
1902 - dosym wine64-preloader "${MY_PREFIX}"/bin/wine-preloader
1903 - fi
1904 -
1905 - # Failglob for binloops, shouldn't be necessary, but including to stay safe
1906 - eshopts_push -s failglob #615218
1907 - # Make wrappers for binaries for handling multiple variants
1908 - # Note: wrappers instead of symlinks because some are shell which use basename
1909 - local b
1910 - for b in "${D%/}${MY_PREFIX}"/bin/*; do
1911 - make_wrapper "${b##*/}-${WINE_VARIANT}" "${MY_PREFIX}/bin/${b##*/}"
1912 - done
1913 - eshopts_pop
1914 -}
1915 -
1916 -pkg_postinst() {
1917 - eselect wine register ${P}
1918 - if [[ ${PN} == "wine-vanilla" ]]; then
1919 - eselect wine register --vanilla ${P} || die
1920 - else
1921 - if use staging; then
1922 - eselect wine register --staging ${P} || die
1923 - fi
1924 - if use d3d9; then
1925 - eselect wine register --d3d9 ${P} || die
1926 - fi
1927 - fi
1928 -
1929 - eselect wine update --all --if-unset || die
1930 -
1931 - xdg_desktop_database_update
1932 -
1933 - if ! use gecko; then
1934 - ewarn "Without Wine Gecko, wine prefixes will not have a default"
1935 - ewarn "implementation of iexplore. Many older windows applications"
1936 - ewarn "rely upon the existence of an iexplore implementation, so"
1937 - ewarn "you will likely need to install an external one, like via winetricks"
1938 - fi
1939 - if ! use mono; then
1940 - ewarn "Without Wine Mono, wine prefixes will not have a default"
1941 - ewarn "implementation of .NET. Many windows applications rely upon"
1942 - ewarn "the existence of a .NET implementation, so you will likely need"
1943 - ewarn "to install an external one, like via winetricks"
1944 - fi
1945 -}
1946 -
1947 -pkg_prerm() {
1948 - eselect wine deregister ${P}
1949 - if [[ ${PN} == "wine-vanilla" ]]; then
1950 - eselect wine deregister --vanilla ${P} || die
1951 - else
1952 - if use staging; then
1953 - eselect wine deregister --staging ${P} || die
1954 - fi
1955 - if use d3d9; then
1956 - eselect wine deregister --d3d9 ${P} || die
1957 - fi
1958 - fi
1959 -
1960 - eselect wine update --all --if-unset || die
1961 -}
1962 -
1963 -pkg_postrm() {
1964 - xdg_desktop_database_update
1965 -}