Skip to content

Commit

Permalink
app-emulation/dxvk-winelib: Attempt to fix build
Browse files Browse the repository at this point in the history
The current dxvk master requires GCC 8 to build the new features that
were added to dxvk's dxgi implementation.

This means some older versions of winegcc will fail to compile
dxvk-winelib, but I've found that the earliest wine version
capable of building DXVK now is 5.9.

This ebuild will now find and use the latest version of
winegcc and wineg++ without requiring the user to use eselect before
hand.

Package-Manager: Portage-3.0.8, Repoman-3.0.2
  • Loading branch information
TheGreatMcPain committed Nov 1, 2020
1 parent 92a07a2 commit 5f5237a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app-emulation/dxvk-winelib/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ DIST dxvk-winelib-1.6.1.tar.gz 894553 BLAKE2B a45f905f33b255beed65daebbb946b36c2
DIST dxvk-winelib-1.7.1.tar.gz 1076712 BLAKE2B 553812437d8a8d5f59b79cbe42e0f77a643cd0e48efc1f5572c07527b43cf1486a60dc8b6eeca8db6d9bf9f40dc1383d8815b98e7b0177cedc913c943a17be6b SHA512 e8e056fa7ef87e3fcab7584915524bf0d6e5462fd615fdbaa4a99462a5f66319c48bf7c8cbed85ac5ebbb3cdaa0e8478b0da45c1aa7439962e50b8ae51542fc1
DIST dxvk-winelib-1.7.2.tar.gz 1078632 BLAKE2B 6ee1f7b92e93074f9ff1ef3d884dc67f99a876a6a4158dd4c26b898a0f09525d8d0f85625c1396d75bf99beac8b2722b9681691a4f37b813139e7044068b679f SHA512 5851f70ee16540ba2ce761991136362952be9bbb4e66f2f4e9d2cd5dea67abb93db6c3a04623370225dee09a743f968c4b49ac364ab1d5d0b10dc013dd608a0c
DIST dxvk-winelib-1.7.tar.gz 899679 BLAKE2B 3e382520c136ebdb5277289ba2ba6586dbd861074f1c7d71b296ea1c564560087737044683d79db17a5faf732a9b339908d8f247225511431ed2943680c9d3ff SHA512 3a78332dbaaed71fb007ef9b441b33892bd56844dfddc72ded926108712ade34060ddb850bf3943b175aed6e89d453fb84f12fe9c00a94e03a342de61d7aed0c
EBUILD dxvk-winelib-1.6.1.ebuild 4524 BLAKE2B 478934f4236f9e3095ea868c5fd967b3f69a9f0d7e1c39f7789f43768d31a6a7b11fd8fbe8ca9cc6a8e464a457b74285117719021825d4baa7cdf145ab6a2521 SHA512 ce2f1604bade2c58fb58f4f8eb15b893f2a11263bc6c10a904a64fbcb5343151d3bafa737520886b09497e83b8e86d739feba18b3850770ba3f2ddae8b4221f3
EBUILD dxvk-winelib-1.7.1.ebuild 4524 BLAKE2B 478934f4236f9e3095ea868c5fd967b3f69a9f0d7e1c39f7789f43768d31a6a7b11fd8fbe8ca9cc6a8e464a457b74285117719021825d4baa7cdf145ab6a2521 SHA512 ce2f1604bade2c58fb58f4f8eb15b893f2a11263bc6c10a904a64fbcb5343151d3bafa737520886b09497e83b8e86d739feba18b3850770ba3f2ddae8b4221f3
EBUILD dxvk-winelib-1.7.2.ebuild 4524 BLAKE2B 478934f4236f9e3095ea868c5fd967b3f69a9f0d7e1c39f7789f43768d31a6a7b11fd8fbe8ca9cc6a8e464a457b74285117719021825d4baa7cdf145ab6a2521 SHA512 ce2f1604bade2c58fb58f4f8eb15b893f2a11263bc6c10a904a64fbcb5343151d3bafa737520886b09497e83b8e86d739feba18b3850770ba3f2ddae8b4221f3
EBUILD dxvk-winelib-1.7.ebuild 4524 BLAKE2B 478934f4236f9e3095ea868c5fd967b3f69a9f0d7e1c39f7789f43768d31a6a7b11fd8fbe8ca9cc6a8e464a457b74285117719021825d4baa7cdf145ab6a2521 SHA512 ce2f1604bade2c58fb58f4f8eb15b893f2a11263bc6c10a904a64fbcb5343151d3bafa737520886b09497e83b8e86d739feba18b3850770ba3f2ddae8b4221f3
EBUILD dxvk-winelib-9999.ebuild 4524 BLAKE2B 478934f4236f9e3095ea868c5fd967b3f69a9f0d7e1c39f7789f43768d31a6a7b11fd8fbe8ca9cc6a8e464a457b74285117719021825d4baa7cdf145ab6a2521 SHA512 ce2f1604bade2c58fb58f4f8eb15b893f2a11263bc6c10a904a64fbcb5343151d3bafa737520886b09497e83b8e86d739feba18b3850770ba3f2ddae8b4221f3
EBUILD dxvk-winelib-1.6.1.ebuild 5361 BLAKE2B 3aadc4a8a461d5ec8707cece74ed478f7b03c342c15cb38bd47c5cdc6ec5cb1c6550460603ca65f11b2ddb1401166577ee0b49126fc1e8a6bc19f6e5aaef4035 SHA512 dd702496be761f3b53797421f6dba034f998ba9124fda18085ac863177977fe16a4e8de7663b44460e9eb2a433129444c578709004b94fd7f3e21d8e4b6831fd
EBUILD dxvk-winelib-1.7.1.ebuild 5361 BLAKE2B 3aadc4a8a461d5ec8707cece74ed478f7b03c342c15cb38bd47c5cdc6ec5cb1c6550460603ca65f11b2ddb1401166577ee0b49126fc1e8a6bc19f6e5aaef4035 SHA512 dd702496be761f3b53797421f6dba034f998ba9124fda18085ac863177977fe16a4e8de7663b44460e9eb2a433129444c578709004b94fd7f3e21d8e4b6831fd
EBUILD dxvk-winelib-1.7.2.ebuild 5361 BLAKE2B 3aadc4a8a461d5ec8707cece74ed478f7b03c342c15cb38bd47c5cdc6ec5cb1c6550460603ca65f11b2ddb1401166577ee0b49126fc1e8a6bc19f6e5aaef4035 SHA512 dd702496be761f3b53797421f6dba034f998ba9124fda18085ac863177977fe16a4e8de7663b44460e9eb2a433129444c578709004b94fd7f3e21d8e4b6831fd
EBUILD dxvk-winelib-1.7.ebuild 5361 BLAKE2B 3aadc4a8a461d5ec8707cece74ed478f7b03c342c15cb38bd47c5cdc6ec5cb1c6550460603ca65f11b2ddb1401166577ee0b49126fc1e8a6bc19f6e5aaef4035 SHA512 dd702496be761f3b53797421f6dba034f998ba9124fda18085ac863177977fe16a4e8de7663b44460e9eb2a433129444c578709004b94fd7f3e21d8e4b6831fd
EBUILD dxvk-winelib-9999.ebuild 5361 BLAKE2B 3aadc4a8a461d5ec8707cece74ed478f7b03c342c15cb38bd47c5cdc6ec5cb1c6550460603ca65f11b2ddb1401166577ee0b49126fc1e8a6bc19f6e5aaef4035 SHA512 dd702496be761f3b53797421f6dba034f998ba9124fda18085ac863177977fe16a4e8de7663b44460e9eb2a433129444c578709004b94fd7f3e21d8e4b6831fd
MISC metadata.xml 916 BLAKE2B 1ed7c1853ff8eda38631791a4d364a50397ed981c7260dcb40af21e14823532f4f2e285b3bafca0cdb27b466a8a477a3959726273310efa30f5934d2158b3ede SHA512 97f872d10f9b3f2f5ad29a4f27bd508459964238a2c1cad59c7756eef52e6e7f9bfe82fffb7c7cfd424b421d393434a877c0416a8dd134aaef02db48be0f77fd
28 changes: 28 additions & 0 deletions app-emulation/dxvk-winelib/dxvk-winelib-9999.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,24 @@ bits() {
[[ ${ABI} = "x86" ]] && echo 32
}

