summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gentoo.org>2021-08-04 15:25:36 -0700
committerMatt Turner <mattst88@gentoo.org>2021-08-04 15:28:09 -0700
commit139cd7a38152835009c149085aad04e53ddc4e1c (patch)
treeb4893b2c51870eeb76f15a25dd501483ff0b5fd8 /dev-cpp/gstreamermm
parentmedia-libs/mesa: Version bump to 21.2.0 (diff)
downloadgentoo-139cd7a38152835009c149085aad04e53ddc4e1c.tar.gz
gentoo-139cd7a38152835009c149085aad04e53ddc4e1c.tar.bz2
gentoo-139cd7a38152835009c149085aad04e53ddc4e1c.zip
dev-cpp/gstreamermm: Add patch to build with gcc-11
Closes: https://bugs.gentoo.org/786444 Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'dev-cpp/gstreamermm')
-rw-r--r--dev-cpp/gstreamermm/files/gstreamermm-1.10.0-no-volatile.patch17
-rw-r--r--dev-cpp/gstreamermm/gstreamermm-1.10.0.ebuild4
2 files changed, 21 insertions, 0 deletions
diff --git a/dev-cpp/gstreamermm/files/gstreamermm-1.10.0-no-volatile.patch b/dev-cpp/gstreamermm/files/gstreamermm-1.10.0-no-volatile.patch
new file mode 100644
index 000000000000..ede9f910ae14
--- /dev/null
+++ b/dev-cpp/gstreamermm/files/gstreamermm-1.10.0-no-volatile.patch
@@ -0,0 +1,17 @@
+https://bugs.gentoo.org/786444
+
+g_once_init_enter(void*) should NOT be passed a volatile argument:
+https://developer.gnome.org/glib/stable/glib-Threads.html#g-once-init-enter
+"While location has a volatile qualifier, this is a historical
+artifact and the pointer passed to it should not be volatile."
+--- gstreamermm-1.10.0/gstreamer/gstreamermm/register.h.orig 2017-10-20 12:26:46.000000000 +0300
++++ gstreamermm-1.10.0/gstreamer/gstreamermm/register.h 2021-05-25 17:52:13.031337753 +0300
+@@ -110,7 +110,7 @@
+ /* The typedef for GType may be gulong or gsize, depending on the
+ * system and whether the compiler is c++ or not. The g_once_init_*
+ * functions always take a gsize * though ... */
+- static volatile gsize gonce_data = 0;
++ static gsize gonce_data = 0;
+ if (g_once_init_enter (&gonce_data)) {
+ GTypeInfo info;
+
diff --git a/dev-cpp/gstreamermm/gstreamermm-1.10.0.ebuild b/dev-cpp/gstreamermm/gstreamermm-1.10.0.ebuild
index 6fdef7109be2..fced073bba0a 100644
--- a/dev-cpp/gstreamermm/gstreamermm-1.10.0.ebuild
+++ b/dev-cpp/gstreamermm/gstreamermm-1.10.0.ebuild
@@ -40,6 +40,10 @@ DEPEND="${RDEPEND}
# Installs reference docs into /usr/share/doc/gstreamermm-1.0/
# but that's okay, because the rest of dev-cpp/*mm stuff does the same
+PATCHES=(
+ "${FILESDIR}"/${P}-no-volatile.patch
+)
+
src_prepare() {
if ! use examples; then
# don't waste time building examples