Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-plugins/vdr-epgsearch/files/, media-plugins/vdr-epgsearch/
Date: Sat, 27 Feb 2021 18:49:07
Message-Id: 1614451734.07d23eb89e595e56f3dd9de084f139071578ee7f.juippis@gentoo
1 commit: 07d23eb89e595e56f3dd9de084f139071578ee7f
2 Author: Martin Dummer <martin.dummer <AT> gmx <DOT> net>
3 AuthorDate: Sat Feb 27 16:28:54 2021 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 27 18:48:54 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07d23eb8
7
8 media-plugins/vdr-epgsearch: fix QA+clang issue in 2.2.0-r1
9
10 problem with pre-compressed man+doc fixed, add patch for CC="clang"
11
12 Closes: https://bugs.gentoo.org/772899
13 Package-Manager: Portage-3.0.13, Repoman-3.0.2
14 Signed-off-by: Martin Dummer <martin.dummer <AT> gmx.net>
15 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
16
17 .../files/vdr-epgsearch-2.2.0_clang.patch | 35 ++++++++
18 .../vdr-epgsearch-2.2.0_docsrc2man-no-gzip.patch | 11 +++
19 .../files/vdr-epgsearch-2.2.0_makefile.patch | 39 +++++++++
20 .../vdr-epgsearch/vdr-epgsearch-2.2.0-r1.ebuild | 95 ++++++++++++++++++++++
21 4 files changed, 180 insertions(+)
22
23 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
24 new file mode 100644
25 index 00000000000..9c414509ea8
26 --- /dev/null
27 +++ b/media-plugins/vdr-epgsearch/files/vdr-epgsearch-2.2.0_clang.patch
28 @@ -0,0 +1,35 @@
29 +when compiling with CC="clang" CXX="clang++" it aborts with
30 +
31 +
32 +createcats.c:71:42: error: ordered comparison between pointer and zero ('char *' and 'int')
33 + if (fgets(buffer, sizeof(buffer), f) > 0) {
34 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
35 +
36 +This patch fixes it.
37 +
38 +Signed-off-by: Martin Dummer <martin.dummer@×××.net> ( 2021-02-16 )
39 +
40 +diff -Naur vdr-plugin-epgsearch-2.2.0.orig/createcats.c vdr-plugin-epgsearch-2.2.0/createcats.c
41 +--- vdr-plugin-epgsearch-2.2.0.orig/createcats.c 2017-05-01 21:40:19.000000000 +0200
42 ++++ vdr-plugin-epgsearch-2.2.0/createcats.c 2021-02-27 11:59:41.175196651 +0100
43 +@@ -65,7 +65,7 @@
44 +
45 + char *cReadLine::Read(FILE *f)
46 + {
47 +- if (fgets(buffer, sizeof(buffer), f) > 0) {
48 ++ if (fgets(buffer, sizeof(buffer), f) != NULL) {
49 + int l = strlen(buffer) - 1;
50 + if (l >= 0 && buffer[l] == '\n')
51 + buffer[l] = 0;
52 +diff -Naur vdr-plugin-epgsearch-2.2.0.orig/epgsearchext.c vdr-plugin-epgsearch-2.2.0/epgsearchext.c
53 +--- vdr-plugin-epgsearch-2.2.0.orig/epgsearchext.c 2017-05-01 21:40:19.000000000 +0200
54 ++++ vdr-plugin-epgsearch-2.2.0/epgsearchext.c 2021-02-27 12:01:51.502220684 +0100
55 +@@ -1497,7 +1497,7 @@
56 + int line = 0;
57 + char buffer[MAXPARSEBUFFER];
58 + result = true;
59 +- while (fgets(buffer, sizeof(buffer), f) > 0) {
60 ++ while (fgets(buffer, sizeof(buffer), f) != NULL) {
61 + line++;
62 + char *p = strchr(buffer, '#');
63 + if (p == buffer) *p = 0;
64
65 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
66 new file mode 100644
67 index 00000000000..508ad7f5d9a
68 --- /dev/null
69 +++ b/media-plugins/vdr-epgsearch/files/vdr-epgsearch-2.2.0_docsrc2man-no-gzip.patch
70 @@ -0,0 +1,11 @@
71 +--- a/docsrc2man.sh 2021-02-25 22:14:42.139999981 +0100
72 ++++ b/docsrc2man.sh 2021-02-25 22:16:14.079999983 +0100
73 +@@ -37,8 +37,6 @@
74 + done
75 +
76 + rm "$DOCSRC"/$LANGUAGE/*~ 2>/dev/null
77 +- gzip -f man/$LANGUAGE/*.[0-9]
78 +-
79 + done
80 +
81 + echo
82
83 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
84 new file mode 100644
85 index 00000000000..2871b46ccbe
86 --- /dev/null
87 +++ b/media-plugins/vdr-epgsearch/files/vdr-epgsearch-2.2.0_makefile.patch
88 @@ -0,0 +1,39 @@
89 +Signed-off-by: Martin Dummer <martin.dummer@×××.net> ( 2021 Feb 21 )
90 +
91 +--- a/Makefile 2021-02-26 08:43:13.903753021 +0100
92 ++++ b/Makefile 2021-02-26 08:48:50.793719332 +0100
93 +@@ -255,9 +255,6 @@
94 + docs:
95 + ./docsrc2man.sh
96 + ./docsrc2html.sh
97 +- ln -sf ./doc/en/epgsearch.4.txt MANUAL
98 +- ln -sf ./doc/en/epgsearch.1.txt README
99 +- ln -sf ./doc/de/epgsearch.1.txt README.DE
100 +
101 + install-$(PLUGIN): libvdr-$(PLUGIN).so
102 + install -D libvdr-$(PLUGIN).so $(DESTDIR)$(LIBDIR)/libvdr-$(PLUGIN).so.$(APIVERSION)
103 +@@ -272,7 +269,7 @@
104 + install -D libvdr-$(PLUGIN4).so $(DESTDIR)$(LIBDIR)/libvdr-$(PLUGIN4).so.$(APIVERSION)
105 +
106 + install-conf:
107 +- mkdir -p $(DESTDIR)$(CONFDIR)/plugins/$(PLUGIN)/conf.d
108 ++ mkdir -p $(DESTDIR)$(CONFDIR)/plugins/$(PLUGIN)
109 + cp -n conf/* $(DESTDIR)$(CONFDIR)/plugins/$(PLUGIN)
110 +
111 + install-doc:
112 +@@ -291,7 +288,7 @@
113 + mkdir -p $(DESTDIR)$(BINDIR)
114 + cp createcats $(DESTDIR)$(BINDIR)
115 +
116 +-install: install-lib install-i18n install-conf install-doc install-bin
117 ++install: install-lib install-i18n install-conf install-bin
118 +
119 + install-lib: install-$(PLUGIN) install-$(PLUGIN2) install-$(PLUGIN3) install-$(PLUGIN4)
120 +
121 +@@ -322,3 +319,6 @@
122 + @-rm -f $(OBJS) $(OBJS2) $(OBJS3) $(OBJS4) $(DEPFILE) *.so *.tgz core* createcats createcats.o pod2*.tmp
123 + @-find . \( -name "*~" -o -name "#*#" \) -print0 | xargs -0r rm -f
124 + @-rm -rf doc html man
125 ++
126 ++# make detection in vdr-plugin-2.eclass for new Makefile handling happy
127 ++# SOFILE
128
129 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
130 new file mode 100644
131 index 00000000000..25420e6723e
132 --- /dev/null
133 +++ b/media-plugins/vdr-epgsearch/vdr-epgsearch-2.2.0-r1.ebuild
134 @@ -0,0 +1,95 @@
135 +# Copyright 2021 Gentoo Authors
136 +# Distributed under the terms of the GNU General Public License v2
137 +
138 +EAPI=7
139 +
140 +inherit vdr-plugin-2
141 +
142 +DESCRIPTION="VDR plugin: create timers from epg content based on saved search expressions"
143 +HOMEPAGE="http://winni.vdr-developer.org/epgsearch/index_eng.html"
144 +SRC_URI="https://projects.vdr-developer.org/git/vdr-plugin-${VDRPLUGIN}.git/snapshot/vdr-plugin-${VDRPLUGIN}-${PV}.tar.gz -> ${P}.tgz"
145 +
146 +LICENSE="GPL-2+"
147 +SLOT="0"
148 +KEYWORDS="~amd64 ~x86"
149 +IUSE="conflictcheckonly epgsearchonly pcre quicksearch tre"
150 +REQUIRED_USE="?? ( pcre tre )"
151 +
152 +DEPEND="
153 + =media-video/vdr-2.2*
154 + pcre? ( dev-libs/libpcre )
155 + tre? ( dev-libs/tre )"
156 +RDEPEND="${DEPEND}"
157 +BDEPEND="
158 + sys-apps/groff
159 + dev-lang/perl"
160 +
161 +QA_FLAGS_IGNORED="
162 + usr/lib/vdr/plugins/libvdr-.*
163 + usr/lib64/vdr/plugins/libvdr-.*
164 + usr/bin/createcats"
165 +S="${WORKDIR}/vdr-plugin-${VDRPLUGIN}-${PV}"
166 +
167 +PATCHES=(
168 + "${FILESDIR}/${P}_makefile.patch"
169 + "${FILESDIR}/${P}_docsrc2man-no-gzip.patch"
170 + "${FILESDIR}/${P}_clang.patch"
171 +)
172 +
173 +src_prepare() {
174 + # remove untranslated .po files
175 + 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 \
176 + || die "cannot remove untranslated .po files"
177 +
178 + if ! use conflictcheckonly; then
179 + sed -e "s:install-\$(PLUGIN3)::" -i Makefile || die "cannot modify Makefile"
180 + fi
181 +
182 + if ! use epgsearchonly; then
183 + sed -e "s:install-\$(PLUGIN2)::" -i Makefile || die "cannot modify Makefile"
184 + fi
185 +
186 + if ! use quicksearch; then
187 + sed -e "s:install-\$(PLUGIN4)::" -i Makefile || die "cannot modify Makefile"
188 + fi
189 +
190 + vdr-plugin-2_src_prepare
191 +
192 + fix_vdr_libsi_include conflictcheck.c
193 +
194 + # install conf-file disabled
195 + sed -e '/^Menu/s:^:#:' -i conf/epgsearchmenu.conf || die "cannot modify epgsearchmenu.conf"
196 +
197 + # Get rid of the broken symlink
198 + rm README || die "cannot remove broken symlink"
199 +}
200 +
201 +src_compile() {
202 + BUILD_PARAMS="SENDMAIL=/usr/sbin/sendmail AUTOCONFIG=0"
203 +
204 + if use pcre; then
205 + BUILD_PARAMS+=" REGEXLIB=pcre"
206 + einfo "Using pcre for regexp searches"
207 + fi
208 +
209 + if use tre; then
210 + BUILD_PARAMS+=" REGEXLIB=tre"
211 + einfo "Using tre for unlimited fuzzy searches"
212 + fi
213 +
214 + vdr-plugin-2_src_compile
215 +}
216 +
217 +src_install() {
218 + local DOCS=( conf/*.templ HISTORY* README.Translators )
219 + vdr-plugin-2_src_install
220 +
221 + diropts -m 755 -o vdr -g vdr
222 + insopts -m 644 -o vdr -g vdr
223 + keepdir /etc/vdr/plugins/epgsearch
224 + insinto /etc/vdr/plugins/epgsearch
225 + doins conf/*
226 +
227 + doman man/en/*
228 + doman -i18n=de man/de/*
229 +}