pkg_setup() {
if [[ ${PV} == "9999" ]]; then
if $(has_version ">=app-emulation/wine-staging-5.9"); then
WINE_VERSION=$(best_version app-emulation/wine-staging)
elif $(has_version ">=app-emulation/wine-vanilla-5.9"); then
WINE_VERSION=$(best_version app-emulation/wine-vanilla)
else
die "${P} requires a wine version newer than 5.9 to build."
fi

WINEGPP=$(equery f $WINE_VERSION | grep /usr/bin | grep wineg++)
WINEGCC=$(equery f $WINE_VERSION | grep /usr/bin | grep winegcc)

WINEGPP=${WINEGPP/"/usr/bin/"/}
WINEGCC=${WINEGCC/"/usr/bin/"/}
fi
}

src_prepare() {
if use dxvk-config; then
PATCHES+=(
Expand Down Expand Up @@ -124,6 +142,16 @@ src_prepare() {
-e "s!@LDFLAGS@!$(_meson_env_array "${LDFLAGS}")!" \
build-wine$(bits).txt \
|| die "sed failed"

# Newer dxvk versions need winegcc 5.9 to build,
# so I'll use the latest version of winegcc.
if [[ ${PV} == "9999" ]]; then
sed -i \
-e "s!winegcc!$WINEGCC!" \
-e "s!wineg++!$WINEGPP!" \
build-wine$(bits).txt \
|| die "sed failed"
fi
}

multilib_foreach_abi bootstrap_dxvk
Expand Down

0 comments on commit 5f5237a

Please sign in to comment.