Skip to content

Commit

Permalink
media-plugins/vdr-skinelchi: compile fix for not declared min/max
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/703994
Package-Manager: Portage-2.3.83, Repoman-2.3.20
Signed-off-by: Joerg Bornkessel <[email protected]>
  • Loading branch information
hd-brummy committed Jan 5, 2020
1 parent 8fac046 commit 84014af
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
taken from debian vdr repo
this will fix
https://bugs.gentoo.org/703994

Reviewed-by: Joerg Bornkessel <[email protected]> ( 2020 Jan 05 )
Index: b/DisplayChannel.c
===================================================================
--- a/DisplayChannel.c
+++ b/DisplayChannel.c
@@ -724,7 +724,7 @@
}
else {
time_t t = time(NULL);
- int seen = max(0, min(y9 - y6a - 1, int((y9 - y6a) * double(t - Present->StartTime()) / Present->Duration())));
+ int seen = std::max(0, std::min(y9 - y6a - 1, int((y9 - y6a) * double(t - Present->StartTime()) / Present->Duration())));
osd->DrawRectangle(x4 + Gap, y6a + seen, x4 + Gap + ScrollWidth - 1, y9 - 1, Theme.Color(clrChannelTimebarRest));
osd->DrawRectangle(x4 + Gap, y6a, x4 + Gap + ScrollWidth - 1, y6a + seen - 1, Theme.Color(clrChannelTimebarSeen));
changed = true;
41 changes: 41 additions & 0 deletions media-plugins/vdr-skinelchi/vdr-skinelchi-0.3.0-r2.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit vdr-plugin-2

DESCRIPTION="VDR Skin Plugin: skinelchi"
HOMEPAGE="http://firefly.vdr-developer.org/skinelchi"
SRC_URI="http://firefly.vdr-developer.org/skinelchi/${P}.tar.bz2"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~amd64 ~x86"

DEPEND="media-video/vdr"

src_prepare() {
vdr-plugin-2_src_prepare

#bug #599148
append-cxxflags -std=gnu++11

# disable imagemagick support, broken ...
sed -i "${S}"/Makefile -e \
"s:SKINELCHI_HAVE_IMAGEMAGICK = 1:SKINELCHI_HAVE_IMAGEMAGICK = 0:"

sed -i "${S}"/DisplayChannel.c \
-e "s:/hqlogos::" \
-e "s:/logos::"

# wrong sed in vdr-plugin-2.eclass?
sed -e "s:INCLUDES += -I\$(VDRINCDIR):INCLUDES += -I\$(VDRINCDIR)/include:" \
-i Makefile

# gcc-6 warnings
sed -e "s:auto_ptr:unique_ptr:" -i services/epgsearch_services.h

# wrt bug 703994
eapply "${FILESDIR}/${P}_min_max_from_stl.patch"
}

0 comments on commit 84014af

Please sign in to comment.