ports/128419: [PATCH] multimedia/mythtv: various compile fixes
Bernhard Froehlich
decke at bluelife.at
Mon Oct 27 17:40:04 UTC 2008
>Number: 128419
>Category: ports
>Synopsis: [PATCH] multimedia/mythtv: various compile fixes
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Oct 27 17:40:03 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Bernhard Fr__hlich
>Release: FreeBSD 7.1-PRERELEASE amd64
>Organization:
>Environment:
System: FreeBSD chii.bluelife.at 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #2: Sat Oct 18 10:09:35 CEST 2008
>Description:
This patch is against the multimedia/mythtv port with applied
patch-3.diff from ports/126343 by Anders Trobaeck.
His patch fixes the install/deinstall problems and my PR fixes the
compile problems that came up.
- fixed build on amd64
- fixed conflicts with installed ffmpeg
- fixed compile problem with libdts/libdca
- proper ARTS and JACK audio support
At least Stefan Ehmann on freebsd-multimedia@ successfully tested this patches.
http://lists.freebsd.org/pipermail/freebsd-multimedia/2008-September/009219.html
Added file(s):
- files/patch-libs-libavcodec.pro
- files/patch-libs-libmythtv-NuppelVideoPlayer.h
- files/patch-libs-libmythtv-libmythtv.pro
- files/patch-libs-libmythtv-signalmonitor.cpp
- files/patch-libs-libmythtv-vbilut.h
- files/patch-libs-libmythtv-yuv2rgb.cpp
- files/patch-programs-mythtranscode-mythtranscode.pro
Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:
--- mythtv-0.20_4.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/multimedia/mythtv-126343/Makefile /usr/ports/multimedia/mythtv/Makefile
--- /usr/ports/multimedia/mythtv-126343/Makefile 2008-10-26 10:47:10.000000000 +0100
+++ /usr/ports/multimedia/mythtv/Makefile 2008-10-26 11:41:56.000000000 +0100
@@ -8,7 +8,7 @@
PORTNAME= mythtv
PORTVERSION= 0.20
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= multimedia
MASTER_SITES= http://chuggalug.clues.com/mythtv/
DISTNAME= mythtv-fixes-0.20-13053
@@ -17,20 +17,25 @@
COMMENT= MythTV is a homebrew PVR project
LIB_DEPENDS= mp3lame.0:${PORTSDIR}/audio/lame \
- freetype.9:${PORTSDIR}/print/freetype2
+ freetype.9:${PORTSDIR}/print/freetype2 \
+ dca.0:${PORTSDIR}/multimedia/libdca
BUILD_DEPENDS= qmake:${PORTSDIR}/devel/qmake \
${SITE_PERL}/${PERL_ARCH}/XML/Parser/Expat.pm:${PORTSDIR}/textproc/p5-XML-SAX-Expat
RUN_DEPENDS= tv_check:${PORTSDIR}/textproc/p5-xmltv \
${LOCALBASE}/lib/plugins/sqldrivers/libqsqlmysql.so:${PORTSDIR}/databases/qt-mysql-plugin \
wget:${PORTSDIR}/ftp/wget
-ONLY_FOR_ARCHS= i386
+CONFLICTS= mythtv-frontend-[0-9]*
+
+ONLY_FOR_ARCHS= i386 amd64
USE_BZIP2= yes
USE_QT_VER= 3
USE_MYSQL= 51
GNU_CONFIGURE= yes
+USE_LDCONFIG= yes
CONFIGURE_ENV= QMAKESPEC="${QMAKESPEC}" \
- CFLAGS="${CFLAGS}"
+ CFLAGS="-L${LOCALBASE}/include" \
+ LDFLAGS="-L${LOCALBASE}/lib"
MAKE_ENV= QTDIR="${QT_PREFIX}" QMAKESPEC="${QMAKESPEC}"
USE_RC_SUBR= mythbackend
@@ -48,8 +53,10 @@
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 \
+ ARTS "arts sound driver" off \
+ JACK "JACK sound driver" off
.include <bsd.port.pre.mk>
@@ -65,13 +72,31 @@
SUB_LIST= PREFIX=${PREFIX} \
${PLIST_SUB}
+.if ${ARCH} == "amd64"
+CONFIG+= --arch=x86-64
+.endif
+
.if defined(WITH_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+= ${LOCALBASE}/libexec/mysqld:${PORTSDIR}/databases/mysql${MYSQL_VER}-server
+.endif
+
+.if defined(WITH_ARTS)
+LIB_DEPENDS+= artsc.0:${PORTSDIR}/audio/arts
+CONFIG+= --enable-audio-arts
+.else
+CONFIG+= --disable-audio-arts
+.endif
+
+.if defined(WITH_JACK)
+LIB_DEPENDS+= jack.0:${PORTSDIR}/audio/jack
+CONFIG+= --enable-audio-jack
+.else
+CONFIG+= --disable-audio-jack
.endif
post-extract:
@@ -82,7 +107,7 @@
${ECHO_CMD} export QMAKESPEC=${QMAKESPEC}
do-configure:
- @cd ${WRKSRC} && QMAKESPEC=${QMAKESPEC} ./configure ${CONFIG}
+ @cd ${WRKSRC} && ${CONFIGURE_ENV} ./configure ${CONFIG}
@${ECHO_CMD} MAKE_ENV: ${MAKE_ENV}
@cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} qmake \
-spec ${LOCALBASE}/share/qt/mkspecs/freebsd-g++ mythtv.pro
diff -ruN --exclude=CVS /usr/ports/multimedia/mythtv-126343/files/patch-configure /usr/ports/multimedia/mythtv/files/patch-configure
--- /usr/ports/multimedia/mythtv-126343/files/patch-configure 2007-04-15 11:33:29.000000000 +0200
+++ /usr/ports/multimedia/mythtv/files/patch-configure 2008-09-27 14:42:50.000000000 +0200
@@ -1,5 +1,5 @@
---- configure.really-orig Fri Mar 16 18:11:46 2007
-+++ configure Thu Mar 29 16:18:29 2007
+--- configure 2007-03-16 08:41:46.000000000 +0100
++++ configure 2008-09-27 13:41:46.000000000 +0200
@@ -463,6 +463,17 @@
fi
fi
@@ -35,3 +35,12 @@
CCONFIG="$CCONFIG freebsd"
;;
GNU/kFreeBSD)
+@@ -2241,7 +2252,7 @@
+
+ audio_jack=no
+ audio_jack_libs="-ljack"
+-if $cc -o $TMPE $TMPC $audio_jack_libs > /dev/null 2>&1; then
++if $cc -o $TMPE $TMPC $CFLAGS $LDFLAGS $audio_jack_libs > /dev/null 2>&1; then
+ audio_jack=yes
+ fi
+
diff -ruN --exclude=CVS /usr/ports/multimedia/mythtv-126343/files/patch-libs-libavcodec.pro /usr/ports/multimedia/mythtv/files/patch-libs-libavcodec.pro
--- /usr/ports/multimedia/mythtv-126343/files/patch-libs-libavcodec.pro 1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/multimedia/mythtv/files/patch-libs-libavcodec.pro 2008-09-21 01:39:46.000000000 +0200
@@ -0,0 +1,11 @@
+--- libs/libavcodec/libavcodec.pro 2008-09-21 01:31:46.000000000 +0200
++++ libs/libavcodec/libavcodec.pro 2008-09-21 01:31:58.000000000 +0200
+@@ -359,7 +359,7 @@
+
+ contains( CONFIG_DTS, yes ) {
+ SOURCES += dtsdec.c
+- LIBS += -ldts
++ LIBS += -ldca
+ }
+
+ using_xvmc {
diff -ruN --exclude=CVS /usr/ports/multimedia/mythtv-126343/files/patch-libs-libmythtv-NuppelVideoPlayer.h /usr/ports/multimedia/mythtv/files/patch-libs-libmythtv-NuppelVideoPlayer.h
--- /usr/ports/multimedia/mythtv-126343/files/patch-libs-libmythtv-NuppelVideoPlayer.h 1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/multimedia/mythtv/files/patch-libs-libmythtv-NuppelVideoPlayer.h 2008-09-14 17:53:23.000000000 +0200
@@ -0,0 +1,15 @@
+--- libs/libmythtv/NuppelVideoPlayer.h 2007-03-16 08:40:54.000000000 +0100
++++ libs/libmythtv/NuppelVideoPlayer.h 2008-09-14 16:48:18.000000000 +0200
+@@ -21,6 +21,12 @@
+ #include "cc708decoder.h"
+ #include "cc708window.h"
+
++#ifndef LONG_LONG_MIN
++#ifdef LLONG_MIN
++#define LONG_LONG_MIN LLONG_MIN
++#endif
++#endif
++
+ extern "C" {
+ #include "filter.h"
+ }
\ No newline at end of file
diff -ruN --exclude=CVS /usr/ports/multimedia/mythtv-126343/files/patch-libs-libmythtv-libmythtv.pro /usr/ports/multimedia/mythtv/files/patch-libs-libmythtv-libmythtv.pro
--- /usr/ports/multimedia/mythtv-126343/files/patch-libs-libmythtv-libmythtv.pro 1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/multimedia/mythtv/files/patch-libs-libmythtv-libmythtv.pro 2008-09-22 13:46:09.000000000 +0200
@@ -0,0 +1,14 @@
+--- libs/libmythtv/libmythtv.pro.orig 2007-03-16 08:40:54.000000000 +0100
++++ libs/libmythtv/libmythtv.pro 2008-09-22 11:18:28.000000000 +0200
+@@ -49,8 +49,11 @@
+
+
+ DEFINES += _LARGEFILE_SOURCE
++QMAKE_CXXFLAGS = -I../libmyth -I../libavcodec -I../libavutil -I../libmythmpeg2 $${QMAKE_CXXFLAGS}
+ QMAKE_CXXFLAGS_RELEASE += $${FREETYPE_CFLAGS}
+ QMAKE_CXXFLAGS_DEBUG += $${FREETYPE_CFLAGS}
++QMAKE_LFLAGS_SHLIB += -L../libmyth -L../libavcodec -L../libavutil -L../libmythmpeg2
++QMAKE_LFLAGS_SHLIB += -lmyth-$${LIBVERSION} -lmythavutil-$${LIBVERSION} -lmythavcodec-$${LIBVERSION} -lmythmpeg2-$${LIBVERSION}
+ QMAKE_LFLAGS_SHLIB += $${FREETYPE_LIBS}
+
+ macx {
diff -ruN --exclude=CVS /usr/ports/multimedia/mythtv-126343/files/patch-libs-libmythtv-signalmonitor.cpp /usr/ports/multimedia/mythtv/files/patch-libs-libmythtv-signalmonitor.cpp
--- /usr/ports/multimedia/mythtv-126343/files/patch-libs-libmythtv-signalmonitor.cpp 1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/multimedia/mythtv/files/patch-libs-libmythtv-signalmonitor.cpp 2008-09-21 01:11:57.000000000 +0200
@@ -0,0 +1,15 @@
+--- libs/libmythtv/signalmonitor.cpp 2007-03-16 08:40:54.000000000 +0100
++++ libs/libmythtv/signalmonitor.cpp 2008-09-21 01:10:01.000000000 +0200
+@@ -10,8 +10,10 @@
+ #include "mythcontext.h"
+ #include "signalmonitor.h"
+
+-#include "libavcodec/avcodec.h"
+-#include "libmyth/util.h"
++extern "C" {
++#include "../libavcodec/avcodec.h"
++}
++#include "../libmyth/util.h"
+
+ #ifdef USING_DVB
+ # include "dvbsignalmonitor.h"
diff -ruN --exclude=CVS /usr/ports/multimedia/mythtv-126343/files/patch-libs-libmythtv-vbilut.h /usr/ports/multimedia/mythtv/files/patch-libs-libmythtv-vbilut.h
--- /usr/ports/multimedia/mythtv-126343/files/patch-libs-libmythtv-vbilut.h 1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/multimedia/mythtv/files/patch-libs-libmythtv-vbilut.h 2008-09-14 17:53:23.000000000 +0200
@@ -0,0 +1,15 @@
+--- libs/libmythtv/vbilut.h 2007-03-16 08:40:54.000000000 +0100
++++ libs/libmythtv/vbilut.h 2008-09-14 16:48:18.000000000 +0200
+@@ -1,7 +1,12 @@
+ #ifndef _VBILUT_H_
+ #define _VBILUT_H_
+
++#include "config.h"
++
++#ifdef HAVE_STDINT_H
+ #include <stdint.h>
++#endif
++#include <sys/types.h>
+
+ extern "C" const unsigned char lang_chars[][16];
+ extern const char chartab_original[];
diff -ruN --exclude=CVS /usr/ports/multimedia/mythtv-126343/files/patch-libs-libmythtv-yuv2rgb.cpp /usr/ports/multimedia/mythtv/files/patch-libs-libmythtv-yuv2rgb.cpp
--- /usr/ports/multimedia/mythtv-126343/files/patch-libs-libmythtv-yuv2rgb.cpp 1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/multimedia/mythtv/files/patch-libs-libmythtv-yuv2rgb.cpp 2008-09-14 17:53:23.000000000 +0200
@@ -0,0 +1,15 @@
+--- libs/libmythtv/yuv2rgb.cpp 2007-03-16 08:40:55.000000000 +0100
++++ libs/libmythtv/yuv2rgb.cpp 2008-09-14 16:48:18.000000000 +0200
+@@ -392,9 +392,9 @@
+ #define RGBOUT(r, g, b, y1)\
+ {\
+ y = (y1 - 16) * C_Y;\
+- r = std::min(UCHAR_MAX, std::max(0, (y + r_add) >> SCALE_BITS));\
+- g = std::min(UCHAR_MAX, std::max(0, (y + g_add) >> SCALE_BITS));\
+- b = std::min(UCHAR_MAX, std::max(0, (y + b_add) >> SCALE_BITS));\
++ r = std::min((unsigned int) UCHAR_MAX, (unsigned int) std::max(0, (y + r_add) >> SCALE_BITS));\
++ g = std::min((unsigned int) UCHAR_MAX, (unsigned int) std::max(0, (y + g_add) >> SCALE_BITS));\
++ b = std::min((unsigned int) UCHAR_MAX, (unsigned int) std::max(0, (y + b_add) >> SCALE_BITS));\
+ }
+
+ static void yuv420_argb32_non_mmx(unsigned char *image, unsigned char *py,
diff -ruN --exclude=CVS /usr/ports/multimedia/mythtv-126343/files/patch-programs-mythtranscode-mythtranscode.pro /usr/ports/multimedia/mythtv/files/patch-programs-mythtranscode-mythtranscode.pro
--- /usr/ports/multimedia/mythtv-126343/files/patch-programs-mythtranscode-mythtranscode.pro 1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/multimedia/mythtv/files/patch-programs-mythtranscode-mythtranscode.pro 2008-09-23 22:16:09.000000000 +0200
@@ -0,0 +1,10 @@
+--- programs/mythtranscode/mythtranscode.pro.orig 2008-09-22 22:28:57.000000000 +0200
++++ programs/mythtranscode/mythtranscode.pro 2008-09-22 22:31:03.000000000 +0200
+@@ -20,3 +20,7 @@
+ INCLUDEPATH += replex
+ INCLUDEPATH += ../../libs/libavcodec ../../libs/libavformat \
+ ../../libs/libavutil ../../libs/libmythmpeg2
++
++QMAKE_CXXFLAGS = -I../../libs/libavcodec -I../../libs/libavformat \
++ -I../../libs/libavutil -I../../libs/libmythmpeg2 \
++ $${QMAKE_CXXFLAGS}
--- mythtv-0.20_4.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list