dev-cpp/gstreamermm: fix compilation with newer gcc
authorMart Raudsepp <leio@gentoo.org>
Wed, 12 Apr 2017 04:36:42 +0000 (07:36 +0300)
committerMart Raudsepp <leio@gentoo.org>
Wed, 12 Apr 2017 04:37:23 +0000 (07:37 +0300)
Also filter out -Werror for tests compilation, but those fail to compile further along then.

Gentoo-bug: 600296

dev-cpp/gstreamermm/files/1.4.3-fix-compile.patch [new file with mode: 0644]
dev-cpp/gstreamermm/gstreamermm-1.4.3.ebuild

diff --git a/dev-cpp/gstreamermm/files/1.4.3-fix-compile.patch b/dev-cpp/gstreamermm/files/1.4.3-fix-compile.patch
new file mode 100644 (file)
index 0000000..6ccf0e1
--- /dev/null
@@ -0,0 +1,23 @@
+From c5006faf05bc4b46767d30f42bcb6157836b7540 Mon Sep 17 00:00:00 2001
+From: Marcin Kolny <marcin.kolny@gmail.com>
+Date: Sat, 17 Sep 2016 22:49:34 +0200
+Subject: Fix warnings
+
+---
+ gstreamer/gstreamermm/check.cc   |  2 +-
+
+leio: Trimmed patch down to only ThrowIf that makes compilation fail with newer gcc, not just warn
+
+diff --git a/gstreamer/gstreamermm/check.cc b/gstreamer/gstreamermm/check.cc
+index d620435..a0d323d 100644
+--- a/gstreamer/gstreamermm/check.cc
++++ b/gstreamer/gstreamermm/check.cc
+@@ -54,7 +54,7 @@ RefPtr<Element> Check::_Check::setup_element (const ustring& factory)
+ 
+     element = ElementFactory::create_element (factory, factory);
+ 
+-    ThrowIf (element, "Could not create a '" + factory + "' element");
++    ThrowIf (!!element, "Could not create a '" + factory + "' element");
+     CheckRefCount (element->gobj(), factory, 1);
+ 
+     return element;
index 463e498f380014eef78f19b9c4280e910a9c1532..4f8e13d9c739ae4c7609f086c57313386c761684 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="5"
@@ -38,12 +38,16 @@ DEPEND="${RDEPEND}
 # but that's okay, because the rest of dev-cpp/*mm stuff does the same
 
 src_prepare() {
+       epatch "${FILESDIR}"/${PV}-fix-compile.patch
+
        if ! use examples; then
                # don't waste time building examples
                sed -e 's/^\(SUBDIRS =.*\)examples\(.*\)$/\1\2/' \
                        -i Makefile.am Makefile.in || die
        fi
 
+       sed -e 's/ -Werror/ /' -i tests/Makefile.am tests/Makefile.in || die
+
        gnome2_src_prepare
        append-cxxflags -std=c++11 #568254 , fixed in master
 }