summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStelios Tsampas2023-03-06 20:24:54 +0200
committerStelios Tsampas2023-03-06 20:24:54 +0200
commitf126713d0b19df6d16169ff8b145f96cfe676c12 (patch)
treeac1597dc0ab5435bea727c87188be324c53ddff9
parent2fc5cc8c65655e1957ad8b31b7a839e08d7bb975 (diff)
downloadaur-f126713d0b19df6d16169ff8b145f96cfe676c12.tar.gz
[dxvk-nvapi-mingw] move git PKGBUILD into its own package
-rw-r--r--PKGBUILD.live134
1 files changed, 0 insertions, 134 deletions
diff --git a/PKGBUILD.live b/PKGBUILD.live
deleted file mode 100644
index 67e6e109d72c..000000000000
--- a/PKGBUILD.live
+++ /dev/null
@@ -1,134 +0,0 @@
-# Maintainer: loathingkernel <loathingkernel @at gmail .dot com>
-
-pkgname=dxvk-mingw
-pkgver=2.0.r0.g8f8a9369
-_asyncver=master
-pkgrel=1
-pkgdesc='Vulkan-based implementation of D3D9, D3D10 and D3D11 for Linux / Wine, MingW version'
-arch=('x86_64')
-url="https://github.com/doitsujin/dxvk"
-license=('zlib/libpng')
-depends=('vulkan-icd-loader' 'lib32-vulkan-icd-loader' 'bash')
-makedepends=('ninja' 'meson>=0.43' 'glslang' 'git' 'mingw-w64-gcc')
-provides=('dxvk' 'd9vk' "dxvk=$pkgver")
-conflicts=('dxvk' 'd9vk')
-options=(!lto !staticlibs)
-source=(
- "git+https://github.com/doitsujin/dxvk.git"
- "git+https://github.com/KhronosGroup/Vulkan-Headers.git"
- "git+https://github.com/KhronosGroup/SPIRV-Headers.git"
- "git+https://gitlab.freedesktop.org/JoshuaAshton/libdisplay-info.git"
- "dxvk-async-${_asyncver}.patch::https://raw.githubusercontent.com/Sporif/dxvk-async/${_asyncver}/dxvk-async.patch"
- "dxvk-async-conf.patch"
- "dxvk-extraopts.patch"
- "setup_dxvk"
-)
-
-pkgver() {
- cd dxvk
- printf "%s" "$(git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/v//g')"
-}
-
-prepare() {
- cd dxvk
-
- git revert -n 7644776f7a3bc6a097f20c1465708acf88ad215f
- git revert -n 64cb1ad208f80b11400eef779e99fec223754098
-
- git submodule init include/{vulkan,spirv} subprojects/libdisplay-info
- git submodule set-url include/vulkan "$srcdir/Vulkan-Headers"
- git submodule set-url include/spirv "$srcdir/SPIRV-Headers"
- git submodule set-url subprojects/libdisplay-info "$srcdir/libdisplay-info"
- git -c protocol.file.allow=always submodule update include/{vulkan,spirv} subprojects/libdisplay-info
-
- # Uncomment to enable dxvk async patch.
- # Enable at your own risk. If you don't know what it is,
- # and its implications, leave it as is. You have been warned.
- # I am not liable if anything happens to you by using it.
- #patch -p1 -i "$srcdir"/dxvk-async-${_asyncver}.patch
- #patch -p1 -i "$srcdir"/dxvk-async-conf.patch
-
- # By default export FLAGS used by proton and ignore makepkg
- # This overrides FLAGS from makepkg.conf, if you comment these you are on your own
- # If you want the "best" possible optimizations for your system you can use
- # `-march=native` and remove the `-mtune=core-avx2` option.
- export CFLAGS="-O2 -march=haswell -mtune=haswell -pipe -fno-semantic-interposition"
- export CXXFLAGS="-O2 -march=haswell -mtune=haswell -pipe -fno-semantic-interposition"
- export LDFLAGS="-Wl,-O1,--sort-common,--as-needed"
-
- # Uncomment to enable extra optimizations
- # Patch crossfiles with extra optimizations from makepkg.conf
- patch -p1 -i "$srcdir"/dxvk-extraopts.patch
- local cross_cflags="$CFLAGS"
- local cross_cxxflags="$CXXFLAGS"
- local cross_ldflags="$LDFLAGS"
-
- # If using -march=native and the CPU supports AVX, launching a d3d9
- # game can cause an Unhandled exception. The cause seems to be the
- # combination of AVX instructions and tree vectorization (implied by O3),
- # all tested archictures from sandybridge to haswell are affected.
- # Disabling AVX (and AVX2 as a side-effect).
- # Since Wine 5.16 AVX is supported. Testing showed 32bit applications
- # crashing with AVX regardless, but 64bit applications worked just fine.
- # So disable AVX only for the 32bit binaries and AVX2 for the 64bit.
- # AVX2 seems to degrade performance. So disregard the above.
- # Relevant Wine issues
- # https://bugs.winehq.org/show_bug.cgi?id=45289
- # https://bugs.winehq.org/show_bug.cgi?id=43516
- cross_cflags+=" -mno-avx2"
- cross_cxxflags+=" -mno-avx2"
-
- # These flags are taken from Proton, I don't know if there are issues with Arch wine.
- cross_cflags+=" -mfpmath=sse -fwrapv -fno-strict-aliasing -gdwarf-2 -gstrict-dwarf"
- cross_cxxflags+=" -mfpmath=sse -fwrapv -fno-strict-aliasing -gdwarf-2 -gstrict-dwarf -std=c++17"
- cross_ldflags+=" -Wl,--file-alignment,4096"
-
- sed -i build-win64.txt \
- -e "s|@CARGS@|\'${cross_cflags// /\',\'}\'|g" \
- -e "s|@CXXARGS@|\'${cross_cxxflags// /\',\'}\'|g" \
- -e "s|@LDARGS@|\'${cross_ldflags// /\',\'}\'|g"
-
- cross_cflags+=" -mstackrealign -mno-avx"
- cross_cxxflags+=" -mstackrealign -mno-avx"
- sed -i build-win32.txt \
- -e "s|@CARGS@|\'${cross_cflags// /\',\'}\'|g" \
- -e "s|@CXXARGS@|\'${cross_cxxflags// /\',\'}\'|g" \
- -e "s|@LDARGS@|\'${cross_ldflags// /\',\'}\'|g"
-}
-
-build() {
- meson setup dxvk "build/x64" \
- --cross-file dxvk/build-win64.txt \
- --prefix "/usr/share/dxvk/x64" \
- --bindir "" --libdir "" \
- --buildtype "plain" \
- --strip
- ninja -C "build/x64" -v
-
- meson setup dxvk "build/x32" \
- --cross-file dxvk/build-win32.txt \
- --prefix "/usr/share/dxvk/x32" \
- --bindir "" --libdir "" \
- --buildtype "plain" \
- --strip
- ninja -C "build/x32" -v
-}
-
-package() {
- DESTDIR="$pkgdir" ninja -C "build/x32" install
- DESTDIR="$pkgdir" ninja -C "build/x64" install
- install -Dm 755 -t "$pkgdir/usr/share/dxvk" dxvk/setup_dxvk.sh
- install -Dm 644 -t "$pkgdir/usr/share/dxvk" dxvk/dxvk.conf
- install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname" dxvk/README.md
- install -Dm 644 -t "$pkgdir/usr/share/licenses/$pkgname" dxvk/LICENSE
- install -Dm 755 -t "$pkgdir/usr/bin" setup_dxvk
-}
-
-sha256sums=('SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'c9c2f02bce1e1e93d511aff73484208456835d4d7601a36ab4524939472fc401'
- 'bcc15521e4c7f966a0192a1dabb7fb4935b33db39344ab5b861f9d81486f1362'
- 'c1f6a18b03d1612b60f8081428f00cfac5e66315fe9d42719f01cf5564deeeff')