1 |
commit: 942e52300c8e525ae888c320524771517c3f585e |
2 |
Author: Joerg Bornkessel <hd_brummy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 15 12:58:41 2019 +0000 |
4 |
Commit: Joerg Bornkessel <hd_brummy <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 15 12:59:33 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=942e5230 |
7 |
|
8 |
media-video/vdr: moved use flag |
9 |
|
10 |
moved use flag kbd to keyboard |
11 |
requested by wrt bug 685828 |
12 |
|
13 |
Bug: https://bugs.gentoo.org/685828 |
14 |
Package-Manager: Portage-2.3.81, Repoman-2.3.18 |
15 |
Signed-off-by: Joerg Bornkessel <hd_brummy <AT> gentoo.org> |
16 |
|
17 |
media-video/vdr/metadata.xml | 1 + |
18 |
media-video/vdr/vdr-2.2.0-r5.ebuild | 301 ++++++++++++++++++++++++++++++++++++ |
19 |
2 files changed, 302 insertions(+) |
20 |
|
21 |
diff --git a/media-video/vdr/metadata.xml b/media-video/vdr/metadata.xml |
22 |
index 84dcc17c309..d0e7ffcbce8 100644 |
23 |
--- a/media-video/vdr/metadata.xml |
24 |
+++ b/media-video/vdr/metadata.xml |
25 |
@@ -19,6 +19,7 @@ |
26 |
<flag name="graphtft">support for vdr-graphtft plugin up from version 0.1.7</flag> |
27 |
<flag name="html">Install HTML documentation</flag> |
28 |
<flag name="kbd">enable keyboard support as remote device</flag> |
29 |
+ <flag name="keyboard">enable keyboard support as remote device</flag> |
30 |
<flag name="mainmenuhooks">Allows to replace main menu entries by some special plugins (like epgsearch, extrecmenu, ...)</flag> |
31 |
<flag name="menuorg">Enables support for the <pkg>media-plugins/vdr-menuorg</pkg></flag> |
32 |
<flag name="menuselection">adds support for menu hotkeys of double digits</flag> |
33 |
|
34 |
diff --git a/media-video/vdr/vdr-2.2.0-r5.ebuild b/media-video/vdr/vdr-2.2.0-r5.ebuild |
35 |
new file mode 100644 |
36 |
index 00000000000..740d4182bd8 |
37 |
--- /dev/null |
38 |
+++ b/media-video/vdr/vdr-2.2.0-r5.ebuild |
39 |
@@ -0,0 +1,301 @@ |
40 |
+# Copyright 2019 Gentoo Authors |
41 |
+# Distributed under the terms of the GNU General Public License v2 |
42 |
+ |
43 |
+EAPI=7 |
44 |
+ |
45 |
+inherit flag-o-matic toolchain-funcs |
46 |
+ |
47 |
+# Switches supported by extensions-patch |
48 |
+EXT_PATCH_FLAGS="alternatechannel graphtft naludump permashift pinplugin |
49 |
+ mainmenuhooks menuorg menuselection resumereset ttxtsubs" |
50 |
+ |
51 |
+# names of the use-flags |
52 |
+EXT_PATCH_FLAGS_RENAMED="" |
53 |
+ |
54 |
+# names ext-patch uses internally, here only used for maintainer checks |
55 |
+EXT_PATCH_FLAGS_RENAMED_EXT_NAME="bidi no_kbd sdnotify" |
56 |
+ |
57 |
+MY_PV="${PV%_p*}" |
58 |
+MY_P="${PN}-${MY_PV}" |
59 |
+S="${WORKDIR}/${MY_P}" |
60 |
+ |
61 |
+EXT_P="extpng-${P}-gentoo-edition-v1" |
62 |
+ |
63 |
+DESCRIPTION="Video Disk Recorder - turns a pc into a powerful set top box for DVB" |
64 |
+HOMEPAGE="http://www.tvdr.de/" |
65 |
+SRC_URI="ftp://ftp.tvdr.de/vdr/${MY_P}.tar.bz2 |
66 |
+ mirror://gentoo/${EXT_P}.patch.bz2" |
67 |
+ |
68 |
+LICENSE="GPL-2" |
69 |
+SLOT="0" |
70 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86" |
71 |
+IUSE="bidi debug keyboard html systemd vanilla ${EXT_PATCH_FLAGS} ${EXT_PATCH_FLAGS_RENAMED}" |
72 |
+ |
73 |
+COMMON_DEPEND=" |
74 |
+ virtual/jpeg:* |
75 |
+ sys-libs/libcap |
76 |
+ >=media-libs/fontconfig-2.4.2 |
77 |
+ >=media-libs/freetype-2" |
78 |
+DEPEND="${COMMON_DEPEND} |
79 |
+ >=virtual/linuxtv-dvb-headers-5.3" |
80 |
+RDEPEND="${COMMON_DEPEND} |
81 |
+ dev-lang/perl |
82 |
+ >=media-tv/gentoo-vdr-scripts-2.7 |
83 |
+ media-fonts/corefonts |
84 |
+ bidi? ( dev-libs/fribidi ) |
85 |
+ systemd? ( sys-apps/systemd )" |
86 |
+BDEPEND="sys-devel/gettext" |
87 |
+ |
88 |
+CONF_DIR="/etc/vdr" |
89 |
+CAP_FILE="${S}/capabilities.sh" |
90 |
+CAPS="# Capabilities of the vdr-executable for use by startscript etc." |
91 |
+ |
92 |
+pkg_setup() { |
93 |
+ use debug && append-flags -g |
94 |
+ |
95 |
+ PLUGIN_LIBDIR="/usr/$(get_libdir)/vdr/plugins" |
96 |
+ |
97 |
+ tc-export CC CXX AR |
98 |
+} |
99 |
+ |
100 |
+add_cap() { |
101 |
+ local arg |
102 |
+ for arg; do |
103 |
+ CAPS="${CAPS}\n${arg}=1" |
104 |
+ done |
105 |
+} |
106 |
+ |
107 |
+enable_patch() { |
108 |
+ local arg ARG_UPPER |
109 |
+ for arg; do |
110 |
+ ARG_UPPER=$(echo $arg | tr '[:lower:]' '[:upper:]') |
111 |
+ echo "${ARG_UPPER} = 1" >> Make.config || die "cannot write to Make.config" |
112 |
+ |
113 |
+ # codesnippet to bring the extpng defines into the vdr.pc CXXFLAGS CFLAGS |
114 |
+ echo "-DUSE_${ARG_UPPER}" >> "${T}"/defines.tmp || die "cannot write to defines.tmp" |
115 |
+ cat "${T}"/defines.tmp | tr \\\012 ' ' > "${T}"/defines.IUSE || die "cannot write to defines.tmp" |
116 |
+ export DEFINES_IUSE=$( cat ${T}/defines.IUSE ) |
117 |
+ done |
118 |
+} |
119 |
+ |
120 |
+extensions_add_make_conf() |
121 |
+{ |
122 |
+ # copy all ifdef for extensions-patch to Make.config |
123 |
+ sed -e '1,/need to touch the following:/d' \ |
124 |
+ -e '/need to touch the following/,/^$/d' \ |
125 |
+ Make.config.template >> Make.config || die "cannot write to Make.config" |
126 |
+} |
127 |
+ |
128 |
+extensions_all_defines() { |
129 |
+ # extract all possible settings for extensions-patch |
130 |
+ sed -e '/^#\?[A-Z].*= 1/!d' -e 's/^#\?//' -e 's/ .*//' \ |
131 |
+ Make.config.template \ |
132 |
+ | sort \ |
133 |
+ | tr '[:upper:]' '[:lower:]' || die "error in function extensions_all_defines" |
134 |
+} |
135 |
+ |
136 |
+lang_po() { |
137 |
+ LING_PO=$( ls ${S}/po | sed -e "s:.po::g" | cut -d_ -f1 | tr \\\012 ' ' ) |
138 |
+} |
139 |
+ |
140 |
+src_configure() { |
141 |
+ # support languages, written from right to left |
142 |
+ export "BIDI=$(usex bidi 1 0)" |
143 |
+ # systemd notification support |
144 |
+ export "SDNOTIFY=$(usex systemd 1 0)" |
145 |
+ # with/without keyboard |
146 |
+ export "USE_KBD=$(usex keyboard 1 0)" |
147 |
+} |
148 |
+ |
149 |
+src_prepare() { |
150 |
+ # apply maintenance-patches |
151 |
+ ebegin "Changing paths for gentoo" |
152 |
+ |
153 |
+ local DVBDIR="/usr/include" |
154 |
+ local i |
155 |
+ for i in ${DVB_HEADER_PATH} /usr/include/v4l-dvb-hg /usr/include; do |
156 |
+ [[ -d ${i} ]] || continue |
157 |
+ if [[ -f ${i}/linux/dvb/dmx.h ]]; then |
158 |
+ einfo "Found DVB header files in ${i}" |
159 |
+ DVBDIR="${i}" |
160 |
+ break |
161 |
+ fi |
162 |
+ done |
163 |
+ |
164 |
+ # checking for s2api headers |
165 |
+ local api_version |
166 |
+ api_version=$(awk -F' ' '/define DVB_API_VERSION / {print $3}' "${DVBDIR}"/linux/dvb/version.h) |
167 |
+ api_version=${api_version}*$(awk -F' ' '/define DVB_API_VERSION_MINOR / {print $3}' "${DVBDIR}"/linux/dvb/version.h) |
168 |
+ |
169 |
+ if [[ ${api_version:-0} -lt 5*3 ]]; then |
170 |
+ eerror "DVB header files do not contain s2api support or too old for ${P}" |
171 |
+ eerror "You cannot compile VDR against old dvb-header" |
172 |
+ die "DVB headers too old" |
173 |
+ fi |
174 |
+ |
175 |
+ cat > Make.config <<-EOT || die "cannot write to Make.config" |
176 |
+ # |
177 |
+ # Generated by ebuild ${PF} |
178 |
+ # |
179 |
+ PREFIX = /usr |
180 |
+ DVBDIR = ${DVBDIR} |
181 |
+ PLUGINLIBDIR = ${PLUGIN_LIBDIR} |
182 |
+ CONFDIR = ${CONF_DIR} |
183 |
+ VIDEODIR = /var/vdr/video |
184 |
+ LOCDIR = \$(PREFIX)/share/locale |
185 |
+ INCDIR = \$(PREFIX)/include |
186 |
+ |
187 |
+ DEFINES += -DCONFDIR=\"\$(CONFDIR)\" |
188 |
+ INCLUDES += -I\$(DVBDIR) |
189 |
+ |
190 |
+ # >=vdr-1.7.36-r1; parameter only used for compiletime on vdr |
191 |
+ # PLUGINLIBDIR (plugin Makefile old) = LIBDIR (plugin Makefile new) |
192 |
+ LIBDIR = ${PLUGIN_LIBDIR} |
193 |
+ PCDIR = /usr/$(get_libdir)/pkgconfig |
194 |
+ |
195 |
+ EOT |
196 |
+ eend 0 |
197 |
+ |
198 |
+ # wrt bug 586070 |
199 |
+ if has_version ">=sys-apps/systemd-230"; then |
200 |
+ sed -e "s:libsystemd-daemon:libsystemd:g" -i Makefile || die "sed libsystemd failed" |
201 |
+ fi |
202 |
+ |
203 |
+ if ! use vanilla; then |
204 |
+ |
205 |
+ # Now apply extensions patch |
206 |
+ eapply "${WORKDIR}/${EXT_P}.patch" |
207 |
+ sed -e 's/PERMASHIFT_V1/PERMASHIFT/g' -i "${S}"/*.[ch] "${S}"/Make.config* || die "sed failed" |
208 |
+ |
209 |
+ # This allows us to start even if some plugin does not exist |
210 |
+ # or is not loadable. |
211 |
+ enable_patch PLUGINMISSING |
212 |
+ |
213 |
+ if [[ -n ${VDR_MAINTAINER_MODE} ]]; then |
214 |
+ einfo "Doing maintainer checks:" |
215 |
+ |
216 |
+ # we do not support these patches |
217 |
+ # (or have them already hard enabled) |
218 |
+ local IGNORE_PATCHES="pluginmissing" |
219 |
+ |
220 |
+ extensions_all_defines > "${T}"/new.IUSE || die "cannot write to new.IUSE" |
221 |
+ echo $EXT_PATCH_FLAGS $EXT_PATCH_FLAGS_RENAMED_EXT_NAME \ |
222 |
+ $IGNORE_PATCHES | \ |
223 |
+ tr ' ' '\n' |sort > "${T}"/old.IUSE || die "cannot write to old.IUSE" |
224 |
+ local DIFFS=$(diff -u "${T}"/old.IUSE "${T}"/new.IUSE|grep '^[+-][^+-]') |
225 |
+ if [[ -z ${DIFFS} ]]; then |
226 |
+ einfo "EXT_PATCH_FLAGS are up to date." |
227 |
+ else |
228 |
+ ewarn "IUSE differences!" |
229 |
+ local diff |
230 |
+ for diff in $DIFFS; do |
231 |
+ ewarn "$diff" |
232 |
+ done |
233 |
+ fi |
234 |
+ fi |
235 |
+ |
236 |
+ ebegin "Enabling selected patches" |
237 |
+ local flag |
238 |
+ for flag in $EXT_PATCH_FLAGS; do |
239 |
+ use $flag && enable_patch ${flag} |
240 |
+ done |
241 |
+ |
242 |
+ eend 0 |
243 |
+ |
244 |
+ extensions_add_make_conf |
245 |
+ |
246 |
+ # add defined use-flags compile options to vdr.pc |
247 |
+ sed -e "s:\$(CDEFINES) \$(CINCLUDES) \$(HDRDIR):\$(CDEFINES) \$(CINCLUDES) \$(HDRDIR) \$(DEFINES_IUSE):" \ |
248 |
+ -i Makefile || die "sed fails on Makefile" |
249 |
+ |
250 |
+ ebegin "Make depend" |
251 |
+ emake .dependencies >/dev/null |
252 |
+ eend $? "make depend failed" |
253 |
+ |
254 |
+ eapply "${FILESDIR}/${P}_gcc7extpng.patch" |
255 |
+ fi |
256 |
+ |
257 |
+ eapply "${FILESDIR}/${P}_gentoo.patch" |
258 |
+ eapply "${FILESDIR}/${P}_unsignedtosigned.patch" |
259 |
+ eapply "${FILESDIR}/${P}_glibc-2.24.patch" |
260 |
+ eapply "${FILESDIR}/${P}-jpeg-9c.patch" |
261 |
+ |
262 |
+ # fix some makefile issues |
263 |
+ sed -e "s:ifndef NO_KBD:ifeq (\$(USE_KBD),1):" \ |
264 |
+ -e "s:ifdef BIDI:ifeq (\$(BIDI),1):" \ |
265 |
+ -e "s:ifdef SDNOTIFY:ifeq (\$(SDNOTIFY),1):" \ |
266 |
+ -i "${S}"/Makefile || die "sed fails on Makefile" |
267 |
+ |
268 |
+ eapply_user |
269 |
+ |
270 |
+ add_cap CAP_UTF8 |
271 |
+ |
272 |
+ add_cap CAP_IRCTRL_RUNTIME_PARAM \ |
273 |
+ CAP_VFAT_RUNTIME_PARAM \ |
274 |
+ CAP_CHUID \ |
275 |
+ CAP_SHUTDOWN_AUTO_RETRY |
276 |
+ |
277 |
+ echo -e ${CAPS} > "${CAP_FILE}" |
278 |
+ |
279 |
+ # LINGUAS support |
280 |
+ einfo "\n \t VDR supports the LINGUAS values" |
281 |
+ |
282 |
+ lang_po |
283 |
+ |
284 |
+ einfo "\t Please set one of this values in your sytem make.conf" |
285 |
+ einfo "\t LINGUAS=\"${LING_PO}\"\n" |
286 |
+ |
287 |
+ if [[ -z ${LINGUAS} ]]; then |
288 |
+ einfo "\n \t No values in LINGUAS=" |
289 |
+ einfo "\t You will get only english text on OSD \n" |
290 |
+ fi |
291 |
+ |
292 |
+ strip-linguas ${LING_PO} en |
293 |
+} |
294 |
+ |
295 |
+src_install() { |
296 |
+ # trick makefile not to create a videodir by supplying it with an existing |
297 |
+ # directory |
298 |
+ emake install \ |
299 |
+ VIDEODIR="/" \ |
300 |
+ DESTDIR="${ED}" install |
301 |
+ |
302 |
+ keepdir "${PLUGIN_LIBDIR}" |
303 |
+ |
304 |
+ # backup for plugins they don't be able to create this dir |
305 |
+ keepdir "${CONF_DIR}"/plugins |
306 |
+ |
307 |
+ if use html; then |
308 |
+ local HTML_DOCS=( *.html ) |
309 |
+ fi |
310 |
+ |
311 |
+ local DOCS=( MANUAL INSTALL README* HISTORY CONTRIBUTORS ) |
312 |
+ |
313 |
+ einstalldocs |
314 |
+ |
315 |
+ insinto /usr/share/vdr |
316 |
+ doins "${CAP_FILE}" |
317 |
+ |
318 |
+ if use alternatechannel; then |
319 |
+ insinto /etc/vdr |
320 |
+ doins "${FILESDIR}"/channel_alternative.conf |
321 |
+ fi |
322 |
+ |
323 |
+ chown -R vdr:vdr "${ED}/${CONF_DIR}" || die "chown failed" |
324 |
+} |
325 |
+ |
326 |
+pkg_postinst() { |
327 |
+ |
328 |
+ elog "\n\t---- 15 YEARS ANNIVERSARY EDITON ----\n" |
329 |
+ elog "\tA lot of thanks to Klaus Schmidinger" |
330 |
+ elog "\tfor this nice piece of Software...\n" |
331 |
+ |
332 |
+ elog "It is a good idea to run vdrplugin-rebuild now." |
333 |
+ |
334 |
+ elog "To get nice symbols in OSD we recommend to install" |
335 |
+ elog "\t1. emerge media-fonts/vdrsymbols-ttf" |
336 |
+ elog "\t2. select font VDRSymbolsSans in Setup" |
337 |
+ elog "" |
338 |
+ elog "To get an idea how to proceed now, have a look at our vdr-guide:" |
339 |
+ elog "\thttps://wiki.gentoo.org/wiki/VDR" |
340 |
+} |