-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wine-cachyos-opt: version 9.0-20241115, build with clang/llvm
- Loading branch information
1 parent
79e6819
commit 5e7753f
Showing
3 changed files
with
35 additions
and
1,163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
# Contributor: Giovanni Scafora <[email protected]> | ||
|
||
pkgname=wine-cachyos-opt | ||
_srctag=9.0-20241031 | ||
_srctag=9.0-20241115 | ||
pkgver=${_srctag//-/.} | ||
pkgrel=1 | ||
epoch=2 | ||
|
@@ -19,7 +19,6 @@ source=(wine-cachyos::git+https://github.com/CachyOS/wine-cachyos.git#tag=cachyo | |
30-win32-aliases.conf | ||
wine-binfmt.conf) | ||
source+=( | ||
wine-optical-flow.patch | ||
) | ||
validpgpkeys=(5AC1A08B03BD7A313E0A955AF5E6E9EEB9461DD7 | ||
DA23579A74D4AD9AF9D3F945CEFAC8EAAF17519D) | ||
|
@@ -38,7 +37,7 @@ depends=( | |
libxi lib32-libxi | ||
gettext lib32-gettext | ||
freetype2 lib32-freetype2 | ||
gcc-libs lib32-gcc-libs | ||
llvm-libs lib32-llvm-libs | ||
libpcap lib32-libpcap | ||
desktop-file-utils | ||
) | ||
|
@@ -47,8 +46,10 @@ depends+=( | |
wayland lib32-wayland | ||
) | ||
|
||
makedepends=(autoconf bison perl flex mingw-w64-gcc | ||
makedepends=(autoconf bison perl flex clang lld | ||
git | ||
python | ||
llvm lib32-llvm | ||
giflib lib32-giflib | ||
gnutls lib32-gnutls | ||
libxinerama lib32-libxinerama | ||
|
@@ -113,7 +114,6 @@ prepare() { | |
git config user.email "[email protected]" | ||
git config user.name "wine cachyos" | ||
git tag wine-9.0 --annotate -m "$pkgver" --force | ||
patch -Np1 -i "$srcdir"/wine-optical-flow.patch | ||
./dlls/winevulkan/make_vulkan -x vk.xml | ||
./tools/make_specfiles | ||
./tools/make_requests | ||
|
@@ -122,35 +122,32 @@ prepare() { | |
} | ||
|
||
build() { | ||
# Doesn't compile without remove these flags as of 4.10 | ||
export CFLAGS="$CFLAGS -ffat-lto-objects" | ||
export CC="clang" | ||
export CXX="clang++" | ||
|
||
local -a split=($CFLAGS) | ||
local -A flags | ||
for opt in "${split[@]}"; do flags["${opt%%=*}"]="${opt##*=}"; done | ||
local march="${flags["-march"]:-nocona}" | ||
local mtune="generic" #"${flags["-mtune"]:-core-avx2}" | ||
local mtune="${flags["-mtune"]:-core-avx2}" | ||
|
||
# From Proton | ||
OPTIMIZE_FLAGS="-O3 -march=$march -mtune=$mtune -mfpmath=sse -pipe -fno-semantic-interposition" | ||
SANITY_FLAGS="-fwrapv -fno-strict-aliasing" | ||
WARNING_FLAGS="-Wno-incompatible-pointer-types" | ||
COMMON_FLAGS="$OPTIMIZE_FLAGS $SANITY_FLAGS $WARNING_FLAGS -s" | ||
|
||
COMMON_LDFLAGS="-Wl,-O1,--sort-common,--as-needed" | ||
LTO_FLAGS="-fuse-linker-plugin -fdevirtualize-at-ltrans -flto-partition=one -flto -Wl,-flto" | ||
COMMON_FLAGS="$OPTIMIZE_FLAGS $SANITY_FLAGS $WARNING_FLAGS" | ||
|
||
export LDFLAGS="$COMMON_LDFLAGS $LTO_FLAGS" | ||
export CROSSLDFLAGS="$COMMON_LDFLAGS -Wl,--file-alignment,4096" | ||
export LDFLAGS="-Wl,-O1,--sort-common,--as-needed" | ||
export CROSSLDFLAGS="-Wl,/FILEALIGN:4096,/OPT:REF,/OPT:ICF" | ||
|
||
cd "$srcdir" | ||
|
||
msg2 "Building Wine-64..." | ||
|
||
export CFLAGS="$COMMON_FLAGS -mcmodel=small $LTO_FLAGS" | ||
export CXXFLAGS="$COMMON_FLAGS -mcmodel=small -std=c++17 $LTO_FLAGS" | ||
export CROSSCFLAGS="$COMMON_FLAGS -mcmodel=small" | ||
export CROSSCXXFLAGS="$COMMON_FLAGS -mcmodel=small -std=c++17" | ||
export CFLAGS="$COMMON_FLAGS -mcmodel=small" | ||
export CXXFLAGS="$COMMON_FLAGS -mcmodel=small -std=c++17" | ||
export CROSSCFLAGS="$CFLAGS" | ||
export CROSSCXXFLAGS="$CXXFLAGS" | ||
export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/share/pkgconfig" | ||
cd "$srcdir/${pkgname//-opt}-64-build" | ||
../${pkgname//-opt}/configure \ | ||
|
@@ -159,7 +156,7 @@ build() { | |
--with-x \ | ||
--with-wayland \ | ||
--with-gstreamer \ | ||
--with-mingw \ | ||
--with-mingw=clang \ | ||
--with-alsa \ | ||
--without-oss \ | ||
--disable-winemenubuilder \ | ||
|
@@ -172,18 +169,18 @@ build() { | |
msg2 "Building Wine-32..." | ||
|
||
# Disable AVX instead of using 02, for 32bit | ||
export CFLAGS="$COMMON_FLAGS -mstackrealign -mno-avx $LTO_FLAGS" | ||
export CXXFLAGS="$COMMON_FLAGS -mstackrealign -mno-avx -std=c++17 $LTO_FLAGS" | ||
export CROSSCFLAGS="$COMMON_FLAGS -mstackrealign -mno-avx" | ||
export CROSSCXXFLAGS="$COMMON_FLAGS -mstackrealign -mno-avx -std=c++17" | ||
export CFLAGS="$COMMON_FLAGS -mstackrealign" | ||
export CXXFLAGS="$COMMON_FLAGS -mstackrealign -std=c++17" | ||
export CROSSCFLAGS="$CFLAGS" | ||
export CROSSCXXFLAGS="$CXXFLAGS" | ||
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig:/usr/share/pkgconfig" | ||
cd "$srcdir/${pkgname//-opt}-32-build" | ||
../${pkgname//-opt}/configure \ | ||
--prefix=/opt/"${pkgname//-opt}" \ | ||
--with-x \ | ||
--with-wayland \ | ||
--with-gstreamer \ | ||
--with-mingw \ | ||
--with-mingw=clang \ | ||
--with-alsa \ | ||
--without-oss \ | ||
--disable-winemenubuilder \ | ||
|
@@ -210,15 +207,14 @@ package() { | |
dlldir="$pkgdir/opt/${pkgname//-opt}/lib/wine" install | ||
|
||
|
||
i686-w64-mingw32-strip --strip-unneeded "$pkgdir"/opt/"${pkgname//-opt}"/lib32/wine/i386-windows/*.{dll,exe} | ||
x86_64-w64-mingw32-strip --strip-unneeded "$pkgdir"/opt/"${pkgname//-opt}"/lib/wine/x86_64-windows/*.{dll,exe} | ||
llvm-strip --strip-unneeded "$pkgdir"/opt/"${pkgname//-opt}"/lib32/wine/i386-windows/*.{dll,exe} | ||
llvm-strip --strip-unneeded "$pkgdir"/opt/"${pkgname//-opt}"/lib/wine/x86_64-windows/*.{dll,exe} | ||
|
||
find "$pkgdir"/opt/"${pkgname//-opt}"/lib{,32}/wine -iname "*.a" -delete | ||
find "$pkgdir"/opt/"${pkgname//-opt}"/lib{,32}/wine -iname "*.def" -delete | ||
} | ||
|
||
# vim:set ts=8 sts=2 sw=2 et: | ||
b2sums=('07db0f26144e00738fbbdeff3a96c303a62c706fa56d346d8c4b5a4956697fb9a05f7a91ae1235bdb922a8ec89ebf85479e7fdc5a99a19a02ea7bde4f5416d66' | ||
b2sums=('a60f80f5ebc8ac7e855b18f6f4614d3b080bee06eaaedda4a3ff83d485197d79f0fe0a1847992b0e44b13eafdf991e2fccf719c065f32298e1e60f261dbb722d' | ||
'45db34fb35a679dc191b4119603eba37b8008326bd4f7d6bd422fbbb2a74b675bdbc9f0cc6995ed0c564cf088b7ecd9fbe2d06d42ff8a4464828f3c4f188075b' | ||
'e9de76a32493c601ab32bde28a2c8f8aded12978057159dd9bf35eefbf82f2389a4d5e30170218956101331cf3e7452ae82ad0db6aad623651b0cc2174a61588' | ||
'3c4516dd44c8bbec45fc30e75c45e3a87ca6d0275f22e1ba8a9b9a423768ea789166140519cceae3c8e24476d1d9acab5439075b073c3422c4fead4fa7a18b88') | ||
'e9de76a32493c601ab32bde28a2c8f8aded12978057159dd9bf35eefbf82f2389a4d5e30170218956101331cf3e7452ae82ad0db6aad623651b0cc2174a61588') |
Oops, something went wrong.