From fb6cbea841a38b9dedf2ca47f3e54a4ccbdd46f4 Mon Sep 17 00:00:00 2001 From: Chaoting Liu Date: Wed, 19 Sep 2018 02:33:01 +0200 Subject: [PATCH] [skip-ci] spring: update to 104.0 --- spring/PKGBUILD | 21 +++++++++++++------ .../fix-reinterpret_cast-in-constexpr.patch | 15 +++++++++++++ spring/spring.install | 12 ----------- 3 files changed, 30 insertions(+), 18 deletions(-) create mode 100644 spring/fix-reinterpret_cast-in-constexpr.patch delete mode 100644 spring/spring.install diff --git a/spring/PKGBUILD b/spring/PKGBUILD index e4dcee9c8..c833e5c6e 100644 --- a/spring/PKGBUILD +++ b/spring/PKGBUILD @@ -1,7 +1,7 @@ pkgname=spring _pkgname=springrts -pkgver=101.0 -pkgrel=4 +pkgver=104.0 +pkgrel=1 pkgdesc='A 3D real-time-strategy game engine.' arch=('x86_64') url="http://springrts.com/" @@ -11,9 +11,18 @@ depends=('openal' 'glew' 'boost-libs' 'freetype2' 'devil' 'libvorbis' 'sdl2' 'li makedepends=('boost' 'cmake' 'zip' 'xz' 'p7zip' 'python2' 'java-environment' 'mesa') optdepends=('python2: python-based bots' 'java-runtime: java-based bots') -install=spring.install -source=("http://downloads.sourceforge.net/sourceforge/$_pkgname/${pkgname}_${pkgver}_src.tar.lzma") -md5sums=('26d7558c86f0af615211f629eaccffa6') +source=("https://downloads.sourceforge.net/sourceforge/$_pkgname/${pkgname}_${pkgver}_src.tar.lzma" + fix-reinterpret_cast-in-constexpr.patch) +sha256sums=('ceb0bf59f8aac14f2d844f920e898724913326cdf1adf3f10d88ecc317a3ec16' + '982b8a4da8e6ccb8f4f977d7f75de0206ad4ccf488d0843ad37bab34f7e35bca') + +prepare() { + cd spring_$pkgver + + # https://springrts.com/mantis/view.php?id=5781 + # https://github.com/spring/spring/commit/6104061fe3 + patch -Np1 -i ../fix-reinterpret_cast-in-constexpr.patch +} build() { bsdtar -xf ${pkgname}_${pkgver}_src.tar.lzma @@ -33,5 +42,5 @@ package() { make DESTDIR="$pkgdir" install install -d "$pkgdir/etc/spring" - echo '$HOME/.spring' > "$pkgdir/etc/spring/datadir" + echo '$HOME/.local/share/spring' > "$pkgdir/etc/spring/datadir" } diff --git a/spring/fix-reinterpret_cast-in-constexpr.patch b/spring/fix-reinterpret_cast-in-constexpr.patch new file mode 100644 index 000000000..21b25bdee --- /dev/null +++ b/spring/fix-reinterpret_cast-in-constexpr.patch @@ -0,0 +1,15 @@ +diff --git a/rts/Rendering/GL/myGL.cpp b/rts/Rendering/GL/myGL.cpp +index 5abef32ce0..95a786970c 100644 +--- a/rts/Rendering/GL/myGL.cpp ++++ b/rts/Rendering/GL/myGL.cpp +@@ -146,8 +147,8 @@ static bool GetVideoMemInfoMESA(GLint* memInfo) + + typedef PFNGLXQUERYCURRENTRENDERERINTEGERMESAPROC QCRIProc; + +- static constexpr const GLubyte* qcriProcName = (const GLubyte*) "glXQueryCurrentRendererIntegerMESA"; +- static const QCRIProc qcriProcAddr = (QCRIProc) glXGetProcAddress(qcriProcName); ++ static const char qcriProcName[] = "glXQueryCurrentRendererIntegerMESA"; ++ static const QCRIProc qcriProcAddr = (QCRIProc) glXGetProcAddress(reinterpret_cast(qcriProcName)); + + if (qcriProcAddr == nullptr) + return false; diff --git a/spring/spring.install b/spring/spring.install deleted file mode 100644 index 41f09f887..000000000 --- a/spring/spring.install +++ /dev/null @@ -1,12 +0,0 @@ -post_install() { - update-desktop-database -q - update-mime-database usr/share/mime &> /dev/null -} - -post_upgrade() { - post_install $1 -} - -post_remove() { - post_install $1 -}