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-tv/mythtv/
Date: Mon, 01 Mar 2021 17:41:50
Message-Id: 1614620500.aaeb80ac2143704cc108bd13e5281cbb3157aa6d.juippis@gentoo
1 commit: aaeb80ac2143704cc108bd13e5281cbb3157aa6d
2 Author: Wilson Michaels <thebitpit <AT> austincustomerrands <DOT> com>
3 AuthorDate: Sat Feb 27 19:30:38 2021 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 1 17:41:40 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aaeb80ac
7
8 media-tv/mythtv: snapshot bump for bug fixes
9
10 Closes: https://bugs.gentoo.org/772248
11 Package-Manager: Portage-3.0.13, Repoman-3.0.2
12 Signed-off-by: Wilson Michaels <thebitpit <AT> austincustomerrands.com>
13 Closes: https://github.com/gentoo/gentoo/pull/19696
14 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
15
16 media-tv/mythtv/Manifest | 1 +
17 media-tv/mythtv/mythtv-31.0_p20210225.ebuild | 435 +++++++++++++++++++++++++++
18 2 files changed, 436 insertions(+)
19
20 diff --git a/media-tv/mythtv/Manifest b/media-tv/mythtv/Manifest
21 index e2859fa3242..b21d725ebb3 100644
22 --- a/media-tv/mythtv/Manifest
23 +++ b/media-tv/mythtv/Manifest
24 @@ -1 +1,2 @@
25 DIST mythtv-31.0.tar.gz 102552136 BLAKE2B b09b41230eb2cae19d770c3cc59151863e0a56e95a86627473d52613e62f0acf3bd0c4bb37afb340ab874c222899f9d3c219ded470785d27960db9b39d784ceb SHA512 d53817231409934ef37d12739c38cf6936f04f816b0ba1c9738ce99b5b4ff387c70b683ccd84f649ff2f74992b2158829f5f1d1ffe06c8768da1922b90439f6e
26 +DIST mythtv-31.0_p20210225.tar.gz 102623777 BLAKE2B 1428e066cb7aeb2d1260eb694a67224cdff27ecebfaa17bddfa0daf36d525435e51bd98b45d83121925620f3c1f43e5dfbcb058ace5ffe87d7ce5f65222c999e SHA512 49e5a207ea043653942875e2a327443fff9308f784c536c62cc10ca7c81a84de6eeaf3cc6708047c183db263f32711d264210c56d4f588fbd56c08b297ae0b5f
27
28 diff --git a/media-tv/mythtv/mythtv-31.0_p20210225.ebuild b/media-tv/mythtv/mythtv-31.0_p20210225.ebuild
29 new file mode 100644
30 index 00000000000..afb8c5cb9cc
31 --- /dev/null
32 +++ b/media-tv/mythtv/mythtv-31.0_p20210225.ebuild
33 @@ -0,0 +1,435 @@
34 +# Copyright 1999-2021 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=7
38 +
39 +PYTHON_COMPAT=( python3_{7,8} )
40 +
41 +inherit eutils flag-o-matic python-any-r1 qmake-utils readme.gentoo-r1 systemd user-info
42 +
43 +MY_COMMIT="b6ddf202a496dac180218a6581344251804f2086"
44 +
45 +DESCRIPTION="Open Source DVR and media center hub"
46 +HOMEPAGE="https://www.mythtv.org https://github.com/MythTV/mythtv"
47 +if [[ $(ver_cut 3) == "p" ]] ; then
48 + SRC_URI="https://github.com/MythTV/mythtv/archive/${MY_COMMIT}.tar.gz -> ${P}.tar.gz"
49 + # mythtv and mythplugins are separate builds in the github MythTV project
50 + S="${WORKDIR}/mythtv-${MY_COMMIT}/mythtv"
51 +else
52 + SRC_URI="https://github.com/MythTV/mythtv/archive/v${PV}.tar.gz -> ${P}.tar.gz"
53 + # mythtv and mythplugins are separate builds in the github mythtv project
54 + S="${WORKDIR}/${P}/mythtv"
55 +fi
56 +KEYWORDS="~amd64 ~x86"
57 +LICENSE="GPL-2+"
58 +SLOT="0"
59 +
60 +IUSE_INPUT_DEVICES="input_devices_joystick"
61 +IUSE_VIDEO_CAPTURE_DEVICES="v4l ivtv ieee1394 hdpvr hdhomerun vbox ceton"
62 +IUSE="alsa altivec asi autostart bluray cdda cdr cec debug dvd dvb egl exif fftw jack java
63 + +lame lcd libass lirc nvdec +opengl oss perl pulseaudio python raw systemd vaapi vdpau vpx
64 + +wrapper x264 x265 +xml xmltv +xvid +X zeroconf
65 + ${IUSE_INPUT_DEVICES} ${IUSE_VIDEO_CAPTURE_DEVICES}"
66 +
67 +REQUIRED_USE="
68 + bluray? ( xml )
69 + cdr? ( cdda )
70 +"
71 +RDEPEND="
72 + acct-user/mythtv
73 + dev-libs/glib:2
74 + dev-libs/lzo
75 + dev-qt/qtcore:5
76 + dev-qt/qtdbus:5
77 + dev-qt/qtgui:5
78 + dev-qt/qtnetwork:5
79 + dev-qt/qtscript:5
80 + dev-qt/qtsql:5[mysql]
81 + dev-qt/qtwidgets:5
82 + dev-qt/qtxml:5
83 + media-fonts/corefonts
84 + media-fonts/dejavu
85 + media-fonts/liberation-fonts
86 + media-fonts/tex-gyre
87 + media-gfx/exiv2:=
88 + media-libs/freetype:2
89 + media-libs/libsamplerate
90 + media-libs/taglib
91 + sys-libs/zlib
92 + alsa? ( media-libs/alsa-lib )
93 + autostart? (
94 + net-dialup/mingetty
95 + x11-apps/xset
96 + x11-wm/evilwm
97 + )
98 + bluray? (
99 + dev-libs/libcdio:=
100 + media-libs/libbluray:=[java?]
101 + sys-fs/udisks:2
102 + )
103 + cec? ( dev-libs/libcec )
104 + dvd? (
105 + dev-libs/libcdio:=
106 + media-libs/libdvdcss
107 + sys-fs/udisks:2
108 + )
109 + egl? ( media-libs/mesa[egl] )
110 + fftw? ( sci-libs/fftw:3.0=[threads] )
111 + hdhomerun? ( media-libs/libhdhomerun )
112 + ieee1394? (
113 + media-libs/libiec61883
114 + sys-libs/libavc1394
115 + sys-libs/libraw1394
116 + )
117 + jack? ( virtual/jack )
118 + java? ( dev-java/ant-core )
119 + lame? ( media-sound/lame )
120 + lcd? ( app-misc/lcdproc )
121 + libass? ( media-libs/libass:= )
122 + lirc? ( app-misc/lirc )
123 + nvdec? ( x11-drivers/nvidia-drivers )
124 + opengl? ( dev-qt/qtopengl:5 )
125 + pulseaudio? ( media-sound/pulseaudio )
126 + systemd? ( sys-apps/systemd:= )
127 + vaapi? ( x11-libs/libva:=[opengl] )
128 + vdpau? ( x11-libs/libvdpau )
129 + vpx? ( media-libs/libvpx:= )
130 + x264? ( media-libs/x264:= )
131 + X? (
132 + x11-apps/xinit
133 + x11-libs/libX11:=
134 + x11-libs/libXext:=
135 + x11-libs/libXinerama:=
136 + x11-libs/libXrandr:=
137 + x11-libs/libXv:=
138 + x11-libs/libXxf86vm:=
139 + x11-misc/wmctrl:=
140 + )
141 + x265? ( media-libs/x265 )
142 + xml? ( dev-libs/libxml2:2 )
143 + xmltv? (
144 + dev-perl/XML-LibXML
145 + media-tv/xmltv
146 + )
147 + xvid? ( media-libs/xvid )
148 + zeroconf? (
149 + dev-libs/openssl:=
150 + net-dns/avahi[mdnsresponder-compat]
151 + )
152 +"
153 +BDEPEND="
154 + virtual/pkgconfig
155 + opengl? ( virtual/opengl )
156 + python? ( ${PYTHON_DEPS} )
157 +"
158 +DEPEND="
159 + ${RDEPEND}
160 + dev-lang/yasm
161 + x11-base/xorg-proto
162 + perl? (
163 + dev-perl/DBD-mysql
164 + dev-perl/DBI
165 + dev-perl/HTTP-Message
166 + dev-perl/IO-Socket-INET6
167 + dev-perl/LWP-Protocol-https
168 + dev-perl/Net-UPnP
169 + dev-perl/XML-Simple
170 + )
171 + python? (
172 + $(python_gen_any_dep '
173 + dev-python/python-dateutil[${PYTHON_USEDEP}]
174 + dev-python/future[${PYTHON_USEDEP}]
175 + dev-python/lxml[${PYTHON_USEDEP}]
176 + dev-python/mysqlclient[${PYTHON_USEDEP}]
177 + dev-python/requests-cache[${PYTHON_USEDEP}]
178 + dev-python/simplejson[${PYTHON_USEDEP}]
179 + ')
180 + )
181 +"
182 +python_check_deps() {
183 + use python || return 0
184 + has_version "dev-python/python-dateutil[${PYTHON_USEDEP}]" &&
185 + has_version "dev-python/future[${PYTHON_USEDEP}]" &&
186 + has_version "dev-python/lxml[${PYTHON_USEDEP}]" &&
187 + has_version "dev-python/mysqlclient[${PYTHON_USEDEP}]" &&
188 + has_version "dev-python/requests-cache[${PYTHON_USEDEP}]" &&
189 + has_version "dev-python/simplejson[${PYTHON_USEDEP}]"
190 +}
191 +
192 +PATCHES=(
193 + "${FILESDIR}/${PN}-30.0_p20190808-respect_LDFLAGS.patch"
194 +)
195 +
196 +DISABLE_AUTOFORMATTING="yes"
197 +DOC_CONTENTS="
198 +Support for metadata lookup changes is added. User configuration required.
199 +Details at: https://www.mythtv.org/wiki/Metadata_Lookup_Changes_March_2021
200 +
201 +Suppport for Python 2.7 is removed.
202 +
203 +If a MYSQL server is installed, a mythtv MySQL user and mythconverg database
204 +is created if it does not already exist.
205 +You will be prompted for your MySQL root password.
206 +
207 +A mythtv user is maintained by acct-user/mythtv. An existing mythtv user
208 +may be modified to the configuration defined by acct-user/mythtv.
209 +The mythtv user's primary group is now mythtv. (formerly video)
210 +An existing mythtv user may be changed which may alter some functionality.
211 +If it breaks mythtv you may need to (choose one):
212 + * Restore the original mythtv user
213 + * Create custom acct-user/mythtv overlay for your system
214 + * Fix you system to use mythtv as daemon only (recommended)
215 +Failure to emerge acct-user/mythtv indicates that the existing mythtv user
216 +is customized and not changed. Corrective action (choose one):
217 + * Ignore emerge failure
218 + * Create custom acct-user/mythtv overlay for your system
219 + * Fix you system to use mythtv as daemon only
220 + * Delete existing user and try again (dangerous)
221 +
222 +Mythtv is updated to use correct FHS/Gentoo policy paths.
223 +Updating mythtv installations may report:
224 + * mythtv is in use, cannot update home
225 + * There was an error when attempting to update the home directory for mythtv
226 + * Please update it manually on your system (as root):
227 + * usermod -d "/var/lib/mythtv" "mythtv"
228 +This can be ignored. The previous default was "/home/mythtv".
229 +Use caution if you change the home directory.
230 +
231 +To have this machine operate as recording host for MythTV,
232 +mythbackend must be running. Run the following:
233 +rc-update add mythbackend default
234 +
235 +Your recordings folder must be owned 'mythtv'. e.g.
236 +chown -R mythtv /var/lib/mythtv
237 +
238 +Want mythfrontend to start automatically?
239 +Set USE=autostart. Details can be found at:
240 +https://dev.gentoo.org/~cardoe/mythtv/autostart.html
241 +"
242 +
243 +pkg_setup() {
244 + use python && python-any-r1_pkg_setup
245 + # The acct-user/mythtv package creates/manages the user 'mythtv'
246 +}
247 +
248 +src_prepare() {
249 + default
250 +
251 + # Perl bits need to go into vender_perl and not site_perl
252 + sed -e "s:pure_install:pure_install INSTALLDIRS=vendor:" \
253 + -i "${S}"/bindings/perl/Makefile || die "Cannot convert site_perl to vendor_perl!"
254 +
255 +}
256 +
257 +src_configure() {
258 + local -a myconf
259 +
260 + # Setup paths
261 + myconf+=(--prefix="${EPREFIX}"/usr)
262 + myconf+=(--libdir="${EPREFIX}"/usr/$(get_libdir))
263 + myconf+=(--libdir-name=$(get_libdir))
264 + myconf+=(--mandir="${EPREFIX}"/usr/share/man)
265 +
266 + if use debug; then
267 + myconf+=(--compile-type=debug)
268 + myconf+=(--disable-stripping) # FIXME: does not disable for all files, only for some
269 + myconf+=(--enable-valgrind) # disables timeouts for valgrind memory debugging
270 + else
271 + myconf+=(--compile-type=release)
272 + fi
273 +
274 + # Build boosters
275 + has ccache "${FEATURES}" || myconf+=(--disable-ccache)
276 + has distcc "${FEATURES}" || myconf+=(--disable-distcc)
277 +
278 + # CPU settings
279 + # Mythtv's configure is borrowed from ffmpeg,
280 + # Bug #172723
281 + # Try to get cpu type based on CFLAGS.
282 + # We need to do this so that features of that CPU will be better used
283 + # If they contain an unknown CPU it will not hurt since ffmpeg's configure
284 + # will just ignore it.
285 + for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do
286 + [ "${i}" = "native" ] && i="host" # bug #273421
287 + myconf+=(--cpu="${i}")
288 + break
289 + done
290 + myconf+=($(use_enable altivec))
291 +
292 + # Sound Output Support
293 + myconf+=(
294 + $(use_enable oss audio-oss)
295 + $(use_enable alsa audio-alsa)
296 + $(use_enable jack audio-jack)
297 + $(use_enable pulseaudio audio-pulseoutput)
298 + )
299 +
300 + # Input Support
301 + myconf+=(
302 + $(use_enable lirc)
303 + $(use_enable input_devices_joystick joystick-menu)
304 + $(use_enable cec libcec)
305 + $(use_enable ieee1394 firewire)
306 + $(use_enable hdhomerun)
307 + $(use_enable vbox)
308 + $(use_enable ceton)
309 + $(use_enable v4l v4l2)
310 + $(use_enable ivtv)
311 + $(use_enable hdpvr)
312 + $(use_enable dvb)
313 + $(use_enable asi)
314 + )
315 +
316 + # Video Output Support
317 + myconf+=(
318 + $(use_enable X x11)
319 + $(use_enable X xrandr)
320 + )
321 +
322 + # Hardware accellerators
323 + myconf+=(
324 + $(use_enable nvdec)
325 + $(use_enable vaapi)
326 + $(use_enable vdpau)
327 + $(use_enable opengl)
328 + $(use_enable libass)
329 + )
330 +
331 + # System tools
332 + myconf+=(
333 + $(use_enable systemd systemd_notify)
334 + $(use_enable systemd systemd_journal)
335 + $(use_enable xml libxml2)
336 + $(use_enable zeroconf libdns-sd)
337 + )
338 +
339 + # Bindings
340 + if use perl && use python; then
341 + myconf+=(--with-bindings=perl,python)
342 + elif use perl; then
343 + myconf+=(--without-bindings=python)
344 + myconf+=(--with-bindings=perl)
345 + elif use python; then
346 + myconf+=(--without-bindings=perl)
347 + myconf+=(--with-bindings=python)
348 + else
349 + myconf+=(--without-bindings=perl,python)
350 + fi
351 + use python && myconf+=(--python="${EPYTHON}")
352 + myconf+=($(use_enable java bdjava))
353 +
354 + # External codec library options (used for mythffmpeg and streaming transcode)
355 + # lame is required for some broadcasts for silence detection of commercials
356 + # default enable in IUSE with +lame
357 + myconf+=(
358 + $(use_enable lame libmp3lame)
359 + $(use_enable xvid libxvid)
360 + $(use_enable x264 libx264)
361 + $(use_enable x265 libx265)
362 + $(use_enable vpx libvpx)
363 + )
364 +
365 + # Clean up DSO load times and other compiler bits
366 + myconf+=(--enable-symbol-visibility)
367 + myconf+=(--enable-pic)
368 +
369 + if tc-is-cross-compiler ; then
370 + myconf+=(--enable-cross-compile --arch=$(tc-arch-kernel))
371 + myconf+=(--cross-prefix="${CHOST}"-)
372 + fi
373 +
374 + myconf+=($(use_enable bluray libbluray_external))
375 +
376 + # econf sets these options that are not handled by configure:
377 + # --build --host --infodir --localstatedir --sysconfdir
378 +
379 + einfo "Running ./configure ${myconf[@]} - THIS MAY TAKE A WHILE."
380 + ./configure \
381 + --prefix="${EPREFIX}/usr" \
382 + --cc="$(tc-getCC)" \
383 + --cxx="$(tc-getCXX)" \
384 + --ar="$(tc-getAR)" \
385 + --optflags="${CFLAGS}" \
386 + --extra-cflags="${CFLAGS}" \
387 + --extra-cxxflags="${CXXFLAGS}" \
388 + --extra-ldflags="${LDFLAGS}" \
389 + --qmake=$(qt5_get_bindir)/qmake \
390 + "${myconf[@]}"
391 +}
392 +
393 +src_install() {
394 + emake STRIP="true" INSTALL_ROOT="${D}" install
395 + use python && python_optimize # does all packages by default
396 + dodoc AUTHORS UPGRADING README
397 + readme.gentoo_create_doc
398 +
399 + insinto /usr/share/mythtv/database
400 + doins database/*
401 +
402 + newinitd "${FILESDIR}"/mythbackend.init-r3 mythbackend
403 + newconfd "${FILESDIR}"/mythbackend.conf-r1 mythbackend
404 + if use systemd; then
405 + systemd_newunit "${FILESDIR}"/mythbackend.service-28 mythbackend.service
406 + fi
407 +
408 + dodoc keys.txt
409 +
410 + keepdir /etc/mythtv
411 + fowners -R mythtv /etc/mythtv
412 + keepdir /var/log/mythtv
413 + fowners -R mythtv /var/log/mythtv
414 +
415 + insinto /etc/logrotate.d
416 + newins "${FILESDIR}"/mythtv.logrotate.d-r4 mythtv
417 +
418 + insinto /usr/share/mythtv/contrib
419 + # Ensure we don't install scripts needing the perl bindings (bug #516968) Finding none is OK.
420 + if ! use perl; then
421 + find contrib/ -name '*.pl' -exec rm {} \;
422 + fi
423 + # Ensure we don't install scripts needing the python bindings (bug #516968) Finding none is OK.
424 + if ! use python; then
425 + find contrib/ -name '*.py' -exec rm {} \;
426 + fi
427 + doins -r contrib/*
428 +
429 + # Install our mythfrontend wrapper which is similar to Mythbuntu's
430 + if use wrapper; then
431 + mv "${ED}/usr/bin/mythfrontend" "${ED}/usr/bin/mythfrontend.real" || die "Failed to install mythfrontend.real"
432 + newbin "${FILESDIR}"/mythfrontend.wrapper mythfrontend
433 + newconfd "${FILESDIR}"/mythfrontend.conf mythfrontend
434 + fi
435 +
436 + if use autostart; then
437 + newenvd - 95mythtv <<- _EOF_
438 + CONFIG_PROTECT=\"$(egethome mythtv)\"
439 + _EOF_
440 + insinto $(egethome mythtv)
441 + newins "${FILESDIR}"/bash_profile .bash_profile
442 + newins "${FILESDIR}"/xinitrc-r1 .xinitrc
443 + fi
444 +
445 + # Make Python files executable but not files named "__init__.py"
446 + find "${ED}/usr/share/mythtv" -type f -name '*.py' -exec expr \( {} : '.*__init__.py' \) = 0 \; \
447 + -exec chmod a+x {} \; || die "Failed to make python file $(basename ${file}) executable"
448 +
449 + # Ensure that Python scripts are executed by Python 2
450 + use python && python_fix_shebang "${ED}/usr/share/mythtv"
451 +
452 + # Make shell & perl scripts executable
453 + find "${ED}" -type f \( -name '*.sh' -o -name '*.pl' \) -exec chmod a+x {} \; || die "Failed to make script executable"
454 +}
455 +
456 +pkg_postinst() {
457 + readme.gentoo_print_elog
458 +}
459 +
460 +pkg_info() {
461 + return
462 +}
463 +
464 +pkg_config() {
465 + if [[ -e "${EROOT}"/usr/bin/mysql ]]; then
466 + "${EROOT}"/usr/bin/mysql -u root -p < "${EROOT}"/usr/share/mythtv/database/mc.sql
467 + fi
468 +}