Сравнение wine-vanilla-8.0.2 с wine-vanilla-8.13

/usr/portage/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild 2023-10-09 14:52:28.740368331 +0300
7 7
inherit autotools flag-o-matic multilib multilib-build
8 8
inherit prefix toolchain-funcs wrapper
9 9

  
10
WINE_GECKO=2.47.3
11
WINE_MONO=7.4.0
10
WINE_GECKO=2.47.4
11
WINE_MONO=8.0.0
12 12

  
13 13
if [[ ${PV} == *9999 ]]; then
14 14
	inherit git-r3
......
17 17
	(( $(ver_cut 2) )) && WINE_SDIR=$(ver_cut 1).x || WINE_SDIR=$(ver_cut 1).0
18 18
	SRC_URI="https://dl.winehq.org/wine/source/${WINE_SDIR}/wine-${PV}.tar.xz"
19 19
	S="${WORKDIR}/wine-${PV}"
20
	KEYWORDS="-* amd64 x86"
20
	KEYWORDS="-* ~amd64 ~x86"
21 21
fi
22 22

  
23 23
DESCRIPTION="Free implementation of Windows(tm) on Unix, without external patchsets"
......
31 31
	+X +abi_x86_32 +abi_x86_64 +alsa capi crossdev-mingw cups dos
32 32
	llvm-libunwind custom-cflags +fontconfig +gecko gphoto2 +gstreamer
33 33
	kerberos +mingw +mono netapi nls odbc opencl +opengl osmesa pcap
34
	perl pulseaudio samba scanner +sdl selinux +ssl +strip +truetype
35
	udev udisks +unwind usb v4l +vulkan +xcomposite xinerama"
34
	perl pulseaudio samba scanner +sdl selinux smartcard +ssl +strip
35
	+truetype udev udisks +unwind usb v4l +vulkan wayland wow64
36
	+xcomposite xinerama"
37
# bug #551124 for truetype
38
# TODO: wow64 can be done without mingw if using clang (needs bug #912237)
36 39
REQUIRED_USE="
37 40
	X? ( truetype )
38
	crossdev-mingw? ( mingw )" # bug #551124 for truetype
41
	crossdev-mingw? ( mingw )
42
	wow64? ( abi_x86_64 !abi_x86_32 mingw )"
39 43

  
40 44
# tests are non-trivial to run, can hang easily, don't play well with
41 45
# sandbox, and several need real opengl/vulkan or network access
......
86 90
	pcap? ( net-libs/libpcap[${MULTILIB_USEDEP}] )
87 91
	pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] )
88 92
	scanner? ( media-gfx/sane-backends[${MULTILIB_USEDEP}] )
93
	smartcard? ( sys-apps/pcsc-lite[${MULTILIB_USEDEP}] )
89 94
	udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] )
90 95
	unwind? (
91 96
		llvm-libunwind? ( sys-libs/llvm-libunwind[${MULTILIB_USEDEP}] )
92 97
		!llvm-libunwind? ( sys-libs/libunwind:=[${MULTILIB_USEDEP}] )
93 98
	)
94
	usb? ( dev-libs/libusb:1[${MULTILIB_USEDEP}] )"
99
	usb? ( dev-libs/libusb:1[${MULTILIB_USEDEP}] )
100
	wayland? ( dev-libs/wayland[${MULTILIB_USEDEP}] )"
95 101
RDEPEND="
96 102
	${WINE_COMMON_DEPEND}
97 103
	app-emulation/wine-desktop-common
......
101 107
			games-emulation/dosbox-staging
102 108
		)
103 109
	)
104
	gecko? ( app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}] )
110
	gecko? (
111
		app-emulation/wine-gecko:${WINE_GECKO}[${MULTILIB_USEDEP}]
112
		wow64? ( app-emulation/wine-gecko[abi_x86_32] )
113
	)
105 114
	gstreamer? ( media-plugins/gst-plugins-meta:1.0[${MULTILIB_USEDEP}] )
106 115
	mono? ( app-emulation/wine-mono:${WINE_MONO} )
