summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorStelios Tsampas2024-01-26 00:26:04 +0200
committerStelios Tsampas2024-01-26 00:26:04 +0200
commitddc98e182a72141e49d426f3ef380703684632e0 (patch)
tree6446976afa0ff7708e0ccdde1f22072a3c4e649e
parenta5d312ce866302422dc4136de3fa9bdef29ea1a9 (diff)
downloadaur-ddc98e182a72141e49d426f3ef380703684632e0.tar.gz
[proton*] Remove personal builds
-rw-r--r--PKGBUILD37
-rw-r--r--PKGBUILD.personal276
2 files changed, 15 insertions, 298 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a83f7869b8a8..3577c78f0d81 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,17 +1,12 @@
# Maintainer: loathingkernel <loathingkernel _a_ gmail _d_ com>
-# By default use the same optimizations used by Valve and ignore makepkg,
-# to avoid build failures due to options incompatible with MingW cross-compilation.
-# If you set this switch to 'true', you are on your own.
-: ${_system_cflags:=false}
-
pkgname=proton
_srctag=8.0-5c
_commit=
pkgver=8.0.5.3 # pkgver=${_srctag//-/.}
_geckover=2.47.3
_monover=8.1.0
-pkgrel=1
+pkgrel=2
epoch=1
pkgdesc="Compatibility tool for Steam Play based on Wine and additional components"
url="https://github.com/ValveSoftware/Proton"
@@ -94,9 +89,6 @@ source=(
0004-AUR-Strip-binaries-early.patch
0005-AUR-Fix-hwnd-redefinition.patch
)
-# Optional patches
-source+=(
-)
noextract=(
wine-gecko-${_geckover}-{x86,x86_64}.tar.xz
wine-mono-${_monover}-x86.tar.xz
@@ -178,14 +170,16 @@ build() {
--proton-sdk-image="" \
--build-name="${pkgname}"
- if [[ x"${_system_cflags::1}" != "xt" ]] ; then
- unset CFLAGS CXXFLAGS RUSTFLAGS LDFLAGS
- fi
- : ${CFLAGS:="-O2 -march=nocona -mtune=core-avx2 -pipe"}
- : ${CXXFLAGS:="-O2 -march=nocona -mtune=core-avx2 -pipe"}
- : ${RUSTFLAGS:="-C opt-level=2 -C target-cpu=nocona"}
- : ${LDFLAGS:="-Wl,-O1,--sort-common,--as-needed"}
- export CFLAGS CXXFLAGS RUSTFLAGS LDFLAGS
+ local -a split=($CFLAGS)
+ local -A flags
+ for opt in "${split[@]}"; do flags["${opt%%=*}"]="${opt##*=}"; done
+ local march="${flags["-march"]:-nocona}"
+ local mtune="${flags["-mtune"]:-core-avx2}"
+
+ CFLAGS="-O2 -march=$march -mtune=$mtune -pipe -fno-semantic-interposition"
+ CXXFLAGS="-O2 -march=$march -mtune=$mtune -pipe -fno-semantic-interposition"
+ RUSTFLAGS:="-C opt-level=2 -C target-cpu=$march"
+ LDFLAGS:="-Wl,-O1,--sort-common,--as-needed"
# If using -march=native and the CPU supports AVX, launching a d3d9
# game can cause an Unhandled exception. The cause seems to be the
@@ -198,8 +192,10 @@ build() {
# https://bugs.winehq.org/show_bug.cgi?id=43516
# AVX is "hard" disabled for 32bit in any case.
# AVX2 for both 32bit and 64bit is disabled below.
- export CFLAGS+=" -mno-avx2"
- export CXXFLAGS+=" -mno-avx2"
+ CFLAGS+=" -mno-avx2"
+ CXXFLAGS+=" -mno-avx2"
+
+ export CFLAGS CXXFLAGS RUSTFLAGS LDFLAGS
export RUSTUP_TOOLCHAIN=stable
export CARGO_HOME="${SRCDEST}"/proton-cargo
@@ -267,7 +263,4 @@ sha256sums=('SKIP'
'01ce9791c768ca861c0ea5ae34c95b92647886e9ebebd46b89dd459961646d18'
'7b054514740f4f042cc68a97b10d32fead2123c2b9756887e59f66d6f703069f'
'5ec6cd2229a4a6ca66af1e669fa581667d459da3cc1c826828e4d9d91b2a9fc8')
-# Optional patches
-sha256sums+=(
-)
diff --git a/PKGBUILD.personal b/PKGBUILD.personal
deleted file mode 100644
index fe865ecd55e2..000000000000
--- a/PKGBUILD.personal
+++ /dev/null
@@ -1,276 +0,0 @@
-# Maintainer: loathingkernel <loathingkernel _a_ gmail _d_ com>
-
-# By default use the same optimizations used by Valve and ignore makepkg,
-# to avoid build failures due to options incompatible with MingW cross-compilation.
-# If you set this switch to 'true', you are on your own.
-: ${_system_cflags:=false}
-
-pkgname=proton
-_srctag=8.0-5c
-_commit=
-pkgver=8.0.5.3 # pkgver=${_srctag//-/.}
-_geckover=2.47.3
-_monover=8.1.0
-pkgrel=1
-epoch=1
-pkgdesc="Compatibility tool for Steam Play based on Wine and additional components"
-url="https://github.com/ValveSoftware/Proton"
-arch=(x86_64 x86_64_v3)
-options=(!staticlibs !lto !debug emptydirs)
-license=('custom')
-
-depends=(
- attr lib32-attr
- fontconfig lib32-fontconfig
- libxcursor lib32-libxcursor
- libxrandr lib32-libxrandr
- libxi lib32-libxi
- gettext lib32-gettext
- freetype2 lib32-freetype2
- gcc-libs lib32-gcc-libs
- libpcap lib32-libpcap
- lzo lib32-lzo
- libxkbcommon lib32-libxkbcommon
- libvpx lib32-libvpx
- 'sdl2>=2.0.16' 'lib32-sdl2>=2.0.16'
- libsoup lib32-libsoup
- libgudev lib32-libgudev
- desktop-file-utils
- python
- steam-native-runtime
-)
-
-makedepends=(autoconf bison perl flex mingw-w64-gcc
- git wget rsync mingw-w64-tools lld nasm
- meson cmake fontforge afdko python-pefile
- glslang vulkan-headers
- clang
- giflib lib32-giflib
- gnutls lib32-gnutls
- libxinerama lib32-libxinerama
- libxcomposite lib32-libxcomposite
- libxxf86vm lib32-libxxf86vm
- v4l-utils lib32-v4l-utils
- alsa-lib lib32-alsa-lib
- libxcomposite lib32-libxcomposite
- mesa lib32-mesa
- mesa-libgl lib32-mesa-libgl
- opencl-icd-loader lib32-opencl-icd-loader
- libpulse lib32-libpulse
- gtk3 lib32-gtk3
- gst-plugins-base-libs lib32-gst-plugins-base-libs
- vulkan-icd-loader lib32-vulkan-icd-loader
- 'sdl2>=2.0.16' 'lib32-sdl2>=2.0.16'
- rust lib32-rust-libs
- libgphoto2
- opencl-headers
-)
-
-optdepends=(
- giflib lib32-giflib
- gnutls lib32-gnutls
- v4l-utils lib32-v4l-utils
- libpulse lib32-libpulse
- alsa-plugins lib32-alsa-plugins
- alsa-lib lib32-alsa-lib
- libxcomposite lib32-libxcomposite
- libxinerama lib32-libxinerama
- opencl-icd-loader lib32-opencl-icd-loader
- gtk3 lib32-gtk3
- gst-plugins-base-libs lib32-gst-plugins-base-libs
- vulkan-icd-loader lib32-vulkan-icd-loader
- libgphoto2
-)
-
-makedepends=(${makedepends[@]} ${depends[@]})
-install=${pkgname}.install
-source=(
- proton::git+https://github.com/ValveSoftware/Proton.git#tag=proton-${_srctag}
- https://dl.winehq.org/wine/wine-gecko/${_geckover}/wine-gecko-${_geckover}-x86{,_64}.tar.xz
- https://github.com/madewokherd/wine-mono/releases/download/wine-mono-${_monover}/wine-mono-${_monover}-x86.tar.xz
- 0001-AUR-Pkgbuild-changes.patch
- 0002-AUR-Do-not-update-cargo-crates.patch
- 0003-AUR-Copy-DLL-dependencies-of-32bit-libvkd3d-dlls-int.patch
- 0004-AUR-Strip-binaries-early.patch
- 0005-AUR-Fix-hwnd-redefinition.patch
-)
-# Optional patches
-source+=(
-)
-noextract=(
- wine-gecko-${_geckover}-{x86,x86_64}.tar.xz
- wine-mono-${_monover}-x86.tar.xz
-)
-
-_make_wrappers () {
- # _arch prefix gcc ld as strip
- local _i686=( "i686" "-m32" "-melf_i386" "--32" "elf32-i386")
- local _x86_64=("x86_64" "-m64" "-melf_x86_64" "--64" "elf64-x86-64")
- local _opts=(_i686 _x86_64)
- declare -n _opt
- for _opt in "${_opts[@]}"; do
- for l in ar ranlib nm; do
- ln -s /usr/bin/gcc-$l wrappers/${_opt[0]}-pc-linux-gnu-$l
- done
- for t in gcc g++; do
- install -Dm755 /dev/stdin wrappers/${_opt[0]}-pc-linux-gnu-$t <<EOF
-#!/usr/bin/bash
-$(which ccache 2> /dev/null) /usr/bin/$t ${_opt[1]} "\$@"
-EOF
- done
- install -Dm755 /dev/stdin wrappers/${_opt[0]}-pc-linux-gnu-ld <<EOF
-#!/usr/bin/bash
-/usr/bin/ld ${_opt[2]} "\$@"
-EOF
- install -Dm755 /dev/stdin wrappers/${_opt[0]}-pc-linux-gnu-as <<EOF
-#!/usr/bin/bash
-/usr/bin/as ${_opt[3]} "\$@"
-EOF
- install -Dm755 /dev/stdin wrappers/${_opt[0]}-pc-linux-gnu-strip <<EOF
-#!/usr/bin/bash
-/usr/bin/strip -F ${_opt[4]} "\$@"
-EOF
- done
-}
-
-prepare() {
-
- # Provide wrappers to compiler tools
- rm -rf wrappers && mkdir wrappers
- _make_wrappers
-
- [ ! -d build ] && mkdir build
-
- cd proton
-
- [ ! -d contrib ] && mkdir -p contrib
- mv "$srcdir"/wine-gecko-${_geckover}-x86{,_64}.tar.xz contrib/
- mv "$srcdir"/wine-mono-${_monover}-x86.tar.xz contrib/
-
- # Explicitly set origin URL for submodules using relative paths
- git remote set-url origin https://github.com/ValveSoftware/Proton.git
- git submodule update --init --filter=tree:0 --recursive
-
- for rustlib in gst-plugins-rs media-converter; do
- pushd $rustlib
- export RUSTUP_TOOLCHAIN=stable
- export CARGO_HOME="${SRCDEST}"/proton-cargo
- cargo update
- cargo fetch --locked --target "i686-unknown-linux-gnu"
- cargo fetch --locked --target "x86_64-unknown-linux-gnu"
- popd
- done
-
- patch -p1 -i "$srcdir"/0001-AUR-Pkgbuild-changes.patch
- #patch -p1 -i "$srcdir"/0002-AUR-Do-not-update-cargo-crates.patch
- patch -p1 -i "$srcdir"/0003-AUR-Copy-DLL-dependencies-of-32bit-libvkd3d-dlls-int.patch
- patch -p1 -i "$srcdir"/0004-AUR-Strip-binaries-early.patch
- patch -p1 -i "$srcdir"/0005-AUR-Fix-hwnd-redefinition.patch
-}
-
-build() {
- export PATH="$(pwd)/wrappers:$PATH"
-
- cd build
- ROOTLESS_CONTAINER="" \
- ../proton/configure.sh \
- --container-engine="none" \
- --proton-sdk-image="" \
- --build-name="${pkgname}"
-
- if [[ x"${_system_cflags::1}" != "xt" ]] ; then
- unset CFLAGS CXXFLAGS RUSTFLAGS LDFLAGS
- fi
- : ${CFLAGS:="-O2 -march=haswell -mtune=haswell -pipe -fno-semantic-interposition"}
- : ${CXXFLAGS:="-O2 -march=haswell -mtune=haswell -pipe -fno-semantic-interposition"}
- : ${RUSTFLAGS:="-C opt-level=2 -C target-cpu=haswell"}
- : ${LDFLAGS:="-Wl,-O1,--sort-common,--as-needed"}
- export CFLAGS CXXFLAGS RUSTFLAGS 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 O2),
- # all tested archictures from sandybridge to haswell are affected.
- # Since Wine 5.16 AVX is supported. Testing showed 32bit applications
- # crashing with AVX regardless, but 64bit applications worked just fine.
- # Relevant Wine issues
- # https://bugs.winehq.org/show_bug.cgi?id=45289
- # https://bugs.winehq.org/show_bug.cgi?id=43516
- # AVX is "hard" disabled for 32bit in any case.
- # AVX2 for both 32bit and 64bit is disabled below.
- export CFLAGS+=" -mno-avx2"
- export CXXFLAGS+=" -mno-avx2"
-
- export RUSTUP_TOOLCHAIN=stable
- export CARGO_HOME="${SRCDEST}"/proton-cargo
- export WINEESYNC=0
- export WINEFSYNC=0
- export DISPLAY=
- SUBJOBS=$([[ "$MAKEFLAGS" =~ -j\ *([1-9][0-9]*) ]] && echo "${BASH_REMATCH[1]}" || echo "$(nproc)") \
- make -j1 dist
-}
-
-package() {
- cd build
-
- # Delete the intermediate build directories to free space (mostly for my github actions)
- rm -rf dst-* obj-* src-* pfx-*
-
- local _compatdir="$pkgdir/usr/share/steam/compatibilitytools.d"
- mkdir -p "$_compatdir/${pkgname}"
- rsync --delete -arx dist/* "$_compatdir/${pkgname}"
- cp -f dist/version "$_compatdir/${pkgname}/dist"
-
- # For some unknown to me reason, 32bit vkd3d (not vkd3d-proton) always links
- # to libgcc_s_dw2-1.dll no matter what linker options I tried.
- # Copy the required dlls into the package, they will be copied later into the prefix
- # by the patched proton script. Bundling the helps to avoid making mingw-w64-gcc package
- # a runtime dependency.
- cp /usr/i686-w64-mingw32/bin/{libgcc_s_dw2-1.dll,libwinpthread-1.dll} \
- "$_compatdir/${pkgname}"/dist/lib/vkd3d/
- cp /usr/x86_64-w64-mingw32/bin/{libgcc_s_seh-1.dll,libwinpthread-1.dll} \
- "$_compatdir/${pkgname}"/dist/lib64/vkd3d/
-
- mkdir -p "$pkgdir/usr/share/licenses/${pkgname}"
- mv "$_compatdir/${pkgname}"/LICENSE{,.OFL} \
- "$pkgdir/usr/share/licenses/${pkgname}"
-
- cd "$_compatdir/${pkgname}/dist"
- # NOTE: Reduces size by 40 MiB, worth it
- i686-w64-mingw32-strip --strip-unneeded \
- $(find lib/wine \( -iname fakedlls -or -iname i386-windows \) -prune -false -or -iname "*.dll" -or -iname "*.exe")
- x86_64-w64-mingw32-strip --strip-unneeded \
- $(find lib64/wine \( -iname fakedlls -or -iname x86_64-windows \) -prune -false -or -iname "*.dll" -or -iname "*.exe")
-
- # NOTE: Reduces size by 38 MiB, worth it
- local _geckodir="share/wine/gecko/wine-gecko-${_geckover}"
- i686-w64-mingw32-strip --strip-unneeded \
- $(find "$_geckodir"-x86 -iname "*.dll" -or -iname "*.exe")
- x86_64-w64-mingw32-strip --strip-unneeded \
- $(find "$_geckodir"-x86_64 -iname "*.dll" -or -iname "*.exe")
-
- # NOTE: Reduces size by 0.16 MiB, not worth it
- local _monodir="share/wine/mono/wine-mono-${_monover}"
- i686-w64-mingw32-strip --strip-unneeded \
- $(find "$_monodir"/lib/mono -iname "*.dll" -or -iname "*.exe")
- i686-w64-mingw32-strip --strip-unneeded \
- "$_monodir"/lib/x86/*.dll \
- $(find "$_monodir" -iname "*x86.dll" -or -iname "*x86.exe")
- x86_64-w64-mingw32-strip --strip-unneeded \
- "$_monodir"/lib/x86_64/*.dll \
- $(find "$_monodir" -iname "*x86_64.dll" -or -iname "*x86_64.exe")
-}
-
-sha256sums=('SKIP'
- '08d318f3dd6440a8a777cf044ccab039b0d9c8809991d2180eb3c9f903135db3'
- '0beac419c20ee2e68a1227b6e3fa8d59fec0274ed5e82d0da38613184716ef75'
- '4e3e8a40729e4c9e3e9e651cebe4f1aed8f9a4d22e991e6cd24608687f0eedd4'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP'
- 'SKIP')
-# Optional patches
-sha256sums+=(
-)
-