Index: multimedia/mythtv/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/mythtv/Makefile,v retrieving revision 1.18 diff -u -r1.18 Makefile --- multimedia/mythtv/Makefile 7 Aug 2008 08:58:30 -0000 1.18 +++ multimedia/mythtv/Makefile 31 Oct 2008 19:35:17 -0000 @@ -7,13 +7,11 @@ # $FreeBSD: ports/multimedia/mythtv/Makefile,v 1.18 2008/08/07 08:58:30 linimon Exp $ PORTNAME= mythtv -PORTVERSION= 0.20 -PORTREVISION= 3 +PORTVERSION= 0.21 CATEGORIES= multimedia -MASTER_SITES= http://chuggalug.clues.com/mythtv/ -DISTNAME= mythtv-fixes-0.20-13053 +MASTER_SITES= http://www.mythtv.org/mc/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= glarkin@FreeBSD.org COMMENT= MythTV is a homebrew PVR project LIB_DEPENDS= mp3lame.0:${PORTSDIR}/audio/lame \ @@ -24,11 +22,7 @@ ${LOCALBASE}/lib/plugins/sqldrivers/libqsqlmysql.so:${PORTSDIR}/databases/qt-mysql-plugin \ wget:${PORTSDIR}/ftp/wget -BROKEN= Incorrect handling of user addition -DEPRECATED= Has been broken for more than 6 months -EXPIRATION_DATE=2008-09-19 - -ONLY_FOR_ARCHS= i386 +ONLY_FOR_ARCHS= i386 USE_BZIP2= yes USE_QT_VER= 3 USE_MYSQL= 51 @@ -38,7 +32,14 @@ MAKE_ENV= QTDIR="${QT_PREFIX}" QMAKESPEC="${QMAKESPEC}" USE_RC_SUBR= mythbackend -CONFIG= --enable-xvmc --enable-opengl-vsync \ +MYTHTVUSER?= mythtv +MYTHTVGROUP?= mythtv +MYTHTVUID?= 119 +MYTHTVGID?= ${MYTHTVUID} +MYTHTVDIR?= /home/mythtv + +CONFIG= --enable-xvmc --enable-opengl-vsync --disable-directfb \ + --disable-ivtv \ --disable-xvmc-pro --disable-xvmc-vld --disable-xvmcw \ --prefix=${PREFIX} --extra-cflags=-g --extra-cxxflags=-g @@ -46,25 +47,33 @@ QMAKESPEC?= ${LOCALBASE}/share/qt/mkspecs/freebsd-g++ -OPTIONS= LIRC "Native LIRC Support" Off -OPTIONS+= MYSQL_LOCAL "RUN_DEPEND on selected MySQL server" off +OPTIONS= LIRC "Native LIRC Support" Off \ + MYSQL_LOCAL "RUN_DEPEND on selected MySQL server" Off .include +PLIST_SUB= MYTHTVDIR=${MYTHTVDIR} \ + MYTHTVUSER=${MYTHTVUSER} \ + MYTHTVGROUP=${MYTHTVGROUP} \ + MYTHTVUID=${MYTHTVUID} \ + MYTHTVGID=${MYTHTVGID} + +SUB_FILES= pkg-install \ + pkg-deinstall + +SUB_LIST= PREFIX=${PREFIX} \ + ${PLIST_SUB} + .if defined(WITH_LIRC) -LIB_DEPENDS+= lirc_client.1:${PORTSDIR}/comms/lirc +LIB_DEPENDS+= lirc_client.1:${PORTSDIR}/comms/lirc # EXTRA_PATCHES= ${FILESDIR}/patchsettings-lirc .endif .if defined(WITH_MYSQL_LOCAL) -RUN_DEPENDS+= mysqld:${PORTSDIR}/databases/${MYSQL_VER}-server +RUN_DEPENDS+= mysqld_safe:${PORTSDIR}/databases/mysql${MYSQL_VER}-server .endif post-extract: - ${ECHO_CMD} 'const char *myth_source_version = "FreeBSD Ports Collection' \ - `pwd`, MythTV version ${PORTVERSION} "`date`\";" \ - > ${WRKSRC}/programs/mythfrontend/version.cpp - ${CP} -p ${WRKSRC}/programs/mythfrontend/version.cpp ${WRKSRC}/programs/mythbackend ${ECHO_CMD} export QMAKESPEC=${QMAKESPEC} do-configure: @@ -74,10 +83,10 @@ -spec ${LOCALBASE}/share/qt/mkspecs/freebsd-g++ mythtv.pro post-install: - ${MKDIR} ${PREFIX}/share/mythtv/database + ${INSTALL} -d ${PREFIX}/share/mythtv/database ${CP} ${WRKSRC}/database/mc.sql ${PREFIX}/share/mythtv/database ${CP} ${WRKSRC}/programs/mythtv-setup/mythtv-setup ${PREFIX}/bin/mythtv-setup ${SETENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL - ${MKDIR} ${PREFIX}/share/mythtv/database + ${INSTALL} -d ${PREFIX}/share/mythtv/database .include Index: multimedia/mythtv/distinfo =================================================================== RCS file: /home/pcvs/ports/multimedia/mythtv/distinfo,v retrieving revision 1.2 diff -u -r1.2 distinfo --- multimedia/mythtv/distinfo 15 Apr 2007 09:33:29 -0000 1.2 +++ multimedia/mythtv/distinfo 31 Oct 2008 19:35:17 -0000 @@ -1,3 +1,3 @@ -MD5 (mythtv-fixes-0.20-13053.tar.bz2) = 8beb8c54db79c40428f16d2c63a514b2 -SHA256 (mythtv-fixes-0.20-13053.tar.bz2) = 8f1d25cf3a8380501255465da942aba37be7b0418b2e6f24a69292f8e5d97f88 -SIZE (mythtv-fixes-0.20-13053.tar.bz2) = 12332802 +MD5 (mythtv-0.21.tar.bz2) = 49fc135e1cde90cd935c1229467fa37e +SHA256 (mythtv-0.21.tar.bz2) = 33a878a8fc3efdd74519b09b4ec3d16fa9d3a0436b321c13344e5f3ab723c5e4 +SIZE (mythtv-0.21.tar.bz2) = 14230687 Index: multimedia/mythtv/pkg-install =================================================================== RCS file: multimedia/mythtv/pkg-install diff -N multimedia/mythtv/pkg-install --- multimedia/mythtv/pkg-install 15 Apr 2007 09:33:29 -0000 1.5 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,91 +0,0 @@ -#!/bin/sh -# $FreeBSD: ports/multimedia/mythtv/pkg-install,v 1.5 2007/04/15 09:33:29 grog Exp $ - -PATH=/bin:/usr/sbin:/usr/bin:/usr/local/bin -case $2 in -POST-INSTALL) - USER=mythtv - GROUP=${USER} - UID=119 - GID=${UID} - HOME=/home/mythtv - - if pw group show "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." - else - if pw groupadd ${GROUP} -g ${GID}; then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - exit 1 - fi - fi - - if pw user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." - else - if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d ${HOME} -m -s /bin/sh -c "MythTV" - then - echo "Added user \"${USER}\"." - mkdir -p ${HOME} - if [ $? -ne 0 ]; then - echo '*** Unable to create' ${HOME} '***' - fi - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi - -# Now make the database - if [ -f /usr/local/etc/rc.d/mysql-server ]; then - pgrep mysqld > /dev/null - if [ $? -ne 0 ]; then - /usr/local/etc/rc.d/mysql-server start - if [ $? -ne 0 ]; then - echo '*** Unable to start mysqld' - exit 1 - else - pgrep mysqld > /dev/null - if [ $? -ne 0 ]; then - echo '*** Unable to start mysqld' - exit 1 - fi - fi - fi - # Try to create the database - mysql < /usr/local/share/mythtv/database/mc.sql - if [ $? -ne 0 ]; then - cat < Index: multimedia/mythtv/files/patch-configure =================================================================== RCS file: multimedia/mythtv/files/patch-configure diff -N multimedia/mythtv/files/patch-configure --- multimedia/mythtv/files/patch-configure 15 Apr 2007 09:33:29 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,37 +0,0 @@ ---- configure.really-orig Fri Mar 16 18:11:46 2007 -+++ configure Thu Mar 29 16:18:29 2007 -@@ -463,6 +463,17 @@ - fi - fi - -+# BSD. -+if uname -s | grep BSD > 0; then -+ dmesg=/var/run/dmesg.boot -+ if test -f $dmesg ; then -+ processor=`grep ^CPU: $dmesg` -+# processor_flags is used only to determine whether the processor -+# supports MMX. The script expexts lower-case 'mmx'. Give it to it. -+ processor_flags=`grep '^ Features=' $dmesg | tr "[:upper:]" "[:lower:]"` -+ fi -+fi -+ - # These have to be looked up early for some types of cross-compiling to work - cpu_overide="no" - for opt do -@@ -712,14 +723,14 @@ - ;; - FreeBSD) - joystick_menu="no" --v4l2="no" -+v4l2="yes" - bktr="yes" - audio_oss="yes" - dv1394="no" - make="gmake" - backend="yes" - v4l="yes" --CFLAGS="$CFLAGS -pthread" -+CFLAGS="$CFLAGS -pthread -I/usr/local/include" - CCONFIG="$CCONFIG freebsd" - ;; - GNU/kFreeBSD) Index: multimedia/mythtv/files/patch-httprequest.cpp =================================================================== RCS file: multimedia/mythtv/files/patch-httprequest.cpp diff -N multimedia/mythtv/files/patch-httprequest.cpp --- multimedia/mythtv/files/patch-httprequest.cpp 15 Apr 2007 09:33:30 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,48 +0,0 @@ ---- libs/libmythupnp/httprequest.cpp~ Fri Mar 16 08:25:39 2007 -+++ libs/libmythupnp/httprequest.cpp Fri Mar 16 08:40:32 2007 -@@ -21,8 +21,12 @@ - #ifdef CONFIG_DARWIN - #include "darwin-sendfile.h" - #else -+#ifdef __FreeBSD__ -+typedef off_t __off64_t; -+#else - #include - #endif -+#endif - #include - #include - #include -@@ -289,6 +293,24 @@ - __off64_t offset = llStart; - int file = open( sFileName.ascii(), O_RDONLY | O_LARGEFILE ); - ssize_t sent = 0; -+#ifdef __FreeBSD__ -+ -+ int error; -+ error = sendfile (file, -+ getSocketHandle (), -+ offset, -+ llSize, -+ NULL, -+ NULL, -+ NULL ); -+ if (error) -+ fprintf (stderr, -+ "Can't transfer %s: %s (%d)\n", -+ sFileName.ascii(), -+ strerror (errno), -+ errno ); -+ -+#else - - do - { -@@ -301,6 +319,7 @@ - llSize -= sent; - } - while (( sent >= 0 ) && ( llSize > 0 )); -+#endif - - close( file ); - } Index: multimedia/mythtv/files/patch-libs-libmythtv-cardutil.cpp =================================================================== RCS file: multimedia/mythtv/files/patch-libs-libmythtv-cardutil.cpp diff -N multimedia/mythtv/files/patch-libs-libmythtv-cardutil.cpp --- multimedia/mythtv/files/patch-libs-libmythtv-cardutil.cpp 23 Feb 2007 23:15:51 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,11 +0,0 @@ ---- libs/libmythtv/cardutil.cpp~ Tue Jul 18 22:05:04 2006 -+++ libs/libmythtv/cardutil.cpp Fri Feb 23 11:40:25 2007 -@@ -588,7 +588,7 @@ - { - bool ok; - QStringList ret; -- int videofd = open(device.ascii(), O_RDWR); -+ int videofd = open(device.ascii(), O_RDONLY); - if (videofd < 0) - { - ret += QObject::tr("Could not open '%1' " Index: multimedia/mythtv/files/patch-libs-libmythtvfreemheg-Programs.cpp =================================================================== RCS file: multimedia/mythtv/files/patch-libs-libmythtvfreemheg-Programs.cpp diff -N multimedia/mythtv/files/patch-libs-libmythtvfreemheg-Programs.cpp --- multimedia/mythtv/files/patch-libs-libmythtvfreemheg-Programs.cpp 15 Apr 2007 09:33:30 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,18 +0,0 @@ ---- libs/libmythfreemheg/Programs.cpp~ Fri Mar 16 18:11:34 2007 -+++ libs/libmythfreemheg/Programs.cpp Sat Apr 7 11:41:11 2007 -@@ -30,7 +30,15 @@ - #include "freemheg.h" - - #include -+#ifdef __FreeBSD__ -+/* -+ * This file refers to the non-POSIX structure timezone, which is -+ * defined in sys/time.h. -+ */ -+#include -+#else - #include -+#endif - - #include "../../config.h" - Index: multimedia/mythtv/files/patch-libs__libmyth__compat.h =================================================================== RCS file: multimedia/mythtv/files/patch-libs__libmyth__compat.h diff -N multimedia/mythtv/files/patch-libs__libmyth__compat.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ multimedia/mythtv/files/patch-libs__libmyth__compat.h 31 Oct 2008 19:35:17 -0000 @@ -0,0 +1,11 @@ +--- ./libs/libmyth/compat.h.orig 2008-02-18 02:35:01.000000000 -0500 ++++ ./libs/libmyth/compat.h 2008-10-31 09:18:59.000000000 -0400 +@@ -273,7 +273,7 @@ + + // Libdvdnav now uses off64_t lseek64(), which Darwin doesn't have. + // Luckily, its lseek() is already 64bit compatible +-#ifdef CONFIG_DARWIN ++#if defined(CONFIG_DARWIN) || defined(__FreeBSD__) + typedef off_t off64_t; + #define lseek64(f,o,w) lseek(f,o,w) + #endif Index: multimedia/mythtv/files/patch-libs__libmyth__util.cpp =================================================================== RCS file: multimedia/mythtv/files/patch-libs__libmyth__util.cpp diff -N multimedia/mythtv/files/patch-libs__libmyth__util.cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ multimedia/mythtv/files/patch-libs__libmyth__util.cpp 31 Oct 2008 19:35:17 -0000 @@ -0,0 +1,13 @@ +--- ./libs/libmyth/util.cpp.orig 2008-02-24 10:19:20.000000000 -0500 ++++ ./libs/libmyth/util.cpp 2008-10-31 09:19:00.000000000 -0400 +@@ -54,6 +54,10 @@ + #include // for struct statfs + #endif + ++#if defined(__FreeBSD__) ++#include // for struct statfs ++#endif ++ + #ifdef USE_LIRC + #include "lircevent.h" + #endif Index: multimedia/mythtv/files/patch-libs__libmythdvdnav__dvd_input.c =================================================================== RCS file: multimedia/mythtv/files/patch-libs__libmythdvdnav__dvd_input.c diff -N multimedia/mythtv/files/patch-libs__libmythdvdnav__dvd_input.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ multimedia/mythtv/files/patch-libs__libmythdvdnav__dvd_input.c 31 Oct 2008 19:35:17 -0000 @@ -0,0 +1,12 @@ +--- ./libs/libmythdvdnav/dvd_input.c.orig 2008-01-27 14:27:40.000000000 -0500 ++++ ./libs/libmythdvdnav/dvd_input.c 2008-10-31 09:22:21.000000000 -0400 +@@ -27,6 +27,9 @@ + #include "dvd_reader.h" + #include "dvd_input.h" + ++#if defined(__FreeBSD__) ++#define lseek64 lseek ++#endif + + /* The function pointers that is the exported interface of this file. */ + dvd_input_t (*dvdinput_open) (const char *); Index: multimedia/mythtv/files/patch-libs__libmythdvdnav__dvdnav_internal.h =================================================================== RCS file: multimedia/mythtv/files/patch-libs__libmythdvdnav__dvdnav_internal.h diff -N multimedia/mythtv/files/patch-libs__libmythdvdnav__dvdnav_internal.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ multimedia/mythtv/files/patch-libs__libmythdvdnav__dvdnav_internal.h 31 Oct 2008 19:35:17 -0000 @@ -0,0 +1,12 @@ +--- ./libs/libmythdvdnav/dvdnav_internal.h.orig 2008-10-28 17:26:11.000000000 -0400 ++++ ./libs/libmythdvdnav/dvdnav_internal.h 2008-10-28 17:26:43.000000000 -0400 +@@ -62,6 +62,9 @@ + #else + + #include ++#if defined(__FreeBSD__) ++#define lseek64 lseek ++#endif + + #endif /* WIN32 */ + Index: multimedia/mythtv/files/patch-libs__libmythfreemheg__Programs.cpp =================================================================== RCS file: multimedia/mythtv/files/patch-libs__libmythfreemheg__Programs.cpp diff -N multimedia/mythtv/files/patch-libs__libmythfreemheg__Programs.cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ multimedia/mythtv/files/patch-libs__libmythfreemheg__Programs.cpp 31 Oct 2008 19:35:17 -0000 @@ -0,0 +1,18 @@ +--- ./libs/libmythfreemheg/Programs.cpp.orig 2007-03-29 15:44:23.000000000 -0400 ++++ ./libs/libmythfreemheg/Programs.cpp 2008-10-28 16:46:13.000000000 -0400 +@@ -30,7 +30,15 @@ + #include "freemheg.h" + + #include ++#ifdef __FreeBSD__ ++/* ++ * This file refers to the non-POSIX structure timezone, which is ++ * defined in sys/time.h. ++ */ ++#include ++#else + #include ++#endif + + #include "../../config.h" + Index: multimedia/mythtv/files/patch-libs__libmythtv__cardutil.cpp =================================================================== RCS file: multimedia/mythtv/files/patch-libs__libmythtv__cardutil.cpp diff -N multimedia/mythtv/files/patch-libs__libmythtv__cardutil.cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ multimedia/mythtv/files/patch-libs__libmythtv__cardutil.cpp 31 Oct 2008 19:35:17 -0000 @@ -0,0 +1,11 @@ +--- ./libs/libmythtv/cardutil.cpp.orig 2008-02-02 12:42:34.000000000 -0500 ++++ ./libs/libmythtv/cardutil.cpp 2008-10-28 16:46:13.000000000 -0400 +@@ -1473,7 +1473,7 @@ + { + bool ok; + QStringList ret; +- int videofd = open(device.ascii(), O_RDWR); ++ int videofd = open(device.ascii(), O_RDONLY); + if (videofd < 0) + { + ret += QObject::tr("Could not open '%1' " Index: multimedia/mythtv/files/patch-libs__libmythupnp__httprequest.cpp =================================================================== RCS file: multimedia/mythtv/files/patch-libs__libmythupnp__httprequest.cpp diff -N multimedia/mythtv/files/patch-libs__libmythupnp__httprequest.cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ multimedia/mythtv/files/patch-libs__libmythupnp__httprequest.cpp 31 Oct 2008 19:35:17 -0000 @@ -0,0 +1,49 @@ +--- ./libs/libmythupnp/httprequest.cpp.orig 2008-03-03 22:14:01.000000000 -0500 ++++ ./libs/libmythupnp/httprequest.cpp 2008-10-28 16:46:13.000000000 -0400 +@@ -21,9 +21,13 @@ + #if defined CONFIG_DARWIN || defined CONFIG_CYGWIN || defined(__FreeBSD__) || defined(USING_MINGW) + #include "darwin-sendfile.h" + #else ++#ifdef __FreeBSD__ ++typedef off_t __off64_t; ++#else + #define USE_SETSOCKOPT + #include + #endif ++#endif + #include + #include + #include +@@ -398,6 +402,24 @@ + __off64_t offset = llStart; + int file = open( sFileName.ascii(), O_RDONLY | O_LARGEFILE ); + ssize_t sent = 0; ++#ifdef __FreeBSD__ ++ ++ int error; ++ error = sendfile (file, ++ getSocketHandle (), ++ offset, ++ llSize, ++ NULL, ++ NULL, ++ NULL ); ++ if (error) ++ fprintf (stderr, ++ "Can't transfer %s: %s (%d)\n", ++ sFileName.ascii(), ++ strerror (errno), ++ errno ); ++ ++#else + + do + { +@@ -411,6 +433,7 @@ + //VERBOSE(VB_UPNP, QString("SendResponseFile : --- size = %1, offset = %2, sent = %3").arg(llSize).arg(offset).arg(sent)); + } + while (( sent >= 0 ) && ( llSize > 0 )); ++#endif + + if (sent == -1) + { Index: multimedia/mythtv/files/patch-mainserver.cpp =================================================================== RCS file: multimedia/mythtv/files/patch-mainserver.cpp diff -N multimedia/mythtv/files/patch-mainserver.cpp --- multimedia/mythtv/files/patch-mainserver.cpp 24 Feb 2007 02:30:36 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,32 +0,0 @@ ---- programs/mythbackend/mainserver.cpp.orig Wed Jan 31 22:16:22 2007 -+++ programs/mythbackend/mainserver.cpp Wed Jan 31 16:16:00 2007 -@@ -238,9 +238,9 @@ - return; - } - -- readReadyLock.lock(); -+ // readReadyLock.lock(); - -- sock->Lock(); -+ // sock->Lock(); - - //if (socket->IsInProcess()) - //{ -@@ -287,7 +287,7 @@ - - prt->setup(sock); - -- readReadyLock.unlock(); -+ //readReadyLock.unlock(); - } - - void MainServer::ProcessRequest(MythSocket *sock) -@@ -301,7 +301,7 @@ - ProcessRequestWork(sock); - } - -- sock->Unlock(); -+ //sock->Unlock(); - //sock->SetInProcess(false); - } - Index: multimedia/mythtv/files/patch-mpegrecorder.cpp =================================================================== RCS file: multimedia/mythtv/files/patch-mpegrecorder.cpp diff -N multimedia/mythtv/files/patch-mpegrecorder.cpp --- multimedia/mythtv/files/patch-mpegrecorder.cpp 24 Feb 2007 02:30:36 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,19 +0,0 @@ ---- libs/libmythtv/mpegrecorder.cpp.orig Wed Jan 31 22:18:54 2007 -+++ libs/libmythtv/mpegrecorder.cpp Wed Jan 31 16:16:27 2007 -@@ -603,7 +603,7 @@ - tv.tv_usec = 0; - FD_ZERO(&rdset); - FD_SET(readfd, &rdset); -- -+#ifdef _nuniet_ - switch (select(readfd + 1, &rdset, NULL, NULL, &tv)) - { - case -1: -@@ -627,6 +627,7 @@ - - default: break; - } -+#endif - - ret = read(readfd, buffer, bufferSize); - Index: multimedia/mythtv/files/patch-mythbackend-scheduler.cpp =================================================================== RCS file: multimedia/mythtv/files/patch-mythbackend-scheduler.cpp diff -N multimedia/mythtv/files/patch-mythbackend-scheduler.cpp --- multimedia/mythtv/files/patch-mythbackend-scheduler.cpp 17 Jan 2007 05:52:04 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,11 +0,0 @@ ---- programs/mythbackend/scheduler.cpp~ Sat Sep 9 13:50:38 2006 -+++ programs/mythbackend/scheduler.cpp Mon Jan 15 14:06:50 2007 -@@ -1578,7 +1578,7 @@ - gContext->dispatch(me); - - QString halt_cmd = gContext->GetSetting("ServerHaltCommand", -- "sudo /sbin/halt -p"); -+ "/sbin/shutdown -p now"); - - if (!halt_cmd.isEmpty()) - { Index: multimedia/mythtv/files/patch-mythfrontend-main.cpp =================================================================== RCS file: multimedia/mythtv/files/patch-mythfrontend-main.cpp diff -N multimedia/mythtv/files/patch-mythfrontend-main.cpp --- multimedia/mythtv/files/patch-mythfrontend-main.cpp 17 Jan 2007 05:52:04 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,11 +0,0 @@ ---- programs/mythfrontend/main.cpp~ Mon Sep 11 15:04:42 2006 -+++ programs/mythfrontend/main.cpp Mon Jan 15 14:06:28 2007 -@@ -472,7 +472,7 @@ - void haltnow() - { - QString halt_cmd = gContext->GetSetting("HaltCommand", -- "sudo /sbin/halt -p"); -+ "/sbin/shutdown -p now"); - if (!halt_cmd.isEmpty()) - system(halt_cmd.ascii()); - } Index: multimedia/mythtv/files/patch-mythtv-setup-backendsettings.cpp =================================================================== RCS file: multimedia/mythtv/files/patch-mythtv-setup-backendsettings.cpp diff -N multimedia/mythtv/files/patch-mythtv-setup-backendsettings.cpp --- multimedia/mythtv/files/patch-mythtv-setup-backendsettings.cpp 17 Jan 2007 05:52:04 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,11 +0,0 @@ ---- programs/mythtv-setup/backendsettings.cpp~ Sat Aug 26 13:34:08 2006 -+++ programs/mythtv-setup/backendsettings.cpp Mon Jan 15 14:07:17 2007 -@@ -386,7 +386,7 @@ - { - GlobalLineEdit *gc = new GlobalLineEdit("ServerHaltCommand"); - gc->setLabel(QObject::tr("Server halt command")); -- gc->setValue("sudo /sbin/halt -p"); -+ gc->setValue("/sbin/shutdown -p now"); - gc->setHelpText(QObject::tr("The command used to halt the backends.")); - return gc; - }; Index: multimedia/mythtv/files/patch-programs__mythbackend__mainserver.cpp =================================================================== RCS file: multimedia/mythtv/files/patch-programs__mythbackend__mainserver.cpp diff -N multimedia/mythtv/files/patch-programs__mythbackend__mainserver.cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ multimedia/mythtv/files/patch-programs__mythbackend__mainserver.cpp 31 Oct 2008 19:35:17 -0000 @@ -0,0 +1,34 @@ +--- ./programs/mythbackend/mainserver.cpp.orig 2008-10-29 09:01:37.000000000 -0400 ++++ ./programs/mythbackend/mainserver.cpp 2008-10-29 09:14:40.000000000 -0400 +@@ -251,7 +251,7 @@ + return; + } + +- readReadyLock.lock(); ++ // readReadyLock.lock(); + + ProcessRequestThread *prt = NULL; + threadPoolLock.lock(); +@@ -278,19 +278,19 @@ + + prt->setup(sock); + +- readReadyLock.unlock(); ++ // readReadyLock.unlock(); + } + + void MainServer::ProcessRequest(MythSocket *sock) + { +- sock->Lock(); ++ // sock->Lock(); + + if (sock->bytesAvailable() > 0) + { + ProcessRequestWork(sock); + } + +- sock->Unlock(); ++ // sock->Unlock(); + } + + void MainServer::ProcessRequestWork(MythSocket *sock) Index: multimedia/mythtv/files/patch-programs__mythbackend__scheduler.cpp =================================================================== RCS file: multimedia/mythtv/files/patch-programs__mythbackend__scheduler.cpp diff -N multimedia/mythtv/files/patch-programs__mythbackend__scheduler.cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ multimedia/mythtv/files/patch-programs__mythbackend__scheduler.cpp 31 Oct 2008 19:35:17 -0000 @@ -0,0 +1,11 @@ +--- ./programs/mythbackend/scheduler.cpp.orig 2008-02-20 22:23:22.000000000 -0500 ++++ ./programs/mythbackend/scheduler.cpp 2008-10-28 16:46:13.000000000 -0400 +@@ -2054,7 +2054,7 @@ + gContext->dispatch(me); + + QString halt_cmd = gContext->GetSetting("ServerHaltCommand", +- "sudo /sbin/halt -p"); ++ "/sbin/shutdown -p now"); + + if (!halt_cmd.isEmpty()) + { Index: multimedia/mythtv/files/patch-programs__mythfrontend__main.cpp =================================================================== RCS file: multimedia/mythtv/files/patch-programs__mythfrontend__main.cpp diff -N multimedia/mythtv/files/patch-programs__mythfrontend__main.cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ multimedia/mythtv/files/patch-programs__mythfrontend__main.cpp 31 Oct 2008 19:35:17 -0000 @@ -0,0 +1,11 @@ +--- ./programs/mythfrontend/main.cpp.orig 2008-02-23 22:25:03.000000000 -0500 ++++ ./programs/mythfrontend/main.cpp 2008-10-28 16:46:13.000000000 -0400 +@@ -577,7 +577,7 @@ + void haltnow() + { + QString halt_cmd = gContext->GetSetting("HaltCommand", +- "sudo /sbin/halt -p"); ++ "/sbin/shutdown -p now"); + if (!halt_cmd.isEmpty()) + system(halt_cmd.ascii()); + } Index: multimedia/mythtv/files/patch-programs__mythtv-setup__backendsettings.cpp =================================================================== RCS file: multimedia/mythtv/files/patch-programs__mythtv-setup__backendsettings.cpp diff -N multimedia/mythtv/files/patch-programs__mythtv-setup__backendsettings.cpp --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ multimedia/mythtv/files/patch-programs__mythtv-setup__backendsettings.cpp 31 Oct 2008 19:35:17 -0000 @@ -0,0 +1,11 @@ +--- ./programs/mythtv-setup/backendsettings.cpp.orig 2008-02-05 12:52:11.000000000 -0500 ++++ ./programs/mythtv-setup/backendsettings.cpp 2008-10-28 16:46:13.000000000 -0400 +@@ -425,7 +425,7 @@ + { + GlobalLineEdit *gc = new GlobalLineEdit("ServerHaltCommand"); + gc->setLabel(QObject::tr("Server halt command")); +- gc->setValue("sudo /sbin/halt -p"); ++ gc->setValue("/sbin/shutdown -p now"); + gc->setHelpText(QObject::tr("The command used to halt the backends.")); + return gc; + }; Index: multimedia/mythtv/files/patch-upnpglobal.h =================================================================== RCS file: multimedia/mythtv/files/patch-upnpglobal.h diff -N multimedia/mythtv/files/patch-upnpglobal.h --- multimedia/mythtv/files/patch-upnpglobal.h 19 Dec 2006 23:55:54 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ ---- libs/libmythupnp/upnpglobal.h~ Tue Jun 6 20:03:35 2006 -+++ libs/libmythupnp/upnpglobal.h Tue Nov 14 10:40:52 2006 -@@ -15,9 +15,11 @@ - - // __suseconds_t doesn't exist on some older Unixes. e.g. Darwin/Mac OS X - -+#ifndef __FreeBSD__ - #ifndef __suseconds_t_defined - #define __suseconds_t_defined - typedef int32_t __suseconds_t; -+#endif - #endif - - ////////////////////////////////////////////////////////////////////////////// Index: multimedia/mythtv/files/patch-version.pro =================================================================== RCS file: multimedia/mythtv/files/patch-version.pro diff -N multimedia/mythtv/files/patch-version.pro --- multimedia/mythtv/files/patch-version.pro 19 Dec 2006 23:55:54 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,16 +0,0 @@ ---- version.pro~ Thu Jan 26 21:01:39 2006 -+++ version.pro Tue Nov 14 13:43:28 2006 -@@ -10,11 +10,7 @@ - SOURCES += version.cpp - - version.target = version.cpp --version.commands = echo 'const char *myth_source_version =' \ --'"'`(svnversion $${SVNTREEDIR} 2>/dev/null) || echo Unknown`'";' > .vers.new ; \ --diff .vers.new version.cpp > .vers.diff 2>&1 ; \ --if test -s .vers.diff ; then mv -f .vers.new version.cpp ; fi ; \ --rm -f .vers.new .vers.diff --version.depends = FORCE -+version.commands = -+version.depends = - - QMAKE_EXTRA_UNIX_TARGETS += version Index: multimedia/mythtv/files/patch-videodev_myth.h =================================================================== RCS file: multimedia/mythtv/files/patch-videodev_myth.h diff -N multimedia/mythtv/files/patch-videodev_myth.h --- multimedia/mythtv/files/patch-videodev_myth.h 24 Feb 2007 02:30:36 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,21 +0,0 @@ ---- ./libs/libmythtv/videodev_myth.h.orig Wed Jan 31 22:16:51 2007 -+++ ./libs/libmythtv/videodev_myth.h Wed Jan 31 22:28:06 2007 -@@ -5,12 +5,12 @@ - - #if defined(__FreeBSD__) || defined(CONFIG_DARWIN) - #include --typedef unsigned long __u32; --typedef unsigned short __u16; --typedef int __s32; --typedef unsigned char __u8; --typedef unsigned long long __u64; --typedef long long __s64; -+typedef uint32_t __u32; -+typedef uint16_t __u16; -+typedef int32_t __s32; -+typedef uint8_t __u8; -+typedef uint32_t __u64; -+typedef int32_t __s64; - #else - #include - #include Index: multimedia/mythtv/files/patch-videoout_xv.cpp =================================================================== RCS file: multimedia/mythtv/files/patch-videoout_xv.cpp diff -N multimedia/mythtv/files/patch-videoout_xv.cpp --- multimedia/mythtv/files/patch-videoout_xv.cpp 19 Dec 2006 23:55:54 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,13 +0,0 @@ ---- libs/libmythtv/videoout_xv.cpp~ Tue Aug 29 16:43:24 2006 -+++ libs/libmythtv/videoout_xv.cpp Tue Nov 14 12:23:32 2006 -@@ -7,7 +7,10 @@ - #include - #include - -+#ifdef __FreeBSD__ -+#else - #include -+#endif - #include - #include - #include Index: multimedia/mythtv/files/pkg-deinstall.in =================================================================== RCS file: multimedia/mythtv/files/pkg-deinstall.in diff -N multimedia/mythtv/files/pkg-deinstall.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ multimedia/mythtv/files/pkg-deinstall.in 31 Oct 2008 19:35:17 -0000 @@ -0,0 +1,22 @@ +#!/bin/sh +# +# $FreeBSD:$ +# + +MYTHTVUSER=%%MYTHTVUSER%% +MYTHTVGROUP=%%MYTHTVGROUP%% +MYTHTVDIR=%%MYTHTVDIR%% + +if [ "$2" = "POST-DEINSTALL" ]; then + if /usr/sbin/pw group show "${MYTHTVGROUP}" 2>&1 >/dev/null; then + echo "You should manually remove the \"${MYTHTVGROUP}\" group." + fi + + if /usr/sbin/pw user show "${MYTHTVUSER}" 2>&1 >/dev/null; then + echo "You should manually remove the \"${MYTHTVUSER}\" user." + fi + + if [ -e "${MYTHTVDIR}" ]; then + echo "You should manually remove the \"${MYTHTVDIR}\" directory." + fi +fi Index: multimedia/mythtv/files/pkg-install.in =================================================================== RCS file: multimedia/mythtv/files/pkg-install.in diff -N multimedia/mythtv/files/pkg-install.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ multimedia/mythtv/files/pkg-install.in 31 Oct 2008 19:35:17 -0000 @@ -0,0 +1,93 @@ +#!/bin/sh +# $FreeBSD: ports/multimedia/mythtv/pkg-install,v 1.5 2007/04/15 09:33:29 grog Exp $ + +PREFIX=%%PREFIX%% +MYTHTVUSER=%%MYTHTVUSER%% +MYTHTVGROUP=%%MYTHTVGROUP%% +MYTHTVDIR=%%MYTHTVDIR%% +MYTHTVUID=%%MYTHTVUID%% +MYTHTVGID=%%MYTHTVGID%% +PATH=/bin:/usr/sbin:/usr/bin:${LOCALBASE}/bin + +case $2 in +POST-INSTALL) + + if pw group show "${MYTHTVGROUP}" 2>/dev/null; then + echo "You already have a group \"${MYTHTVGROUP}\", so I will use it." + else + if pw groupadd ${MYTHTVGROUP} -g ${MYTHTVGID}; then + echo "Added group \"${MYTHTVGROUP}\"." + else + echo "Adding group \"${MYTHTVGROUP}\" failed..." + exit 1 + fi + fi + + if pw user show "${MYTHTVUSER}" 2>/dev/null; then + echo "You already have a user \"${MYTHTVUSER}\", so I will use it." + else + if pw useradd ${MYTHTVUSER} -u ${MYTHTVUID} -g ${MYTHTVGROUP} -h - \ + -d ${MYTHTVDIR} -m -s /bin/sh -c "MythTV" + then + echo "Added user \"${MYTHTVUSER}\"." + mkdir -p ${MYTHTVDIR} + if [ $? -ne 0 ]; then + echo '*** Unable to create' ${MYTHTVDIR} '***' + fi + else + echo "Adding user \"${MYTHTVUSER}\" failed..." + exit 1 + fi + fi + +# Now make the database + if [ -f ${LOCALBASE}/etc/rc.d/mysql-server ]; then + pgrep mysqld > /dev/null + if [ $? -ne 0 ]; then + ${LOCALBASE}/etc/rc.d/mysql-server start + if [ $? -ne 0 ]; then + echo '*** Unable to start mysqld' + exit 1 + else + pgrep mysqld > /dev/null + if [ $? -ne 0 ]; then + echo '*** Unable to start mysqld' + exit 1 + fi + fi + fi + # Try to create the database + mysql < ${PREFIX}/share/mythtv/database/mc.sql + if [ $? -ne 0 ]; then + cat <