107 116
	perl? (
......
116 125
	sys-kernel/linux-headers
117 126
	X? ( x11-base/xorg-proto )"
118 127
BDEPEND="
128
	|| (
129
		sys-devel/binutils
130
		sys-devel/lld
131
	)
119 132
	dev-lang/perl
120
	sys-devel/binutils
121 133
	sys-devel/bison
122 134
	sys-devel/flex
123 135
	virtual/pkgconfig
124 136
	mingw? ( !crossdev-mingw? (
125 137
		>=dev-util/mingw64-toolchain-10.0.0_p1-r2[${MULTILIB_USEDEP}]
138
		wow64? ( dev-util/mingw64-toolchain[abi_x86_32] )
126 139
	) )
127
	nls? ( sys-devel/gettext )"
140
	nls? ( sys-devel/gettext )
141
	wayland? ( dev-util/wayland-scanner )"
128 142
IDEPEND=">=app-eselect/eselect-wine-2"
129 143

  
130 144
QA_CONFIG_IMPL_DECL_SKIP=(
......
136 150
PATCHES=(
137 151
	"${FILESDIR}"/${PN}-7.0-noexecstack.patch
138 152
	"${FILESDIR}"/${PN}-7.20-unwind.patch
153
	"${FILESDIR}"/${PN}-8.13-rpath.patch
139 154
)
140 155

  
141 156
pkg_pretend() {
......
143 158

  
144 159
	if use crossdev-mingw && [[ ! -v MINGW_BYPASS ]]; then
145 160
		local mingw=-w64-mingw32
146
		for mingw in $(usev abi_x86_64 x86_64${mingw}) $(usev abi_x86_32 i686${mingw}); do
161
		for mingw in $(usev abi_x86_64 x86_64${mingw}) \
162
			$(use abi_x86_32 || use wow64 && echo i686${mingw}); do
147 163
			if ! type -P ${mingw}-gcc >/dev/null; then
148 164
				eerror "With USE=crossdev-mingw, you must prepare the MinGW toolchain"
149 165
				eerror "yourself by installing sys-devel/crossdev then running:"
......
176 192
			# phase despite USE=mingw, drop as a quick fix for now
177 193
			sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die
178 194
		else
179
			# ./configure will fail, abort early
180
			die "building ${PN} with clang is only supported with USE=mingw"
195
			# fails in ./configure unless --enable-archs is passed, allow to
196
			# bypass with EXTRA_ECONF but is currently considered unsupported
197
			# (by Gentoo) as additional work is needed for (proper) support
198
			# note: also fails w/ :17, but unsure if safe to drop w/o mingw
199
			[[ ${EXTRA_ECONF} == *--enable-archs* ]] ||
200
				die "building ${PN} with clang is only supported with USE=mingw"
181 201
		fi
182 202
	fi
183 203

  
......
202 222
		--includedir="${EPREFIX}"/usr/include/${P}
203 223
		--libdir="${EPREFIX}"${WINE_PREFIX}
204 224
		--mandir="${EPREFIX}"${WINE_DATADIR}/man
225

  
226
		$(usev wow64 --enable-archs=x86_64,i386)
227

  
205 228
		$(use_enable gecko mshtml)
206 229
		$(use_enable mono mscoree)
207 230
		--disable-tests
231

  
208 232
		$(use_with X x)
209 233
		$(use_with alsa)
210 234
		$(use_with capi)
......
225 249
		$(use_with pulseaudio pulse)
226 250
		$(use_with scanner sane)
227 251
		$(use_with sdl)
252
		$(use_with smartcard pcsclite)
228 253
		$(use_with ssl gnutls)
229 254
		$(use_with truetype freetype)
230 255
		$(use_with udev)
......
233 258
		$(use_with usb)
234 259
		$(use_with v4l v4l2)
235 260
		$(use_with vulkan)
261
		$(use_with wayland)
236 262
		$(use_with xcomposite)
237 263
		$(use_with xinerama)
238 264
		$(usev !odbc ac_cv_lib_soname_odbc=)
239 265
	)
240 266

  
241
	tc-ld-force-bfd # builds with non-bfd but broken at runtime (bug #867097)
242 267
	filter-lto # build failure
243
	use mingw || filter-flags -fno-plt # build failure
244 268
	use custom-cflags || strip-flags # can break in obscure ways at runtime
245
	use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
246 269

  
247
	# temporary workaround for tc-ld-force-bfd not yet enforcing with mold
248
	# https://github.com/gentoo/gentoo/pull/28355
249
	[[ $($(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) == mold* ]] &&
250
		append-ldflags -fuse-ld=bfd
270
	# wine uses linker tricks unlikely to work with non-bfd/lld (bug #867097)
271
	# (do self test until https://github.com/gentoo/gentoo/pull/28355)
272
	if [[ $(LC_ALL=C $(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) != @(LLD|GNU\ ld)* ]]
273
	then
274
		has_version -b sys-devel/binutils &&
275
			append-ldflags -fuse-ld=bfd ||
276
			append-ldflags -fuse-ld=lld
277
		strip-unsupported-flags
278
	fi
279

  
280
	if use mingw; then
281
		use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
282

  
283
		filter-flags -fno-plt # build failure
284

  
285
		# CROSSCC was formerly recognized by wine, thus been using similar
286
		# variables (subject to change, esp. if ever make a mingw.eclass).
287
		local mingwcc_amd64=${CROSSCC:-${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}}
288
		local mingwcc_x86=${CROSSCC:-${CROSSCC_x86:-i686-w64-mingw32-gcc}}
289
		local -n mingwcc=mingwcc_$(usex abi_x86_64 amd64 x86)
290

  
291
		conf+=(
292
			ac_cv_prog_x86_64_CC="${mingwcc_amd64}"
293
			ac_cv_prog_i386_CC="${mingwcc_x86}"
294

  
295
			CROSSCFLAGS="${CROSSCFLAGS:-$(
296
				filter-flags '-fstack-protector*' #870136
297
				filter-flags '-mfunction-return=thunk*' #878849
298

  
299
				# -mavx with mingw-gcc has a history of obscure issues and
300
				# disabling is seen as safer, e.g. `WINEARCH=win32 winecfg`
301
				# crashes with -march=skylake >=wine-8.10, similar issues with
302
				# znver4: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110273
303
				append-cflags -mno-avx #912268
304

  
305
				CC=${mingwcc} test-flags-CC ${CFLAGS:--O2}
306
			)}"
251 307

  
252
	# build using upstream's way (--with-wine64)
253
	# order matters: configure+compile 64->32, install 32->64
308
			CROSSLDFLAGS="${CROSSLDFLAGS:-$(
309
				filter-flags '-fuse-ld=*'
310

  
311
				CC=${mingwcc} test-flags-CCLD ${LDFLAGS}
312
			)}"
313
		)
