# Copyright 2022-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 # note: version <2.0 should be kept for longer given it's the # last version to support /dev/null; then eerror "With USE=crossdev-mingw, it is necessary to setup the mingw toolchain." eerror "For instructions, please see: https://wiki.gentoo.org/wiki/Mingw" use abi_x86_32 && use abi_x86_64 && eerror "Also, with USE=abi_x86_32, will need both i686 and x86_64 toolchains." die "USE=crossdev-mingw is set but ${tool} was not found" elif [[ ! $(LC_ALL=C ${tool} -v 2>&1) =~ "Thread model: posix" ]]; then eerror "${PN} requires GCC to be built with --enable-threads=posix" eerror "Please see: https://wiki.gentoo.org/wiki/Mingw#POSIX_threads_for_Windows" die "USE=crossdev-mingw is set but ${tool} does not use POSIX threads" fi done fi } src_prepare() { default sed -i "/^basedir=/s|=.*|=${EPREFIX}/usr/lib/${PN}|" setup_dxvk.sh || die } src_configure() { use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} # AVX has a history of causing issues with this package, disable for safety # https://github.com/Tk-Glitch/PKGBUILDS/issues/515 append-flags -mno-avx if [[ ${CHOST} != *-mingw* ]]; then if [[ ! -v MINGW_BYPASS ]]; then unset AR CC CXX RC STRIP filter-flags '-fuse-ld=*' filter-flags '-mfunction-return=thunk*' #878849 if has_version '