summaryrefslogtreecommitdiff
path: root/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild')
-rw-r--r--app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild36
1 files changed, 26 insertions, 10 deletions
diff --git a/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild b/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild
index 9f0672c16b6e..8eec4853243e 100644
--- a/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild
+++ b/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild
@@ -4,6 +4,7 @@
EAPI=8
MULTILIB_COMPAT=( abi_x86_{32,64} )
+# note: multilib+wrapper are not unused, currently a pkgcheck false positive
inherit autotools flag-o-matic multilib multilib-build
inherit prefix toolchain-funcs wrapper
@@ -124,8 +125,11 @@ DEPEND="
sys-kernel/linux-headers
X? ( x11-base/xorg-proto )"
BDEPEND="
+ || (
+ sys-devel/binutils
+ sys-devel/lld
+ )
dev-lang/perl
- sys-devel/binutils
sys-devel/bison
sys-devel/flex
virtual/pkgconfig
@@ -181,6 +185,18 @@ src_prepare() {
default
+ if tc-is-clang; then
+ if use mingw; then
+ # -mabi=ms was ignored by <clang:16 then turned error in :17
+ # and it still gets used in install phase despite USE=mingw,
+ # drop as a quick fix for now which hopefully should be safe
+ sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die
+ else
+ # ./configure will abort looking for -mabi=ms, so do it early
+ die "building ${PN} with clang requires USE=mingw to be enabled"
+ fi
+ fi
+
# ensure .desktop calls this variant + slot
sed -i "/^Exec=/s/wine /${P} /" loader/wine.desktop || die
@@ -244,18 +260,18 @@ src_configure() {
$(usev !odbc ac_cv_lib_soname_odbc=)
)
- # builds with non-bfd but broken at runtime (bug #867097)
- # TODO: retest mold and lld, and figure out what's wrong if
- # still broken given (at least) lld is supposed to work
- tc-ld-force-bfd
-
filter-lto # build failure
use custom-cflags || strip-flags # can break in obscure ways at runtime
- # temporary workaround for tc-ld-force-bfd not yet enforcing with mold
- # https://github.com/gentoo/gentoo/pull/28355
- [[ $($(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) == mold* ]] &&
- append-ldflags -fuse-ld=bfd
+ # wine uses linker tricks unlikely to work with non-bfd/lld (bug #867097)
+ # (do self test until https://github.com/gentoo/gentoo/pull/28355)
+ if [[ $(LC_ALL=C $(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) != @(LLD|GNU\ ld)* ]]
+ then
+ has_version -b sys-devel/binutils &&
+ append-ldflags -fuse-ld=bfd ||
+ append-ldflags -fuse-ld=lld
+ strip-unsupported-flags
+ fi
if use mingw; then
use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}