314
	fi
315

  
316
	# order matters with multilib: configure+compile 64->32, install 32->64
254 317
	local -i bits
255 318
	for bits in $(usev abi_x86_64 64) $(usev abi_x86_32 32); do
256 319
	(
......
259 322
		mkdir ../build${bits} || die
260 323
		cd ../build${bits} || die
261 324

  
262
		pe_arch=i386
263 325
		if (( bits == 64 )); then
264
			pe_arch=x86_64
265
			: "${CROSSCC:=${CROSSCC_amd64:-x86_64-w64-mingw32-gcc}}"
266 326
			conf+=( --enable-win64 )
267 327
		elif use amd64; then
268 328
			conf+=(
......
272 332
			# _setup is optional, but use over Wine's auto-detect (+#472038)
273 333
			multilib_toolchain_setup x86
274 334
		fi
275
		: "${CROSSCC:=${CROSSCC_x86:-i686-w64-mingw32-gcc}}"
276

  
277
		if use mingw; then
278
			# CROSSCC is no longer recognized by Wine, but still use for now
279
			# (future handling for CROSS* variables is subject to changes)
280
			conf+=( ac_cv_prog_${pe_arch}_CC="${CROSSCC}" )
281

  
282
			# use *FLAGS for mingw, but strip unsupported
283
			: "${CROSSCFLAGS:=$(
284
				# >=wine-7.21 configure.ac no longer adds -fno-strict by mistake
285
				append-cflags -fno-strict-aliasing
286

  
287
				filter-flags '-fstack-protector*' #870136
288
				filter-flags '-mfunction-return=thunk*' #878849
289

  
290
				# -mavx with mingw-gcc has a history of obscure issues and
291
				# disabling is seen as safer, e.g. `WINEARCH=win32 winecfg`
292
				# crashes with -march=skylake >=wine-8.10, similar issues with
293
				# znver4: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110273
294
				append-cflags -mno-avx #912268
295

  
296
				CC=${CROSSCC} test-flags-CC ${CFLAGS:--O2})}"
