summaryrefslogtreecommitdiff
path: root/community-staging/mythtv
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-06-06 00:01:34 +0000
committerroot <root@rshg054.dnsready.net>2012-06-06 00:01:34 +0000
commit91734dee3e97f809fb0fcf7add40f7af90fccd87 (patch)
tree5ea3c4fcb1f01ef60e6f841415bd5f7ab78e32f0 /community-staging/mythtv
parent67db4cf68dbdb364c4dee1599294d7701f3c3b0a (diff)
Wed Jun 6 00:01:34 UTC 2012
Diffstat (limited to 'community-staging/mythtv')
-rw-r--r--community-staging/mythtv/PKGBUILD73
-rw-r--r--community-staging/mythtv/mythbackend.conf53
-rw-r--r--community-staging/mythtv/mythbackend.rc73
-rw-r--r--community-staging/mythtv/mythtv.install11
-rw-r--r--community-staging/mythtv/mythtv_0.25_gcc_4.7.patch107
5 files changed, 317 insertions, 0 deletions
diff --git a/community-staging/mythtv/PKGBUILD b/community-staging/mythtv/PKGBUILD
new file mode 100644
index 000000000..927177a73
--- /dev/null
+++ b/community-staging/mythtv/PKGBUILD
@@ -0,0 +1,73 @@
+# $Id: PKGBUILD 71990 2012-06-05 02:18:34Z jconder $
+# Maintainer: Jonathan Conder <jonno.conder@gmail.com>
+# Contributor: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Juergen Hoetzel <juergen@archlinux.org>
+# Contributor: <kleptophobiac@gmail.com>
+# Contributor: dorphell <dorphell@archlinux.org>
+
+pkgname=mythtv
+pkgver=0.25
+pkgrel=4
+epoch=1
+pkgdesc="A Homebrew PVR project"
+arch=('i686' 'x86_64')
+url="http://www.mythtv.org/"
+license=('GPL')
+depends=('avahi' 'fftw' 'lame' 'libass' 'libavc1394' 'libcdio' 'libiec61883'
+ 'libpulse' 'libva' 'libvdpau' 'libxinerama' 'lirc-utils' 'mesa'
+ 'mysql-clients' 'mysql-python' 'perl-dbd-mysql' 'perl-io-socket-inet6'
+ 'perl-libwww' 'perl-net-upnp' 'python2-lxml' 'qtwebkit' 'urlgrabber'
+ 'x264')
+makedepends=('glew' 'libcec' 'libxml2' 'openssl' 'yasm')
+optdepends=('glew: for GPU commercial flagging'
+ 'libcec: for consumer electronics control capabilities'
+ 'libxml2: to read blu-ray metadata'
+ 'openssl: for AirTunes (RAOP) support'
+ 'xmltv: to download tv listings')
+conflicts=('myththemes' 'mythplugins-mythvideo')
+replaces=('myththemes' 'mythplugins-mythvideo')
+backup=('etc/conf.d/mythbackend')
+install='mythtv.install'
+source=("ftp://ftp.osuosl.org/pub/$pkgname/$pkgname-$pkgver.tar.bz2"
+ 'mythtv_0.25_gcc_4.7.patch'
+ 'mythbackend.rc'
+ 'mythbackend.conf')
+md5sums=('e49c81de40e279c83dcb1b2aa9a45748'
+ '6090f5f22a8584db80b76cf19869ee41'
+ '62fd98347c56b1d9b795792f83269d25'
+ 'ab962d83614cbd0ac11ce3fcc929829d')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+ find 'bindings/python' 'contrib' -type f | xargs sed -i 's@^#!.*python$@#!/usr/bin/python2@'
+
+ patch -Np1 -i "$srcdir/mythtv_0.25_gcc_4.7.patch"
+ sed -re 's@Key, &@Key, @' -i 'bindings/php/MythBase.php'
+
+ ARCH="${CARCH/_/-}"
+ ./configure --prefix=/usr \
+ --cpu="$ARCH" \
+ --disable-altivec \
+ --disable-audio-jack \
+ --disable-ccache \
+ --disable-distcc \
+ --enable-libfftw3 \
+ --enable-libmp3lame \
+ --enable-libx264 \
+ --enable-vaapi \
+ --python=python2
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make INSTALL_ROOT="$pkgdir" install
+
+ install -D -m755 "$srcdir/mythbackend.rc" "$pkgdir/etc/rc.d/mythbackend"
+ install -D -m644 "$srcdir/mythbackend.conf" "$pkgdir/etc/conf.d/mythbackend"
+ install -D -m644 'database/mc.sql' "$pkgdir/usr/share/mythtv/mc.sql"
+
+ mkdir -p "$pkgdir/usr/share/mythtv"
+ cp -R 'contrib' "$pkgdir/usr/share/mythtv"
+ mkdir -p "$pkgdir/var/log/mythtv"
+}
diff --git a/community-staging/mythtv/mythbackend.conf b/community-staging/mythtv/mythbackend.conf
new file mode 100644
index 000000000..49bbca877
--- /dev/null
+++ b/community-staging/mythtv/mythbackend.conf
@@ -0,0 +1,53 @@
+#
+# Copyright (c) by the MythTV Development Team.
+#
+# Derived from work by:
+#
+# Michael Thomson <linux at m-thomson dot net>
+# Stu Tomlinson <stu at nosnilmot dot com>
+# Axel Thimm <axel.thimm at atrpms dot net>
+# Adopted for ArchLinux:
+# Jürgen Hoetzel <juergen@archinux.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+###############################################################################
+#
+# User who should start the mythbackend process
+#
+# Running mythbackend as non-root requires you to ensure that audio/video
+# devices used for recording have suitable user permissions. One way
+# to achieve this is to modify existing or create new udev rules which
+# assign these devices to a non-root group with rw permissions and add
+# your mythbackend user to that group. Be aware that console.perms can
+# also affect device permissions and may need additional configuration.
+# Running as non-root may also introduce increased process latency.
+#
+# MBE_USER='root'
+
+#
+# Startup options for mythbackend (see 'mythbackend --help' for a list).
+#
+# MBE_OPTS=''
+
+#
+# Directory holding the mythbackend log file
+#
+# LOG_PATH='/var/log/mythtv'
+
+#
+# Logging options for mythbackend (see 'mythbackend -v help' for a list)
+#
+# LOG_OPTS=''
diff --git a/community-staging/mythtv/mythbackend.rc b/community-staging/mythtv/mythbackend.rc
new file mode 100644
index 000000000..2b3c2d52e
--- /dev/null
+++ b/community-staging/mythtv/mythbackend.rc
@@ -0,0 +1,73 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/profile
+
+###############################################################################
+# Default values to use if none are supplied in the config file.
+#
+# User who should start the mythbackend process
+MBE_USER='root'
+
+# Startup options for mythbackend
+MBE_OPTS=''
+
+# Directory holding the mythbackend log file
+LOG_PATH='/var/log/mythtv'
+
+# Logging options for mythbackend
+LOG_OPTS=''
+###############################################################################
+
+CONFIG_FILE=/etc/conf.d/mythbackend
+PIDFILE=/var/run/mythbackend.pid
+
+if [[ -r "$CONFIG_FILE" ]]; then
+ . "$CONFIG_FILE"
+fi
+
+PID="$(cat "$PIDFILE" 2> /dev/null || pidof mythbackend)"
+export HOME="$(getent passwd "$MBE_USER" | cut -d : -f 6)"
+
+case "$1" in
+ start)
+ stat_busy "Starting MythTV Backend"
+
+ if [[ "$PID" -gt 0 ]] && kill -0 "$PID"; then
+ stat_fail
+ exit 0
+ fi
+
+ touch "$PIDFILE"
+ chown "$MBE_USER" "$PIDFILE" "$LOG_PATH"
+
+ MBE_CMD="/usr/bin/mythbackend --daemon \
+ --logpath "$LOG_PATH" $LOG_OPTS \
+ --pidfile "$PIDFILE" $MBE_OPTS"
+ if su "$MBE_USER" -c "$MBE_CMD"; then
+ add_daemon mythbackend
+ stat_done
+ else
+ stat_fail
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping MythTV Backend"
+ if [[ "$PID" -gt 0 ]] && kill "$PID" &> /dev/null; then
+ rm_daemon mythbackend
+ stat_done
+ rm -f "$PIDFILE"
+ else
+ stat_fail
+ fi
+ ;;
+ restart)
+ "$0" stop
+ "$0" start
+ ;;
+ *)
+ echo "usage: $0 (start|stop|restart)"
+ ;;
+esac
+exit 0
diff --git a/community-staging/mythtv/mythtv.install b/community-staging/mythtv/mythtv.install
new file mode 100644
index 000000000..c29a53454
--- /dev/null
+++ b/community-staging/mythtv/mythtv.install
@@ -0,0 +1,11 @@
+post_install() {
+ echo "See \"MythTV\" on the Archlinux Wiki for installation information - Extensive!!"
+}
+
+post_upgrade() {
+ return
+}
+
+post_remove() {
+ echo -e "NOTE: mysql database was not removed. To remove run:\nmysql -u root -e 'drop database mythconverg;'"
+}
diff --git a/community-staging/mythtv/mythtv_0.25_gcc_4.7.patch b/community-staging/mythtv/mythtv_0.25_gcc_4.7.patch
new file mode 100644
index 000000000..83c8244a0
--- /dev/null
+++ b/community-staging/mythtv/mythtv_0.25_gcc_4.7.patch
@@ -0,0 +1,107 @@
+*** a/libs/libmythbase/compat.h 2012-03-31 20:52:30.430461503 -0400
+--- b/libs/libmythbase/compat.h 2012-03-31 20:59:05.935585911 -0400
+***************
+*** 44,49 ****
+--- 44,51 ----
+ # include <sys/resource.h> // for setpriority
+ # include <sys/socket.h>
+ # include <sys/wait.h> // For WIFEXITED on Mac OS X
++ # include <stdio.h> // for snprintf(), used by inline dlerror()
++ # include <unistd.h> // for usleep()
+ #endif
+
+ #ifdef USING_MINGW
+*** a/libs/libmyth/rssparse.h 2012-03-31 20:52:30.427453729 -0400
+--- b/libs/libmyth/rssparse.h 2012-03-31 21:51:11.687438044 -0400
+***************
+*** 13,18 ****
+--- 13,19 ----
+ #include <QPair>
+ #include <QMap>
+ #include <QVariant>
++ #include <sys/types.h>
+
+ #include "mythexp.h"
+
+*** a/libs/libmythtv/audioinput.h 2012-03-31 22:41:55.626923063 -0400
+--- b/libs/libmythtv/audioinput.h 2012-03-31 22:41:22.478248297 -0400
+***************
+*** 22,27 ****
+--- 22,28 ----
+ #define _AUDIOINPUT_H_
+
+ #include <QString>
++ #include <unistd.h>
+
+ class AudioInput
+ {
+*** a/external/FFmpeg/libavcodec/x86/h264_qpel_mmx.c 2012-03-31 20:52:29.923150437 -0400
+--- b/external/FFmpeg/libavcodec/x86/h264_qpel_mmx.c 2012-03-31 21:58:48.422270780 -0400
+***************
+*** 398,404 ****
+ "2: \n\t"\
+ \
+ : "+a"(src), "+c"(dst)\
+! : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "g"(h)\
+ : "memory"\
+ );\
+ src += 4-(h+5)*srcStride;\
+--- 398,404 ----
+ "2: \n\t"\
+ \
+ : "+a"(src), "+c"(dst)\
+! : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "rm"(h)\
+ : "memory"\
+ );\
+ src += 4-(h+5)*srcStride;\
+***************
+*** 446,452 ****
+ QPEL_H264HV(%%mm3, %%mm4, %%mm5, %%mm0, %%mm1, %%mm2, 15*48)\
+ "2: \n\t"\
+ : "+a"(src)\
+! : "c"(tmp), "S"((x86_reg)srcStride), "g"(size)\
+ : "memory"\
+ );\
+ tmp += 4;\
+--- 446,452 ----
+ QPEL_H264HV(%%mm3, %%mm4, %%mm5, %%mm0, %%mm1, %%mm2, 15*48)\
+ "2: \n\t"\
+ : "+a"(src)\
+! : "c"(tmp), "S"((x86_reg)srcStride), "rm"(size)\
+ : "memory"\
+ );\
+ tmp += 4;\
+***************
+*** 823,829 ****
+ "2: \n\t"\
+ \
+ : "+a"(src), "+c"(dst)\
+! : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "g"(h)\
+ : XMM_CLOBBERS("%xmm0", "%xmm1", "%xmm2", "%xmm3", \
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",)\
+ "memory"\
+--- 823,829 ----
+ "2: \n\t"\
+ \
+ : "+a"(src), "+c"(dst)\
+! : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "rm"(h)\
+ : XMM_CLOBBERS("%xmm0", "%xmm1", "%xmm2", "%xmm3", \
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",)\
+ "memory"\
+***************
+*** 878,884 ****
+ QPEL_H264HV_XMM(%%xmm3, %%xmm4, %%xmm5, %%xmm0, %%xmm1, %%xmm2, 15*48)
+ "2: \n\t"
+ : "+a"(src)
+! : "c"(tmp), "S"((x86_reg)srcStride), "g"(size)
+ : XMM_CLOBBERS("%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",)
+ "memory"
+--- 878,884 ----
+ QPEL_H264HV_XMM(%%xmm3, %%xmm4, %%xmm5, %%xmm0, %%xmm1, %%xmm2, 15*48)
+ "2: \n\t"
+ : "+a"(src)
+! : "c"(tmp), "S"((x86_reg)srcStride), "rm"(size)
+ : XMM_CLOBBERS("%xmm0", "%xmm1", "%xmm2", "%xmm3",
+ "%xmm4", "%xmm5", "%xmm6", "%xmm7",)
+ "memory"