summaryrefslogtreecommitdiff
path: root/app-emulation/wine-staging/wine-staging-8.13.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/wine-staging/wine-staging-8.13.ebuild')
-rw-r--r--app-emulation/wine-staging/wine-staging-8.13.ebuild36
1 files changed, 26 insertions, 10 deletions
diff --git a/app-emulation/wine-staging/wine-staging-8.13.ebuild b/app-emulation/wine-staging/wine-staging-8.13.ebuild
index ce3852c77cc9..bf30ea0d2af9 100644
--- a/app-emulation/wine-staging/wine-staging-8.13.ebuild
+++ b/app-emulation/wine-staging/wine-staging-8.13.ebuild
@@ -5,6 +5,7 @@ EAPI=8
MULTILIB_COMPAT=( abi_x86_{32,64} )
PYTHON_COMPAT=( python3_{10..12} )
+# note: multilib+wrapper are not unused, currently a pkgcheck false positive
inherit autotools edo flag-o-matic multilib multilib-build
inherit prefix python-any-r1 toolchain-funcs wrapper
@@ -137,8 +138,11 @@ BDEPEND="
sys-apps/util-linux
)
)
+ || (
+ sys-devel/binutils
+ sys-devel/lld
+ )
dev-lang/perl
- sys-devel/binutils
sys-devel/bison
sys-devel/flex
virtual/pkgconfig
@@ -222,6 +226,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
@@ -284,18 +300,18 @@ src_configure() {
$(use_with xinerama)
)
- # 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}