297
			: "${CROSSLDFLAGS:=$(
298
				filter-flags '-fuse-ld=*'
299
				CC=${CROSSCC} test-flags-CCLD ${LDFLAGS})}"
300
			export CROSS{C,LD}FLAGS
301
		fi
302 335

  
303 336
		ECONF_SOURCE=${S} econf "${conf[@]}"
304 337
	)
......
314 347
	use abi_x86_32 && emake DESTDIR="${D}" -C ../build32 install
315 348
	use abi_x86_64 && emake DESTDIR="${D}" -C ../build64 install # do last
316 349

  
317
	# symlink for plain 'wine' and install its man pages if 64bit-only #404331
318
	if use abi_x86_64 && use !abi_x86_32; then
319
		dosym wine64 ${WINE_PREFIX}/bin/wine
320
		dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader
321
		local man
322
		for man in ../build64/loader/wine.*man; do
323
			: "${man##*/wine}"
324
			: "${_%.*}"
325
			insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1
326
			newins ${man} wine.1
327
		done
350
	# Ensure both wine64 and wine are available if USE=abi_x86_64 (wow64,
351
	# -abi_x86_32, and/or EXTRA_ECONF could cause varying scenarios where
352
	# one or the other could be missing and that is unexpected for users
353
	# and some tools like winetricks)
354
	if use abi_x86_64; then
355
		if [[ -e ${ED}${WINE_PREFIX}/bin/wine64 && ! -e ${ED}${WINE_PREFIX}/bin/wine ]]; then
356
			dosym wine64 ${WINE_PREFIX}/bin/wine
357
			dosym wine64-preloader ${WINE_PREFIX}/bin/wine-preloader
358

  
359
			# also install wine(1) man pages (incl. translations)
360
			local man
361
			for man in ../build64/loader/wine.*man; do
362
				: "${man##*/wine}"
363
				: "${_%.*}"
364
				insinto ${WINE_DATADIR}/man/${_:+${_#.}/}man1
365
				newins ${man} wine.1
366
			done
367
		elif [[ ! -e ${ED}${WINE_PREFIX}/bin/wine64 && -e ${ED}${WINE_PREFIX}/bin/wine ]]; then
368
			dosym wine ${WINE_PREFIX}/bin/wine64
369
			dosym wine-preloader ${WINE_PREFIX}/bin/wine64-preloader
370
		fi
328 371
	fi
329 372

  
330 373
	use perl || rm "${ED}"${WINE_DATADIR}/man/man1/wine{dump,maker}.1 \
......
353 396
}
354 397

  
355 398
pkg_postinst() {
356
	if use abi_x86_32 && { use opengl || use vulkan; } &&
399
	if use !abi_x86_32 && use !wow64; then
400
		ewarn "32bit support is disabled. While 64bit applications themselves will"
401
		ewarn "work, be warned that it is not unusual that installers or other helpers"
402
		ewarn "will attempt to use 32bit and fail. If do not want full USE=abi_x86_32,"
403
		ewarn "note the experimental/WIP USE=wow64 can allow 32bit without multilib."
404
	elif use abi_x86_32 && { use opengl || use vulkan; } &&
357 405
		has_version 'x11-drivers/nvidia-drivers[-abi_x86_32]'
358 406
	then
359 407
		ewarn "x11-drivers/nvidia-drivers is installed but is built without"
Спасибо!