diff options
author | Jimi Huotari <chiitoo@gentoo.org> | 2020-05-10 10:16:34 +0300 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2020-05-10 13:41:35 +0200 |
commit | 2f867c799b979a69bce09868a6a5a55f73566bb2 (patch) | |
tree | c1f5c4b40b661168cd5c3f62467842909d3eadd2 /media-video/obs-studio | |
parent | media-gfx/iscan: fix building with gcc 10 (diff) | |
download | gentoo-2f867c799b979a69bce09868a6a5a55f73566bb2.tar.gz gentoo-2f867c799b979a69bce09868a6a5a55f73566bb2.tar.bz2 gentoo-2f867c799b979a69bce09868a6a5a55f73566bb2.zip |
media-video/obs-studio: fix build with GCC-10
Bug: https://bugs.gentoo.org/708628
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Jimi Huotari <chiitoo@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/15736
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-video/obs-studio')
-rw-r--r-- | media-video/obs-studio/files/obs-studio-25.0.8-gcc-10-build.patch | 30 | ||||
-rw-r--r-- | media-video/obs-studio/obs-studio-25.0.8.ebuild | 2 |
2 files changed, 32 insertions, 0 deletions
diff --git a/media-video/obs-studio/files/obs-studio-25.0.8-gcc-10-build.patch b/media-video/obs-studio/files/obs-studio-25.0.8-gcc-10-build.patch new file mode 100644 index 000000000000..352ea2c937c7 --- /dev/null +++ b/media-video/obs-studio/files/obs-studio-25.0.8-gcc-10-build.patch @@ -0,0 +1,30 @@ +From c7f84f8fc4e90ef779a204ac268f5ee1a962e324 Mon Sep 17 00:00:00 2001 +From: Jimi Huotari <chiitoo@gentoo.org> +Date: Sun, 9 Feb 2020 05:23:55 +0200 +Subject: [PATCH] deps/glad: Fix build with GCC-10 + +GCC-10 defaults to '-fno-common' [1], which triggers issues with +defining global variables multiple times. To fix the build, use +'extern' to turn the first definition of 'gladGetProcAddressPtr' +into a declaration. + +1. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678 + +Closes https://github.com/obsproject/obs-studio/issues/2828 +--- + deps/glad/src/glad_glx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/deps/glad/src/glad_glx.c b/deps/glad/src/glad_glx.c +index 7c55b9fc01..58086f1039 100644 +--- a/deps/glad/src/glad_glx.c ++++ b/deps/glad/src/glad_glx.c +@@ -35,7 +35,7 @@ static void* libGL; + + #ifndef __APPLE__ + typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*); +-PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr; ++extern PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr; + #endif + + static diff --git a/media-video/obs-studio/obs-studio-25.0.8.ebuild b/media-video/obs-studio/obs-studio-25.0.8.ebuild index 33ca63777c33..a97ec6617d42 100644 --- a/media-video/obs-studio/obs-studio-25.0.8.ebuild +++ b/media-video/obs-studio/obs-studio-25.0.8.ebuild @@ -78,6 +78,8 @@ DEPEND=" " RDEPEND="${DEPEND}" +PATCHES=( "${FILESDIR}/${PN}-25.0.8-gcc-10-build.patch" ) + pkg_setup() { use python && python-single-r1_pkg_setup } |