From ef4c93d0827c7f624bce9952ea5ec49c8f0171db Mon Sep 17 00:00:00 2001 From: jc_gargma Date: Thu, 30 Jan 2020 11:16:34 -0800 Subject: Rebuild against boost 1.72 Added hotfixes for2 zen and unicode --- PKGBUILD | 18 +++++++++++------- missing-includes.patch | 23 +++++++++++++++++++++++ zen2-workaround.patch | 29 +++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 7 deletions(-) create mode 100644 missing-includes.patch create mode 100644 zen2-workaround.patch diff --git a/PKGBUILD b/PKGBUILD index d2cbe02..9d8e929 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: jc_gargma # Maintainer (Arch): Sven-Hendrik Haase # Contributor (Arch): t3ddy -# Contributor (Arch): Adrián Chaves Fernández (Gallaecio) +# Contributor (Arch): Adrián Chaves Fernández (Gallaecio) # # I maintain this because: # Arch version lacks additional optimization and hardening flags @@ -9,7 +9,7 @@ pkgname=0ad pkgver=a23.1 _pkgver=0.0.23b-alpha -pkgrel=7 +pkgrel=8 pkgdesc="Cross-platform, 3D and historically-based real-time strategy game" arch=('x86_64') url="https://play0ad.com/" @@ -18,15 +18,19 @@ depends=('binutils' 'boost-libs' 'curl' 'enet' 'libogg' 'libpng' 'libvorbis' 'libxml2' 'openal' 'sdl2' 'wxgtk' 'zlib' 'libgl' '0ad-data' 'glu' 'gloox' 'miniupnpc' 'libminiupnpc.so' 'icu' 'nspr' 'libsodium') makedepends=('boost' 'cmake' 'mesa' 'zip' 'python2' 'libsm') -source=("https://releases.wildfiregames.com/$pkgname-$_pkgver-unix-build.tar.xz") - #"https://code.wildfiregames.com/file/data/3fjmeh3urwrljudvr5jt/PHID-FILE-aas5xivla4iia52w5i2d/D2353.diff") -sha512sums=('82934313c46c4fd89e3841d5bbf901904abbd2108e9749529d7282bd24ac53b9e6878681c06e6019f4d8ec0e425c28300b0aafc9610a66a331777ffb58ed6135') +source=(https://releases.wildfiregames.com/$pkgname-$_pkgver-unix-build.tar.xz + zen2-workaround.patch + missing-includes.patch) +b2sums=('db7d6bf1a2bb084870b914cf974bfdb19812ff6f9391e5bc5213ae215fc670b77bd4508a5432aa3e47bf327bd37d4bb14961ab3332b165b53327c3f01a935ac1' + 'c3569351f855c2e528add0789261bfc4bc41a248af885db65b828027294932dd4ab20ef42f29a86401adaabc3c55809ed2e1c89c268719554444b5f73f56e0d8' + '0ec294936fbe185fc172d39813b2d11ea2c1958b022155fb43809731378bb6b8294ccb4648432f6a9cc9e615ecda9a414f01a6cce258c7ea49306f4fd6fc49c3') prepare() { cd "$srcdir/$pkgname-$_pkgver/" sed -i "s/env python/env python2/g" libraries/source/cxxtest-4.4/bin/cxxtestgen - #patch -Np0 -i "$srcdir"/D2353.diff + patch -Np0 -i "$srcdir"/zen2-workaround.patch + patch -Np1 -i "$srcdir"/missing-includes.patch } build() { @@ -60,7 +64,7 @@ package() { install -Dm755 binaries/system/pyrogenesis "${pkgdir}/usr/bin" install -Dm755 binaries/system/*.so "${pkgdir}/usr/lib/0ad" - cp -r binaries/data/l10n/ ${pkgdir}/usr/share/${pkgname}/data/ + cp -r binaries/data/l10n/ "${pkgdir}/usr/share/${pkgname}/data/" install -Dm755 build/resources/${pkgname}.sh "${pkgdir}/usr/bin/${pkgname}" install -Dm644 build/resources/${pkgname}.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop" diff --git a/missing-includes.patch b/missing-includes.patch new file mode 100644 index 0000000..c1dea08 --- /dev/null +++ b/missing-includes.patch @@ -0,0 +1,23 @@ +diff -upr 0ad-0.0.23b-alpha.orig/source/ps/CLogger.h 0ad-0.0.23b-alpha/source/ps/CLogger.h +--- 0ad-0.0.23b-alpha.orig/source/ps/CLogger.h 2016-11-23 13:18:37.000000000 +0200 ++++ 0ad-0.0.23b-alpha/source/ps/CLogger.h 2020-01-28 07:37:03.437447311 +0200 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + #include "ps/ThreadUtil.h" + #include "third_party/cppformat/format.h" +diff -upr 0ad-0.0.23b-alpha.orig/source/ps/Profiler2GPU.cpp 0ad-0.0.23b-alpha/source/ps/Profiler2GPU.cpp +--- 0ad-0.0.23b-alpha.orig/source/ps/Profiler2GPU.cpp 2018-03-10 11:58:53.000000000 +0200 ++++ 0ad-0.0.23b-alpha/source/ps/Profiler2GPU.cpp 2020-01-28 07:54:47.144787893 +0200 +@@ -20,6 +20,8 @@ + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + ++#include ++ + #include "precompiled.h" + + #include "Profiler2GPU.h" diff --git a/zen2-workaround.patch b/zen2-workaround.patch new file mode 100644 index 0000000..ff15362 --- /dev/null +++ b/zen2-workaround.patch @@ -0,0 +1,29 @@ +------------------------------------------------------------------------ +r23262 | Imarok | 2019-12-19 18:52:47 +0200 (Thu, 19 Dec 2019) | 9 lines + +Workaround for L3 cache detection of Ryzen 3000 + +This code is planned to get refactored or removed anyway, so just do a cheap workaround. + +Reviewed by: Imarok +Fixes: #4360 +Differential Revision: https://code.wildfiregames.com/D2353 + + + +Index: source/lib/sysdep/arch/x86_x64/cache.cpp +=================================================================== +--- source/lib/sysdep/arch/x86_x64/cache.cpp (revision 23261) ++++ source/lib/sysdep/arch/x86_x64/cache.cpp (revision 23262) +@@ -89,7 +89,8 @@ + static const size_t associativityTable[16] = + { + 0, 1, 2, 0, 4, 0, 8, 0, +- 16, 0, 32, 48, 64, 96, 128, x86_x64::Cache::fullyAssociative ++ // TODO: The second '16' does not obey to the specifications and is only a workaround. For a correct implementation please look here: https://community.amd.com/thread/244207 ++ 16, 16, 32, 48, 64, 96, 128, x86_x64::Cache::fullyAssociative + }; + + static x86_x64::Cache L2Cache(u32 reg, x86_x64::Cache::Type type) + +------------------------------------------------------------------------ -- cgit v1.2.1