1 |
commit: f874f0f48a15e81c838dd4de2117215816d9931d |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Mar 19 05:02:43 2023 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Mar 19 08:24:32 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f874f0f4 |
7 |
|
8 |
app-emulation/wine-staging: add 8.4 |
9 |
|
10 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
11 |
|
12 |
app-emulation/wine-staging/Manifest | 2 + |
13 |
app-emulation/wine-staging/wine-staging-8.4.ebuild | 369 +++++++++++++++++++++ |
14 |
2 files changed, 371 insertions(+) |
15 |
|
16 |
diff --git a/app-emulation/wine-staging/Manifest b/app-emulation/wine-staging/Manifest |
17 |
index 197982707bc1..5935f910d20b 100644 |
18 |
--- a/app-emulation/wine-staging/Manifest |
19 |
+++ b/app-emulation/wine-staging/Manifest |
20 |
@@ -2,7 +2,9 @@ DIST wine-8.0.tar.xz 29054044 BLAKE2B baf8f96b665119c9f38a148a2472dbe8f6ca8d4641 |
21 |
DIST wine-8.1.tar.xz 29083080 BLAKE2B 6eed2128627f15159ad80588ebe839de76cb9a536797d7da136b61f56033ece60c60208702b7928cdb297c1d8730baae0d6bb0ac7a0473c34ed44b5c5edaaec5 SHA512 3f0477c26f293cf928acbdae2ffb98740ac227a605ec90f3ab3d35c0dbca2037529ff4e4de0b69cc975579ad14dc2fb8b52e050cfd99cffcc627418cf8cb4346 |
22 |
DIST wine-8.2.tar.xz 29129032 BLAKE2B 831a5d1c8228050db9257ed60dc77ed0a391f16ee16d2e5563eabbf8f7d988655477327e1081baf947b173e8eb716b15fb72d1daa70d5ade52508c7f1cc2c231 SHA512 d0b8bb8c6d75034519bdf48d52b89f9d44ba4f7306a0b8f860cbb2c4c39d8fae3c2d9c12be37427b9a9cbdb7dd8701844d0a74c245dd7a9e8a423cb56962b254 |
23 |
DIST wine-8.3.tar.xz 28983532 BLAKE2B b811a13aaa87f186c744254059d40fdf0740da42cf788acb2375c04cf3ecc281c92afc7bb7830d5797624d96f803edcb2d2778c5da378d89938fe0b68e72a287 SHA512 9c0c86f1d523cc65fe6bcb2f98e73f8909282eda1c04516ff35a32833e469421e099fe1351c3078ac96aa7884fc194a77fcf2ba8863e2a227316fd84562f1f5a |
24 |
+DIST wine-8.4.tar.xz 29031312 BLAKE2B 0b91267a68e4e332544d273646bb1e9389c3af3f48069ab7942096af5512e86a61d39788d91c221b4ae96e81858cfdff1e43a658ba407ff1450b6d752b8a3235 SHA512 8de144a65c0a3a2984fabc1294b647b8581da5fa8bd28a9ff756ab59256ee2b453d898453fc902bbc372a4e017a8e29b1eeef917f137ec1134ac08b671eccc7d |
25 |
DIST wine-staging-8.0.tar.gz 9529620 BLAKE2B c9540195ea885d9f1e980232b0af471e92c61eb079cae35fdb3af5c13d4660b3466f751772440e38f15874082db296d16d1f1d68827a505b2dd949617eda0203 SHA512 76a729d7ced1ff634ddb455ddfaa66ca103b652f43cd152b57ada7431bb5fbb74f5e92bf2f4f329b6df6f5908130afad84e609cbce6df645d6cf8131e9b949f9 |
26 |
DIST wine-staging-8.1.tar.gz 9527176 BLAKE2B 363243a4a04bc767099b74f3b7613463d99da82996c176e68b9233cbf51c87ecd143840f7729a3edc31ac004b771b89ec3d57a0276b26e30d475feb273d09257 SHA512 c5c3111b27de7d3bf1d7a3a53f33e8d78c5006f22ff0361f77392455fa69b0afd7c58406515ace04b2df7e1dfb20e3adf9d874e5e8be09c9032c1c1aa31fe696 |
27 |
DIST wine-staging-8.2.tar.gz 9528476 BLAKE2B e6fb4d15e9b94c9196c1f472ac50fbd3eabe34ef4a54493ca11b702448c4039c5a4f13fb1119a88477924e204c6e1972b1b25efe742118beec01f71a9d879aa2 SHA512 24bbfb6d03ca8282de058019cbbee57b36f8fdcf3e485f2ca94dbcf50614cf6c80e31103196d11fe48c77953d59a741ae2baf6987e56a88bea038ed16b692ad9 |
28 |
DIST wine-staging-8.3.tar.gz 9523336 BLAKE2B 3fdb6343ab3735e9235ea3d99e3da4d392de9620d93e85e2bd3b13ae2e0eca2654b2b48230a3bfd7c66ead1fb751ddb092b361943f7a95eb3df5a240c2b9e32b SHA512 e2b1dc107088f716f1c7e80bc25b152ff5c2c4c4a6f29a60e42eabdea0e8b5df84eaeaf8b978f5aefc3f9ad5962eb74784d5a98b95fa3694485d00f3fa628ce6 |
29 |
+DIST wine-staging-8.4.tar.gz 9522340 BLAKE2B b9fb08f529c9c24d9d6b09adbb359b265e246b8f4651eef0983d10b9c84afbdc9c58e04180e802cd3a7d0951f12ff46495b1ec0508e02f5b76ae7d0d987dc22c SHA512 96a6a870020e59f8437c65604536fec4b80d7d9e5a937e5d0a6cb0b2b4e544e6153fa0cdf2a8fd2c32d090001334e68124c2855c6a2a1454fdcdb6ea23d75fd7 |
30 |
|
31 |
diff --git a/app-emulation/wine-staging/wine-staging-8.4.ebuild b/app-emulation/wine-staging/wine-staging-8.4.ebuild |
32 |
new file mode 100644 |
33 |
index 000000000000..5f90e2ce8870 |
34 |
--- /dev/null |
35 |
+++ b/app-emulation/wine-staging/wine-staging-8.4.ebuild |
36 |
@@ -0,0 +1,369 @@ |
37 |
+# Copyright 2022-2023 Gentoo Authors |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+ |
40 |
+EAPI=8 |
41 |
+ |
42 |
+MULTILIB_COMPAT=( abi_x86_{32,64} ) |
43 |
+PYTHON_COMPAT=( python3_{9..11} ) |
44 |
+inherit autotools edo flag-o-matic multilib multilib-build |
45 |
+inherit python-any-r1 toolchain-funcs wrapper |
46 |
+ |
47 |
+WINE_GECKO=2.47.3 |
48 |
+WINE_MONO=7.4.0 |
49 |
+ |
50 |
+if [[ ${PV} == *9999 ]]; then |
51 |
+ inherit git-r3 |
52 |
+ EGIT_REPO_URI="https://github.com/wine-staging/wine-staging.git" |
53 |
+ WINE_EGIT_REPO_URI="https://gitlab.winehq.org/wine/wine.git" |
54 |
+else |
55 |
+ (( $(ver_cut 2) )) && WINE_SDIR=$(ver_cut 1).x || WINE_SDIR=$(ver_cut 1).0 |
56 |
+ SRC_URI=" |
57 |
+ https://dl.winehq.org/wine/source/${WINE_SDIR}/wine-${PV}.tar.xz |
58 |
+ https://github.com/wine-staging/wine-staging/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
59 |
+ KEYWORDS="-* ~amd64 ~x86" |
60 |
+fi |
61 |
+S="${WORKDIR}/wine-${PV}" |
62 |
+ |
63 |
+DESCRIPTION="Free implementation of Windows(tm) on Unix, with Wine-Staging patchset" |
64 |
+HOMEPAGE="https://wiki.winehq.org/Wine-Staging" |
65 |
+ |
66 |
+LICENSE="LGPL-2.1+ BSD-2 IJG MIT OPENLDAP ZLIB gsm libpng2 libtiff" |
67 |
+SLOT="${PV}" |
68 |
+IUSE=" |
69 |
+ +X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups dos |
70 |
+ llvm-libunwind debug custom-cflags +fontconfig +gecko gphoto2 |
71 |
+ +gstreamer kerberos +mingw +mono netapi nls opencl +opengl osmesa |
72 |
+ pcap perl pulseaudio samba scanner +sdl selinux smartcard +ssl |
73 |
+ +truetype udev udisks +unwind usb v4l +vulkan wayland +xcomposite |
74 |
+ xinerama" |
75 |
+REQUIRED_USE=" |
76 |
+ X? ( truetype ) |
77 |
+ crossdev-mingw? ( mingw )" # bug #551124 for truetype |
78 |
+ |
79 |
+# tests are non-trivial to run, can hang easily, don't play well with |
80 |
+# sandbox, and several need real opengl/vulkan or network access |
81 |
+RESTRICT="test" |
82 |
+ |
83 |
+# `grep WINE_CHECK_SONAME configure.ac` + if not directly linked |
84 |
+WINE_DLOPEN_DEPEND=" |
85 |
+ X? ( |
86 |
+ x11-libs/libXcursor[${MULTILIB_USEDEP}] |
87 |
+ x11-libs/libXfixes[${MULTILIB_USEDEP}] |
88 |
+ x11-libs/libXi[${MULTILIB_USEDEP}] |
89 |
+ x11-libs/libXrandr[${MULTILIB_USEDEP}] |
90 |
+ x11-libs/libXrender[${MULTILIB_USEDEP}] |
91 |
+ x11-libs/libXxf86vm[${MULTILIB_USEDEP}] |
92 |
+ opengl? ( |
93 |
+ media-libs/libglvnd[X,${MULTILIB_USEDEP}] |
94 |
+ osmesa? ( media-libs/mesa[osmesa,${MULTILIB_USEDEP}] ) |
95 |
+ ) |
96 |
+ xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] ) |
97 |
+ xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] ) |
98 |
+ ) |
99 |
+ cups? ( net-print/cups[${MULTILIB_USEDEP}] ) |
100 |
+ fontconfig? ( media-libs/fontconfig[${MULTILIB_USEDEP}] ) |
101 |
+ kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] ) |
102 |
+ netapi? ( net-fs/samba[${MULTILIB_USEDEP}] ) |
103 |
+ sdl? ( media-libs/libsdl2[haptic,joystick,${MULTILIB_USEDEP}] ) |
104 |
+ ssl? ( net-libs/gnutls:=[${MULTILIB_USEDEP}] ) |
105 |
+ truetype? ( media-libs/freetype[${MULTILIB_USEDEP}] ) |
106 |
+ udisks? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) |
107 |
+ v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] ) |
108 |
+ vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] )" |
109 |
+WINE_COMMON_DEPEND=" |
110 |
+ ${WINE_DLOPEN_DEPEND} |
111 |
+ X? ( |
112 |
+ x11-libs/libX11[${MULTILIB_USEDEP}] |
113 |
+ x11-libs/libXext[${MULTILIB_USEDEP}] |
114 |
+ ) |
115 |
+ alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) |
116 |
+ capi? ( net-libs/libcapi:=[${MULTILIB_USEDEP}] ) |
117 |
+ gphoto2? ( media-libs/libgphoto2:=[${MULTILIB_USEDEP}] ) |
118 |
+ gstreamer? ( |
119 |
+ dev-libs/glib:2[${MULTILIB_USEDEP}] |
120 |
+ media-libs/gst-plugins-base:1.0[${MULTILIB_USEDEP}] |
121 |
+ media-libs/gstreamer:1.0[${MULTILIB_USEDEP}] |
122 |
+ ) |
123 |
+ opencl? ( virtual/opencl[${MULTILIB_USEDEP}] ) |
124 |
+ pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] ) |
125 |
+ pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] ) |
126 |
+ scanner? ( media-gfx/sane-backends[${MULTILIB_USEDEP}] ) |
127 |
+ smartcard? ( sys-apps/pcsc-lite[${MULTILIB_USEDEP}] ) |
128 |
+ udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) |
129 |
+ unwind? ( |
130 |
+ llvm-libunwind? ( sys-libs/llvm-libunwind[${MULTILIB_USEDEP}] ) |
131 |
+ !llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] ) |
132 |
+ ) |
133 |
+ usb? ( dev-libs/libusb:1[${MULTILIB_USEDEP}] ) |
134 |
+ wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )" |
135 |
+RDEPEND=" |
136 |
+ ${WINE_COMMON_DEPEND} |
137 |
+ app-emulation/wine-desktop-common |
138 |
+ dos? ( games-emulation/dosbox ) |
139 |
+ gecko? ( app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}] ) |
140 |
+ gstreamer? ( media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] ) |
141 |
+ mono? ( app-emulation/wine-mono:${WINE_MONO} ) |
142 |
+ perl? ( |
143 |
+ dev-lang/perl |
144 |
+ dev-perl/XML-LibXML |
145 |
+ ) |
146 |
+ samba? ( net-fs/samba[winbind] ) |
147 |
+ selinux? ( sec-policy/selinux-wine ) |
148 |
+ udisks? ( sys-fs/udisks:2 )" |
149 |
+DEPEND=" |
150 |
+ ${WINE_COMMON_DEPEND} |
151 |
+ sys-kernel/linux-headers |
152 |
+ X? ( x11-base/xorg-proto )" |
153 |
+# gitapply.sh prefers git but can fallback to patch+extras |
154 |
+BDEPEND=" |
155 |
+ ${PYTHON_DEPS} |
156 |
+ || ( |
157 |
+ dev-vcs/git |
158 |
+ ( |
159 |
+ sys-apps/gawk |
160 |
+ sys-apps/util-linux |
161 |
+ ) |
162 |
+ ) |
163 |
+ dev-lang/perl |
164 |
+ sys-devel/binutils |
165 |
+ sys-devel/bison |
166 |
+ sys-devel/flex |
167 |
+ virtual/pkgconfig |
168 |
+ mingw? ( !crossdev-mingw? ( |
169 |
+ >=dev-util/mingw64-toolchain-10.0.0_p1-r2[${MULTILIB_USEDEP}] |
170 |
+ ) ) |
171 |
+ nls? ( sys-devel/gettext )" |
172 |
+IDEPEND=">=app-eselect/eselect-wine-2" |
173 |
+ |
174 |
+QA_CONFIG_IMPL_DECL_SKIP=( |
175 |
+ __clear_cache # unused on amd64+x86 (bug #900334) |
176 |
+ res_getservers # false positive |
177 |
+) |
178 |
+QA_FLAGS_IGNORED="usr/lib/.*/wine/.*-unix/odbc32.so" # has no compiled objects |
179 |
+QA_TEXTRELS="usr/lib/*/wine/i386-unix/*.so" # uses -fno-PIC -Wl,-z,notext |
180 |
+ |
181 |
+PATCHES=( |
182 |
+ "${FILESDIR}"/${PN}-7.17-noexecstack.patch |
183 |
+ "${FILESDIR}"/${PN}-7.20-unwind.patch |
184 |
+) |
185 |
+ |
186 |
+pkg_pretend() { |
187 |
+ [[ ${MERGE_TYPE} == binary ]] && return |
188 |
+ |
189 |
+ if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then |
190 |
+ local mingw=-w64-mingw32 |
191 |
+ for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do |
192 |
+ if ! type -P ${mingw}-gcc >/dev/null; then |
193 |
+ eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain" |
194 |
+ eerror "yourself by installing sys-devel/crossdev then running:" |
195 |
+ eerror |
196 |
+ eerror " crossdev --target ${mingw}" |
197 |
+ eerror |
198 |
+ eerror "For more information, please see: https://wiki.gentoo.org/wiki/Mingw" |
199 |
+ die "USE=crossdev-mingw is enabled, but ${mingw}-gcc was not found" |
200 |
+ fi |
201 |
+ done |
202 |
+ fi |
203 |
+} |
204 |
+ |
205 |
+src_unpack() { |
206 |
+ if [[ ${PV} == *9999 ]]; then |
207 |
+ EGIT_CHECKOUT_DIR=${WORKDIR}/${P} |
208 |
+ git-r3_src_unpack |
209 |
+ |
210 |
+ EGIT_COMMIT=$(<"${EGIT_CHECKOUT_DIR}"/staging/upstream-commit) || die |
211 |
+ EGIT_REPO_URI=${WINE_EGIT_REPO_URI} |
212 |
+ EGIT_CHECKOUT_DIR=${S} |
213 |
+ einfo "Fetching Wine commit matching the current patchset by default (${EGIT_COMMIT})" |
214 |
+ git-r3_src_unpack |
215 |
+ else |
216 |
+ default |
217 |
+ fi |
218 |
+} |
219 |
+ |
220 |
+src_prepare() { |
221 |
+ local patchinstallargs=( |
222 |
+ --all |
223 |
+ --no-autoconf |
224 |
+ -W winemenubuilder-Desktop_Icon_Path #652176 |
225 |
+ ${MY_WINE_STAGING_CONF} |
226 |
+ ) |
227 |
+ |
228 |
+ edo "${PYTHON}" ../${P}/staging/patchinstall.py "${patchinstallargs[@]}" |
229 |
+ |
230 |
+ # sanity check, bumping these has a history of oversights |
231 |
+ local geckomono=$(sed -En '/^#define (GECKO|MONO)_VER/{s/[^0-9.]//gp}' \ |
232 |
+ dlls/appwiz.cpl/addons.c || die) |
233 |
+ if [[ ${WINE_GECKO}$'\n'${WINE_MONO} != "${geckomono}" ]]; then |
234 |
+ local gmfatal= |
235 |
+ [[ ${PV} == *9999 ]] && gmfatal=nonfatal |
236 |
+ ${gmfatal} die -n "gecko/mono mismatch in ebuild, has: " ${geckomono} " (please file a bug)" |
237 |
+ fi |
238 |
+ |
239 |
+ default |
240 |
+ |
241 |
+ # ensure .desktop calls this variant + slot |
242 |
+ sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die |
243 |
+ |
244 |
+ # always update for patches (including user's wrt #432348) |
245 |
+ eautoreconf |
246 |
+ tools/make_requests || die # perl |
247 |
+} |
248 |
+ |
249 |
+src_configure() { |
250 |
+ WINE_PREFIX=/usr/lib/${P} |
251 |
+ WINE_DATADIR=/usr/share/${P} |
252 |
+ |
253 |
+ local conf=( |
254 |
+ --prefix="${EPREFIX}"${WINE_PREFIX} |
255 |
+ --datadir="${EPREFIX}"${WINE_DATADIR} |
256 |
+ --includedir="${EPREFIX}"/usr/include/${P} |
257 |
+ --libdir="${EPREFIX}"${WINE_PREFIX} |
258 |
+ --mandir="${EPREFIX}"${WINE_DATADIR}/man |
259 |
+ $(use_enable gecko mshtml) |
260 |
+ $(use_enable mono mscoree) |
261 |
+ --disable-tests |
262 |
+ $(use_with X x) |
263 |
+ $(use_with alsa) |
264 |
+ $(use_with capi) |
265 |
+ $(use_with cups) |
266 |
+ $(use_with fontconfig) |
267 |
+ $(use_with gphoto2 gphoto) |
268 |
+ $(use_with gstreamer) |
269 |
+ $(use_with kerberos gssapi) |
270 |
+ $(use_with kerberos krb5) |
271 |
+ $(use_with mingw) |
272 |
+ $(use_with netapi) |
273 |
+ $(use_with nls gettext) |
274 |
+ $(use_with opencl) |
275 |
+ $(use_with opengl) |
276 |
+ $(use_with osmesa) |
277 |
+ --without-oss # media-sound/oss is not packaged (OSSv4) |
278 |
+ $(use_with pcap) |
279 |
+ $(use_with pulseaudio pulse) |
280 |
+ $(use_with scanner sane) |
281 |
+ $(use_with sdl) |
282 |
+ $(use_with smartcard pcsclite) |
283 |
+ $(use_with ssl gnutls) |
284 |
+ $(use_with truetype freetype) |
285 |
+ $(use_with udev) |
286 |
+ $(use_with udisks dbus) # dbus is only used for udisks |
287 |
+ $(use_with unwind) |
288 |
+ $(use_with usb) |
289 |
+ $(use_with v4l v4l2) |
290 |
+ $(use_with vulkan) |
291 |
+ $(use_with wayland) |
292 |
+ $(use_with xcomposite) |
293 |
+ $(use_with xinerama) |
294 |
+ ) |
295 |
+ |
296 |
+ tc-ld-force-bfd # builds with non-bfd but broken at runtime (bug #867097) |
297 |
+ filter-lto # build failure |
298 |
+ use mingw || filter-flags -fno-plt # build failure |
299 |
+ use custom-cflags || strip-flags # can break in obscure ways at runtime |
300 |
+ use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} |
301 |
+ |
302 |
+ # temporary workaround for tc-ld-force-bfd not yet enforcing with mold |
303 |
+ # https://github.com/gentoo/gentoo/pull/28355 |
304 |
+ [[ $($(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) == mold* ]] && |
305 |
+ append-ldflags -fuse-ld=bfd |
306 |
+ |
307 |
+ # build using upstream's way (--with-wine64) |
308 |
+ # order matters: configure+compile 64->32, install 32->64 |
309 |
+ local -i bits |
310 |
+ for bits in $(usev abi_x86_64 64) $(usev abi_x86_32 32); do |
311 |
+ ( |
312 |
+ einfo "Configuring ${PN} for ${bits}bits in ${WORKDIR}/build${bits} ..." |
313 |
+ |
314 |
+ mkdir ../build${bits} || die |
315 |
+ cd ../build${bits} || die |
316 |
+ |
317 |
+ pe_arch=i386 |
318 |
+ if (( bits == 64 )); then |
319 |
+ pe_arch=x86_64 |
320 |
+ : "${CROSSCC:=${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}}" |
321 |
+ conf+=( --enable-win64 ) |
322 |
+ elif use amd64; then |
323 |
+ conf+=( |
324 |
+ $(usev abi_x86_64 --with-wine64=../build64) |
325 |
+ TARGETFLAGS=-m32 # for widl |
326 |
+ ) |
327 |
+ # _setup is optional, but use over Wine's auto-detect (+#472038) |
328 |
+ multilib_toolchain_setup x86 |
329 |
+ fi |
330 |
+ : "${CROSSCC:=${CROSSCC_x86:-i686-w64-mingw32-gcc}}" |
331 |
+ |
332 |
+ if use mingw; then |
333 |
+ # CROSSCC is no longer recognized by Wine, but still use for now |
334 |
+ # (future handling for CROSS* variables is subject to changes) |
335 |
+ conf+=( ac_cv_prog_${pe_arch}_CC="${CROSSCC}" ) |
336 |
+ |
337 |
+ # use *FLAGS for mingw, but strip unsupported |
338 |
+ : "${CROSSCFLAGS:=$( |
339 |
+ # >=wine-7.21 configure.ac no longer adds -fno-strict by mistake |
340 |
+ append-cflags '-fno-strict-aliasing' |
341 |
+ filter-flags '-fstack-clash-protection' #758914 |
342 |
+ filter-flags '-fstack-protector*' #870136 |
343 |
+ filter-flags '-mfunction-return=thunk*' #878849 |
344 |
+ CC=${CROSSCC} test-flags-CC ${CFLAGS:--O2})}" |
345 |
+ : "${CROSSLDFLAGS:=$( |
346 |
+ filter-flags '-fuse-ld=*' |
347 |
+ CC=${CROSSCC} test-flags-CCLD ${LDFLAGS})}" |
348 |
+ export CROSS{C,LD}FLAGS |
349 |
+ fi |
350 |
+ |
351 |
+ ECONF_SOURCE=${S} econf "${conf[@]}" |
352 |
+ ) |
353 |
+ done |
354 |
+} |
355 |
+ |
356 |
+src_compile() { |
357 |
+ use abi_x86_64 && emake -C ../build64 # do first |
358 |
+ use abi_x86_32 && emake -C ../build32 |
359 |
+} |
360 |
+ |
361 |
+src_install() { |
362 |
+ use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install |
363 |
+ use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last |
364 |
+ |
365 |
+ # symlink for plain 'wine' and install its man pages if 64bit-only #404331 |
366 |
+ if use abi_x86_64 && use !abi_x86_32; then |
367 |
+ dosym wine64 ${WINE_PREFIX}/bin/wine |
368 |
+ dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader |
369 |
+ local man |
370 |
+ for man in ../build64/loader/wine.*man; do |
371 |
+ : "${man##*/wine}" |
372 |
+ : "${_%.*}" |
373 |
+ insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1 |
374 |
+ newins ${man} wine.1 |
375 |
+ done |
376 |
+ fi |
377 |
+ |
378 |
+ use perl || rm "${ED}"${WINE_DATADIR}/man/man1/wine{dump,maker}.1 \ |
379 |
+ "${ED}"${WINE_PREFIX}/bin/{function_grep.pl,wine{dump,maker}} || die |
380 |
+ |
381 |
+ # create variant wrappers for eselect-wine |
382 |
+ local bin |
383 |
+ for bin in "${ED}"${WINE_PREFIX}/bin/*; do |
384 |
+ make_wrapper "${bin##*/}-${P#wine-}" "${bin#"${ED}"}" |
385 |
+ done |
386 |
+ |
387 |
+ # don't let portage try to strip PE files with the wrong |
388 |
+ # strip executable and instead handle it here (saves ~120MB) |
389 |
+ if use mingw; then |
390 |
+ dostrip -x ${WINE_PREFIX}/wine/{i386,x86_64}-windows |
391 |
+ use debug || |
392 |
+ find "${ED}"${WINE_PREFIX}/wine/*-windows -regex '.*\.\(a\|dll\|exe\)' \ |
393 |
+ -exec $(usex abi_x86_64 x86_64 i686)-w64-mingw32-strip --strip-unneeded {} + || die |
394 |
+ fi |
395 |
+ |
396 |
+ dodoc ANNOUNCE AUTHORS README* documentation/README* |
397 |
+} |
398 |
+ |
399 |
+pkg_postinst() { |
400 |
+ eselect wine update --if-unset || die |
401 |
+} |
402 |
+ |
403 |
+pkg_postrm() { |
404 |
+ eselect wine update --if-unset || die |
405 |
+} |