commit:     8d43d1f453e06fb9108e2f89edb0633cafc803ae
Author:     Martin Dummer <martin.dummer <AT> gmx <DOT> net>
AuthorDate: Sun May 16 11:02:40 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Thu Jun  3 07:01:12 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d43d1f4

media-plugins/vdr-epgsearch: version bump and gcc-11 fix

Closes: https://bugs.gentoo.org/789402
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Martin Dummer <martin.dummer <AT> gmx.net>
Closes: https://github.com/gentoo/gentoo/pull/20833
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 media-plugins/vdr-epgsearch/Manifest               |  1 +
 ...vdr-epgsearch-2.4.0_p20210426_gcc11-const.patch | 18 ++++
 ...-epgsearch-2.4.0_p20210426_gcc11-warnings.patch | 58 +++++++++++++
 .../vdr-epgsearch-2.4.0_p20210426.ebuild           | 97 ++++++++++++++++++++++
 4 files changed, 174 insertions(+)

diff --git a/media-plugins/vdr-epgsearch/Manifest 
b/media-plugins/vdr-epgsearch/Manifest
index 6a9f4de9ed4..a2859941876 100644
--- a/media-plugins/vdr-epgsearch/Manifest
+++ b/media-plugins/vdr-epgsearch/Manifest
@@ -1,2 +1,3 @@
 DIST vdr-epgsearch-2.2.0.tgz 472502 BLAKE2B 
f98053d95a6fe56aff48bd3e86ae8a37166b3b8556fe3500c956901cb3f8d19c5792b157606d372392b7387c05a72f4d664881a27bbd5b9484640d8de73b8673
 SHA512 
c0fef60069addc3cca82535c22b7e1f73f01de7466bc6d0b837ba34df7a7dd0fe2cbf7e9b9bc36a523a75a3db18889a1ff9040fb2647c889ea74666067c3a1e4
 DIST vdr-epgsearch-2.4.0_p20200402.tar.gz 479998 BLAKE2B 
04e83bd2361743669baba7b10a27fab91f22115b81fe69e9252cc5ecd94fb0fda55d8b6ce3fcaeb08e779f07d46d26e37026d1732d6b38c03385c659eacd5ab0
 SHA512 
586b369a25c32bbf2d33e68997e7298ad7fda50ac78da5321c848a74d91753a51e6f47d70ef6893ca980bfa2c9f167defd611464729ca4ebf704247e8e37a065
+DIST vdr-epgsearch-2.4.0_p20210426.tar.gz 481490 BLAKE2B 
71c336f2f8838c435ca439a61be58884ef001954cf33fe99c1b20987baaa207e74b5a032f3fa9543f58b53157ecfabcd7fca08f7ebf49c015ba6893e7e6f7759
 SHA512 
4260ebbd3c18dd66b18ff7d05480a1affd0ba9a4dd130cf23e93cd7085218ebb8f60f5733ee1f616b74618ea68a367a001d330a60294faced7e04d4f10a5ffa3

diff --git 
a/media-plugins/vdr-epgsearch/files/vdr-epgsearch-2.4.0_p20210426_gcc11-const.patch
 
b/media-plugins/vdr-epgsearch/files/vdr-epgsearch-2.4.0_p20210426_gcc11-const.patch
new file mode 100644
index 00000000000..b0d756a73b4
--- /dev/null
+++ 
b/media-plugins/vdr-epgsearch/files/vdr-epgsearch-2.4.0_p20210426_gcc11-const.patch
@@ -0,0 +1,18 @@
+the following change to const is necessary since gcc-11
+
+thanks to seahawk1986 @ vdr-portal.de
+https://www.vdr-portal.de/forum/index.php?thread/134005-vdr-2-4-6-kompiliert-mit-gcc-11-0-0-nicht/&postID=1340496#post1340496
+
+Signed-off-by: Martin Dummer <[email protected]>
+
+--- a/conflictcheck.h
++++ b/conflictcheck.h
+@@ -73,7 +73,7 @@
+ class TimerObjSort
+ {
+ public:
+-    bool operator()(cConflictCheckTimerObj* a, cConflictCheckTimerObj* b) {
++    bool operator()(const cConflictCheckTimerObj* a, const 
cConflictCheckTimerObj* b) const {
+         return (a->Compare(*b) < 0);
+     }
+ };

diff --git 
a/media-plugins/vdr-epgsearch/files/vdr-epgsearch-2.4.0_p20210426_gcc11-warnings.patch
 
b/media-plugins/vdr-epgsearch/files/vdr-epgsearch-2.4.0_p20210426_gcc11-warnings.patch
new file mode 100644
index 00000000000..fb5e672cf0e
--- /dev/null
+++ 
b/media-plugins/vdr-epgsearch/files/vdr-epgsearch-2.4.0_p20210426_gcc11-warnings.patch
@@ -0,0 +1,58 @@
+the following change removes a bunch of warnings since gcc-11
+
+afuzzy.c: In function ‘int afuzzy_checkSUB(const char*, AFUZZY*)’:
+afuzzy.c:197:19: warning: ISO C++17 does not allow ‘register’ storage class 
specifier [-Wregister]
+
+Signed-off-by: Martin Dummer <[email protected]>
+--- a/afuzzy.c
++++ b/afuzzy.c
+@@ -194,8 +194,8 @@
+ 
******************************************************************************/
+ int afuzzy_checkSUB(const char *t, AFUZZY *fuzzy)
+ {
+-    register char c;
+-    register int j, d;
++    char c;
++    int j, d;
+ 
+     /* For eficciency this case should be little bit optimized */
+     if (!fuzzy->k) {
+@@ -207,7 +207,7 @@
+ 
+             if (R1 & fuzzy->mask_ok)
+                 return 1;
+-        } /* end for (register int j = 0 ... */
++        } /* end for (int j = 0 ... */
+         return 0;
+     }
+ 
+@@ -229,16 +229,16 @@
+ 
+         memcpy(fuzzy->R, fuzzy->R1, fuzzy->r_size);
+ 
+-    } /* end for (register int j = 0 ... */
++    } /* end for (int j = 0 ... */
+ 
+     return 0;
+ }
+ 
+ static int afuzzy_checkFLT(const char *t, AFUZZY *fuzzy)
+ {
+-    register Uint FilterR = 0;
+-    register Uint FilterR1;
+-    register int j;
++    Uint FilterR = 0;
++    Uint FilterR1;
++    int j;
+ 
+     for (j = 0; t[j] != '\0'; j++) {
+         FilterR1 = (((FilterR << (fuzzy->k + 1)) | fuzzy->filter_shift) &
+@@ -246,7 +246,7 @@
+         if (FilterR1 & fuzzy->filter_ok)
+             return 1;
+         FilterR = FilterR1;
+-    } /* end for (register int j = 0 ... */
++    } /* end for (int j = 0 ... */
+ 
+     return 0;
+ }

