[arch-commits] Commit in spring/trunk (2 files)

Evangelos Foutras foutrelis at archlinux.org
Thu May 31 15:08:00 UTC 2018


    Date: Thursday, May 31, 2018 @ 15:08:00
  Author: foutrelis
Revision: 334857

Fix use of reinterpret_cast in constant expression

Added:
  spring/trunk/fix-reinterpret_cast-in-constexpr.patch
Modified:
  spring/trunk/PKGBUILD

-----------------------------------------+
 PKGBUILD                                |    6 ++++++
 fix-reinterpret_cast-in-constexpr.patch |   15 +++++++++++++++
 2 files changed, 21 insertions(+)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-05-31 15:07:22 UTC (rev 334856)
+++ PKGBUILD	2018-05-31 15:08:00 UTC (rev 334857)
@@ -16,9 +16,11 @@
 optdepends=('python2: python-based bots'
             'java-runtime: java-based bots')
 source=(https://downloads.sourceforge.net/sourceforge/springrts/${pkgname}_${pkgver}_src.tar.lzma
+        fix-reinterpret_cast-in-constexpr.patch
         gold-linker.patch
         0001-fix-build-with-curl-7.50.0.patch)
 sha512sums=('be8922e798d7c959c248501494ab61cff625154c109debd324875a4e2a7149748224b6fcb428948f2b4d66cc9e484bc002a63810f55c5f25a499c34a01dfc225'
+            'ba8a6f3031c7507983f2ae10de9f19b27434cd9159df6ce431d1f83b21b37974e8add4bea8bc0d738f88f5bfebdbeeacaeb3964b9db31b5181d12bed66ff2109'
             'd400f9b5055e4a3bddab4a1fc839dc1f35b34e8cd309e3bece53028184250013186480f5ffb60c0b1a7d35844c75c80d2619c9cc8e51be94deca3f44d4d1ec9f'
             'c87954af0192784e6318ceb997a7fb21b3dcc740e5b8a8ed14671ac19923bd0ab6655512fa3d7b17ce0997505b0ad6f51bf0866dbbfe1c0b22cc2b9ba14e8ab1')
 
@@ -25,6 +27,10 @@
 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
+
   # https://springrts.com/mantis/view.php?id=5413
   # patch -Np1 -i ../gold-linker.patch
   #

Added: fix-reinterpret_cast-in-constexpr.patch
===================================================================
--- fix-reinterpret_cast-in-constexpr.patch	                        (rev 0)
+++ fix-reinterpret_cast-in-constexpr.patch	2018-05-31 15:08:00 UTC (rev 334857)
@@ -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<const GLubyte*>(qcriProcName));
+ 
+ 	if (qcriProcAddr == nullptr)
+ 		return false;



More information about the arch-commits mailing list