diff options
author | Martin Dummer <martin.dummer@gmx.net> | 2021-02-27 17:28:54 +0100 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2021-02-27 20:48:54 +0200 |
commit | 07d23eb89e595e56f3dd9de084f139071578ee7f (patch) | |
tree | 87a1af2d48960bfe5408125409ffcd9edf874b56 /media-plugins | |
parent | media-plugins/vdr-epgsearch: fix for 2.4.0_p20200402-r1 (diff) | |
download | gentoo-07d23eb89e595e56f3dd9de084f139071578ee7f.tar.gz gentoo-07d23eb89e595e56f3dd9de084f139071578ee7f.tar.bz2 gentoo-07d23eb89e595e56f3dd9de084f139071578ee7f.zip |
media-plugins/vdr-epgsearch: fix QA+clang issue in 2.2.0-r1
problem with pre-compressed man+doc fixed, add patch for CC="clang"
Closes: https://bugs.gentoo.org/772899
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Martin Dummer <martin.dummer@gmx.net>
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'media-plugins')
4 files changed, 180 insertions, 0 deletions
diff --git a/media-plugins/vdr-epgsearch/files/vdr-epgsearch-2.2.0_clang.patch b/media-plugins/vdr-epgsearch/files/vdr-epgsearch-2.2.0_clang.patch new file mode 100644 index 000000000000..9c414509ea8c --- /dev/null +++ b/media-plugins/vdr-epgsearch/files/vdr-epgsearch-2.2.0_clang.patch @@ -0,0 +1,35 @@ +when compiling with CC="clang" CXX="clang++" it aborts with + + +createcats.c:71:42: error: ordered comparison between pointer and zero ('char *' and 'int') + if (fgets(buffer, sizeof(buffer), f) > 0) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ + +This patch fixes it. + +Signed-off-by: Martin Dummer <martin.dummer@gmx.net> ( 2021-02-16 ) + +diff -Naur vdr-plugin-epgsearch-2.2.0.orig/createcats.c vdr-plugin-epgsearch-2.2.0/createcats.c +--- vdr-plugin-epgsearch-2.2.0.orig/createcats.c 2017-05-01 21:40:19.000000000 +0200 ++++ vdr-plugin-epgsearch-2.2.0/createcats.c 2021-02-27 11:59:41.175196651 +0100 +@@ -65,7 +65,7 @@ + + char *cReadLine::Read(FILE *f) + { +- if (fgets(buffer, sizeof(buffer), f) > 0) { ++ if (fgets(buffer, sizeof(buffer), f) != NULL) { + int l = strlen(buffer) - 1; + if (l >= 0 && buffer[l] == '\n') + buffer[l] = 0; +diff -Naur vdr-plugin-epgsearch-2.2.0.orig/epgsearchext.c vdr-plugin-epgsearch-2.2.0/epgsearchext.c +--- vdr-plugin-epgsearch-2.2.0.orig/epgsearchext.c 2017-05-01 21:40:19.000000000 +0200 ++++ vdr-plugin-epgsearch-2.2.0/epgsearchext.c 2021-02-27 12:01:51.502220684 +0100 +@@ -1497,7 +1497,7 @@ + int line = 0; + char buffer[MAXPARSEBUFFER]; + result = true; +- while (fgets(buffer, sizeof(buffer), f) > 0) { ++ while (fgets(buffer, sizeof(buffer), f) != NULL) { + line++; + char *p = strchr(buffer, '#'); + if (p == buffer) *p = 0; diff --git a/media-plugins/vdr-epgsearch/files/vdr-epgsearch-2.2.0_docsrc2man-no-gzip.patch b/media-plugins/vdr-epgsearch/files/vdr-epgsearch-2.2.0_docsrc2man-no-gzip.patch new file mode 100644 index 000000000000..508ad7f5d9ab --- /dev/null +++ b/media-plugins/vdr-epgsearch/files/vdr-epgsearch-2.2.0_docsrc2man-no-gzip.patch @@ -0,0 +1,11 @@ +--- a/docsrc2man.sh 2021-02-25 22:14:42.139999981 +0100 ++++ b/docsrc2man.sh 2021-02-25 22:16:14.079999983 +0100 +@@ -37,8 +37,6 @@ + done + + rm "$DOCSRC"/$LANGUAGE/*~ 2>/dev/null +- gzip -f man/$LANGUAGE/*.[0-9] +- + done + + echo diff --git a/media-plugins/vdr-epgsearch/files/vdr-epgsearch-2.2.0_makefile.patch b/media-plugins/vdr-epgsearch/files/vdr-epgsearch-2.2.0_makefile.patch new file mode 100644 index 000000000000..2871b46ccbe1 --- /dev/null +++ b/media-plugins/vdr-epgsearch/files/vdr-epgsearch-2.2.0_makefile.patch @@ -0,0 +1,39 @@ +Signed-off-by: Martin Dummer <martin.dummer@gmx.net> ( 2021 Feb 21 ) + +--- a/Makefile 2021-02-26 08:43:13.903753021 +0100 ++++ b/Makefile 2021-02-26 08:48:50.793719332 +0100 +@@ -255,9 +255,6 @@ + docs: + ./docsrc2man.sh + ./docsrc2html.sh +- ln -sf ./doc/en/epgsearch.4.txt MANUAL +- ln -sf ./doc/en/epgsearch.1.txt README +- ln -sf ./doc/de/epgsearch.1.txt README.DE + + install-$(PLUGIN): libvdr-$(PLUGIN).so + install -D libvdr-$(PLUGIN).so $(DESTDIR)$(LIBDIR)/libvdr-$(PLUGIN).so.$(APIVERSION) +@@ -272,7 +269,7 @@ + install -D libvdr-$(PLUGIN4).so $(DESTDIR)$(LIBDIR)/libvdr-$(PLUGIN4).so.$(APIVERSION) + + install-conf: +- mkdir -p $(DESTDIR)$(CONFDIR)/plugins/$(PLUGIN)/conf.d ++ mkdir -p $(DESTDIR)$(CONFDIR)/plugins/$(PLUGIN) + cp -n conf/* $(DESTDIR)$(CONFDIR)/plugins/$(PLUGIN) + + install-doc: +@@ -291,7 +288,7 @@ + mkdir -p $(DESTDIR)$(BINDIR) + cp createcats $(DESTDIR)$(BINDIR) + +-install: install-lib install-i18n install-conf install-doc install-bin ++install: install-lib install-i18n install-conf install-bin + + install-lib: install-$(PLUGIN) install-$(PLUGIN2) install-$(PLUGIN3) install-$(PLUGIN4) + +@@ -322,3 +319,6 @@ + @-rm -f $(OBJS) $(OBJS2) $(OBJS3) $(OBJS4) $(DEPFILE) *.so *.tgz core* createcats createcats.o pod2*.tmp + @-find . \( -name "*~" -o -name "#*#" \) -print0 | xargs -0r rm -f + @-rm -rf doc html man ++ ++# make detection in vdr-plugin-2.eclass for new Makefile handling happy ++# SOFILE diff --git a/media-plugins/vdr-epgsearch/vdr-epgsearch-2.2.0-r1.ebuild b/media-plugins/vdr-epgsearch/vdr-epgsearch-2.2.0-r1.ebuild new file mode 100644 index 000000000000..25420e6723ec --- /dev/null +++ b/media-plugins/vdr-epgsearch/vdr-epgsearch-2.2.0-r1.ebuild @@ -0,0 +1,95 @@ +# 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" +SRC_URI="https://projects.vdr-developer.org/git/vdr-plugin-${VDRPLUGIN}.git/snapshot/vdr-plugin-${VDRPLUGIN}-${PV}.tar.gz -> ${P}.tgz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="conflictcheckonly epgsearchonly pcre quicksearch tre" +REQUIRED_USE="?? ( pcre tre )" + +DEPEND=" + =media-video/vdr-2.2* + pcre? ( dev-libs/libpcre ) + tre? ( dev-libs/tre )" +RDEPEND="${DEPEND}" +BDEPEND=" + sys-apps/groff + dev-lang/perl" + +QA_FLAGS_IGNORED=" + usr/lib/vdr/plugins/libvdr-.* + usr/lib64/vdr/plugins/libvdr-.* + usr/bin/createcats" +S="${WORKDIR}/vdr-plugin-${VDRPLUGIN}-${PV}" + +PATCHES=( + "${FILESDIR}/${P}_makefile.patch" + "${FILESDIR}/${P}_docsrc2man-no-gzip.patch" + "${FILESDIR}/${P}_clang.patch" +) + +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/sbin/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/* +} |