diff options
author | Sam James <sam@gentoo.org> | 2022-11-10 04:57:16 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-11-10 05:09:21 +0000 |
commit | a4ae230be03c2f8ab6ed0e2d53f431d5bd649dbb (patch) | |
tree | ac5b6ed631686685ce07b3c4ac093cfc33a56ac7 | |
parent | app-admin/sysstat: Stabilize 12.7.1 ppc, #880673 (diff) | |
download | gentoo-a4ae230be03c2f8ab6ed0e2d53f431d5bd649dbb.tar.gz gentoo-a4ae230be03c2f8ab6ed0e2d53f431d5bd649dbb.tar.bz2 gentoo-a4ae230be03c2f8ab6ed0e2d53f431d5bd649dbb.zip |
app-admin/procinfo-ng: fix build w/ clang, -Wformat-security
It's a lazy fix but upstream is dead and surprisingly other
distros still package this. Fix -Wformat-security while at it.
Closes: https://bugs.gentoo.org/719790
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | app-admin/procinfo-ng/files/procinfo-ng-2.0.304-wformat-security.patch | 11 | ||||
-rw-r--r-- | app-admin/procinfo-ng/procinfo-ng-2.0.304-r2.ebuild (renamed from app-admin/procinfo-ng/procinfo-ng-2.0.304-r1.ebuild) | 17 |
2 files changed, 24 insertions, 4 deletions
diff --git a/app-admin/procinfo-ng/files/procinfo-ng-2.0.304-wformat-security.patch b/app-admin/procinfo-ng/files/procinfo-ng-2.0.304-wformat-security.patch new file mode 100644 index 000000000000..315983c9af30 --- /dev/null +++ b/app-admin/procinfo-ng/files/procinfo-ng-2.0.304-wformat-security.patch @@ -0,0 +1,11 @@ +--- a/procinfo.cpp ++++ b/procinfo.cpp +@@ -211,7 +211,7 @@ int mainLoop(bool perSecond, bool showTotals, bool showTotalsMem, bool fullScree + try { + rows = getNetStats(perSecond, showTotals, skipIfaces, elapsed); + } catch (string exceptionMessage) { +- print(exceptionMessage.c_str()); ++ print("%s", exceptionMessage.c_str()); + } + print("\n"); + prettyPrint(rows, rowWidth, true); diff --git a/app-admin/procinfo-ng/procinfo-ng-2.0.304-r1.ebuild b/app-admin/procinfo-ng/procinfo-ng-2.0.304-r2.ebuild index c1fe7c224965..d9384bee0dd8 100644 --- a/app-admin/procinfo-ng/procinfo-ng-2.0.304-r1.ebuild +++ b/app-admin/procinfo-ng/procinfo-ng-2.0.304-r2.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 -inherit autotools +inherit autotools flag-o-matic DESCRIPTION="Completely rewrite of the old system monitoring app procinfo" HOMEPAGE="https://sourceforge.net/projects/procinfo-ng/" @@ -13,17 +13,26 @@ LICENSE="|| ( GPL-2 LGPL-2.1 )" SLOT="0" KEYWORDS="amd64 ~hppa x86" -RDEPEND="sys-libs/ncurses:0=" +RDEPEND="sys-libs/ncurses:=" DEPEND="${RDEPEND}" BDEPEND="virtual/pkgconfig" PATCHES=( "${FILESDIR}"/${P}-autotools.patch "${FILESDIR}"/${P}-man.patch + "${FILESDIR}"/${P}-wformat-security.patch ) src_prepare() { default + mv configure.{in,ac} || die eautoreconf } + +src_configure() { + # bug #719790 + append-cxxflags -std=c++03 + + default +} |