freeglut: add patch for clang@11: (#25438)

This commit is contained in:
Valentin Volkl 2021-08-16 18:07:38 +02:00 committed by GitHub
parent 3773185639
commit 39cf1b2736
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 12 deletions

View file

@ -1,11 +0,0 @@
--- a/CMakeLists.txt 2019-09-25 15:43:34.000000000 -0500
+++ b/CMakeLists.txt 2020-01-31 09:26:24.104743210 -0600
@@ -302,7 +302,7 @@
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCC)
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fcommon")
IF(NOT(ANDROID OR BLACKBERRY OR FREEGLUT_WAYLAND))
# not setting -ansi as EGL/KHR headers doesn't support it
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic")

View file

@ -26,7 +26,14 @@ class Freeglut(CMakePackage, SourceforgePackage):
depends_on('xrandr')
depends_on('inputproto')
patch('common-gcc10.patch', when="@3.2.1: %gcc@10.0:")
# freeglut fails to build with -fno-common (default with newer compilers)
# see https://bugs.gentoo.org/705840 and https://github.com/dcnieho/FreeGLUT/pull/76
patch('https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/freeglut/files/freeglut-3.2.1-gcc10-fno-common.patch?id=f9102571b69d9fc05471a592fda252681fdfdef1',
sha256='898e8fb314cbe728d791e9ea69829313143cda039c008f0ca06c1b5730922aa7',
when="@3.2.1: %gcc@10.0:")
patch('https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/freeglut/files/freeglut-3.2.1-gcc10-fno-common.patch?id=f9102571b69d9fc05471a592fda252681fdfdef1',
sha256='898e8fb314cbe728d791e9ea69829313143cda039c008f0ca06c1b5730922aa7',
when="@3.2.1: %clang@11.0:")
def cmake_args(self):
return [