diff --git a/media-plugins/vdr-epgsearch/vdr-epgsearch-2.4.0_p20210426.ebuild 
b/media-plugins/vdr-epgsearch/vdr-epgsearch-2.4.0_p20210426.ebuild
new file mode 100644
index 00000000000..14836980108
--- /dev/null
+++ b/media-plugins/vdr-epgsearch/vdr-epgsearch-2.4.0_p20210426.ebuild
@@ -0,0 +1,97 @@
+# Copyright 2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit vdr-plugin-2
+
+DESCRIPTION="VDR plugin: create timers from epg content based on saved search 
expressions"
+HOMEPAGE="http://winni.vdr-developer.org/epgsearch/index_eng.html";
+GIT_COMMIT_ID="fc309e3841d204554dba001b6f01fcc4c4cc0fc6"
+SRC_URI="https://projects.vdr-developer.org/git/vdr-plugin-epgsearch.git/snapshot/vdr-plugin-epgsearch-${GIT_COMMIT_ID}.tar.gz
 -> ${P}.tar.gz"
+S="${WORKDIR}/vdr-plugin-epgsearch-${GIT_COMMIT_ID}"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="conflictcheckonly epgsearchonly pcre quicksearch tre"
+REQUIRED_USE="?? ( pcre tre )"
+
+DEPEND="
+       >=media-video/vdr-2.4
+       pcre? ( dev-libs/libpcre )
+       tre? ( dev-libs/tre )"
+RDEPEND="${DEPEND}"
+BDEPEND="
+       sys-apps/groff
+       dev-lang/perl"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-2.4.0_makefile.patch"
+       "${FILESDIR}/${PN}-2.4.0_docsrc2man-no-gzip.patch"
+       "${FILESDIR}/${P}_gcc11-const.patch"
+       "${FILESDIR}/${P}_gcc11-warnings.patch"
+)
+
+QA_FLAGS_IGNORED="
+       usr/lib/vdr/plugins/libvdr-.*
+       usr/lib64/vdr/plugins/libvdr-.*
+       usr/bin/createcats"
+
+src_prepare() {
+       # remove untranslated .po files
+       rm 
"${S}"/po/{ca_ES,da_DK,el_GR,et_EE,hr_HR,hu_HU,nn_NO,pl_PL,pt_PT,ro_RO,ru_RU,sl_SI,sv_SE,tr_TR}.po
 \
+               || die "cannot remove untranslated .po files"
+
+       if ! use conflictcheckonly; then
+               sed -e "s:install-\$(PLUGIN3)::" -i Makefile || die "cannot 
modify Makefile"
+       fi
+
+       if ! use epgsearchonly; then
+               sed -e "s:install-\$(PLUGIN2)::" -i Makefile || die "cannot 
modify Makefile"
+       fi
+
+       if ! use quicksearch; then
+               sed -e "s:install-\$(PLUGIN4)::" -i Makefile || die "cannot 
modify Makefile"
+       fi
+
+       vdr-plugin-2_src_prepare
+
+       fix_vdr_libsi_include conflictcheck.c
+
+       # install conf-file disabled
+       sed -e '/^Menu/s:^:#:' -i conf/epgsearchmenu.conf || die "cannot modify 
epgsearchmenu.conf"
+
+       # Get rid of the broken symlink
+       rm README || die "cannot remove broken symlink"
+}
+
+src_compile() {
+       BUILD_PARAMS="SENDMAIL=/usr/bin/sendmail AUTOCONFIG=0"
+
+       if use pcre; then
+               BUILD_PARAMS+=" REGEXLIB=pcre"
+               einfo "Using pcre for regexp searches"
+       fi
+
+       if use tre; then
+               BUILD_PARAMS+=" REGEXLIB=tre"
+               einfo "Using tre for unlimited fuzzy searches"
+       fi
+
+       vdr-plugin-2_src_compile
+}
+
+src_install() {
+       local DOCS=( conf/*.templ HISTORY* README.Translators )
+       vdr-plugin-2_src_install
+
+       diropts -m 755 -o vdr -g vdr
+       insopts -m 644 -o vdr -g vdr
+       keepdir /etc/vdr/plugins/epgsearch
+       insinto /etc/vdr/plugins/epgsearch
+       doins conf/*
+
+       doman man/en/*
+       doman -i18n=de man/de/*
+}

Reply via email to