commit:     686a9fd142ec10330e8f82e0473dc91b8a1495b8
Author:     Louis Sautier <sbraz <AT> gentoo <DOT> org>
AuthorDate: Sat May  9 13:05:27 2020 +0000
Commit:     Louis Sautier <sbraz <AT> gentoo <DOT> org>
CommitDate: Sat May  9 14:57:32 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=686a9fd1

media-sound/ncmpcpp: fix build with GCC 10

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Acked-by: David Seifert <soap <AT> gentoo.org>
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>

 .../ncmpcpp/files/ncmpcpp-0.8.2-gcc10.patch        | 26 ++++++++++++++++++++++
 media-sound/ncmpcpp/ncmpcpp-0.7.7.ebuild           | 13 ++++++-----
 media-sound/ncmpcpp/ncmpcpp-0.8.2-r1.ebuild        | 11 ++++-----
 3 files changed, 39 insertions(+), 11 deletions(-)

diff --git a/media-sound/ncmpcpp/files/ncmpcpp-0.8.2-gcc10.patch 
b/media-sound/ncmpcpp/files/ncmpcpp-0.8.2-gcc10.patch
new file mode 100644
index 00000000000..466abceecfe
--- /dev/null
+++ b/media-sound/ncmpcpp/files/ncmpcpp-0.8.2-gcc10.patch
@@ -0,0 +1,26 @@
+From 399e0f47008b487df3505476c959b4f42d8bc1b1 Mon Sep 17 00:00:00 2001
+From: Louis Sautier <[email protected]>
+Date: Sat, 9 May 2020 14:31:52 +0200
+Subject: [PATCH] Fix build with GCC 10 by adding missing include
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes the following error:
+./mpdpp.h:438:15: error: ‘runtime_error’ is not a member of ‘std’
+---
+ src/mpdpp.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/mpdpp.h b/src/mpdpp.h
+index a2bb79eb..abd3666c 100644
+--- a/src/mpdpp.h
++++ b/src/mpdpp.h
+@@ -25,6 +25,7 @@
+ #include <exception>
+ #include <random>
+ #include <set>
++#include <stdexcept>
+ #include <vector>
+ 
+ #include <mpd/client.h>

diff --git a/media-sound/ncmpcpp/ncmpcpp-0.7.7.ebuild 
b/media-sound/ncmpcpp/ncmpcpp-0.7.7.ebuild
index 6ca6ada7832..1593220f204 100644
--- a/media-sound/ncmpcpp/ncmpcpp-0.7.7.ebuild
+++ b/media-sound/ncmpcpp/ncmpcpp-0.7.7.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
 DESCRIPTION="featureful ncurses based MPD client inspired by ncmpc"
 HOMEPAGE="https://rybczak.net/ncmpcpp/";
@@ -24,10 +24,11 @@ RDEPEND="
        taglib? ( media-libs/taglib )
        visualizer? ( sci-libs/fftw:3.0= )
 "
-DEPEND="
-       ${RDEPEND}
-       virtual/pkgconfig
-"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+# https://github.com/ncmpcpp/ncmpcpp/pull/385
+PATCHES=( "${FILESDIR}/${PN}-0.8.2-gcc10.patch" )
 
 src_prepare() {
        default
@@ -56,7 +57,7 @@ src_install() {
 pkg_postinst() {
        echo
        elog "Example configuration files have been installed at"
-       elog "${ROOT}usr/share/doc/${PF}"
+       elog "${EROOT}/usr/share/doc/${PF}"
        elog "${P} uses ~/.ncmpcpp/config and ~/.ncmpcpp/bindings"
        elog "as user configuration files."
        echo

diff --git a/media-sound/ncmpcpp/ncmpcpp-0.8.2-r1.ebuild 
b/media-sound/ncmpcpp/ncmpcpp-0.8.2-r1.ebuild
index 55b91f7c614..5b38962ff92 100644
--- a/media-sound/ncmpcpp/ncmpcpp-0.8.2-r1.ebuild
+++ b/media-sound/ncmpcpp/ncmpcpp-0.8.2-r1.ebuild
@@ -23,10 +23,11 @@ RDEPEND="
        taglib? ( media-libs/taglib )
        visualizer? ( sci-libs/fftw:3.0= )
 "
-DEPEND="
-       ${RDEPEND}
-       virtual/pkgconfig
-"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+# https://github.com/ncmpcpp/ncmpcpp/pull/385
+PATCHES=( "${FILESDIR}/${P}-gcc10.patch" )
 
 src_prepare() {
        default
@@ -53,7 +54,7 @@ src_install() {
 pkg_postinst() {
        echo
        elog "Example configuration files have been installed at"
-       elog "${ROOT}/usr/share/doc/${PF}"
+       elog "${EROOT}/usr/share/doc/${PF}"
        elog "${P} uses ~/.ncmpcpp/config and ~/.ncmpcpp/bindings"
        elog "as user configuration files."
        echo

Reply via email to