From d648afac343e93926af5bfb7bf5a0ce31eb8a655 Mon Sep 17 00:00:00 2001 From: David Seifert Date: Sat, 22 Jun 2019 15:16:22 +0200 Subject: [PATCH] sci-libs/dcmtk: Fix building against GCC 9 Closes: https://bugs.gentoo.org/686592 Package-Manager: Portage-2.3.67, Repoman-2.3.15 Signed-off-by: David Seifert --- sci-libs/dcmtk/dcmtk-3.6.3.ebuild | 3 +- .../dcmtk/files/dcmtk-3.6.3-fix-gcc9.patch | 29 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 sci-libs/dcmtk/files/dcmtk-3.6.3-fix-gcc9.patch diff --git a/sci-libs/dcmtk/dcmtk-3.6.3.ebuild b/sci-libs/dcmtk/dcmtk-3.6.3.ebuild index 463fca72dfb1..b1f261640f62 100644 --- a/sci-libs/dcmtk/dcmtk-3.6.3.ebuild +++ b/sci-libs/dcmtk/dcmtk-3.6.3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -30,6 +30,7 @@ DEPEND="${RDEPEND} PATCHES=( "${FILESDIR}"/${P}-dcmqrdb-cfg.patch "${FILESDIR}"/${P}-nostrip.patch + "${FILESDIR}"/${P}-fix-gcc9.patch ) src_prepare() { diff --git a/sci-libs/dcmtk/files/dcmtk-3.6.3-fix-gcc9.patch b/sci-libs/dcmtk/files/dcmtk-3.6.3-fix-gcc9.patch new file mode 100644 index 000000000000..596a1ae21b95 --- /dev/null +++ b/sci-libs/dcmtk/files/dcmtk-3.6.3-fix-gcc9.patch @@ -0,0 +1,29 @@ +https://bugs.gentoo.org/686592 + +In file included from /var/tmp/portage/sci-libs/dcmtk-3.6.3/work/dcmtk-3.6.3/ofstd/include/dcmtk/ofstd/variadic/variant.h:19, + from /var/tmp/portage/sci-libs/dcmtk-3.6.3/work/dcmtk-3.6.3/ofstd/include/dcmtk/ofstd/ofvriant.h:379, + from /var/tmp/portage/sci-libs/dcmtk-3.6.3/work/dcmtk-3.6.3/ofstd/tests/tvariant.cc:26: +/var/tmp/portage/sci-libs/dcmtk-3.6.3/work/dcmtk-3.6.3/ofstd/include/dcmtk/ofstd/variadic/helpers.h:57:32: error: narrowing conversion of ‘-1’ from ‘int’ to ‘long unsigned int’ [-Wnarrowing] + 57 | : OFintegral_constant {}; + | + +--- a/ofstd/include/dcmtk/ofstd/variadic/helpers.h ++++ b/ofstd/include/dcmtk/ofstd/variadic/helpers.h +@@ -14,6 +14,8 @@ + #ifndef VARIADIC_HELPERS_H + #define VARIADIC_HELPERS_H + ++#include ++ + #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ + + #include "dcmtk/ofstd/oftraits.h" +@@ -54,7 +56,7 @@ + + template + struct OFvariadic_find_type_t +-: OFintegral_constant {}; ++: OFintegral_constant::max()> {}; + + template + struct OFvariadic_find_type -- 2.26.2