Gentoo Archives: gentoo-commits

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