1 |
commit: 2f867c799b979a69bce09868a6a5a55f73566bb2 |
2 |
Author: Jimi Huotari <chiitoo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 10 07:16:34 2020 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 10 11:41:35 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f867c79 |
7 |
|
8 |
media-video/obs-studio: fix build with GCC-10 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/708628 |
11 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
12 |
Signed-off-by: Jimi Huotari <chiitoo <AT> gentoo.org> |
13 |
Closes: https://github.com/gentoo/gentoo/pull/15736 |
14 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
15 |
|
16 |
.../files/obs-studio-25.0.8-gcc-10-build.patch | 30 ++++++++++++++++++++++ |
17 |
media-video/obs-studio/obs-studio-25.0.8.ebuild | 2 ++ |
18 |
2 files changed, 32 insertions(+) |
19 |
|
20 |
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 |
21 |
new file mode 100644 |
22 |
index 00000000000..352ea2c937c |
23 |
--- /dev/null |
24 |
+++ b/media-video/obs-studio/files/obs-studio-25.0.8-gcc-10-build.patch |
25 |
@@ -0,0 +1,30 @@ |
26 |
+From c7f84f8fc4e90ef779a204ac268f5ee1a962e324 Mon Sep 17 00:00:00 2001 |
27 |
+From: Jimi Huotari <chiitoo@g.o> |
28 |
+Date: Sun, 9 Feb 2020 05:23:55 +0200 |
29 |
+Subject: [PATCH] deps/glad: Fix build with GCC-10 |
30 |
+ |
31 |
+GCC-10 defaults to '-fno-common' [1], which triggers issues with |
32 |
+defining global variables multiple times. To fix the build, use |
33 |
+'extern' to turn the first definition of 'gladGetProcAddressPtr' |
34 |
+into a declaration. |
35 |
+ |
36 |
+1. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678 |
37 |
+ |
38 |
+Closes https://github.com/obsproject/obs-studio/issues/2828 |
39 |
+--- |
40 |
+ deps/glad/src/glad_glx.c | 2 +- |
41 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
42 |
+ |
43 |
+diff --git a/deps/glad/src/glad_glx.c b/deps/glad/src/glad_glx.c |
44 |
+index 7c55b9fc01..58086f1039 100644 |
45 |
+--- a/deps/glad/src/glad_glx.c |
46 |
++++ b/deps/glad/src/glad_glx.c |
47 |
+@@ -35,7 +35,7 @@ static void* libGL; |
48 |
+ |
49 |
+ #ifndef __APPLE__ |
50 |
+ typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*); |
51 |
+-PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr; |
52 |
++extern PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr; |
53 |
+ #endif |
54 |
+ |
55 |
+ static |
56 |
|
57 |
diff --git a/media-video/obs-studio/obs-studio-25.0.8.ebuild b/media-video/obs-studio/obs-studio-25.0.8.ebuild |
58 |
index 33ca63777c3..a97ec6617d4 100644 |
59 |
--- a/media-video/obs-studio/obs-studio-25.0.8.ebuild |
60 |
+++ b/media-video/obs-studio/obs-studio-25.0.8.ebuild |
61 |
@@ -78,6 +78,8 @@ DEPEND=" |
62 |
" |
63 |
RDEPEND="${DEPEND}" |
64 |
|
65 |
+PATCHES=( "${FILESDIR}/${PN}-25.0.8-gcc-10-build.patch" ) |
66 |
+ |
67 |
pkg_setup() { |
68 |
use python && python-single-r1_pkg_setup |
69 |
} |