diff options
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | PKGBUILD | 36 |
2 files changed, 24 insertions, 23 deletions
@@ -10,14 +10,10 @@ pkgbase = dxvk-nvapi-mingw-git makedepends = glslang makedepends = git makedepends = mingw-w64-gcc - depends = vulkan-icd-loader - depends = wine>=4.0rc1 - depends = lib32-vulkan-icd-loader - depends = dxvk - depends = bash provides = dxvk-nvapi-mingw conflicts = dxvk-nvapi-mingw options = !lto + options = !staticlibs source = git+https://github.com/jp7677/dxvk-nvapi.git source = git+https://github.com/KhronosGroup/Vulkan-Headers.git source = dxvk-nvapi-extraopts.patch @@ -30,3 +26,8 @@ pkgbase = dxvk-nvapi-mingw-git sha256sums = 1f4934c5bfcf208e288a0eda2f385f82acc9e78a4b0ac2a77b5af14c64c8e21e pkgname = dxvk-nvapi-mingw-git + depends = vulkan-icd-loader + depends = lib32-vulkan-icd-loader + depends = wine + depends = dxvk + depends = bash @@ -7,11 +7,10 @@ pkgdesc='Alternative NVAPI implementation on top of DXVK. ' arch=('x86_64') url="https://github.com/jp7677/dxvk-nvapi" license=('MIT') -depends=('vulkan-icd-loader' 'wine>=4.0rc1' 'lib32-vulkan-icd-loader' 'dxvk' 'bash') makedepends=('ninja' 'meson>=0.43' 'glslang' 'git' 'mingw-w64-gcc') provides=('dxvk-nvapi-mingw') conflicts=('dxvk-nvapi-mingw') -options=(!lto) +options=(!lto !staticlibs) source=( "git+https://github.com/jp7677/dxvk-nvapi.git" "git+https://github.com/KhronosGroup/Vulkan-Headers.git" @@ -36,17 +35,14 @@ prepare() { # 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. - # `-O2` is adjusted to `-O3` since AVX is disabled export CFLAGS="-O2 -march=nocona -mtune=core-avx2 -pipe" export CXXFLAGS="-O2 -march=nocona -mtune=core-avx2 -pipe" 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-nvapi-extraopts.patch - local cross_cflags="$CFLAGS" - local cross_cxxflags="$CXXFLAGS" - local cross_ldflags="$LDFLAGS" + # These flags are taken from Proton + CFLAGS+=" -mfpmath=sse -fwrapv -fno-strict-aliasing" + CXXFLAGS+=" -mfpmath=sse -fwrapv -fno-strict-aliasing -std=c++17" + LDFLAGS+=" -Wl,--file-alignment,4096" # If using -march=native and the CPU supports AVX, launching a d3d9 # game can cause an Unhandled exception. The cause seems to be the @@ -60,21 +56,24 @@ prepare() { # 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" + CFLAGS+=" -mno-avx2" + 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" + # Uncomment to enable extra optimizations + # Patch crossfiles with extra optimizations from makepkg.conf + patch -p1 -i "$srcdir"/dxvk-nvapi-extraopts.patch + + local cross_ldflags="$LDFLAGS" + local cross_cflags="$CFLAGS -mcmodel=small" + local cross_cxxflags="$CXXFLAGS -mcmodel=small" 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" + local cross_cflags="$CFLAGS -mstackrealign -mno-avx" + local cross_cxxflags="$CXXFLAGS -mstackrealign -mno-avx" sed -i build-win32.txt \ -e "s|@CARGS@|\'${cross_cflags// /\',\'}\'|g" \ -e "s|@CXXARGS@|\'${cross_cxxflags// /\',\'}\'|g" \ @@ -82,7 +81,6 @@ prepare() { } build() { - meson setup dxvk-nvapi "build/x64" \ --cross-file dxvk-nvapi/build-win64.txt \ --prefix "/usr/share/dxvk-nvapi/x64" \ @@ -103,6 +101,8 @@ build() { } package() { + depends=('vulkan-icd-loader' 'lib32-vulkan-icd-loader' 'wine' 'dxvk' 'bash') + DESTDIR="$pkgdir" ninja -C "build/x32" install DESTDIR="$pkgdir" ninja -C "build/x64" install install -Dm 755 -t "$pkgdir/usr/share/dxvk-nvapi" setup_dxvk_nvapi.sh |