diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-tv/mythtv | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-tv/mythtv')
22 files changed, 3496 insertions, 0 deletions
diff --git a/media-tv/mythtv/Manifest b/media-tv/mythtv/Manifest new file mode 100644 index 000000000000..91be4bde6915 --- /dev/null +++ b/media-tv/mythtv/Manifest @@ -0,0 +1,15 @@ +DIST mythtv-0.26.0-9fd7c6102b2cd1a3760337663803b110446c6ea7.tar.xz 179540 SHA256 ae63398f1ea8884950eb4653c42f6bf71e504738112f5ac8f4d13c1988098d95 SHA512 599dab7a51e9e2f5e240e6d80aadf3bc1f89b8f83e0a5c2e6c82695926ef3f1b7694a73d95b0a296544f9642f1e070a809d86563a415498345a3c1049f269aa4 WHIRLPOOL 74c8aa8f2846eb67f88bddacf5d7c5aa0445e0fe2fbd0f6f2f284e51e1f2c024ca8b7ef22639b7e201b8304421859d7bab802a7d2fe9343ec40d36453f0bfa8e +DIST mythtv-0.26.0.tar.bz2 40887666 SHA256 2f158962ca3009db563dabc32827c47788a688bd67a25abd76f4baa9c3cfe306 SHA512 8c8766542b6a1a877d400fd99343e8149d9c6cc4ab1e425db358bdbdc10b6cb7422bb4bdcf984ce64b2cf02b0ad0725606b266558afcadff9ec9c9bb95bb49c0 WHIRLPOOL c737a1dbdfafe65ae5ee3bde8d0b3a9ad50ebfccec784d6907c78d03f9732637cfbf8b82ecfca80af0b049c65d70c608a81ac3bf27a8070ba3f32d657f5137bb +DIST mythtv-0.27-583395f5a376637efcd408a102fa64d0f188c12f.tar.xz 298048 SHA256 2b18428980fe8951694eb9c8594aa2559df491b029987e1a4b983128fdea4f51 SHA512 1d8c2a61bd91d7116ba3b43251d517bda3c8db3c235e73dde66116dc02d14806db9c80bacf6e19eaf816c4765d8e51fe9b53900efa3112134c564c08cc0ca012 WHIRLPOOL 3d50908d085f844cd210c568b50c55c47e4fe8dd8423ffe18303a7c799a45e24dfceaa5221e6f59596394484162d9992f46d5f66b0ad3c57fbb5a240def68dec +DIST mythtv-0.27.1-082d5c1fbccd48dd862f14007c0445dee8502f3d.tar.xz 161652 SHA256 271c12af8bdf6188f1a11f07ac7c3ad45374cc60211e4a005975af66d5421739 SHA512 ed7ecb9fc5d3abe592e195309d88979a41132ebd99e92e59e2471f17c3f5da089cc5846d817a5228657cef37fade5724f9ac8f0e335ec45855158996a2317016 WHIRLPOOL 86a99cc0a74c75789a98e18fd57b5627b59c650da02602d947a8ccd854ed2bf210e76bf858bc16a2a6fd93763149257ae0e3ea95f44aecf0916b5f1a2b81460d +DIST mythtv-0.27.1-aaae611819c6a6f92a55d5c82efb8738ec9a23df.tar.xz 148364 SHA256 ca09cf37ef0bf8b4ca2ff54416b66126229680bef7e687f6b1f0b215250c0f12 SHA512 bc5d719a10e683b13170975d39d2d57547f7935007697c3f1d002067bffb63fe1b6375e834c4c0aea765c54ef35085d6f46cea1b5744605eae616d939fcb795d WHIRLPOOL 5ff8be973fe9a59cab833025e3cfe5c38dd8a3b4a9af83e2a584350f9b5389d82ec32738f66d91c633fa3f01dbf27c69d723023c72e554e1feec2687a3cdfb1a +DIST mythtv-0.27.1.tar.gz 85612356 SHA256 a7039ba46347f1d6a0ed392a53117639c8cba6bc458a6ad30082046d8ad85de7 SHA512 f2c79765948c0a00c7a92f24d2315b5af3044333f67ed8925a59c5bebbdebf98792ef05e2bc8864bfbe77be8cc8ff530e3f4e8761320cfe5ed21369341d8915e WHIRLPOOL 938e0e77070473a523323fe64e40eb416809b40b16943d66a5914d65caa7530dd4b5ba5209919050a7b4968c9e5ca5155ee970f165b39a5c77392debb20bf0ad +DIST mythtv-0.27.3-2d4a7c9235287b0589035974bff282e3f2e9a7e5.tar.xz 71744 SHA256 1c2c9912377dac670d0c24fa14445272af100250aaa19e8ae40e409d3c30b78f SHA512 19fc2d92acb99668d90f71ff5e65b29c5c00fe35d8be150df3721f081b6ada0b53bca4d88a74a4de3ed2bd78c781a0a48df6a502cb10b89aa3d77ea5e12b80f1 WHIRLPOOL d5ca9d06634a7bf41162158ba9be1e0669032b78df85049ff7878ef1b5b1e34cc2c6ecf99815ded8d963da4cefb14bc90dcfbb227ed2277201e0e71d00af460a +DIST mythtv-0.27.3-e1d575da2fdde7ae7119972c688b0ddd15e676c4.tar.xz 77584 SHA256 43e54366582c71c0835771987be6dd33543326ba2aba4efb8a57f83b965647cc SHA512 0360b990d0ec5eade879879c516a9169c50aafaff8b08fff60d4d65e93b3c2dadac36869f958e070b644eea72592344a7f678c78a25ae7950372e17b725a1cd1 WHIRLPOOL 5eb3b1cbea2defad1143ad3934ad5d2c2585595013bc8619f8e436eebcdfa35efe377bf40b50281140901314b5c1daf2c8654b9a0f7ab4be59fdc49c5d278c43 +DIST mythtv-0.27.3.tar.gz 85624583 SHA256 8eaaf8c6e42ca6eb81f180467de90d597dbeabb1bb14b7085da353d2980db8f4 SHA512 c825c6d5a4fab6fe3179dbb78730575732615ab41cf2d21f82c6e6317ab62c9a6570cd9d204c39c04d176138c90dfdc95892cd8336bb8487051f1f3842cc0866 WHIRLPOOL b9382dbe1019bde96135ff404039d4db5ef03d52d5f2d75cfd3005e1e5eea702529df3a45497c081de89d9ecfd5a6a143b6dadc228e581453b9aa75c63bcc042 +DIST mythtv-0.27.4-3b4390396bf09dfe3741508ecf7fc71a004abd01.tar.xz 12752 SHA256 b3331d8dbe36d34c88ab42aec2d2d84e2bb51ba11b714f23c5faa91e32ce06de SHA512 8f80378cfc5be8058baa74f7d25e8ec0a0405201e6f8b77b6cb96ba91dbd9b9251947ba7b6e48efad5270624769195891e2c48e0c8d0a16d6f8893801103a26b WHIRLPOOL 140d8dfb39942ef587b551099942b6b284bd49e070225aaee71f3fb4feebfc0ce293461b87fe9f6477def2745a6d71226fb103cf090a25fc33ecf85bd62212b6 +DIST mythtv-0.27.4-b305eb5b7fc662146e74983fa3754d622695cdeb.tar.xz 2376 SHA256 a08af2e8457099397512eb10c8729c75ceff078045881e22a1c53595536f41ba SHA512 63e52a9dc34e344e632ab339ab3ab4093e3f9e363b406c5b0b172744fbd78187dde20ed3da9bc2d1258404c412e4d39f855f9060457337815c995773aa0a62b9 WHIRLPOOL 59ba3805295b990f785c7e4f6fcc1c1748444a2d515119de8acaaa31979fe4fec05181ad87b24aeb62de54a100cc017bcad46fdd65dcc0f6d06c773bf7d94ed6 +DIST mythtv-0.27.4.tar.gz 85644227 SHA256 1f734ffc776e4938aa913e49ce94279f2c2d520c62af278f1d04fe399723365b SHA512 6f858f32467756e96db6f79ccb2c42edc0bf22d217cb7b9dc9188ada994bbb9aafe9f72dd71aca10cd26bad1bd5d344af64487ec5fc925872aba81cf7aa257c8 WHIRLPOOL 65cd1869b7cee00197179b13a138d466dc443ecaf23c665754e0451e7ab51940e7235cb74d23ed7296be2c716f443c9c42df2fdd918a0480a04c63381ebce2c4 +DIST mythtv-0.27.5-9498257571e8158926b60a0eefc74568c4436823.tar.xz 11992 SHA256 aef3b944a9f4b49daa3f5489b58a080db35eb7b85c76819d9d00ccf1adfadfdf SHA512 bddc80f6d7e7ad583459a2192660e6101d53d8821c0f875634f90588bc6fbff86c80fa75f6e8cb859fd5164a81f0ad3427939d57da2b112741b1ea9ce646659d WHIRLPOOL 249d4f5332d943669610b96363b6d2b19d63973ba191bd62900e7d31362b4c541077ffe6ca9eae6027c6d1d5fea1d691722739ff9d0d7af6566d288921444961 +DIST mythtv-0.27.5.tar.gz 85652939 SHA256 7e625f94332effeadfba8e7ae7c98d44a83bfc25b7c59e39adce67dc2f4e1e1b SHA512 b912e010e54271f9321ac1b11d4a31e4093f86c0f2ae3139d4b55085bab142ca3fc6d847d163f6b75aa31320404914c71c094528dc8ee7d70086e56a828b9169 WHIRLPOOL e9ebbbabac6ed53b4ec90537371a63e053bb9a2c0a0e920e43d3d2e475f87bdd0ac5a4604045498e88aaf06b11eb054d50dea7881c87dbd45a36c08309e1b880 +DIST mythtv-0.27.tar.gz 85904162 SHA256 494ebd7ee384e751c05ee0a1b3dcd3618caf72f1e94810381c09c2b5d1c799f0 SHA512 2ea070497a7610b8e1548112d9925a28aeedba819c2d063e88cc63daf69947379ce7213e357c26bf2221f8a8e865c937dee3b9bf2695644f2f1adeadf6d11116 WHIRLPOOL 74c4fade0d0f93a64e5f1da3120358f15f6f8891f53b7c74b41a286369e192790cae87829b79a3a90ce3ca23ede63b3dfa809b514b68cee220432794414b8a47 diff --git a/media-tv/mythtv/files/bash_profile b/media-tv/mythtv/files/bash_profile new file mode 100644 index 000000000000..5de354bccae9 --- /dev/null +++ b/media-tv/mythtv/files/bash_profile @@ -0,0 +1,4 @@ +# .bash_profile +case "`tty`" in + *tty8) startx; logout ;; +esac diff --git a/media-tv/mythtv/files/libdir-27.patch b/media-tv/mythtv/files/libdir-27.patch new file mode 100644 index 000000000000..d25e714b3c62 --- /dev/null +++ b/media-tv/mythtv/files/libdir-27.patch @@ -0,0 +1,13 @@ +diff --git a/mythtv/configure b/mythtv/configure +index 4aa8727..f890df3 100755 +--- a/mythtv/configure ++++ b/mythtv/configure +@@ -6475,7 +6475,7 @@ if enabled mythlogserver; then + echo "Configuring zeromq..." + (cd external/zeromq ; \ + ./configure --quiet --without-documentation --prefix=${prefix} \ +- --includedir=${prefix}/include/mythtv/zeromq) ++ --includedir=${prefix}/include/mythtv/zeromq --libdir=${libdir}) + echo "Configuring nzmqt..." + (cd external/nzmqt/src ; \ + ${qmakeconf} -o Makefile) diff --git a/media-tv/mythtv/files/libdir.patch b/media-tv/mythtv/files/libdir.patch new file mode 100644 index 000000000000..90fc36272532 --- /dev/null +++ b/media-tv/mythtv/files/libdir.patch @@ -0,0 +1,11 @@ +--- external/Makefile 2012-10-06 14:30:40.453248737 -0400 ++++ external/Makefile 2012-10-06 14:32:43.283277751 -0400 +@@ -25,7 +25,7 @@ + zeromq/Makefile: zeromq/configure + (cd zeromq ; \ + ./configure --without-documentation --prefix=${PREFIX} \ +- --includedir=${PREFIX}/include/mythtv/zeromq) ++ --includedir=${PREFIX}/include/mythtv/zeromq --libdir=${LIBDIR}) + + zeromq-install zeromq-uninstall zeromq-clean zeromq-distclean: + ${MAKE} -C zeromq ${@:zeromq-%=%} DESTDIR=${INSTALL_ROOT} diff --git a/media-tv/mythtv/files/mythbackend.conf b/media-tv/mythtv/files/mythbackend.conf new file mode 100644 index 000000000000..4e85f4a215c8 --- /dev/null +++ b/media-tv/mythtv/files/mythbackend.conf @@ -0,0 +1,12 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Accepts any valid combination of logging options to mythbackend +# To get a valid list run: /usr/bin/mythbackend -v help +#MYTHBACKEND_VERBOSE="general" + + +# Allows you to pass specific startup options to mythbackend +# e.g. --noupnp +#MYTHBACKEND_OPTS="" diff --git a/media-tv/mythtv/files/mythbackend.init b/media-tv/mythtv/files/mythbackend.init new file mode 100644 index 000000000000..7caf7a706173 --- /dev/null +++ b/media-tv/mythtv/files/mythbackend.init @@ -0,0 +1,56 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +description="MythTV backend recording daemon" +extra_commands="resched upnprebuild" +description_resched="Forces the recording scheduler to update" +description_upnprebuild="Rebuilds the UPnP media cache" + +depend() { + # mythbackend doesn't need to run on the same machine that + # mysql runs on. so its use for that reason + need net + use mysql LCDd +} + +start() { + [ -z "${MYTHBACKEND_VERBOSE}" ] && \ + MYTHBACKEND_VERBOSE="general" + + #fixes for bug #101308 + unset DISPLAY + unset SESSION_MANAGER + + # Work around any strange permissions that may be on these files. + chown -R mythtv:video /var/log/mythtv/ + chown -R mythtv:video /home/mythtv/ + + ebegin "Starting MythTV Backend" + start-stop-daemon --start --quiet --exec /usr/bin/mythbackend \ + --pidfile /var/run/mythbackend.pid -- \ + --daemon --pidfile /var/run/mythbackend.pid --user mythtv \ + --verbose ${MYTHBACKEND_VERBOSE} \ + --logpath /var/log/mythtv/ \ + ${MYTHBACKEND_OPTS} + eend $? +} + +stop() { + ebegin "Stopping MythTV Backend" + start-stop-daemon --stop --quiet --pidfile=/var/run/mythbackend.pid + eend $? +} + +resched() { + ebegin "Updating the recording scheduler" + /usr/bin/mythbackend --resched + eend $? +} + +upnprebuild() { + ebegin "Rebuilding UPnP media cache" + /usr/bin/mythbackend --upnprebuild + eend $? +} diff --git a/media-tv/mythtv/files/mythbackend.service b/media-tv/mythtv/files/mythbackend.service new file mode 100644 index 000000000000..496c7b295e11 --- /dev/null +++ b/media-tv/mythtv/files/mythbackend.service @@ -0,0 +1,66 @@ +# Do not edit this file, it will be replaced on update +# If you need to make modifications to this unit file first make a copy in # /etc/systemd/system + +# This file is part of the packaging of MythTV # +# MythTV is free software; view http://www.mythtv.org for more information. +# +# It is sometimes necessary to wait for a capture device to finish (hot)plug +# initialization before the backend starts. If this is necessary, +# create a Wants and After entry for all the capture devices that +# one wishes to wait to be created before the backend starts using the systemd +# device name mangling names (/dev/some/thing turns +# into dev-some-thing.device). These normally should be udev persistent +# filename rules to avoid confusion. +# See the MythTV wiki for udev persistent filename # discussions found at: +# http://www.mythtv.org/wiki/Device_Filenames_and_udev +# +# In order to insure that systemd will create a device unit for the +# capture device, one must insure that udev will have the tag "systemd" +# (i.e. add TAG+="systemd" to the udev rule). +# +# The MythTV package ships with a default udev rule file located in: +# /lib/udev/rules.d/99-mythbackend.rules + +[Unit] +Description=MythTV backend service +After=network.target mysqld.service +# Uncomment the following line if you will be using the mythweb plugin on the +# same system as mythbackend. +#Wants=httpd.service + +[Service] +Type=simple + +Environment=MYTHCONFDIR=/etc/mythtv +# Default setting assumes a system wide install. Otherwise it should be set to +# the folder containing the .mythtv subfolder containing the config.xml file +# Such as +#Environment=HOME=/usr/share/mythtv +# or +Environment=HOME=/~/.mythtv + +# systemd changes execution from the calling user (possibly root) to this user +# if you have permissions problems or obscure errors try logging in as mythtv +# See notes below +User=mythtv + +# Uncomment one of the following... +# Use sysloging rather than separate logging: +#ExecStart=/usr/bin/mythbackend --syslog local7 + +# If Type=forking you must specify the --daemon and --pidfile options: +#ExecStart=/usr/bin/mythbackend --daemon --logpath /var/log/mythtv --loglevel crit --pidfile /run/mythtv/mythbackend.pid +#PIDFILE=/run/mythtv/mythbackend.pid + +# Systemd sends stdout to syslog, and mythbackend has console logging enabled without --daemon. +# Send stdout to /dev/null so console logging doesn't go to syslog +#StandardOutput=null +# Default setting for Type=simple. +#ExecStart=/usr/bin/mythbackend --logpath /var/log/mythtv --loglevel crit +ExecStart=/usr/bin/mythbackend --loglevel notice --nologserver + +# Whether systemd will continue over-watch and restart on any halt +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/media-tv/mythtv/files/mythfrontend.conf b/media-tv/mythtv/files/mythfrontend.conf new file mode 100644 index 000000000000..c0b8ba9f6eea --- /dev/null +++ b/media-tv/mythtv/files/mythfrontend.conf @@ -0,0 +1,13 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# Should 'mythfrontend' really execute mythwelcome instead? +# Default: false +MYTHWELCOME=false + +# Options to pass to mythfrontend or mythwelcome based on the above setting +# Note: If you have mythwelcome enabled, it does not pass arguments to +# mythfrontend. You must configure this inside mythwelcome +# Default: --syslog local7 +MYTHFRONTEND_OPTS="--syslog local7" diff --git a/media-tv/mythtv/files/mythfrontend.wrapper b/media-tv/mythtv/files/mythfrontend.wrapper new file mode 100644 index 000000000000..ce3608ec1f9a --- /dev/null +++ b/media-tv/mythtv/files/mythfrontend.wrapper @@ -0,0 +1,29 @@ +#!/bin/sh +# Based on Mythbuntu's script + +# Check if the frontend is already running, +# if it is bring it to the foreground. +# This is to prevent multiple frontends from running +/usr/bin/pgrep mythfrontend.real 2>&1 > /dev/null && \ + /usr/bin/wmctrl -a "MythTV Frontend" 2> /dev/null && \ + exit 0 + +# Check if you're part of the video group +if [ -n "$(groups | grep -v video)" ]; then + echo "'$USER' is not part of the 'video' group." >&2 + echo "For best results add '$USER' to the 'video' group." >&2 +fi + +if [ -e /etc/conf.d/mythfrontend ]; then + . /etc/conf.d/mythfrontend +fi + +if [ "x${MYTHWELCOME}" = "xtrue" ]; then + exec /usr/bin/mythwelcome ${MYTHFRONTEND_OPTS} "$@" + RET=$? +else + exec /usr/bin/mythfrontend.real ${MYTHFRONTEND_OPTS} "$@" + RET=$? +fi + +exit ${RET} diff --git a/media-tv/mythtv/files/mythtv.logrotate.d-r3 b/media-tv/mythtv/files/mythtv.logrotate.d-r3 new file mode 100644 index 000000000000..220776a1d087 --- /dev/null +++ b/media-tv/mythtv/files/mythtv.logrotate.d-r3 @@ -0,0 +1,20 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +/var/log/mythtv/*.log { + weekly + rotate 8 + nocompress + nocreate + notifempty + sharedscripts + missingok + olddir /var/log/mythtv/old + postrotate + killall -HUP mythfrontend + killall -HUP mythbackend + killall -HUP mythlcdserver + find /var/log/mythtv/old -type f -mtime +30 -delete + endscript +} diff --git a/media-tv/mythtv/files/mythtv.logrotate.d-r4 b/media-tv/mythtv/files/mythtv.logrotate.d-r4 new file mode 100644 index 000000000000..28e3ce62bfdb --- /dev/null +++ b/media-tv/mythtv/files/mythtv.logrotate.d-r4 @@ -0,0 +1,14 @@ +/var/log/mythtv/*.log { + weekly + rotate 8 + missingok + ifempty + nocreate + nocompress + sharedscripts + olddir /var/log/mythtv/old + lastaction + killall -HUP mythlogserver + find /var/log/mythtv/old -type f -mtime +30 -delete + endscript +} diff --git a/media-tv/mythtv/files/xinitrc-r1 b/media-tv/mythtv/files/xinitrc-r1 new file mode 100644 index 000000000000..c366fe487a84 --- /dev/null +++ b/media-tv/mythtv/files/xinitrc-r1 @@ -0,0 +1,8 @@ +# .xinitrc +[ -x /usr/bin/nvidia-settings ] && /usr/bin/nvidia-settings -l +/usr/bin/xset s noblank +/usr/bin/xset s off +/usr/bin/xset -dpms +/usr/bin/evilwm & +# Configure arguments via /etc/conf.d/mythfrontend +exec /usr/bin/mythfrontend diff --git a/media-tv/mythtv/metadata.xml b/media-tv/mythtv/metadata.xml new file mode 100644 index 000000000000..a1e2ee6a6769 --- /dev/null +++ b/media-tv/mythtv/metadata.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>mythtv</herd> + <use> + <flag name="alsa">Allows MythTV to directly output sound to ALSA devices, + this is needed if you are using ALSA dmix or SPDIF. Note, you will have + to physically type your device into the MythTV configuration since it + will only give you /dev/dsp devices in the drop down.</flag> + <flag name="altivec">Builds ffmpeg's codec libraries with altivec + support.</flag> + <flag name="autostart">Uses a custom autostart configuration gleaned from + experience with MythTV since its early versions and discussed with + other MythTV maintainers and users. Does not rely on KDE being installed + like most methods do.</flag> + <flag name="bluray">Pulls in libbluray for BluRay support.</flag> + <flag name="cec">Allows you to control CEC enabled TVs via HDMI. Currently + requires a USB based CEC -> HDMI injector between your TV and video + card since no graphics drivers support CEC natively.</flag> + <flag name="crystalhd">Allows you to utilize a Broadcom CrystalHD hardware + based video decoder to improve the performance of video decode.</flag> + <flag name="debug">Instructs Qt to use the 'debug' target instead of + 'release' target. If your MythTV is crashing or you need a backtrace, + you need to compile it with this option otherwise the debugging data is + useless.</flag> + <flag name="dvb">Enables support for Linux DVB cards. These include all + cards that work with digital signals such as ATSC, DVB-T, DVB-C, and + DVB-S, QAM-64, and QAM-256.</flag> + <flag name="egl">Support EGL video output.</flag> + <flag name="fftw">Support visualizations via <pkg>sci-libs/fftw</pkg></flag> + <flag name="hls">HTTP Live Streaming support</flag> + <flag name="ieee1394">Allows MythTV to communicate and use Firewire enabled + Cable boxes. These are typically found in the United States, where such + support is required by law. This will also install Firewire test + programs and external channel changers if the internal changer does not + work.</flag> + <flag name="jack">Allows MythTV to use JACK as your sound output device. You + will have to manually configure the path to your JACK settings.</flag> + <flag name="lcd">Tells MythTV that you have an instance of + <pkg>app-misc/lcdproc</pkg> configured on your machine and it should + output information such as current time, show name, episode name, etc to + that LCD.</flag> + <flag name="lirc">Adds LIRC support directly to MythTV allowing for built in + control via a LIRC device.</flag> + <flag name="perl">Builds the perl bindings for MythTV. Allows you to write + scripts in Perl to control your MythTV setup or communicate with + it.</flag> + <flag name="raop">Remote Audio Output Protocol (aka AirTunes/AirPlay)</flag> + <flag name="wrapper">Use Ubuntu mythtfrontend wrapper.</flag> + <flag name="xmltv">Pulls in the <pkg>media-tv/xmltv</pkg> TV listing + grabbers for users not using Schedules Direct.</flag> + </use> + <upstream> + <remote-id type="github">MythTV/mythtv</remote-id> + </upstream> +</pkgmetadata> diff --git a/media-tv/mythtv/mythtv-0.26.0_p20130922.ebuild b/media-tv/mythtv/mythtv-0.26.0_p20130922.ebuild new file mode 100644 index 000000000000..a691229d41c5 --- /dev/null +++ b/media-tv/mythtv/mythtv-0.26.0_p20130922.ebuild @@ -0,0 +1,347 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_DEPEND="python? 2:2.6" +BACKPORTS="9fd7c6102b2cd1a3760337663803b110446c6ea7" +MY_P=${P%_p*} + +inherit flag-o-matic multilib eutils python user + +MYTHTV_VERSION="v0.26.0" +MYTHTV_BRANCH="fixes/0.26" + +DESCRIPTION="Homebrew PVR project" +HOMEPAGE="http://www.mythtv.org" +SRC_URI="ftp://ftp.osuosl.org/pub/mythtv/${MY_P}.tar.bz2 + ${BACKPORTS:+http://dev.gentoo.org/~rich0/distfiles/${MY_P}-${BACKPORTS}.tar.xz}" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="amd64 x86" + +IUSE_INPUT_DEVICES="input_devices_joystick" +IUSE="alsa altivec libass autostart bluray cec crystalhd debug dvb dvd \ +egl fftw +hls ieee1394 jack lcd lirc perl pulseaudio python raop +theora \ +vaapi vdpau +vorbis +xml xmltv +xvid ${IUSE_INPUT_DEVICES}" + +REQUIRED_USE=" + bluray? ( xml ) + theora? ( vorbis )" + +COMMON=" + >=media-libs/freetype-2.0:= + sys-libs/zlib:= + x11-libs/libX11:= + x11-libs/libXext:= + x11-libs/libXinerama:= + x11-libs/libXv:= + x11-libs/libXrandr:= + x11-libs/libXxf86vm:= + >=dev-qt/qtcore-4.7.2:4= + >=dev-qt/qtdbus-4.7.2:4= + >=dev-qt/qtgui-4.7.2:4= + >=dev-qt/qtscript-4.7.2:4= + >=dev-qt/qtsql-4.7.2:4=[mysql] + >=dev-qt/qtopengl-4.7.2:4=[egl?] + >=dev-qt/qtwebkit-4.7.2:4= + x11-misc/wmctrl:= + virtual/mysql:= + virtual/opengl:= + alsa? ( >=media-libs/alsa-lib-1.0.24:= ) + bluray? ( + dev-libs/libcdio:= + media-libs/libbluray:= + ) + cec? ( dev-libs/libcec:= ) + dvb? ( + media-libs/libdvb:= + virtual/linuxtv-dvb-headers:= + ) + dvd? ( dev-libs/libcdio:= ) + egl? ( media-libs/mesa:=[egl] ) + fftw? ( sci-libs/fftw:3.0= ) + hls? ( + media-libs/faac:= + media-libs/libvpx:= + >=media-libs/x264-0.0.20111220:= + >=media-sound/lame-3.93.1 + ) + ieee1394? ( + >=sys-libs/libraw1394-1.2.0:= + >=sys-libs/libavc1394-0.5.3:= + >=media-libs/libiec61883-1.0.0:= + ) + jack? ( media-sound/jack-audio-connection-kit ) + lcd? ( app-misc/lcdproc ) + libass? ( >=media-libs/libass-0.9.11:= ) + lirc? ( app-misc/lirc ) + perl? ( + dev-perl/DBD-mysql + dev-perl/Net-UPnP + dev-perl/LWP-Protocol-https + dev-perl/HTTP-Message + dev-perl/IO-Socket-INET6 + >=dev-perl/libwww-perl-5 + ) + pulseaudio? ( media-sound/pulseaudio ) + python? ( + dev-python/mysql-python + dev-python/lxml + dev-python/urlgrabber + ) + raop? ( + dev-libs/openssl:= + net-dns/avahi[mdnsresponder-compat] + ) + theora? ( media-libs/libtheora:= ) + vaapi? ( x11-libs/libva:= ) + vdpau? ( x11-libs/libvdpau:= ) + vorbis? ( >=media-libs/libvorbis-1.0:= ) + xml? ( >=dev-libs/libxml2-2.6.0:= ) + xvid? ( >=media-libs/xvid-1.1.0:= ) + !media-tv/mythtv-bindings + !x11-themes/mythtv-themes + " + +RDEPEND="${COMMON} + media-fonts/corefonts + media-fonts/dejavu + media-fonts/liberation-fonts + x11-apps/xinit + autostart? ( + net-dialup/mingetty + x11-wm/evilwm + x11-apps/xset + ) + dvd? ( media-libs/libdvdcss:= ) + xmltv? ( >=media-tv/xmltv-0.5.43 ) + " + +DEPEND="${COMMON} + dev-lang/yasm + x11-proto/xineramaproto + x11-proto/xf86vidmodeproto + " + +S="${WORKDIR}/${MY_P}" + +MYTHTV_GROUPS="video,audio,tty,uucp" + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup + enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS} + usermod -a -G ${MYTHTV_GROUPS} mythtv +} + +src_prepare() { + [[ -n ${BACKPORTS} ]] && \ + EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \ + epatch + + # Perl bits need to go into vender_perl and not site_perl + sed -e "s:pure_install:pure_install INSTALLDIRS=vendor:" \ + -i "${S}"/bindings/perl/Makefile + + # Fix up the version info since we are using the fixes/${PV} branch + echo "SOURCE_VERSION=\"${MYTHTV_VERSION}\"" > "${S}"/VERSION + echo "BRANCH=\"${MYTHTV_BRANCH}\"" >> "${S}"/VERSION + + echo "setting.extra -= -ldconfig" >> "${S}"/programs/mythfrontend/mythfrontend.pro + + epatch "${FILESDIR}/libdir.patch" + + epatch_user +} + +src_configure() { + local myconf= + + # Setup paths + myconf="${myconf} --prefix=${EPREFIX}/usr" + myconf="${myconf} --libdir=${EPREFIX}/usr/$(get_libdir)" + myconf="${myconf} --libdir-name=$(get_libdir)" + myconf="${myconf} --mandir=${EPREFIX}/usr/share/man" + + # Audio + myconf="${myconf} $(use_enable alsa audio-alsa)" + myconf="${myconf} $(use_enable jack audio-jack)" + use pulseaudio || myconf="${myconf} --disable-audio-pulseoutput" + + use altivec || myconf="${myconf} --disable-altivec" + myconf="${myconf} $(use_enable dvb)" + myconf="${myconf} $(use_enable ieee1394 firewire)" + myconf="${myconf} $(use_enable lirc)" + myconf="${myconf} $(use_enable xvid libxvid)" + myconf="${myconf} --dvb-path=/usr/include" + myconf="${myconf} --enable-xrandr" + myconf="${myconf} --enable-xv" + myconf="${myconf} --enable-x11" + myconf="${myconf} --enable-nonfree" + use cec || myconf="${myconf} --disable-libcec" + use raop || myconf="${myconf} --disable-libdns-sd" + myconf="${myconf} $(use_enable theora libtheora)" + myconf="${myconf} $(use_enable vorbis libvorbis)" + + if use hls; then + myconf="${myconf} --enable-libmp3lame" + myconf="${myconf} --enable-libx264" + myconf="${myconf} --enable-libvpx" + myconf="${myconf} --enable-libfaac" + fi + + if use perl && use python; then + myconf="${myconf} --with-bindings=perl,python" + elif use perl; then + myconf="${myconf} --without-bindings=python" + myconf="${myconf} --with-bindings=perl" + elif use python; then + myconf="${myconf} --without-bindings=perl" + myconf="${myconf} --with-bindings=python" + else + myconf="${myconf} --without-bindings=perl,python" + fi + + use python && myconf="${myconf} --python=$(PYTHON)" + + if use debug; then + myconf="${myconf} --compile-type=debug" + else + myconf="${myconf} --compile-type=profile" + #myconf="${myconf} --enable-debug" does nothing per sphery + #myconf="${myconf} --disable-stripping" does nothing per sphery + fi + + # Video + use vdpau && myconf="${myconf} --enable-vdpau" + use vaapi && myconf="${myconf} --enable-vaapi" + use crystalhd && myconf="${myconf} --enable-crystalhd" + + # Input + use input_devices_joystick || myconf="${myconf} --disable-joystick-menu" + + # Clean up DSO load times and other compiler bits + myconf="${myconf} --enable-symbol-visibility" + myconf="${myconf} --enable-pic" + + # CPU settings + for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do + [ "${i}" = "native" ] && i="host" + myconf="${myconf} --cpu=${i}" + break + done + + if tc-is-cross-compiler ; then + myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)" + myconf="${myconf} --cross-prefix=${CHOST}-" + fi + + # Build boosters + has distcc ${FEATURES} || myconf="${myconf} --disable-distcc" + has ccache ${FEATURES} || myconf="${myconf} --disable-ccache" + + chmod +x ./external/FFmpeg/version.sh + + einfo "Running ./configure ${myconf}" + ./configure \ + --cc="$(tc-getCC)" \ + --cxx="$(tc-getCXX)" \ + --ar="$(tc-getAR)" \ + --extra-cflags="${CFLAGS}" \ + --extra-cxxflags="${CXXFLAGS}" \ + --extra-ldflags="${LDFLAGS}" \ + ${myconf} || die "configure died" +} + +src_install() { + emake INSTALL_ROOT="${D}" install || die "install failed" + dodoc AUTHORS UPGRADING README + + insinto /usr/share/mythtv/database + doins database/* + + newinitd "${FILESDIR}"/mythbackend.init mythbackend + newconfd "${FILESDIR}"/mythbackend.conf mythbackend + + dodoc keys.txt + + keepdir /etc/mythtv + chown -R mythtv "${ED}"/etc/mythtv + keepdir /var/log/mythtv + chown -R mythtv "${ED}"/var/log/mythtv + dodir /var/log/mythtv/old + + insinto /etc/logrotate.d + newins "${FILESDIR}"/mythtv.logrotate.d-r4 mythtv + + insinto /usr/share/mythtv/contrib + doins -r contrib/* + + # Install our mythfrontend wrapper which is similar to Mythbuntu's + mv "${ED}/usr/bin/mythfrontend" "${ED}/usr/bin/mythfrontend.real" + newbin "${FILESDIR}"/mythfrontend.wrapper mythfrontend + newconfd "${FILESDIR}"/mythfrontend.conf mythfrontend + + if use autostart; then + dodir /etc/env.d/ + echo 'CONFIG_PROTECT="/home/mythtv/"' > "${ED}"/etc/env.d/95mythtv + + insinto /home/mythtv + newins "${FILESDIR}"/bash_profile .bash_profile + newins "${FILESDIR}"/xinitrc-r1 .xinitrc + fi + + # Make Python files executable + find "${ED}/usr/share/mythtv" -type f -name '*.py' | while read file; do + if [[ ! "${file##*/}" = "__init__.py" ]]; then + chmod a+x "${file}" + fi + done + + # Ensure that Python scripts are executed by Python 2 + python_convert_shebangs -q -r 2 "${ED}/usr/share/mythtv" + + # Make shell & perl scripts executable + find "${ED}" -type f -name '*.sh' -o -type f -name '*.pl' | \ + while read file; do + chmod a+x "${file}" + done +} + +pkg_preinst() { + export CONFIG_PROTECT="${CONFIG_PROTECT} ${EROOT}/home/mythtv/" +} + +pkg_postinst() { + use python && python_mod_optimize MythTV + + elog "To have this machine operate as recording host for MythTV, " + elog "mythbackend must be running. Run the following:" + elog "rc-update add mythbackend default" + elog + elog "Your recordings folder must be owned 'mythtv'. e.g." + elog "chown -R mythtv /var/lib/mythtv" + + elog "Want mythfrontend to start automatically?" + elog "Set USE=autostart. Details can be found at:" + elog "http://dev.gentoo.org/~cardoe/mythtv/autostart.html" +} + +pkg_postrm() { + use python && python_mod_cleanup MythTV +} + +pkg_info() { + if [[ -f "${EROOT}"/usr/bin/mythfrontend ]]; then + "${EROOT}"/usr/bin/mythfrontend --version + fi +} + +pkg_config() { + echo "Creating mythtv MySQL user and mythconverg database if it does not" + echo "already exist. You will be prompted for your MySQL root password." + "${EROOT}"/usr/bin/mysql -u root -p < "${EROOT}"/usr/share/mythtv/database/mc.sql +} diff --git a/media-tv/mythtv/mythtv-0.27.1_p20140713.ebuild b/media-tv/mythtv/mythtv-0.27.1_p20140713.ebuild new file mode 100644 index 000000000000..babdf7fc4239 --- /dev/null +++ b/media-tv/mythtv/mythtv-0.27.1_p20140713.ebuild @@ -0,0 +1,350 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_DEPEND="python? 2:2.6" +BACKPORTS="aaae611819c6a6f92a55d5c82efb8738ec9a23df" +MY_P=${P%_p*} + +inherit flag-o-matic multilib eutils python user systemd + +MYTHTV_VERSION="v0.27.1" +MYTHTV_BRANCH="fixes/0.27" + +DESCRIPTION="Homebrew PVR project" +HOMEPAGE="http://www.mythtv.org" +SRC_URI="https://github.com/MythTV/mythtv/archive/v0.27.1.tar.gz -> mythtv-0.27.1.tar.gz + ${BACKPORTS:+http://dev.gentoo.org/~rich0/distfiles/${MY_P}-${BACKPORTS}.tar.xz}" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" + +IUSE_INPUT_DEVICES="input_devices_joystick" +IUSE="alsa altivec libass autostart bluray cec crystalhd debug dvb dvd \ +egl fftw +hls ieee1394 jack lcd lirc perl pulseaudio python raop +theora \ +vaapi vdpau +vorbis +xml xmltv +xvid ${IUSE_INPUT_DEVICES}" + +REQUIRED_USE=" + bluray? ( xml ) + theora? ( vorbis )" + +COMMON=" + >=media-libs/freetype-2.0:= + sys-libs/zlib:= + x11-libs/libX11:= + x11-libs/libXext:= + x11-libs/libXinerama:= + x11-libs/libXv:= + x11-libs/libXrandr:= + x11-libs/libXxf86vm:= + >=dev-qt/qtcore-4.7.2:4= + >=dev-qt/qtdbus-4.7.2:4= + >=dev-qt/qtgui-4.7.2:4= + >=dev-qt/qtscript-4.7.2:4= + >=dev-qt/qtsql-4.7.2:4=[mysql] + >=dev-qt/qtopengl-4.7.2:4=[egl?] + >=dev-qt/qtwebkit-4.7.2:4= + x11-misc/wmctrl:= + virtual/mysql:= + virtual/opengl:= + alsa? ( >=media-libs/alsa-lib-1.0.24:= ) + bluray? ( + dev-libs/libcdio:= + media-libs/libbluray:= + ) + cec? ( dev-libs/libcec:= ) + dvb? ( + media-libs/libdvb:= + virtual/linuxtv-dvb-headers:= + ) + dvd? ( dev-libs/libcdio:= ) + egl? ( media-libs/mesa:=[egl] ) + fftw? ( sci-libs/fftw:3.0= ) + hls? ( + media-libs/faac:= + media-libs/libvpx:= + >=media-libs/x264-0.0.20111220:= + >=media-sound/lame-3.93.1 + ) + ieee1394? ( + >=sys-libs/libraw1394-1.2.0:= + >=sys-libs/libavc1394-0.5.3:= + >=media-libs/libiec61883-1.0.0:= + ) + jack? ( media-sound/jack-audio-connection-kit ) + lcd? ( app-misc/lcdproc ) + libass? ( >=media-libs/libass-0.9.11:= ) + lirc? ( app-misc/lirc ) + perl? ( + dev-perl/DBD-mysql + dev-perl/Net-UPnP + dev-perl/LWP-Protocol-https + dev-perl/HTTP-Message + dev-perl/IO-Socket-INET6 + >=dev-perl/libwww-perl-5 + ) + pulseaudio? ( media-sound/pulseaudio ) + python? ( + dev-python/mysql-python + dev-python/lxml + dev-python/urlgrabber + ) + raop? ( + dev-libs/openssl:= + net-dns/avahi[mdnsresponder-compat] + ) + theora? ( media-libs/libtheora:= media-libs/libogg:= ) + vaapi? ( x11-libs/libva:= ) + vdpau? ( x11-libs/libvdpau:= ) + vorbis? ( >=media-libs/libvorbis-1.0:= media-libs/libogg:= ) + xml? ( >=dev-libs/libxml2-2.6.0:= ) + xvid? ( >=media-libs/xvid-1.1.0:= ) + !media-tv/mythtv-bindings + !x11-themes/mythtv-themes + media-libs/taglib:= + dev-libs/glib:= + " + +RDEPEND="${COMMON} + media-fonts/corefonts + media-fonts/dejavu + media-fonts/liberation-fonts + x11-apps/xinit + autostart? ( + net-dialup/mingetty + x11-wm/evilwm + x11-apps/xset + ) + dvd? ( media-libs/libdvdcss:= ) + xmltv? ( >=media-tv/xmltv-0.5.43 ) + " + +DEPEND="${COMMON} + dev-lang/yasm + x11-proto/xineramaproto + x11-proto/xf86vidmodeproto + " + +S="${WORKDIR}/${MY_P}/mythtv" + +MYTHTV_GROUPS="video,audio,tty,uucp" + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup + enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS} + usermod -a -G ${MYTHTV_GROUPS} mythtv +} + +src_prepare() { + [[ -n ${BACKPORTS} ]] && \ + EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/../patches" \ + epatch + + # Perl bits need to go into vender_perl and not site_perl + sed -e "s:pure_install:pure_install INSTALLDIRS=vendor:" \ + -i "${S}"/bindings/perl/Makefile + + # Fix up the version info since we are using the fixes/${PV} branch + echo "SOURCE_VERSION=\"${MYTHTV_VERSION}\"" > "${S}"/VERSION + echo "BRANCH=\"${MYTHTV_BRANCH}\"" >> "${S}"/VERSION + + echo "setting.extra -= -ldconfig" >> "${S}"/programs/mythfrontend/mythfrontend.pro + + epatch "${FILESDIR}/libdir-27.patch" + + epatch_user +} + +src_configure() { + local myconf= + + # Setup paths + myconf="${myconf} --prefix=${EPREFIX}/usr" + myconf="${myconf} --libdir=${EPREFIX}/usr/$(get_libdir)" + myconf="${myconf} --libdir-name=$(get_libdir)" + myconf="${myconf} --mandir=${EPREFIX}/usr/share/man" + + # Audio + myconf="${myconf} $(use_enable alsa audio-alsa)" + myconf="${myconf} $(use_enable jack audio-jack)" + use pulseaudio || myconf="${myconf} --disable-audio-pulseoutput" + + use altivec || myconf="${myconf} --disable-altivec" + myconf="${myconf} $(use_enable dvb)" + myconf="${myconf} $(use_enable ieee1394 firewire)" + myconf="${myconf} $(use_enable lirc)" + myconf="${myconf} $(use_enable xvid libxvid)" + myconf="${myconf} --dvb-path=/usr/include" + myconf="${myconf} --enable-xrandr" + myconf="${myconf} --enable-xv" + myconf="${myconf} --enable-x11" + myconf="${myconf} --enable-nonfree" + use cec || myconf="${myconf} --disable-libcec" + use raop || myconf="${myconf} --disable-libdns-sd" + myconf="${myconf} $(use_enable theora libtheora)" + myconf="${myconf} $(use_enable vorbis libvorbis)" + + if use hls; then + myconf="${myconf} --enable-libmp3lame" + myconf="${myconf} --enable-libx264" + myconf="${myconf} --enable-libvpx" + myconf="${myconf} --enable-libfaac" + fi + + if use perl && use python; then + myconf="${myconf} --with-bindings=perl,python" + elif use perl; then + myconf="${myconf} --without-bindings=python" + myconf="${myconf} --with-bindings=perl" + elif use python; then + myconf="${myconf} --without-bindings=perl" + myconf="${myconf} --with-bindings=python" + else + myconf="${myconf} --without-bindings=perl,python" + fi + + use python && myconf="${myconf} --python=$(PYTHON)" + + if use debug; then + myconf="${myconf} --compile-type=debug" + else + myconf="${myconf} --compile-type=release" + #myconf="${myconf} --enable-debug" does nothing per sphery + #myconf="${myconf} --disable-stripping" does nothing per sphery + fi + + # Video + use vdpau && myconf="${myconf} --enable-vdpau" + myconf="${myconf} $(use_enable vaapi)" + use crystalhd && myconf="${myconf} --enable-crystalhd" + + # Input + use input_devices_joystick || myconf="${myconf} --disable-joystick-menu" + + # Clean up DSO load times and other compiler bits + myconf="${myconf} --enable-symbol-visibility" + myconf="${myconf} --enable-pic" + + # CPU settings + for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do + [ "${i}" = "native" ] && i="host" + myconf="${myconf} --cpu=${i}" + break + done + + if tc-is-cross-compiler ; then + myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)" + myconf="${myconf} --cross-prefix=${CHOST}-" + fi + + # Build boosters + has distcc ${FEATURES} || myconf="${myconf} --disable-distcc" + has ccache ${FEATURES} || myconf="${myconf} --disable-ccache" + + chmod +x ./external/FFmpeg/version.sh + + einfo "Running ./configure ${myconf}" + ./configure \ + --cc="$(tc-getCC)" \ + --cxx="$(tc-getCXX)" \ + --ar="$(tc-getAR)" \ + --extra-cflags="${CFLAGS}" \ + --extra-cxxflags="${CXXFLAGS}" \ + --extra-ldflags="${LDFLAGS}" \ + ${myconf} || die "configure died" +} + +src_install() { + emake INSTALL_ROOT="${D}" install || die "install failed" + dodoc AUTHORS UPGRADING README + + insinto /usr/share/mythtv/database + doins database/* + + newinitd "${FILESDIR}"/mythbackend.init mythbackend + newconfd "${FILESDIR}"/mythbackend.conf mythbackend + systemd_dounit "${FILESDIR}"/mythbackend.service + + dodoc keys.txt + + keepdir /etc/mythtv + chown -R mythtv "${ED}"/etc/mythtv + keepdir /var/log/mythtv + chown -R mythtv "${ED}"/var/log/mythtv + dodir /var/log/mythtv/old + + insinto /etc/logrotate.d + newins "${FILESDIR}"/mythtv.logrotate.d-r4 mythtv + + insinto /usr/share/mythtv/contrib + doins -r contrib/* + + # Install our mythfrontend wrapper which is similar to Mythbuntu's + mv "${ED}/usr/bin/mythfrontend" "${ED}/usr/bin/mythfrontend.real" + newbin "${FILESDIR}"/mythfrontend.wrapper mythfrontend + newconfd "${FILESDIR}"/mythfrontend.conf mythfrontend + + if use autostart; then + dodir /etc/env.d/ + echo 'CONFIG_PROTECT="/home/mythtv/"' > "${ED}"/etc/env.d/95mythtv + + insinto /home/mythtv + newins "${FILESDIR}"/bash_profile .bash_profile + newins "${FILESDIR}"/xinitrc-r1 .xinitrc + fi + + # Make Python files executable + find "${ED}/usr/share/mythtv" -type f -name '*.py' | while read file; do + if [[ ! "${file##*/}" = "__init__.py" ]]; then + chmod a+x "${file}" + fi + done + + # Ensure that Python scripts are executed by Python 2 + python_convert_shebangs -q -r 2 "${ED}/usr/share/mythtv" + + # Make shell & perl scripts executable + find "${ED}" -type f -name '*.sh' -o -type f -name '*.pl' | \ + while read file; do + chmod a+x "${file}" + done +} + +pkg_preinst() { + export CONFIG_PROTECT="${CONFIG_PROTECT} ${EROOT}/home/mythtv/" +} + +pkg_postinst() { + use python && python_mod_optimize MythTV + + elog "To have this machine operate as recording host for MythTV, " + elog "mythbackend must be running. Run the following:" + elog "rc-update add mythbackend default" + elog + elog "Your recordings folder must be owned 'mythtv'. e.g." + elog "chown -R mythtv /var/lib/mythtv" + + elog "Want mythfrontend to start automatically?" + elog "Set USE=autostart. Details can be found at:" + elog "http://dev.gentoo.org/~cardoe/mythtv/autostart.html" +} + +pkg_postrm() { + use python && python_mod_cleanup MythTV +} + +pkg_info() { + if [[ -f "${EROOT}"/usr/bin/mythfrontend ]]; then + "${EROOT}"/usr/bin/mythfrontend --version + fi +} + +pkg_config() { + echo "Creating mythtv MySQL user and mythconverg database if it does not" + echo "already exist. You will be prompted for your MySQL root password." + "${EROOT}"/usr/bin/mysql -u root -p < "${EROOT}"/usr/share/mythtv/database/mc.sql +} diff --git a/media-tv/mythtv/mythtv-0.27.1_p20140817.ebuild b/media-tv/mythtv/mythtv-0.27.1_p20140817.ebuild new file mode 100644 index 000000000000..7c4ae99c9cd7 --- /dev/null +++ b/media-tv/mythtv/mythtv-0.27.1_p20140817.ebuild @@ -0,0 +1,353 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_DEPEND="python? 2:2.6" +BACKPORTS="082d5c1fbccd48dd862f14007c0445dee8502f3d" +MY_P=${P%_p*} + +inherit flag-o-matic multilib eutils python user systemd + +MYTHTV_VERSION="v0.27.1" +MYTHTV_BRANCH="fixes/0.27" + +DESCRIPTION="Homebrew PVR project" +HOMEPAGE="http://www.mythtv.org" +SRC_URI="https://github.com/MythTV/mythtv/archive/v0.27.1.tar.gz -> mythtv-0.27.1.tar.gz + ${BACKPORTS:+http://dev.gentoo.org/~rich0/distfiles/${MY_P}-${BACKPORTS}.tar.xz}" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" + +IUSE_INPUT_DEVICES="input_devices_joystick" +IUSE="alsa altivec libass autostart bluray cec crystalhd debug dvb dvd \ +egl fftw +hls ieee1394 jack lcd lirc perl pulseaudio python raop +theora \ +vaapi vdpau +vorbis +xml xmltv +xvid ${IUSE_INPUT_DEVICES}" + +REQUIRED_USE=" + bluray? ( xml ) + theora? ( vorbis )" + +COMMON=" + >=media-libs/freetype-2.0:= + sys-libs/zlib:= + x11-libs/libX11:= + x11-libs/libXext:= + x11-libs/libXinerama:= + x11-libs/libXv:= + x11-libs/libXrandr:= + x11-libs/libXxf86vm:= + >=dev-qt/qtcore-4.7.2:4= + >=dev-qt/qtdbus-4.7.2:4= + >=dev-qt/qtgui-4.7.2:4= + >=dev-qt/qtscript-4.7.2:4= + >=dev-qt/qtsql-4.7.2:4=[mysql] + >=dev-qt/qtopengl-4.7.2:4=[egl?] + >=dev-qt/qtwebkit-4.7.2:4= + x11-misc/wmctrl:= + virtual/mysql:= + virtual/opengl:= + alsa? ( >=media-libs/alsa-lib-1.0.24:= ) + bluray? ( + dev-libs/libcdio:= + media-libs/libbluray:= + ) + cec? ( dev-libs/libcec:= ) + dvb? ( + media-libs/libdvb:= + virtual/linuxtv-dvb-headers:= + ) + dvd? ( dev-libs/libcdio:= ) + egl? ( media-libs/mesa:=[egl] ) + fftw? ( sci-libs/fftw:3.0= ) + hls? ( + media-libs/faac:= + media-libs/libvpx:= + >=media-libs/x264-0.0.20111220:= + >=media-sound/lame-3.93.1 + ) + ieee1394? ( + >=sys-libs/libraw1394-1.2.0:= + >=sys-libs/libavc1394-0.5.3:= + >=media-libs/libiec61883-1.0.0:= + ) + jack? ( media-sound/jack-audio-connection-kit ) + lcd? ( app-misc/lcdproc ) + libass? ( >=media-libs/libass-0.9.11:= ) + lirc? ( app-misc/lirc ) + perl? ( + dev-perl/DBD-mysql + dev-perl/Net-UPnP + dev-perl/LWP-Protocol-https + dev-perl/HTTP-Message + dev-perl/IO-Socket-INET6 + >=dev-perl/libwww-perl-5 + ) + pulseaudio? ( media-sound/pulseaudio ) + python? ( + dev-python/mysql-python + dev-python/lxml + dev-python/urlgrabber + ) + raop? ( + dev-libs/openssl:= + net-dns/avahi[mdnsresponder-compat] + ) + theora? ( media-libs/libtheora:= media-libs/libogg:= ) + vaapi? ( x11-libs/libva:= ) + vdpau? ( x11-libs/libvdpau:= ) + vorbis? ( >=media-libs/libvorbis-1.0:= media-libs/libogg:= ) + xml? ( >=dev-libs/libxml2-2.6.0:= ) + xvid? ( >=media-libs/xvid-1.1.0:= ) + !media-tv/mythtv-bindings + !x11-themes/mythtv-themes + media-libs/taglib:= + dev-libs/glib:= + " + +RDEPEND="${COMMON} + media-fonts/corefonts + media-fonts/dejavu + media-fonts/liberation-fonts + x11-apps/xinit + autostart? ( + net-dialup/mingetty + x11-wm/evilwm + x11-apps/xset + ) + dvd? ( media-libs/libdvdcss:= ) + xmltv? ( >=media-tv/xmltv-0.5.43 ) + " + +DEPEND="${COMMON} + dev-lang/yasm + x11-proto/xineramaproto + x11-proto/xf86vidmodeproto + " + +S="${WORKDIR}/${MY_P}/mythtv" + +MYTHTV_GROUPS="video,audio,tty,uucp" + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup + enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS} + usermod -a -G ${MYTHTV_GROUPS} mythtv +} + +src_prepare() { + [[ -n ${BACKPORTS} ]] && \ + EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/../patches" \ + epatch + + # Perl bits need to go into vender_perl and not site_perl + sed -e "s:pure_install:pure_install INSTALLDIRS=vendor:" \ + -i "${S}"/bindings/perl/Makefile + + # Fix up the version info since we are using the fixes/${PV} branch + echo "SOURCE_VERSION=\"${MYTHTV_VERSION}\"" > "${S}"/VERSION + echo "BRANCH=\"${MYTHTV_BRANCH}\"" >> "${S}"/VERSION + + echo "setting.extra -= -ldconfig" >> "${S}"/programs/mythfrontend/mythfrontend.pro + + epatch "${FILESDIR}/libdir-27.patch" + + epatch_user +} + +src_configure() { + local myconf= + + # Setup paths + myconf="${myconf} --prefix=${EPREFIX}/usr" + myconf="${myconf} --libdir=${EPREFIX}/usr/$(get_libdir)" + myconf="${myconf} --libdir-name=$(get_libdir)" + myconf="${myconf} --mandir=${EPREFIX}/usr/share/man" + + # Audio + myconf="${myconf} $(use_enable alsa audio-alsa)" + myconf="${myconf} $(use_enable jack audio-jack)" + use pulseaudio || myconf="${myconf} --disable-audio-pulseoutput" + + use altivec || myconf="${myconf} --disable-altivec" + myconf="${myconf} $(use_enable dvb)" + myconf="${myconf} $(use_enable ieee1394 firewire)" + myconf="${myconf} $(use_enable lirc)" + myconf="${myconf} $(use_enable xvid libxvid)" + myconf="${myconf} --dvb-path=/usr/include" + myconf="${myconf} --enable-xrandr" + myconf="${myconf} --enable-xv" + myconf="${myconf} --enable-x11" + myconf="${myconf} --enable-nonfree" + use cec || myconf="${myconf} --disable-libcec" + use raop || myconf="${myconf} --disable-libdns-sd" + myconf="${myconf} $(use_enable theora libtheora)" + myconf="${myconf} $(use_enable vorbis libvorbis)" + + if use hls; then + myconf="${myconf} --enable-libmp3lame" + myconf="${myconf} --enable-libx264" + myconf="${myconf} --enable-libvpx" + myconf="${myconf} --enable-libfaac" + fi + + if use perl && use python; then + myconf="${myconf} --with-bindings=perl,python" + elif use perl; then + myconf="${myconf} --without-bindings=python" + myconf="${myconf} --with-bindings=perl" + elif use python; then + myconf="${myconf} --without-bindings=perl" + myconf="${myconf} --with-bindings=python" + else + myconf="${myconf} --without-bindings=perl,python" + fi + + use python && myconf="${myconf} --python=$(PYTHON)" + + if use debug; then + myconf="${myconf} --compile-type=debug" + else + myconf="${myconf} --compile-type=release" + #myconf="${myconf} --enable-debug" does nothing per sphery + #myconf="${myconf} --disable-stripping" does nothing per sphery + fi + + # Video + use vdpau && myconf="${myconf} --enable-vdpau" + myconf="${myconf} $(use_enable vaapi)" + use crystalhd && myconf="${myconf} --enable-crystalhd" + + # Input + use input_devices_joystick || myconf="${myconf} --disable-joystick-menu" + + # Clean up DSO load times and other compiler bits + myconf="${myconf} --enable-symbol-visibility" + myconf="${myconf} --enable-pic" + + # CPU settings + for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do + [ "${i}" = "native" ] && i="host" + myconf="${myconf} --cpu=${i}" + break + done + + if tc-is-cross-compiler ; then + myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)" + myconf="${myconf} --cross-prefix=${CHOST}-" + fi + + # Build boosters + has distcc ${FEATURES} || myconf="${myconf} --disable-distcc" + has ccache ${FEATURES} || myconf="${myconf} --disable-ccache" + + chmod +x ./external/FFmpeg/version.sh + + einfo "Running ./configure ${myconf}" + ./configure \ + --cc="$(tc-getCC)" \ + --cxx="$(tc-getCXX)" \ + --ar="$(tc-getAR)" \ + --extra-cflags="${CFLAGS}" \ + --extra-cxxflags="${CXXFLAGS}" \ + --extra-ldflags="${LDFLAGS}" \ + ${myconf} || die "configure died" +} + +src_install() { + emake INSTALL_ROOT="${D}" install || die "install failed" + dodoc AUTHORS UPGRADING README + + insinto /usr/share/mythtv/database + doins database/* + + newinitd "${FILESDIR}"/mythbackend.init mythbackend + newconfd "${FILESDIR}"/mythbackend.conf mythbackend + systemd_dounit "${FILESDIR}"/mythbackend.service + + dodoc keys.txt + + keepdir /etc/mythtv + chown -R mythtv "${ED}"/etc/mythtv + keepdir /var/log/mythtv + chown -R mythtv "${ED}"/var/log/mythtv + dodir /var/log/mythtv/old + + insinto /etc/logrotate.d + newins "${FILESDIR}"/mythtv.logrotate.d-r4 mythtv + + insinto /usr/share/mythtv/contrib + doins -r contrib/* + + # Install our mythfrontend wrapper which is similar to Mythbuntu's + mv "${ED}/usr/bin/mythfrontend" "${ED}/usr/bin/mythfrontend.real" + newbin "${FILESDIR}"/mythfrontend.wrapper mythfrontend + newconfd "${FILESDIR}"/mythfrontend.conf mythfrontend + + if use autostart; then + dodir /etc/env.d/ + echo 'CONFIG_PROTECT="/home/mythtv/"' > "${ED}"/etc/env.d/95mythtv + + insinto /home/mythtv + newins "${FILESDIR}"/bash_profile .bash_profile + newins "${FILESDIR}"/xinitrc-r1 .xinitrc + fi + + # Make Python files executable + find "${ED}/usr/share/mythtv" -type f -name '*.py' | while read file; do + if [[ ! "${file##*/}" = "__init__.py" ]]; then + chmod a+x "${file}" + fi + done + + # Ensure that Python scripts are executed by Python 2 + python_convert_shebangs -q -r 2 "${ED}/usr/share/mythtv" + + # Make shell & perl scripts executable + find "${ED}" -type f -name '*.sh' -o -type f -name '*.pl' | \ + while read file; do + chmod a+x "${file}" + done +} + +pkg_preinst() { + export CONFIG_PROTECT="${CONFIG_PROTECT} ${EROOT}/home/mythtv/" +} + +pkg_postinst() { + use python && python_mod_optimize MythTV + + elog "To have this machine operate as recording host for MythTV, " + elog "mythbackend must be running. Run the following:" + elog "rc-update add mythbackend default" + elog + elog "Your recordings folder must be owned 'mythtv'. e.g." + elog "chown -R mythtv /var/lib/mythtv" + + elog "Want mythfrontend to start automatically?" + elog "Set USE=autostart. Details can be found at:" + elog "http://dev.gentoo.org/~cardoe/mythtv/autostart.html" + elog + elog "Note that the systemd unit now restarts by default and logs" + elog "to journald via the console at the notice verbosity." +} + +pkg_postrm() { + use python && python_mod_cleanup MythTV +} + +pkg_info() { + if [[ -f "${EROOT}"/usr/bin/mythfrontend ]]; then + "${EROOT}"/usr/bin/mythfrontend --version + fi +} + +pkg_config() { + echo "Creating mythtv MySQL user and mythconverg database if it does not" + echo "already exist. You will be prompted for your MySQL root password." + "${EROOT}"/usr/bin/mysql -u root -p < "${EROOT}"/usr/share/mythtv/database/mc.sql +} diff --git a/media-tv/mythtv/mythtv-0.27.3_p20140907.ebuild b/media-tv/mythtv/mythtv-0.27.3_p20140907.ebuild new file mode 100644 index 000000000000..1eec0c6c44a4 --- /dev/null +++ b/media-tv/mythtv/mythtv-0.27.3_p20140907.ebuild @@ -0,0 +1,355 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_DEPEND="python? 2:2.6" +BACKPORTS="2d4a7c9235287b0589035974bff282e3f2e9a7e5" +MY_P=${P%_p*} + +inherit flag-o-matic multilib eutils python user systemd + +MYTHTV_VERSION="v0.27.3" +MYTHTV_BRANCH="fixes/0.27" + +DESCRIPTION="Homebrew PVR project" +HOMEPAGE="http://www.mythtv.org" +SRC_URI="https://github.com/MythTV/mythtv/archive/v0.27.3.tar.gz -> mythtv-0.27.3.tar.gz + ${BACKPORTS:+http://dev.gentoo.org/~rich0/distfiles/${MY_P}-${BACKPORTS}.tar.xz}" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" + +IUSE_INPUT_DEVICES="input_devices_joystick" +IUSE="alsa altivec libass autostart bluray cec crystalhd debug dvb dvd \ +egl fftw +hls ieee1394 jack lcd lirc perl pulseaudio python raop +theora \ +vaapi vdpau +vorbis +xml xmltv +xvid ${IUSE_INPUT_DEVICES}" + +REQUIRED_USE=" + bluray? ( xml ) + theora? ( vorbis )" + +COMMON=" + >=media-libs/freetype-2.0:= + sys-libs/zlib:= + x11-libs/libX11:= + x11-libs/libXext:= + x11-libs/libXinerama:= + x11-libs/libXv:= + x11-libs/libXrandr:= + x11-libs/libXxf86vm:= + >=dev-qt/qtcore-4.7.2:4= + >=dev-qt/qtdbus-4.7.2:4= + >=dev-qt/qtgui-4.7.2:4= + >=dev-qt/qtscript-4.7.2:4= + >=dev-qt/qtsql-4.7.2:4=[mysql] + >=dev-qt/qtopengl-4.7.2:4=[egl?] + >=dev-qt/qtwebkit-4.7.2:4= + x11-misc/wmctrl:= + virtual/mysql:= + virtual/opengl:= + alsa? ( >=media-libs/alsa-lib-1.0.24:= ) + bluray? ( + dev-libs/libcdio:= + media-libs/libbluray:= + ) + cec? ( dev-libs/libcec:= ) + dvb? ( + media-libs/libdvb:= + virtual/linuxtv-dvb-headers:= + ) + dvd? ( dev-libs/libcdio:= ) + egl? ( media-libs/mesa:=[egl] ) + fftw? ( sci-libs/fftw:3.0= ) + hls? ( + media-libs/faac:= + media-libs/libvpx:= + >=media-libs/x264-0.0.20111220:= + >=media-sound/lame-3.93.1 + ) + ieee1394? ( + >=sys-libs/libraw1394-1.2.0:= + >=sys-libs/libavc1394-0.5.3:= + >=media-libs/libiec61883-1.0.0:= + ) + jack? ( media-sound/jack-audio-connection-kit ) + lcd? ( app-misc/lcdproc ) + libass? ( >=media-libs/libass-0.9.11:= ) + lirc? ( app-misc/lirc ) + perl? ( + dev-perl/DBD-mysql + dev-perl/Net-UPnP + dev-perl/LWP-Protocol-https + dev-perl/HTTP-Message + dev-perl/IO-Socket-INET6 + >=dev-perl/libwww-perl-5 + ) + pulseaudio? ( media-sound/pulseaudio ) + python? ( + dev-python/mysql-python + dev-python/lxml + dev-python/urlgrabber + ) + raop? ( + dev-libs/openssl:= + net-dns/avahi[mdnsresponder-compat] + ) + theora? ( media-libs/libtheora:= media-libs/libogg:= ) + vaapi? ( x11-libs/libva:= ) + vdpau? ( x11-libs/libvdpau:= ) + vorbis? ( >=media-libs/libvorbis-1.0:= media-libs/libogg:= ) + xml? ( >=dev-libs/libxml2-2.6.0:= ) + xvid? ( >=media-libs/xvid-1.1.0:= ) + !media-tv/mythtv-bindings + !x11-themes/mythtv-themes + media-libs/taglib:= + dev-libs/glib:= + " + +RDEPEND="${COMMON} + media-fonts/corefonts + media-fonts/dejavu + media-fonts/liberation-fonts + x11-apps/xinit + autostart? ( + net-dialup/mingetty + x11-wm/evilwm + x11-apps/xset + ) + dvd? ( media-libs/libdvdcss:= ) + xmltv? ( >=media-tv/xmltv-0.5.43 ) + " + +DEPEND="${COMMON} + dev-lang/yasm + x11-proto/xineramaproto + x11-proto/xf86vidmodeproto + " + +S="${WORKDIR}/${MY_P}/mythtv" + +MYTHTV_GROUPS="video,audio,tty,uucp" + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup + enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS} + usermod -a -G ${MYTHTV_GROUPS} mythtv +} + +src_prepare() { + [[ -n ${BACKPORTS} ]] && \ + EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/../patches" \ + epatch + + # Perl bits need to go into vender_perl and not site_perl + sed -e "s:pure_install:pure_install INSTALLDIRS=vendor:" \ + -i "${S}"/bindings/perl/Makefile + + # Fix up the version info since we are using the fixes/${PV} branch + echo "SOURCE_VERSION=\"${MYTHTV_VERSION}\"" > "${S}"/VERSION + echo "BRANCH=\"${MYTHTV_BRANCH}\"" >> "${S}"/VERSION + + echo "setting.extra -= -ldconfig" >> "${S}"/programs/mythfrontend/mythfrontend.pro + + epatch "${FILESDIR}/libdir-27.patch" + + epatch_user +} + +src_configure() { + local myconf= + + # Setup paths + myconf="${myconf} --prefix=${EPREFIX}/usr" + myconf="${myconf} --libdir=${EPREFIX}/usr/$(get_libdir)" + myconf="${myconf} --libdir-name=$(get_libdir)" + myconf="${myconf} --mandir=${EPREFIX}/usr/share/man" + + # Audio + myconf="${myconf} $(use_enable alsa audio-alsa)" + myconf="${myconf} $(use_enable jack audio-jack)" + use pulseaudio || myconf="${myconf} --disable-audio-pulseoutput" + + use altivec || myconf="${myconf} --disable-altivec" + myconf="${myconf} $(use_enable dvb)" + myconf="${myconf} $(use_enable ieee1394 firewire)" + myconf="${myconf} $(use_enable lirc)" + myconf="${myconf} $(use_enable xvid libxvid)" + myconf="${myconf} --dvb-path=/usr/include" + myconf="${myconf} --enable-xrandr" + myconf="${myconf} --enable-xv" + myconf="${myconf} --enable-x11" + myconf="${myconf} --enable-nonfree" + use cec || myconf="${myconf} --disable-libcec" + use raop || myconf="${myconf} --disable-libdns-sd" + myconf="${myconf} $(use_enable theora libtheora)" + myconf="${myconf} $(use_enable vorbis libvorbis)" + + if use hls; then + myconf="${myconf} --enable-libmp3lame" + myconf="${myconf} --enable-libx264" + myconf="${myconf} --enable-libvpx" + myconf="${myconf} --enable-libfaac" + fi + + myconf="${myconf} $(use_enable libass)" + + if use perl && use python; then + myconf="${myconf} --with-bindings=perl,python" + elif use perl; then + myconf="${myconf} --without-bindings=python" + myconf="${myconf} --with-bindings=perl" + elif use python; then + myconf="${myconf} --without-bindings=perl" + myconf="${myconf} --with-bindings=python" + else + myconf="${myconf} --without-bindings=perl,python" + fi + + use python && myconf="${myconf} --python=$(PYTHON)" + + if use debug; then + myconf="${myconf} --compile-type=debug" + else + myconf="${myconf} --compile-type=release" + #myconf="${myconf} --enable-debug" does nothing per sphery + #myconf="${myconf} --disable-stripping" does nothing per sphery + fi + + # Video + use vdpau && myconf="${myconf} --enable-vdpau" + myconf="${myconf} $(use_enable vaapi)" + use crystalhd && myconf="${myconf} --enable-crystalhd" + + # Input + use input_devices_joystick || myconf="${myconf} --disable-joystick-menu" + + # Clean up DSO load times and other compiler bits + myconf="${myconf} --enable-symbol-visibility" + myconf="${myconf} --enable-pic" + + # CPU settings + for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do + [ "${i}" = "native" ] && i="host" + myconf="${myconf} --cpu=${i}" + break + done + + if tc-is-cross-compiler ; then + myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)" + myconf="${myconf} --cross-prefix=${CHOST}-" + fi + + # Build boosters + has distcc ${FEATURES} || myconf="${myconf} --disable-distcc" + has ccache ${FEATURES} || myconf="${myconf} --disable-ccache" + + chmod +x ./external/FFmpeg/version.sh + + einfo "Running ./configure ${myconf}" + ./configure \ + --cc="$(tc-getCC)" \ + --cxx="$(tc-getCXX)" \ + --ar="$(tc-getAR)" \ + --extra-cflags="${CFLAGS}" \ + --extra-cxxflags="${CXXFLAGS}" \ + --extra-ldflags="${LDFLAGS}" \ + ${myconf} || die "configure died" +} + +src_install() { + emake INSTALL_ROOT="${D}" install || die "install failed" + dodoc AUTHORS UPGRADING README + + insinto /usr/share/mythtv/database + doins database/* + + newinitd "${FILESDIR}"/mythbackend.init mythbackend + newconfd "${FILESDIR}"/mythbackend.conf mythbackend + systemd_dounit "${FILESDIR}"/mythbackend.service + + dodoc keys.txt + + keepdir /etc/mythtv + chown -R mythtv "${ED}"/etc/mythtv + keepdir /var/log/mythtv + chown -R mythtv "${ED}"/var/log/mythtv + dodir /var/log/mythtv/old + + insinto /etc/logrotate.d + newins "${FILESDIR}"/mythtv.logrotate.d-r4 mythtv + + insinto /usr/share/mythtv/contrib + doins -r contrib/* + + # Install our mythfrontend wrapper which is similar to Mythbuntu's + mv "${ED}/usr/bin/mythfrontend" "${ED}/usr/bin/mythfrontend.real" + newbin "${FILESDIR}"/mythfrontend.wrapper mythfrontend + newconfd "${FILESDIR}"/mythfrontend.conf mythfrontend + + if use autostart; then + dodir /etc/env.d/ + echo 'CONFIG_PROTECT="/home/mythtv/"' > "${ED}"/etc/env.d/95mythtv + + insinto /home/mythtv + newins "${FILESDIR}"/bash_profile .bash_profile + newins "${FILESDIR}"/xinitrc-r1 .xinitrc + fi + + # Make Python files executable + find "${ED}/usr/share/mythtv" -type f -name '*.py' | while read file; do + if [[ ! "${file##*/}" = "__init__.py" ]]; then + chmod a+x "${file}" + fi + done + + # Ensure that Python scripts are executed by Python 2 + python_convert_shebangs -q -r 2 "${ED}/usr/share/mythtv" + + # Make shell & perl scripts executable + find "${ED}" -type f -name '*.sh' -o -type f -name '*.pl' | \ + while read file; do + chmod a+x "${file}" + done +} + +pkg_preinst() { + export CONFIG_PROTECT="${CONFIG_PROTECT} ${EROOT}/home/mythtv/" +} + +pkg_postinst() { + use python && python_mod_optimize MythTV + + elog "To have this machine operate as recording host for MythTV, " + elog "mythbackend must be running. Run the following:" + elog "rc-update add mythbackend default" + elog + elog "Your recordings folder must be owned 'mythtv'. e.g." + elog "chown -R mythtv /var/lib/mythtv" + + elog "Want mythfrontend to start automatically?" + elog "Set USE=autostart. Details can be found at:" + elog "http://dev.gentoo.org/~cardoe/mythtv/autostart.html" + elog + elog "Note that the systemd unit now restarts by default and logs" + elog "to journald via the console at the notice verbosity." +} + +pkg_postrm() { + use python && python_mod_cleanup MythTV +} + +pkg_info() { + if [[ -f "${EROOT}"/usr/bin/mythfrontend ]]; then + "${EROOT}"/usr/bin/mythfrontend --version + fi +} + +pkg_config() { + echo "Creating mythtv MySQL user and mythconverg database if it does not" + echo "already exist. You will be prompted for your MySQL root password." + "${EROOT}"/usr/bin/mysql -u root -p < "${EROOT}"/usr/share/mythtv/database/mc.sql +} diff --git a/media-tv/mythtv/mythtv-0.27.3_p20141009.ebuild b/media-tv/mythtv/mythtv-0.27.3_p20141009.ebuild new file mode 100644 index 000000000000..ec69473e960b --- /dev/null +++ b/media-tv/mythtv/mythtv-0.27.3_p20141009.ebuild @@ -0,0 +1,355 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_DEPEND="python? 2:2.6" +BACKPORTS="e1d575da2fdde7ae7119972c688b0ddd15e676c4" +MY_P=${P%_p*} + +inherit flag-o-matic multilib eutils python user systemd + +MYTHTV_VERSION="v0.27.3" +MYTHTV_BRANCH="fixes/0.27" + +DESCRIPTION="Homebrew PVR project" +HOMEPAGE="http://www.mythtv.org" +SRC_URI="https://github.com/MythTV/mythtv/archive/v0.27.3.tar.gz -> mythtv-0.27.3.tar.gz + ${BACKPORTS:+http://dev.gentoo.org/~rich0/distfiles/${MY_P}-${BACKPORTS}.tar.xz}" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" + +IUSE_INPUT_DEVICES="input_devices_joystick" +IUSE="alsa altivec libass autostart bluray cec crystalhd debug dvb dvd \ +egl fftw +hls ieee1394 jack lcd lirc perl pulseaudio python raop +theora \ +vaapi vdpau +vorbis +xml xmltv +xvid ${IUSE_INPUT_DEVICES}" + +REQUIRED_USE=" + bluray? ( xml ) + theora? ( vorbis )" + +COMMON=" + >=media-libs/freetype-2.0:= + sys-libs/zlib:= + x11-libs/libX11:= + x11-libs/libXext:= + x11-libs/libXinerama:= + x11-libs/libXv:= + x11-libs/libXrandr:= + x11-libs/libXxf86vm:= + >=dev-qt/qtcore-4.7.2:4= + >=dev-qt/qtdbus-4.7.2:4= + >=dev-qt/qtgui-4.7.2:4= + >=dev-qt/qtscript-4.7.2:4= + >=dev-qt/qtsql-4.7.2:4=[mysql] + >=dev-qt/qtopengl-4.7.2:4=[egl?] + >=dev-qt/qtwebkit-4.7.2:4= + x11-misc/wmctrl:= + virtual/mysql:= + virtual/opengl:= + alsa? ( >=media-libs/alsa-lib-1.0.24:= ) + bluray? ( + dev-libs/libcdio:= + media-libs/libbluray:= + ) + cec? ( dev-libs/libcec:= ) + dvb? ( + media-libs/libdvb:= + virtual/linuxtv-dvb-headers:= + ) + dvd? ( dev-libs/libcdio:= ) + egl? ( media-libs/mesa:=[egl] ) + fftw? ( sci-libs/fftw:3.0= ) + hls? ( + media-libs/faac:= + media-libs/libvpx:= + >=media-libs/x264-0.0.20111220:= + >=media-sound/lame-3.93.1 + ) + ieee1394? ( + >=sys-libs/libraw1394-1.2.0:= + >=sys-libs/libavc1394-0.5.3:= + >=media-libs/libiec61883-1.0.0:= + ) + jack? ( media-sound/jack-audio-connection-kit ) + lcd? ( app-misc/lcdproc ) + libass? ( >=media-libs/libass-0.9.11:= ) + lirc? ( app-misc/lirc ) + perl? ( + dev-perl/DBD-mysql + dev-perl/Net-UPnP + dev-perl/LWP-Protocol-https + dev-perl/HTTP-Message + dev-perl/IO-Socket-INET6 + >=dev-perl/libwww-perl-5 + ) + pulseaudio? ( media-sound/pulseaudio ) + python? ( + dev-python/mysql-python + dev-python/lxml + dev-python/urlgrabber + ) + raop? ( + dev-libs/openssl:= + net-dns/avahi[mdnsresponder-compat] + ) + theora? ( media-libs/libtheora:= media-libs/libogg:= ) + vaapi? ( x11-libs/libva:= ) + vdpau? ( x11-libs/libvdpau:= ) + vorbis? ( >=media-libs/libvorbis-1.0:= media-libs/libogg:= ) + xml? ( >=dev-libs/libxml2-2.6.0:= ) + xvid? ( >=media-libs/xvid-1.1.0:= ) + !media-tv/mythtv-bindings + !x11-themes/mythtv-themes + media-libs/taglib:= + dev-libs/glib:= + " + +RDEPEND="${COMMON} + media-fonts/corefonts + media-fonts/dejavu + media-fonts/liberation-fonts + x11-apps/xinit + autostart? ( + net-dialup/mingetty + x11-wm/evilwm + x11-apps/xset + ) + dvd? ( media-libs/libdvdcss:= ) + xmltv? ( >=media-tv/xmltv-0.5.43 ) + " + +DEPEND="${COMMON} + dev-lang/yasm + x11-proto/xineramaproto + x11-proto/xf86vidmodeproto + " + +S="${WORKDIR}/${MY_P}/mythtv" + +MYTHTV_GROUPS="video,audio,tty,uucp" + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup + enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS} + usermod -a -G ${MYTHTV_GROUPS} mythtv +} + +src_prepare() { + [[ -n ${BACKPORTS} ]] && \ + EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/../patches" \ + epatch + + # Perl bits need to go into vender_perl and not site_perl + sed -e "s:pure_install:pure_install INSTALLDIRS=vendor:" \ + -i "${S}"/bindings/perl/Makefile + + # Fix up the version info since we are using the fixes/${PV} branch + echo "SOURCE_VERSION=\"${MYTHTV_VERSION}\"" > "${S}"/VERSION + echo "BRANCH=\"${MYTHTV_BRANCH}\"" >> "${S}"/VERSION + + echo "setting.extra -= -ldconfig" >> "${S}"/programs/mythfrontend/mythfrontend.pro + + epatch "${FILESDIR}/libdir-27.patch" + + epatch_user +} + +src_configure() { + local myconf= + + # Setup paths + myconf="${myconf} --prefix=${EPREFIX}/usr" + myconf="${myconf} --libdir=${EPREFIX}/usr/$(get_libdir)" + myconf="${myconf} --libdir-name=$(get_libdir)" + myconf="${myconf} --mandir=${EPREFIX}/usr/share/man" + + # Audio + myconf="${myconf} $(use_enable alsa audio-alsa)" + myconf="${myconf} $(use_enable jack audio-jack)" + use pulseaudio || myconf="${myconf} --disable-audio-pulseoutput" + + use altivec || myconf="${myconf} --disable-altivec" + myconf="${myconf} $(use_enable dvb)" + myconf="${myconf} $(use_enable ieee1394 firewire)" + myconf="${myconf} $(use_enable lirc)" + myconf="${myconf} $(use_enable xvid libxvid)" + myconf="${myconf} --dvb-path=/usr/include" + myconf="${myconf} --enable-xrandr" + myconf="${myconf} --enable-xv" + myconf="${myconf} --enable-x11" + myconf="${myconf} --enable-nonfree" + use cec || myconf="${myconf} --disable-libcec" + use raop || myconf="${myconf} --disable-libdns-sd" + myconf="${myconf} $(use_enable theora libtheora)" + myconf="${myconf} $(use_enable vorbis libvorbis)" + + if use hls; then + myconf="${myconf} --enable-libmp3lame" + myconf="${myconf} --enable-libx264" + myconf="${myconf} --enable-libvpx" + myconf="${myconf} --enable-libfaac" + fi + + myconf="${myconf} $(use_enable libass)" + + if use perl && use python; then + myconf="${myconf} --with-bindings=perl,python" + elif use perl; then + myconf="${myconf} --without-bindings=python" + myconf="${myconf} --with-bindings=perl" + elif use python; then + myconf="${myconf} --without-bindings=perl" + myconf="${myconf} --with-bindings=python" + else + myconf="${myconf} --without-bindings=perl,python" + fi + + use python && myconf="${myconf} --python=$(PYTHON)" + + if use debug; then + myconf="${myconf} --compile-type=debug" + else + myconf="${myconf} --compile-type=release" + #myconf="${myconf} --enable-debug" does nothing per sphery + #myconf="${myconf} --disable-stripping" does nothing per sphery + fi + + # Video + use vdpau && myconf="${myconf} --enable-vdpau" + myconf="${myconf} $(use_enable vaapi)" + use crystalhd && myconf="${myconf} --enable-crystalhd" + + # Input + use input_devices_joystick || myconf="${myconf} --disable-joystick-menu" + + # Clean up DSO load times and other compiler bits + myconf="${myconf} --enable-symbol-visibility" + myconf="${myconf} --enable-pic" + + # CPU settings + for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do + [ "${i}" = "native" ] && i="host" + myconf="${myconf} --cpu=${i}" + break + done + + if tc-is-cross-compiler ; then + myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)" + myconf="${myconf} --cross-prefix=${CHOST}-" + fi + + # Build boosters + has distcc ${FEATURES} || myconf="${myconf} --disable-distcc" + has ccache ${FEATURES} || myconf="${myconf} --disable-ccache" + + chmod +x ./external/FFmpeg/version.sh + + einfo "Running ./configure ${myconf}" + ./configure \ + --cc="$(tc-getCC)" \ + --cxx="$(tc-getCXX)" \ + --ar="$(tc-getAR)" \ + --extra-cflags="${CFLAGS}" \ + --extra-cxxflags="${CXXFLAGS}" \ + --extra-ldflags="${LDFLAGS}" \ + ${myconf} || die "configure died" +} + +src_install() { + emake INSTALL_ROOT="${D}" install || die "install failed" + dodoc AUTHORS UPGRADING README + + insinto /usr/share/mythtv/database + doins database/* + + newinitd "${FILESDIR}"/mythbackend.init mythbackend + newconfd "${FILESDIR}"/mythbackend.conf mythbackend + systemd_dounit "${FILESDIR}"/mythbackend.service + + dodoc keys.txt + + keepdir /etc/mythtv + chown -R mythtv "${ED}"/etc/mythtv + keepdir /var/log/mythtv + chown -R mythtv "${ED}"/var/log/mythtv + dodir /var/log/mythtv/old + + insinto /etc/logrotate.d + newins "${FILESDIR}"/mythtv.logrotate.d-r4 mythtv + + insinto /usr/share/mythtv/contrib + doins -r contrib/* + + # Install our mythfrontend wrapper which is similar to Mythbuntu's + mv "${ED}/usr/bin/mythfrontend" "${ED}/usr/bin/mythfrontend.real" + newbin "${FILESDIR}"/mythfrontend.wrapper mythfrontend + newconfd "${FILESDIR}"/mythfrontend.conf mythfrontend + + if use autostart; then + dodir /etc/env.d/ + echo 'CONFIG_PROTECT="/home/mythtv/"' > "${ED}"/etc/env.d/95mythtv + + insinto /home/mythtv + newins "${FILESDIR}"/bash_profile .bash_profile + newins "${FILESDIR}"/xinitrc-r1 .xinitrc + fi + + # Make Python files executable + find "${ED}/usr/share/mythtv" -type f -name '*.py' | while read file; do + if [[ ! "${file##*/}" = "__init__.py" ]]; then + chmod a+x "${file}" + fi + done + + # Ensure that Python scripts are executed by Python 2 + python_convert_shebangs -q -r 2 "${ED}/usr/share/mythtv" + + # Make shell & perl scripts executable + find "${ED}" -type f -name '*.sh' -o -type f -name '*.pl' | \ + while read file; do + chmod a+x "${file}" + done +} + +pkg_preinst() { + export CONFIG_PROTECT="${CONFIG_PROTECT} ${EROOT}/home/mythtv/" +} + +pkg_postinst() { + use python && python_mod_optimize MythTV + + elog "To have this machine operate as recording host for MythTV, " + elog "mythbackend must be running. Run the following:" + elog "rc-update add mythbackend default" + elog + elog "Your recordings folder must be owned 'mythtv'. e.g." + elog "chown -R mythtv /var/lib/mythtv" + + elog "Want mythfrontend to start automatically?" + elog "Set USE=autostart. Details can be found at:" + elog "http://dev.gentoo.org/~cardoe/mythtv/autostart.html" + elog + elog "Note that the systemd unit now restarts by default and logs" + elog "to journald via the console at the notice verbosity." +} + +pkg_postrm() { + use python && python_mod_cleanup MythTV +} + +pkg_info() { + if [[ -f "${EROOT}"/usr/bin/mythfrontend ]]; then + "${EROOT}"/usr/bin/mythfrontend --version + fi +} + +pkg_config() { + echo "Creating mythtv MySQL user and mythconverg database if it does not" + echo "already exist. You will be prompted for your MySQL root password." + "${EROOT}"/usr/bin/mysql -u root -p < "${EROOT}"/usr/share/mythtv/database/mc.sql +} diff --git a/media-tv/mythtv/mythtv-0.27.4_p20141018.ebuild b/media-tv/mythtv/mythtv-0.27.4_p20141018.ebuild new file mode 100644 index 000000000000..1e30d86eafb8 --- /dev/null +++ b/media-tv/mythtv/mythtv-0.27.4_p20141018.ebuild @@ -0,0 +1,355 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_DEPEND="python? 2:2.6" +BACKPORTS="b305eb5b7fc662146e74983fa3754d622695cdeb" +MY_P=${P%_p*} + +inherit flag-o-matic multilib eutils python user systemd + +MYTHTV_VERSION="v0.27.4" +MYTHTV_BRANCH="fixes/0.27" + +DESCRIPTION="Homebrew PVR project" +HOMEPAGE="http://www.mythtv.org" +SRC_URI="https://github.com/MythTV/mythtv/archive/v0.27.4.tar.gz -> mythtv-0.27.4.tar.gz + ${BACKPORTS:+http://dev.gentoo.org/~rich0/distfiles/${MY_P}-${BACKPORTS}.tar.xz}" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" + +IUSE_INPUT_DEVICES="input_devices_joystick" +IUSE="alsa altivec libass autostart bluray cec crystalhd debug dvb dvd \ +egl fftw +hls ieee1394 jack lcd lirc perl pulseaudio python raop +theora \ +vaapi vdpau +vorbis +xml xmltv +xvid ${IUSE_INPUT_DEVICES}" + +REQUIRED_USE=" + bluray? ( xml ) + theora? ( vorbis )" + +COMMON=" + >=media-libs/freetype-2.0:= + sys-libs/zlib:= + x11-libs/libX11:= + x11-libs/libXext:= + x11-libs/libXinerama:= + x11-libs/libXv:= + x11-libs/libXrandr:= + x11-libs/libXxf86vm:= + >=dev-qt/qtcore-4.7.2:4= + >=dev-qt/qtdbus-4.7.2:4= + >=dev-qt/qtgui-4.7.2:4= + >=dev-qt/qtscript-4.7.2:4= + >=dev-qt/qtsql-4.7.2:4=[mysql] + >=dev-qt/qtopengl-4.7.2:4=[egl?] + >=dev-qt/qtwebkit-4.7.2:4= + x11-misc/wmctrl:= + virtual/mysql:= + virtual/opengl:= + alsa? ( >=media-libs/alsa-lib-1.0.24:= ) + bluray? ( + dev-libs/libcdio:= + media-libs/libbluray:= + ) + cec? ( dev-libs/libcec:= ) + dvb? ( + media-libs/libdvb:= + virtual/linuxtv-dvb-headers:= + ) + dvd? ( dev-libs/libcdio:= ) + egl? ( media-libs/mesa:=[egl] ) + fftw? ( sci-libs/fftw:3.0= ) + hls? ( + media-libs/faac:= + media-libs/libvpx:= + >=media-libs/x264-0.0.20111220:= + >=media-sound/lame-3.93.1 + ) + ieee1394? ( + >=sys-libs/libraw1394-1.2.0:= + >=sys-libs/libavc1394-0.5.3:= + >=media-libs/libiec61883-1.0.0:= + ) + jack? ( media-sound/jack-audio-connection-kit ) + lcd? ( app-misc/lcdproc ) + libass? ( >=media-libs/libass-0.9.11:= ) + lirc? ( app-misc/lirc ) + perl? ( + dev-perl/DBD-mysql + dev-perl/Net-UPnP + dev-perl/LWP-Protocol-https + dev-perl/HTTP-Message + dev-perl/IO-Socket-INET6 + >=dev-perl/libwww-perl-5 + ) + pulseaudio? ( media-sound/pulseaudio ) + python? ( + dev-python/mysql-python + dev-python/lxml + dev-python/urlgrabber + ) + raop? ( + dev-libs/openssl:= + net-dns/avahi[mdnsresponder-compat] + ) + theora? ( media-libs/libtheora:= media-libs/libogg:= ) + vaapi? ( x11-libs/libva:= ) + vdpau? ( x11-libs/libvdpau:= ) + vorbis? ( >=media-libs/libvorbis-1.0:= media-libs/libogg:= ) + xml? ( >=dev-libs/libxml2-2.6.0:= ) + xvid? ( >=media-libs/xvid-1.1.0:= ) + !media-tv/mythtv-bindings + !x11-themes/mythtv-themes + media-libs/taglib:= + dev-libs/glib:= + " + +RDEPEND="${COMMON} + media-fonts/corefonts + media-fonts/dejavu + media-fonts/liberation-fonts + x11-apps/xinit + autostart? ( + net-dialup/mingetty + x11-wm/evilwm + x11-apps/xset + ) + dvd? ( media-libs/libdvdcss:= ) + xmltv? ( >=media-tv/xmltv-0.5.43 ) + " + +DEPEND="${COMMON} + dev-lang/yasm + x11-proto/xineramaproto + x11-proto/xf86vidmodeproto + " + +S="${WORKDIR}/${MY_P}/mythtv" + +MYTHTV_GROUPS="video,audio,tty,uucp" + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup + enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS} + usermod -a -G ${MYTHTV_GROUPS} mythtv +} + +src_prepare() { + [[ -n ${BACKPORTS} ]] && \ + EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/../patches" \ + epatch + + # Perl bits need to go into vender_perl and not site_perl + sed -e "s:pure_install:pure_install INSTALLDIRS=vendor:" \ + -i "${S}"/bindings/perl/Makefile + + # Fix up the version info since we are using the fixes/${PV} branch + echo "SOURCE_VERSION=\"${MYTHTV_VERSION}\"" > "${S}"/VERSION + echo "BRANCH=\"${MYTHTV_BRANCH}\"" >> "${S}"/VERSION + + echo "setting.extra -= -ldconfig" >> "${S}"/programs/mythfrontend/mythfrontend.pro + + epatch "${FILESDIR}/libdir-27.patch" + + epatch_user +} + +src_configure() { + local myconf= + + # Setup paths + myconf="${myconf} --prefix=${EPREFIX}/usr" + myconf="${myconf} --libdir=${EPREFIX}/usr/$(get_libdir)" + myconf="${myconf} --libdir-name=$(get_libdir)" + myconf="${myconf} --mandir=${EPREFIX}/usr/share/man" + + # Audio + myconf="${myconf} $(use_enable alsa audio-alsa)" + myconf="${myconf} $(use_enable jack audio-jack)" + use pulseaudio || myconf="${myconf} --disable-audio-pulseoutput" + + use altivec || myconf="${myconf} --disable-altivec" + myconf="${myconf} $(use_enable dvb)" + myconf="${myconf} $(use_enable ieee1394 firewire)" + myconf="${myconf} $(use_enable lirc)" + myconf="${myconf} $(use_enable xvid libxvid)" + myconf="${myconf} --dvb-path=/usr/include" + myconf="${myconf} --enable-xrandr" + myconf="${myconf} --enable-xv" + myconf="${myconf} --enable-x11" + myconf="${myconf} --enable-nonfree" + use cec || myconf="${myconf} --disable-libcec" + use raop || myconf="${myconf} --disable-libdns-sd" + myconf="${myconf} $(use_enable theora libtheora)" + myconf="${myconf} $(use_enable vorbis libvorbis)" + + if use hls; then + myconf="${myconf} --enable-libmp3lame" + myconf="${myconf} --enable-libx264" + myconf="${myconf} --enable-libvpx" + myconf="${myconf} --enable-libfaac" + fi + + myconf="${myconf} $(use_enable libass)" + + if use perl && use python; then + myconf="${myconf} --with-bindings=perl,python" + elif use perl; then + myconf="${myconf} --without-bindings=python" + myconf="${myconf} --with-bindings=perl" + elif use python; then + myconf="${myconf} --without-bindings=perl" + myconf="${myconf} --with-bindings=python" + else + myconf="${myconf} --without-bindings=perl,python" + fi + + use python && myconf="${myconf} --python=$(PYTHON)" + + if use debug; then + myconf="${myconf} --compile-type=debug" + else + myconf="${myconf} --compile-type=release" + #myconf="${myconf} --enable-debug" does nothing per sphery + #myconf="${myconf} --disable-stripping" does nothing per sphery + fi + + # Video + use vdpau && myconf="${myconf} --enable-vdpau" + myconf="${myconf} $(use_enable vaapi)" + use crystalhd && myconf="${myconf} --enable-crystalhd" + + # Input + use input_devices_joystick || myconf="${myconf} --disable-joystick-menu" + + # Clean up DSO load times and other compiler bits + myconf="${myconf} --enable-symbol-visibility" + myconf="${myconf} --enable-pic" + + # CPU settings + for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do + [ "${i}" = "native" ] && i="host" + myconf="${myconf} --cpu=${i}" + break + done + + if tc-is-cross-compiler ; then + myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)" + myconf="${myconf} --cross-prefix=${CHOST}-" + fi + + # Build boosters + has distcc ${FEATURES} || myconf="${myconf} --disable-distcc" + has ccache ${FEATURES} || myconf="${myconf} --disable-ccache" + + chmod +x ./external/FFmpeg/version.sh + + einfo "Running ./configure ${myconf}" + ./configure \ + --cc="$(tc-getCC)" \ + --cxx="$(tc-getCXX)" \ + --ar="$(tc-getAR)" \ + --extra-cflags="${CFLAGS}" \ + --extra-cxxflags="${CXXFLAGS}" \ + --extra-ldflags="${LDFLAGS}" \ + ${myconf} || die "configure died" +} + +src_install() { + emake INSTALL_ROOT="${D}" install || die "install failed" + dodoc AUTHORS UPGRADING README + + insinto /usr/share/mythtv/database + doins database/* + + newinitd "${FILESDIR}"/mythbackend.init mythbackend + newconfd "${FILESDIR}"/mythbackend.conf mythbackend + systemd_dounit "${FILESDIR}"/mythbackend.service + + dodoc keys.txt + + keepdir /etc/mythtv + chown -R mythtv "${ED}"/etc/mythtv + keepdir /var/log/mythtv + chown -R mythtv "${ED}"/var/log/mythtv + dodir /var/log/mythtv/old + + insinto /etc/logrotate.d + newins "${FILESDIR}"/mythtv.logrotate.d-r4 mythtv + + insinto /usr/share/mythtv/contrib + doins -r contrib/* + + # Install our mythfrontend wrapper which is similar to Mythbuntu's + mv "${ED}/usr/bin/mythfrontend" "${ED}/usr/bin/mythfrontend.real" + newbin "${FILESDIR}"/mythfrontend.wrapper mythfrontend + newconfd "${FILESDIR}"/mythfrontend.conf mythfrontend + + if use autostart; then + dodir /etc/env.d/ + echo 'CONFIG_PROTECT="/home/mythtv/"' > "${ED}"/etc/env.d/95mythtv + + insinto /home/mythtv + newins "${FILESDIR}"/bash_profile .bash_profile + newins "${FILESDIR}"/xinitrc-r1 .xinitrc + fi + + # Make Python files executable + find "${ED}/usr/share/mythtv" -type f -name '*.py' | while read file; do + if [[ ! "${file##*/}" = "__init__.py" ]]; then + chmod a+x "${file}" + fi + done + + # Ensure that Python scripts are executed by Python 2 + python_convert_shebangs -q -r 2 "${ED}/usr/share/mythtv" + + # Make shell & perl scripts executable + find "${ED}" -type f -name '*.sh' -o -type f -name '*.pl' | \ + while read file; do + chmod a+x "${file}" + done +} + +pkg_preinst() { + export CONFIG_PROTECT="${CONFIG_PROTECT} ${EROOT}/home/mythtv/" +} + +pkg_postinst() { + use python && python_mod_optimize MythTV + + elog "To have this machine operate as recording host for MythTV, " + elog "mythbackend must be running. Run the following:" + elog "rc-update add mythbackend default" + elog + elog "Your recordings folder must be owned 'mythtv'. e.g." + elog "chown -R mythtv /var/lib/mythtv" + + elog "Want mythfrontend to start automatically?" + elog "Set USE=autostart. Details can be found at:" + elog "http://dev.gentoo.org/~cardoe/mythtv/autostart.html" + elog + elog "Note that the systemd unit now restarts by default and logs" + elog "to journald via the console at the notice verbosity." +} + +pkg_postrm() { + use python && python_mod_cleanup MythTV +} + +pkg_info() { + if [[ -f "${EROOT}"/usr/bin/mythfrontend ]]; then + "${EROOT}"/usr/bin/mythfrontend --version + fi +} + +pkg_config() { + echo "Creating mythtv MySQL user and mythconverg database if it does not" + echo "already exist. You will be prompted for your MySQL root password." + "${EROOT}"/usr/bin/mysql -u root -p < "${EROOT}"/usr/share/mythtv/database/mc.sql +} diff --git a/media-tv/mythtv/mythtv-0.27.4_p20150124.ebuild b/media-tv/mythtv/mythtv-0.27.4_p20150124.ebuild new file mode 100644 index 000000000000..65287edf7ee9 --- /dev/null +++ b/media-tv/mythtv/mythtv-0.27.4_p20150124.ebuild @@ -0,0 +1,355 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_DEPEND="python? 2:2.7" +BACKPORTS="3b4390396bf09dfe3741508ecf7fc71a004abd01" +MY_P=${P%_p*} + +inherit flag-o-matic multilib eutils python user systemd + +MYTHTV_VERSION="v0.27.4" +MYTHTV_BRANCH="fixes/0.27" + +DESCRIPTION="Homebrew PVR project" +HOMEPAGE="http://www.mythtv.org" +SRC_URI="https://github.com/MythTV/mythtv/archive/v0.27.4.tar.gz -> mythtv-0.27.4.tar.gz + ${BACKPORTS:+http://dev.gentoo.org/~rich0/distfiles/${MY_P}-${BACKPORTS}.tar.xz}" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" + +IUSE_INPUT_DEVICES="input_devices_joystick" +IUSE="alsa altivec libass autostart bluray cec crystalhd debug dvb dvd \ +egl fftw +hls ieee1394 jack lcd lirc perl pulseaudio python raop +theora \ +vaapi vdpau +vorbis +xml xmltv +xvid ${IUSE_INPUT_DEVICES}" + +REQUIRED_USE=" + bluray? ( xml ) + theora? ( vorbis )" + +COMMON=" + >=media-libs/freetype-2.0:= + sys-libs/zlib:= + x11-libs/libX11:= + x11-libs/libXext:= + x11-libs/libXinerama:= + x11-libs/libXv:= + x11-libs/libXrandr:= + x11-libs/libXxf86vm:= + >=dev-qt/qtcore-4.7.2:4= + >=dev-qt/qtdbus-4.7.2:4= + >=dev-qt/qtgui-4.7.2:4= + >=dev-qt/qtscript-4.7.2:4= + >=dev-qt/qtsql-4.7.2:4=[mysql] + >=dev-qt/qtopengl-4.7.2:4=[egl?] + >=dev-qt/qtwebkit-4.7.2:4= + x11-misc/wmctrl:= + virtual/mysql:= + virtual/opengl:= + alsa? ( >=media-libs/alsa-lib-1.0.24:= ) + bluray? ( + dev-libs/libcdio:= + media-libs/libbluray:= + ) + cec? ( dev-libs/libcec:= ) + dvb? ( + media-libs/libdvb:= + virtual/linuxtv-dvb-headers:= + ) + dvd? ( dev-libs/libcdio:= ) + egl? ( media-libs/mesa:=[egl] ) + fftw? ( sci-libs/fftw:3.0= ) + hls? ( + media-libs/faac:= + media-libs/libvpx:= + >=media-libs/x264-0.0.20111220:= + >=media-sound/lame-3.93.1 + ) + ieee1394? ( + >=sys-libs/libraw1394-1.2.0:= + >=sys-libs/libavc1394-0.5.3:= + >=media-libs/libiec61883-1.0.0:= + ) + jack? ( media-sound/jack-audio-connection-kit ) + lcd? ( app-misc/lcdproc ) + libass? ( >=media-libs/libass-0.9.11:= ) + lirc? ( app-misc/lirc ) + perl? ( + dev-perl/DBD-mysql + dev-perl/Net-UPnP + dev-perl/LWP-Protocol-https + dev-perl/HTTP-Message + dev-perl/IO-Socket-INET6 + >=dev-perl/libwww-perl-5 + ) + pulseaudio? ( media-sound/pulseaudio ) + python? ( + dev-python/mysql-python + dev-python/lxml + dev-python/urlgrabber + ) + raop? ( + dev-libs/openssl:= + net-dns/avahi[mdnsresponder-compat] + ) + theora? ( media-libs/libtheora:= media-libs/libogg:= ) + vaapi? ( x11-libs/libva:= ) + vdpau? ( x11-libs/libvdpau:= ) + vorbis? ( >=media-libs/libvorbis-1.0:= media-libs/libogg:= ) + xml? ( >=dev-libs/libxml2-2.6.0:= ) + xvid? ( >=media-libs/xvid-1.1.0:= ) + !media-tv/mythtv-bindings + !x11-themes/mythtv-themes + media-libs/taglib:= + dev-libs/glib:= + " + +RDEPEND="${COMMON} + media-fonts/corefonts + media-fonts/dejavu + media-fonts/liberation-fonts + x11-apps/xinit + autostart? ( + net-dialup/mingetty + x11-wm/evilwm + x11-apps/xset + ) + dvd? ( media-libs/libdvdcss:= ) + xmltv? ( >=media-tv/xmltv-0.5.43 ) + " + +DEPEND="${COMMON} + dev-lang/yasm + x11-proto/xineramaproto + x11-proto/xf86vidmodeproto + " + +S="${WORKDIR}/${MY_P}/mythtv" + +MYTHTV_GROUPS="video,audio,tty,uucp" + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup + enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS} + usermod -a -G ${MYTHTV_GROUPS} mythtv +} + +src_prepare() { + [[ -n ${BACKPORTS} ]] && \ + EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/../patches" \ + epatch + + # Perl bits need to go into vender_perl and not site_perl + sed -e "s:pure_install:pure_install INSTALLDIRS=vendor:" \ + -i "${S}"/bindings/perl/Makefile + + # Fix up the version info since we are using the fixes/${PV} branch + echo "SOURCE_VERSION=\"${MYTHTV_VERSION}\"" > "${S}"/VERSION + echo "BRANCH=\"${MYTHTV_BRANCH}\"" >> "${S}"/VERSION + + echo "setting.extra -= -ldconfig" >> "${S}"/programs/mythfrontend/mythfrontend.pro + + epatch "${FILESDIR}/libdir-27.patch" + + epatch_user +} + +src_configure() { + local myconf= + + # Setup paths + myconf="${myconf} --prefix=${EPREFIX}/usr" + myconf="${myconf} --libdir=${EPREFIX}/usr/$(get_libdir)" + myconf="${myconf} --libdir-name=$(get_libdir)" + myconf="${myconf} --mandir=${EPREFIX}/usr/share/man" + + # Audio + myconf="${myconf} $(use_enable alsa audio-alsa)" + myconf="${myconf} $(use_enable jack audio-jack)" + use pulseaudio || myconf="${myconf} --disable-audio-pulseoutput" + + use altivec || myconf="${myconf} --disable-altivec" + myconf="${myconf} $(use_enable dvb)" + myconf="${myconf} $(use_enable ieee1394 firewire)" + myconf="${myconf} $(use_enable lirc)" + myconf="${myconf} $(use_enable xvid libxvid)" + myconf="${myconf} --dvb-path=/usr/include" + myconf="${myconf} --enable-xrandr" + myconf="${myconf} --enable-xv" + myconf="${myconf} --enable-x11" + myconf="${myconf} --enable-nonfree" + use cec || myconf="${myconf} --disable-libcec" + use raop || myconf="${myconf} --disable-libdns-sd" + myconf="${myconf} $(use_enable theora libtheora)" + myconf="${myconf} $(use_enable vorbis libvorbis)" + + if use hls; then + myconf="${myconf} --enable-libmp3lame" + myconf="${myconf} --enable-libx264" + myconf="${myconf} --enable-libvpx" + myconf="${myconf} --enable-libfaac" + fi + + myconf="${myconf} $(use_enable libass)" + + if use perl && use python; then + myconf="${myconf} --with-bindings=perl,python" + elif use perl; then + myconf="${myconf} --without-bindings=python" + myconf="${myconf} --with-bindings=perl" + elif use python; then + myconf="${myconf} --without-bindings=perl" + myconf="${myconf} --with-bindings=python" + else + myconf="${myconf} --without-bindings=perl,python" + fi + + use python && myconf="${myconf} --python=$(PYTHON)" + + if use debug; then + myconf="${myconf} --compile-type=debug" + else + myconf="${myconf} --compile-type=release" + #myconf="${myconf} --enable-debug" does nothing per sphery + #myconf="${myconf} --disable-stripping" does nothing per sphery + fi + + # Video + use vdpau && myconf="${myconf} --enable-vdpau" + myconf="${myconf} $(use_enable vaapi)" + use crystalhd && myconf="${myconf} --enable-crystalhd" + + # Input + use input_devices_joystick || myconf="${myconf} --disable-joystick-menu" + + # Clean up DSO load times and other compiler bits + myconf="${myconf} --enable-symbol-visibility" + myconf="${myconf} --enable-pic" + + # CPU settings + for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do + [ "${i}" = "native" ] && i="host" + myconf="${myconf} --cpu=${i}" + break + done + + if tc-is-cross-compiler ; then + myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)" + myconf="${myconf} --cross-prefix=${CHOST}-" + fi + + # Build boosters + has distcc ${FEATURES} || myconf="${myconf} --disable-distcc" + has ccache ${FEATURES} || myconf="${myconf} --disable-ccache" + + chmod +x ./external/FFmpeg/version.sh + + einfo "Running ./configure ${myconf}" + ./configure \ + --cc="$(tc-getCC)" \ + --cxx="$(tc-getCXX)" \ + --ar="$(tc-getAR)" \ + --extra-cflags="${CFLAGS}" \ + --extra-cxxflags="${CXXFLAGS}" \ + --extra-ldflags="${LDFLAGS}" \ + ${myconf} || die "configure died" +} + +src_install() { + emake INSTALL_ROOT="${D}" install || die "install failed" + dodoc AUTHORS UPGRADING README + + insinto /usr/share/mythtv/database + doins database/* + + newinitd "${FILESDIR}"/mythbackend.init mythbackend + newconfd "${FILESDIR}"/mythbackend.conf mythbackend + systemd_dounit "${FILESDIR}"/mythbackend.service + + dodoc keys.txt + + keepdir /etc/mythtv + chown -R mythtv "${ED}"/etc/mythtv + keepdir /var/log/mythtv + chown -R mythtv "${ED}"/var/log/mythtv + dodir /var/log/mythtv/old + + insinto /etc/logrotate.d + newins "${FILESDIR}"/mythtv.logrotate.d-r4 mythtv + + insinto /usr/share/mythtv/contrib + doins -r contrib/* + + # Install our mythfrontend wrapper which is similar to Mythbuntu's + mv "${ED}/usr/bin/mythfrontend" "${ED}/usr/bin/mythfrontend.real" + newbin "${FILESDIR}"/mythfrontend.wrapper mythfrontend + newconfd "${FILESDIR}"/mythfrontend.conf mythfrontend + + if use autostart; then + dodir /etc/env.d/ + echo 'CONFIG_PROTECT="/home/mythtv/"' > "${ED}"/etc/env.d/95mythtv + + insinto /home/mythtv + newins "${FILESDIR}"/bash_profile .bash_profile + newins "${FILESDIR}"/xinitrc-r1 .xinitrc + fi + + # Make Python files executable + find "${ED}/usr/share/mythtv" -type f -name '*.py' | while read file; do + if [[ ! "${file##*/}" = "__init__.py" ]]; then + chmod a+x "${file}" + fi + done + + # Ensure that Python scripts are executed by Python 2 + python_convert_shebangs -q -r 2 "${ED}/usr/share/mythtv" + + # Make shell & perl scripts executable + find "${ED}" -type f -name '*.sh' -o -type f -name '*.pl' | \ + while read file; do + chmod a+x "${file}" + done +} + +pkg_preinst() { + export CONFIG_PROTECT="${CONFIG_PROTECT} ${EROOT}/home/mythtv/" +} + +pkg_postinst() { + use python && python_mod_optimize MythTV + + elog "To have this machine operate as recording host for MythTV, " + elog "mythbackend must be running. Run the following:" + elog "rc-update add mythbackend default" + elog + elog "Your recordings folder must be owned 'mythtv'. e.g." + elog "chown -R mythtv /var/lib/mythtv" + + elog "Want mythfrontend to start automatically?" + elog "Set USE=autostart. Details can be found at:" + elog "http://dev.gentoo.org/~cardoe/mythtv/autostart.html" + elog + elog "Note that the systemd unit now restarts by default and logs" + elog "to journald via the console at the notice verbosity." +} + +pkg_postrm() { + use python && python_mod_cleanup MythTV +} + +pkg_info() { + if [[ -f "${EROOT}"/usr/bin/mythfrontend ]]; then + "${EROOT}"/usr/bin/mythfrontend --version + fi +} + +pkg_config() { + echo "Creating mythtv MySQL user and mythconverg database if it does not" + echo "already exist. You will be prompted for your MySQL root password." + "${EROOT}"/usr/bin/mysql -u root -p < "${EROOT}"/usr/share/mythtv/database/mc.sql +} diff --git a/media-tv/mythtv/mythtv-0.27.5_p20150627.ebuild b/media-tv/mythtv/mythtv-0.27.5_p20150627.ebuild new file mode 100644 index 000000000000..ee4d0832be43 --- /dev/null +++ b/media-tv/mythtv/mythtv-0.27.5_p20150627.ebuild @@ -0,0 +1,359 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_DEPEND="python? 2:2.7" +BACKPORTS="9498257571e8158926b60a0eefc74568c4436823" +MY_P=${P%_p*} + +inherit flag-o-matic multilib eutils python user systemd + +MYTHTV_VERSION="v0.27.5" +MYTHTV_BRANCH="fixes/0.27" + +DESCRIPTION="Homebrew PVR project" +HOMEPAGE="http://www.mythtv.org" +SRC_URI="https://github.com/MythTV/mythtv/archive/v0.27.5.tar.gz -> mythtv-0.27.5.tar.gz + ${BACKPORTS:+http://dev.gentoo.org/~rich0/distfiles/${MY_P}-${BACKPORTS}.tar.xz}" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" + +IUSE_INPUT_DEVICES="input_devices_joystick" +IUSE="alsa altivec libass autostart bluray cec crystalhd debug dvb dvd \ +egl fftw +hls ieee1394 jack lcd lirc perl pulseaudio python raop +theora \ +vaapi vdpau +vorbis +wrapper +xml xmltv +xvid ${IUSE_INPUT_DEVICES}" + +REQUIRED_USE=" + bluray? ( xml ) + theora? ( vorbis )" + +COMMON=" + >=media-libs/freetype-2.0:= + sys-libs/zlib:= + x11-libs/libX11:= + x11-libs/libXext:= + x11-libs/libXinerama:= + x11-libs/libXv:= + x11-libs/libXrandr:= + x11-libs/libXxf86vm:= + >=dev-qt/qtcore-4.7.2:4= + >=dev-qt/qtdbus-4.7.2:4= + >=dev-qt/qtgui-4.7.2:4= + >=dev-qt/qtscript-4.7.2:4= + >=dev-qt/qtsql-4.7.2:4=[mysql] + >=dev-qt/qtopengl-4.7.2:4=[egl?] + >=dev-qt/qtwebkit-4.7.2:4= + x11-misc/wmctrl:= + virtual/mysql + virtual/opengl:= + alsa? ( >=media-libs/alsa-lib-1.0.24:= ) + bluray? ( + dev-libs/libcdio:= + media-libs/libbluray:= + ) + cec? ( dev-libs/libcec:= ) + dvb? ( + media-libs/libdvb:= + virtual/linuxtv-dvb-headers:= + ) + dvd? ( dev-libs/libcdio:= ) + egl? ( media-libs/mesa:=[egl] ) + fftw? ( sci-libs/fftw:3.0= ) + hls? ( + media-libs/faac:= + media-libs/libvpx:= + >=media-libs/x264-0.0.20111220:= + >=media-sound/lame-3.93.1 + ) + ieee1394? ( + >=sys-libs/libraw1394-1.2.0:= + >=sys-libs/libavc1394-0.5.3:= + >=media-libs/libiec61883-1.0.0:= + ) + jack? ( media-sound/jack-audio-connection-kit ) + lcd? ( app-misc/lcdproc ) + libass? ( >=media-libs/libass-0.9.11:= ) + lirc? ( app-misc/lirc ) + perl? ( + dev-perl/DBD-mysql + dev-perl/Net-UPnP + dev-perl/LWP-Protocol-https + dev-perl/HTTP-Message + dev-perl/IO-Socket-INET6 + >=dev-perl/libwww-perl-5 + ) + pulseaudio? ( media-sound/pulseaudio ) + python? ( + dev-python/mysql-python + dev-python/lxml + dev-python/urlgrabber + ) + raop? ( + dev-libs/openssl:= + net-dns/avahi[mdnsresponder-compat] + ) + theora? ( media-libs/libtheora:= media-libs/libogg:= ) + vaapi? ( x11-libs/libva:= ) + vdpau? ( x11-libs/libvdpau:= ) + vorbis? ( >=media-libs/libvorbis-1.0:= media-libs/libogg:= ) + xml? ( >=dev-libs/libxml2-2.6.0:= ) + xvid? ( >=media-libs/xvid-1.1.0:= ) + !media-tv/mythtv-bindings + !x11-themes/mythtv-themes + media-libs/taglib:= + dev-libs/glib:= + " + +RDEPEND="${COMMON} + media-fonts/corefonts + media-fonts/dejavu + media-fonts/liberation-fonts + x11-apps/xinit + autostart? ( + net-dialup/mingetty + x11-wm/evilwm + x11-apps/xset + ) + dvd? ( media-libs/libdvdcss:= ) + xmltv? ( >=media-tv/xmltv-0.5.43 ) + " + +DEPEND="${COMMON} + dev-lang/yasm + x11-proto/xineramaproto + x11-proto/xf86vidmodeproto + " + +S="${WORKDIR}/${MY_P}/mythtv" + +MYTHTV_GROUPS="video,audio,tty,uucp" + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup + enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS} + usermod -a -G ${MYTHTV_GROUPS} mythtv +} + +src_prepare() { + [[ -n ${BACKPORTS} ]] && \ + EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/../patches" \ + epatch + + # Perl bits need to go into vender_perl and not site_perl + sed -e "s:pure_install:pure_install INSTALLDIRS=vendor:" \ + -i "${S}"/bindings/perl/Makefile + + # Fix up the version info since we are using the fixes/${PV} branch + echo "SOURCE_VERSION=\"${MYTHTV_VERSION}\"" > "${S}"/VERSION + echo "BRANCH=\"${MYTHTV_BRANCH}\"" >> "${S}"/VERSION + echo "SOURCE_VERSION=\"${BACKPORTS}\"" > "${S}"/EXPORTED_VERSION + echo "BRANCH=\"${MYTHTV_BRANCH}\"" >> "${S}"/EXPORTED_VERSION + + echo "setting.extra -= -ldconfig" >> "${S}"/programs/mythfrontend/mythfrontend.pro + + epatch "${FILESDIR}/libdir-27.patch" + + epatch_user +} + +src_configure() { + local myconf= + + # Setup paths + myconf="${myconf} --prefix=${EPREFIX}/usr" + myconf="${myconf} --libdir=${EPREFIX}/usr/$(get_libdir)" + myconf="${myconf} --libdir-name=$(get_libdir)" + myconf="${myconf} --mandir=${EPREFIX}/usr/share/man" + + # Audio + myconf="${myconf} $(use_enable alsa audio-alsa)" + myconf="${myconf} $(use_enable jack audio-jack)" + use pulseaudio || myconf="${myconf} --disable-audio-pulseoutput" + + use altivec || myconf="${myconf} --disable-altivec" + myconf="${myconf} $(use_enable dvb)" + myconf="${myconf} $(use_enable ieee1394 firewire)" + myconf="${myconf} $(use_enable lirc)" + myconf="${myconf} $(use_enable xvid libxvid)" + myconf="${myconf} --dvb-path=/usr/include" + myconf="${myconf} --enable-xrandr" + myconf="${myconf} --enable-xv" + myconf="${myconf} --enable-x11" + myconf="${myconf} --enable-nonfree" + use cec || myconf="${myconf} --disable-libcec" + use raop || myconf="${myconf} --disable-libdns-sd" + myconf="${myconf} $(use_enable theora libtheora)" + myconf="${myconf} $(use_enable vorbis libvorbis)" + + if use hls; then + myconf="${myconf} --enable-libmp3lame" + myconf="${myconf} --enable-libx264" + myconf="${myconf} --enable-libvpx" + myconf="${myconf} --enable-libfaac" + fi + + myconf="${myconf} $(use_enable libass)" + + if use perl && use python; then + myconf="${myconf} --with-bindings=perl,python" + elif use perl; then + myconf="${myconf} --without-bindings=python" + myconf="${myconf} --with-bindings=perl" + elif use python; then + myconf="${myconf} --without-bindings=perl" + myconf="${myconf} --with-bindings=python" + else + myconf="${myconf} --without-bindings=perl,python" + fi + + use python && myconf="${myconf} --python=$(PYTHON)" + + if use debug; then + myconf="${myconf} --compile-type=debug" + else + myconf="${myconf} --compile-type=release" + #myconf="${myconf} --enable-debug" does nothing per sphery + #myconf="${myconf} --disable-stripping" does nothing per sphery + fi + + # Video + use vdpau && myconf="${myconf} --enable-vdpau" + myconf="${myconf} $(use_enable vaapi)" + use crystalhd && myconf="${myconf} --enable-crystalhd" + + # Input + use input_devices_joystick || myconf="${myconf} --disable-joystick-menu" + + # Clean up DSO load times and other compiler bits + myconf="${myconf} --enable-symbol-visibility" + myconf="${myconf} --enable-pic" + + # CPU settings + for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do + [ "${i}" = "native" ] && i="host" + myconf="${myconf} --cpu=${i}" + break + done + + if tc-is-cross-compiler ; then + myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)" + myconf="${myconf} --cross-prefix=${CHOST}-" + fi + + # Build boosters + has distcc ${FEATURES} || myconf="${myconf} --disable-distcc" + has ccache ${FEATURES} || myconf="${myconf} --disable-ccache" + + chmod +x ./external/FFmpeg/version.sh + + einfo "Running ./configure ${myconf}" + ./configure \ + --cc="$(tc-getCC)" \ + --cxx="$(tc-getCXX)" \ + --ar="$(tc-getAR)" \ + --extra-cflags="${CFLAGS}" \ + --extra-cxxflags="${CXXFLAGS}" \ + --extra-ldflags="${LDFLAGS}" \ + ${myconf} || die "configure died" +} + +src_install() { + emake INSTALL_ROOT="${D}" install || die "install failed" + dodoc AUTHORS UPGRADING README + + insinto /usr/share/mythtv/database + doins database/* + + newinitd "${FILESDIR}"/mythbackend.init mythbackend + newconfd "${FILESDIR}"/mythbackend.conf mythbackend + systemd_dounit "${FILESDIR}"/mythbackend.service + + dodoc keys.txt + + keepdir /etc/mythtv + chown -R mythtv "${ED}"/etc/mythtv + keepdir /var/log/mythtv + chown -R mythtv "${ED}"/var/log/mythtv + dodir /var/log/mythtv/old + + insinto /etc/logrotate.d + newins "${FILESDIR}"/mythtv.logrotate.d-r4 mythtv + + insinto /usr/share/mythtv/contrib + doins -r contrib/* + + # Install our mythfrontend wrapper which is similar to Mythbuntu's + if use wrapper; then + mv "${ED}/usr/bin/mythfrontend" "${ED}/usr/bin/mythfrontend.real" + newbin "${FILESDIR}"/mythfrontend.wrapper mythfrontend + newconfd "${FILESDIR}"/mythfrontend.conf mythfrontend + fi + + if use autostart; then + dodir /etc/env.d/ + echo 'CONFIG_PROTECT="/home/mythtv/"' > "${ED}"/etc/env.d/95mythtv + + insinto /home/mythtv + newins "${FILESDIR}"/bash_profile .bash_profile + newins "${FILESDIR}"/xinitrc-r1 .xinitrc + fi + + # Make Python files executable + find "${ED}/usr/share/mythtv" -type f -name '*.py' | while read file; do + if [[ ! "${file##*/}" = "__init__.py" ]]; then + chmod a+x "${file}" + fi + done + + # Ensure that Python scripts are executed by Python 2 + python_convert_shebangs -q -r 2 "${ED}/usr/share/mythtv" + + # Make shell & perl scripts executable + find "${ED}" -type f -name '*.sh' -o -type f -name '*.pl' | \ + while read file; do + chmod a+x "${file}" + done +} + +pkg_preinst() { + export CONFIG_PROTECT="${CONFIG_PROTECT} ${EROOT}/home/mythtv/" +} + +pkg_postinst() { + use python && python_mod_optimize MythTV + + elog "To have this machine operate as recording host for MythTV, " + elog "mythbackend must be running. Run the following:" + elog "rc-update add mythbackend default" + elog + elog "Your recordings folder must be owned 'mythtv'. e.g." + elog "chown -R mythtv /var/lib/mythtv" + + elog "Want mythfrontend to start automatically?" + elog "Set USE=autostart. Details can be found at:" + elog "http://dev.gentoo.org/~cardoe/mythtv/autostart.html" + elog + elog "Note that the systemd unit now restarts by default and logs" + elog "to journald via the console at the notice verbosity." +} + +pkg_postrm() { + use python && python_mod_cleanup MythTV +} + +pkg_info() { + if [[ -f "${EROOT}"/usr/bin/mythfrontend ]]; then + "${EROOT}"/usr/bin/mythfrontend --version + fi +} + +pkg_config() { + echo "Creating mythtv MySQL user and mythconverg database if it does not" + echo "already exist. You will be prompted for your MySQL root password." + "${EROOT}"/usr/bin/mysql -u root -p < "${EROOT}"/usr/share/mythtv/database/mc.sql +} diff --git a/media-tv/mythtv/mythtv-0.27_p20140321.ebuild b/media-tv/mythtv/mythtv-0.27_p20140321.ebuild new file mode 100644 index 000000000000..f767c45a49d8 --- /dev/null +++ b/media-tv/mythtv/mythtv-0.27_p20140321.ebuild @@ -0,0 +1,350 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_DEPEND="python? 2:2.6" +BACKPORTS="583395f5a376637efcd408a102fa64d0f188c12f" +MY_P=${P%_p*} + +inherit flag-o-matic multilib eutils python user systemd + +MYTHTV_VERSION="v0.27" +MYTHTV_BRANCH="fixes/0.27" + +DESCRIPTION="Homebrew PVR project" +HOMEPAGE="http://www.mythtv.org" +SRC_URI="https://github.com/MythTV/mythtv/archive/v0.27.tar.gz -> mythtv-0.27.tar.gz + ${BACKPORTS:+http://dev.gentoo.org/~rich0/distfiles/${MY_P}-${BACKPORTS}.tar.xz}" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="amd64 x86" + +IUSE_INPUT_DEVICES="input_devices_joystick" +IUSE="alsa altivec libass autostart bluray cec crystalhd debug dvb dvd \ +egl fftw +hls ieee1394 jack lcd lirc perl pulseaudio python raop +theora \ +vaapi vdpau +vorbis +xml xmltv +xvid ${IUSE_INPUT_DEVICES}" + +REQUIRED_USE=" + bluray? ( xml ) + theora? ( vorbis )" + +COMMON=" + >=media-libs/freetype-2.0:= + sys-libs/zlib:= + x11-libs/libX11:= + x11-libs/libXext:= + x11-libs/libXinerama:= + x11-libs/libXv:= + x11-libs/libXrandr:= + x11-libs/libXxf86vm:= + >=dev-qt/qtcore-4.7.2:4= + >=dev-qt/qtdbus-4.7.2:4= + >=dev-qt/qtgui-4.7.2:4= + >=dev-qt/qtscript-4.7.2:4= + >=dev-qt/qtsql-4.7.2:4=[mysql] + >=dev-qt/qtopengl-4.7.2:4=[egl?] + >=dev-qt/qtwebkit-4.7.2:4= + x11-misc/wmctrl:= + virtual/mysql:= + virtual/opengl:= + alsa? ( >=media-libs/alsa-lib-1.0.24:= ) + bluray? ( + dev-libs/libcdio:= + media-libs/libbluray:= + ) + cec? ( dev-libs/libcec:= ) + dvb? ( + media-libs/libdvb:= + virtual/linuxtv-dvb-headers:= + ) + dvd? ( dev-libs/libcdio:= ) + egl? ( media-libs/mesa:=[egl] ) + fftw? ( sci-libs/fftw:3.0= ) + hls? ( + media-libs/faac:= + media-libs/libvpx:= + >=media-libs/x264-0.0.20111220:= + >=media-sound/lame-3.93.1 + ) + ieee1394? ( + >=sys-libs/libraw1394-1.2.0:= + >=sys-libs/libavc1394-0.5.3:= + >=media-libs/libiec61883-1.0.0:= + ) + jack? ( media-sound/jack-audio-connection-kit ) + lcd? ( app-misc/lcdproc ) + libass? ( >=media-libs/libass-0.9.11:= ) + lirc? ( app-misc/lirc ) + perl? ( + dev-perl/DBD-mysql + dev-perl/Net-UPnP + dev-perl/LWP-Protocol-https + dev-perl/HTTP-Message + dev-perl/IO-Socket-INET6 + >=dev-perl/libwww-perl-5 + ) + pulseaudio? ( media-sound/pulseaudio ) + python? ( + dev-python/mysql-python + dev-python/lxml + dev-python/urlgrabber + ) + raop? ( + dev-libs/openssl:= + net-dns/avahi[mdnsresponder-compat] + ) + theora? ( media-libs/libtheora:= media-libs/libogg:= ) + vaapi? ( x11-libs/libva:= ) + vdpau? ( x11-libs/libvdpau:= ) + vorbis? ( >=media-libs/libvorbis-1.0:= media-libs/libogg:= ) + xml? ( >=dev-libs/libxml2-2.6.0:= ) + xvid? ( >=media-libs/xvid-1.1.0:= ) + !media-tv/mythtv-bindings + !x11-themes/mythtv-themes + media-libs/taglib:= + dev-libs/glib:= + " + +RDEPEND="${COMMON} + media-fonts/corefonts + media-fonts/dejavu + media-fonts/liberation-fonts + x11-apps/xinit + autostart? ( + net-dialup/mingetty + x11-wm/evilwm + x11-apps/xset + ) + dvd? ( media-libs/libdvdcss:= ) + xmltv? ( >=media-tv/xmltv-0.5.43 ) + " + +DEPEND="${COMMON} + dev-lang/yasm + x11-proto/xineramaproto + x11-proto/xf86vidmodeproto + " + +S="${WORKDIR}/${MY_P}/mythtv" + +MYTHTV_GROUPS="video,audio,tty,uucp" + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup + enewuser mythtv -1 /bin/bash /home/mythtv ${MYTHTV_GROUPS} + usermod -a -G ${MYTHTV_GROUPS} mythtv +} + +src_prepare() { + [[ -n ${BACKPORTS} ]] && \ + EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/../patches" \ + epatch + + # Perl bits need to go into vender_perl and not site_perl + sed -e "s:pure_install:pure_install INSTALLDIRS=vendor:" \ + -i "${S}"/bindings/perl/Makefile + + # Fix up the version info since we are using the fixes/${PV} branch + echo "SOURCE_VERSION=\"${MYTHTV_VERSION}\"" > "${S}"/VERSION + echo "BRANCH=\"${MYTHTV_BRANCH}\"" >> "${S}"/VERSION + + echo "setting.extra -= -ldconfig" >> "${S}"/programs/mythfrontend/mythfrontend.pro + + epatch "${FILESDIR}/libdir-27.patch" + + epatch_user +} + +src_configure() { + local myconf= + + # Setup paths + myconf="${myconf} --prefix=${EPREFIX}/usr" + myconf="${myconf} --libdir=${EPREFIX}/usr/$(get_libdir)" + myconf="${myconf} --libdir-name=$(get_libdir)" + myconf="${myconf} --mandir=${EPREFIX}/usr/share/man" + + # Audio + myconf="${myconf} $(use_enable alsa audio-alsa)" + myconf="${myconf} $(use_enable jack audio-jack)" + use pulseaudio || myconf="${myconf} --disable-audio-pulseoutput" + + use altivec || myconf="${myconf} --disable-altivec" + myconf="${myconf} $(use_enable dvb)" + myconf="${myconf} $(use_enable ieee1394 firewire)" + myconf="${myconf} $(use_enable lirc)" + myconf="${myconf} $(use_enable xvid libxvid)" + myconf="${myconf} --dvb-path=/usr/include" + myconf="${myconf} --enable-xrandr" + myconf="${myconf} --enable-xv" + myconf="${myconf} --enable-x11" + myconf="${myconf} --enable-nonfree" + use cec || myconf="${myconf} --disable-libcec" + use raop || myconf="${myconf} --disable-libdns-sd" + myconf="${myconf} $(use_enable theora libtheora)" + myconf="${myconf} $(use_enable vorbis libvorbis)" + + if use hls; then + myconf="${myconf} --enable-libmp3lame" + myconf="${myconf} --enable-libx264" + myconf="${myconf} --enable-libvpx" + myconf="${myconf} --enable-libfaac" + fi + + if use perl && use python; then + myconf="${myconf} --with-bindings=perl,python" + elif use perl; then + myconf="${myconf} --without-bindings=python" + myconf="${myconf} --with-bindings=perl" + elif use python; then + myconf="${myconf} --without-bindings=perl" + myconf="${myconf} --with-bindings=python" + else + myconf="${myconf} --without-bindings=perl,python" + fi + + use python && myconf="${myconf} --python=$(PYTHON)" + + if use debug; then + myconf="${myconf} --compile-type=debug" + else + myconf="${myconf} --compile-type=profile" + #myconf="${myconf} --enable-debug" does nothing per sphery + #myconf="${myconf} --disable-stripping" does nothing per sphery + fi + + # Video + use vdpau && myconf="${myconf} --enable-vdpau" + myconf="${myconf} $(use_enable vaapi)" + use crystalhd && myconf="${myconf} --enable-crystalhd" + + # Input + use input_devices_joystick || myconf="${myconf} --disable-joystick-menu" + + # Clean up DSO load times and other compiler bits + myconf="${myconf} --enable-symbol-visibility" + myconf="${myconf} --enable-pic" + + # CPU settings + for i in $(get-flag march) $(get-flag mcpu) $(get-flag mtune) ; do + [ "${i}" = "native" ] && i="host" + myconf="${myconf} --cpu=${i}" + break + done + + if tc-is-cross-compiler ; then + myconf="${myconf} --enable-cross-compile --arch=$(tc-arch-kernel)" + myconf="${myconf} --cross-prefix=${CHOST}-" + fi + + # Build boosters + has distcc ${FEATURES} || myconf="${myconf} --disable-distcc" + has ccache ${FEATURES} || myconf="${myconf} --disable-ccache" + + chmod +x ./external/FFmpeg/version.sh + + einfo "Running ./configure ${myconf}" + ./configure \ + --cc="$(tc-getCC)" \ + --cxx="$(tc-getCXX)" \ + --ar="$(tc-getAR)" \ + --extra-cflags="${CFLAGS}" \ + --extra-cxxflags="${CXXFLAGS}" \ + --extra-ldflags="${LDFLAGS}" \ + ${myconf} || die "configure died" +} + +src_install() { + emake INSTALL_ROOT="${D}" install || die "install failed" + dodoc AUTHORS UPGRADING README + + insinto /usr/share/mythtv/database + doins database/* + + newinitd "${FILESDIR}"/mythbackend.init mythbackend + newconfd "${FILESDIR}"/mythbackend.conf mythbackend + systemd_dounit "${FILESDIR}"/mythbackend.service + + dodoc keys.txt + + keepdir /etc/mythtv + chown -R mythtv "${ED}"/etc/mythtv + keepdir /var/log/mythtv + chown -R mythtv "${ED}"/var/log/mythtv + dodir /var/log/mythtv/old + + insinto /etc/logrotate.d + newins "${FILESDIR}"/mythtv.logrotate.d-r4 mythtv + + insinto /usr/share/mythtv/contrib + doins -r contrib/* + + # Install our mythfrontend wrapper which is similar to Mythbuntu's + mv "${ED}/usr/bin/mythfrontend" "${ED}/usr/bin/mythfrontend.real" + newbin "${FILESDIR}"/mythfrontend.wrapper mythfrontend + newconfd "${FILESDIR}"/mythfrontend.conf mythfrontend + + if use autostart; then + dodir /etc/env.d/ + echo 'CONFIG_PROTECT="/home/mythtv/"' > "${ED}"/etc/env.d/95mythtv + + insinto /home/mythtv + newins "${FILESDIR}"/bash_profile .bash_profile + newins "${FILESDIR}"/xinitrc-r1 .xinitrc + fi + + # Make Python files executable + find "${ED}/usr/share/mythtv" -type f -name '*.py' | while read file; do + if [[ ! "${file##*/}" = "__init__.py" ]]; then + chmod a+x "${file}" + fi + done + + # Ensure that Python scripts are executed by Python 2 + python_convert_shebangs -q -r 2 "${ED}/usr/share/mythtv" + + # Make shell & perl scripts executable + find "${ED}" -type f -name '*.sh' -o -type f -name '*.pl' | \ + while read file; do + chmod a+x "${file}" + done +} + +pkg_preinst() { + export CONFIG_PROTECT="${CONFIG_PROTECT} ${EROOT}/home/mythtv/" +} + +pkg_postinst() { + use python && python_mod_optimize MythTV + + elog "To have this machine operate as recording host for MythTV, " + elog "mythbackend must be running. Run the following:" + elog "rc-update add mythbackend default" + elog + elog "Your recordings folder must be owned 'mythtv'. e.g." + elog "chown -R mythtv /var/lib/mythtv" + + elog "Want mythfrontend to start automatically?" + elog "Set USE=autostart. Details can be found at:" + elog "http://dev.gentoo.org/~cardoe/mythtv/autostart.html" +} + +pkg_postrm() { + use python && python_mod_cleanup MythTV +} + +pkg_info() { + if [[ -f "${EROOT}"/usr/bin/mythfrontend ]]; then + "${EROOT}"/usr/bin/mythfrontend --version + fi +} + +pkg_config() { + echo "Creating mythtv MySQL user and mythconverg database if it does not" + echo "already exist. You will be prompted for your MySQL root password." + "${EROOT}"/usr/bin/mysql -u root -p < "${EROOT}"/usr/share/mythtv/database/mc.sql +} |