summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Bornkessel <hd_brummy@gentoo.org>2021-05-02 19:53:06 +0200
committerJoerg Bornkessel <hd_brummy@gentoo.org>2021-05-02 19:53:51 +0200
commitd4a283d7069c7204e6b6b1bbc608c663deb8ec02 (patch)
tree5662bb927f87481d3b37993ee6c2804ddaf403bc
parentmedia-plugins/vdr-suspendoutput: missing die fixed (diff)
downloadgentoo-d4a283d7069c7204e6b6b1bbc608c663deb8ec02.tar.gz
gentoo-d4a283d7069c7204e6b6b1bbc608c663deb8ec02.tar.bz2
gentoo-d4a283d7069c7204e6b6b1bbc608c663deb8ec02.zip
media-plugins/vdr-systeminfo: gcc-11 reladet fix
Closes: https://bugs.gentoo.org/787707 Package-Manager: Portage-3.0.18, Repoman-3.0.2 Signed-off-by: Joerg Bornkessel <hd_brummy@gentoo.org>
-rw-r--r--media-plugins/vdr-systeminfo/files/vdr-systeminfo-0.1.4_gcc11.patch35
-rw-r--r--media-plugins/vdr-systeminfo/vdr-systeminfo-0.1.4-r1.ebuild (renamed from media-plugins/vdr-systeminfo/vdr-systeminfo-0.1.4.ebuild)9
2 files changed, 41 insertions, 3 deletions
diff --git a/media-plugins/vdr-systeminfo/files/vdr-systeminfo-0.1.4_gcc11.patch b/media-plugins/vdr-systeminfo/files/vdr-systeminfo-0.1.4_gcc11.patch
new file mode 100644
index 000000000000..76f70289e6df
--- /dev/null
+++ b/media-plugins/vdr-systeminfo/files/vdr-systeminfo-0.1.4_gcc11.patch
@@ -0,0 +1,35 @@
+https://bugs.gentoo.org/787707
+
+fix declaring of max/min
+
+Signed-off-by: Joerg Bornkessel <hd_brummy@gentoo.org> (02 Mar 2021)
+diff -Naur systeminfo-0.1.4.orig/displayinfo.c systeminfo-0.1.4/displayinfo.c
+--- systeminfo-0.1.4.orig/displayinfo.c 2021-05-02 17:41:51.702653108 +0200
++++ systeminfo-0.1.4/displayinfo.c 2021-05-02 17:43:41.404653108 +0200
+@@ -173,7 +173,7 @@
+ if (fval1 == 0.0)
+ osdline = cString::sprintf("%s:\t%.1f GB / %.1f GB", pname, fval1, fval2);
+ else {
+- int frac = min(BARLEN,max(0, int((fval1-fval2)*BARLEN/fval1)));
++ int frac = std::min(BARLEN,std::max(0, int((fval1-fval2)*BARLEN/fval1)));
+ memset(progressbar + 1,'|',frac);
+ memset(progressbar + 1 + frac ,' ', BARLEN - frac);
+
+@@ -188,7 +188,7 @@
+ if (fval1 == 0.0)
+ osdline = cString::sprintf("%s:\t%.1f kB / %.1f kB", pname, fval1, fval2);
+ else {
+- int frac = min(BARLEN,max(0, int((fval1-fval2)*BARLEN/fval1)));
++ int frac = std::min(BARLEN,std::max(0, int((fval1-fval2)*BARLEN/fval1)));
+ memset(progressbar + 1,'|',frac);
+ memset(progressbar + 1 + frac ,' ', BARLEN - frac);
+
+@@ -209,7 +209,7 @@
+ // check for CPU%
+ else if (1 == sscanf(systeminfo, "%a[a-zA-Z,/0-9 ]: CPU%%", &pname) && NULL != strstr(systeminfo, "CPU%")) {
+ fval2 = GetCpuPct();
+- int frac = min(BARLEN,max(0, int(fval2*BARLEN/100.0)));
++ int frac = std::min(BARLEN,std::max(0, int(fval2*BARLEN/100.0)));
+ memset(progressbar + 1,'|',frac);
+ memset(progressbar + 1 + frac ,' ', BARLEN - frac);
+
diff --git a/media-plugins/vdr-systeminfo/vdr-systeminfo-0.1.4.ebuild b/media-plugins/vdr-systeminfo/vdr-systeminfo-0.1.4-r1.ebuild
index 83e1cc72dd81..9d09ab352892 100644
--- a/media-plugins/vdr-systeminfo/vdr-systeminfo-0.1.4.ebuild
+++ b/media-plugins/vdr-systeminfo/vdr-systeminfo-0.1.4-r1.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
inherit vdr-plugin-2
@@ -23,7 +23,10 @@ src_prepare() {
vdr-plugin-2_src_prepare
# Makefile correction, .eclass fails in some Makefiles
- sed -e "s:(VDRINCDIR):(VDRDIR)/include:" -i Makefile
+ sed -e "s:(VDRINCDIR):(VDRDIR)/include:" -i Makefile || die
+
+ # 787707
+ eapply "${FILESDIR}/${P}_gcc11.patch"
}
src_install() {