aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia
diff options
context:
space:
mode:
authorse <se@FreeBSD.org>2013-12-02 16:29:54 +0800
committerse <se@FreeBSD.org>2013-12-02 16:29:54 +0800
commit497c02639048b090876d2d4ee275982bc23a1c7d (patch)
tree604c59c375f2d42aa282a1055388067aa28d58d1 /multimedia
parent66f44f9012b69841ad456d3279cf17c8050ecee9 (diff)
downloadfreebsd-ports-gnome-497c02639048b090876d2d4ee275982bc23a1c7d.tar.gz
freebsd-ports-gnome-497c02639048b090876d2d4ee275982bc23a1c7d.tar.zst
freebsd-ports-gnome-497c02639048b090876d2d4ee275982bc23a1c7d.zip
Fix build of dvbcut , which was broken by a recent ffmpeg upgrade.
This port is no longer based on the Qt3 version of dvbcut plus a large patch to make it build on Qt4 with the Qt3 emulation layer. A fork that uses native Qt4 calls is used instead. The generated files moc_progressstatusbar.cpp and moc_progresswindow.cpp trigger an internal error in clang, if compiled with optimization. This bug has been accepted as 18098 in the llvm bug tracker. To work around this problem, the above mentioned two files are compiled with -O0 appended to the compiler flages. The post-configure target in the ports Makefile is to be removed, when a fixed version of clang is distributed in all FreeBSD releases supported by the ports infrastructure.
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/dvbcut/Makefile34
-rw-r--r--multimedia/dvbcut/distinfo4
-rw-r--r--multimedia/dvbcut/files/patch-avframe.cpp16
-rw-r--r--multimedia/dvbcut/files/patch-defines.h24
-rw-r--r--multimedia/dvbcut/files/patch-index.h14
-rw-r--r--multimedia/dvbcut/files/patch-lavfmuxer.cpp13
-rw-r--r--multimedia/dvbcut/files/patch-main.cpp10
-rw-r--r--multimedia/dvbcut/files/patch-src.pro12
-rw-r--r--multimedia/dvbcut/files/patch-src_playaudio.cpp18
-rw-r--r--multimedia/dvbcut/files/use-qt4.diff.bz2bin40298 -> 0 bytes
-rw-r--r--multimedia/dvbcut/pkg-descr2
-rw-r--r--multimedia/dvbcut/pkg-plist2
12 files changed, 70 insertions, 79 deletions
diff --git a/multimedia/dvbcut/Makefile b/multimedia/dvbcut/Makefile
index 151e286aa8cf..84de0f7dcc23 100644
--- a/multimedia/dvbcut/Makefile
+++ b/multimedia/dvbcut/Makefile
@@ -2,44 +2,50 @@
# $FreeBSD$
PORTNAME= dvbcut
-PORTVERSION= 0.6.1
-PORTREVISION= 2
+PORTVERSION= 0.6.2.a1
CATEGORIES= multimedia
-MASTER_SITES= http://www.mr511.de/dvbcut/
MAINTAINER= se@FreeBSD.org
COMMENT= Qt application for cutting of MPEG PS and MPEG TS streams (DVB)
LICENSE= GPLv2
-BUILD_DEPENDS= mplayer:${PORTSDIR}/multimedia/mplayer
+BUILD_DEPENDS= mplayer:${PORTSDIR}/multimedia/mplayer \
+ ffmpeg:${PORTSDIR}/multimedia/ffmpeg \
+ pkg-config:${PORTSDIR}/devel/pkgconf
LIB_DEPENDS= a52:${PORTSDIR}/audio/liba52 \
ao:${PORTSDIR}/audio/libao \
mad:${PORTSDIR}/audio/libmad \
avutil:${PORTSDIR}/multimedia/ffmpeg
-
RUN_DEPENDS:= ${BUILD_DEPENDS}
-USE_GCC= any
-USES= cmake
-USE_QT4= gui qt3support xml moc_build qmake_build rcc_build uic_build
+USE_GITHUB= yes
+GH_ACCOUNT= nextghost
+GH_PROJECT= dvbcut-qt4
+GH_TAGNAME= ${GH_COMMIT}
+GH_COMMIT= 81c31ed
+
+WRKSRC= ${WRKDIR}/${GH_ACCOUNT}-${GH_PROJECT}-${GH_COMMIT}
+
+USES= qmake
+USE_QT4= gui linguist moc_build rcc_build uic_build
+INSTALLS_ICONS= yes
+
CXXFLAGS+= -I${LOCALBASE}/include \
-I${LOCALBASE}/include/libavcodec \
-I${LOCALBASE}/include/libavformat \
-I${LOCALBASE}/include/libswscale
-BROKEN= Does not compile due to FFMPEG update - will be fixed soon
-
-pre-patch:
- cd ${WRKSRC} && ${BZCAT} ${FILESDIR}/use-qt4.diff.bz2 | ${PATCH} -p2
+post-configure:
+ ${REINPLACE_CMD} -e '/CXX.*moc_progress/s/ -o / -O0 -o /' ${WRKSRC}/src/Makefile
post-build:
- $(SED) -e 's;@prefix@/dvbcut/share/icons;'${PREFIX}/share/icons/dvbcut';' \
+ ${SED} -e 's;@prefix@;${PREFIX};' \
< ${WRKSRC}/dvbcut.desktop.in \
> ${WRKSRC}/dvbcut.desktop
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/src/dvbcut ${STAGEDIR}${PREFIX}/bin/
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/dvbcut ${STAGEDIR}${PREFIX}/bin/
${INSTALL_MAN} ${WRKSRC}/dvbcut.1 ${STAGEDIR}${MANPREFIX}/man/man1/
${MKDIR} $(STAGEDIR)$(PREFIX)/share/applications
$(INSTALL_DATA) ${WRKSRC}/dvbcut.desktop $(STAGEDIR)$(PREFIX)/share/applications/
diff --git a/multimedia/dvbcut/distinfo b/multimedia/dvbcut/distinfo
index f8db17e3a906..70ee00e25f8d 100644
--- a/multimedia/dvbcut/distinfo
+++ b/multimedia/dvbcut/distinfo
@@ -1,2 +1,2 @@
-SHA256 (dvbcut-0.6.1.tar.gz) = 053941abfd4cf8cfe0c86c78a1c22c9a6bf218cd9ae5158f8ec9181d7996ab2c
-SIZE (dvbcut-0.6.1.tar.gz) = 1104382
+SHA256 (dvbcut-0.6.2.a1.tar.gz) = 7ad4b0cf0320a2e3411bd7dc4d83870851d0cf80a1fe0ec9f509921d63296a07
+SIZE (dvbcut-0.6.2.a1.tar.gz) = 1122349
diff --git a/multimedia/dvbcut/files/patch-avframe.cpp b/multimedia/dvbcut/files/patch-avframe.cpp
index b69b21f07b4f..f534e8ee1409 100644
--- a/multimedia/dvbcut/files/patch-avframe.cpp
+++ b/multimedia/dvbcut/files/patch-avframe.cpp
@@ -1,10 +1,10 @@
---- src/avframe.cpp.orig 2011-04-22 23:51:29.000000000 +0200
-+++ src/avframe.cpp 2013-10-04 11:04:43.876355112 +0200
-@@ -18,6 +18,7 @@
-
- /* $Id: avframe.cpp 141 2009-01-09 17:53:48Z too-tired $ */
-
-+#include <sys/types.h>
- #include <qimage.h>
+--- src/avframe.cpp~ 2013-06-16 11:57:51.000000000 +0200
++++ src/avframe.cpp 2013-11-29 22:27:30.884805249 +0100
+@@ -22,6 +22,7 @@
+ #include <QImage>
#include <cstdlib>
#include <cstdio>
++#include <types.h>
+ #include "avframe.h"
+
+ #ifdef HAVE_LIB_SWSCALE
diff --git a/multimedia/dvbcut/files/patch-defines.h b/multimedia/dvbcut/files/patch-defines.h
index f3dee9872251..8ee76d3ad3f6 100644
--- a/multimedia/dvbcut/files/patch-defines.h
+++ b/multimedia/dvbcut/files/patch-defines.h
@@ -1,22 +1,14 @@
---- src/defines.h.orig 2007-09-30 23:31:46.000000000 +0900
-+++ src/defines.h 2009-03-27 01:33:10.000000000 +0900
-@@ -42,6 +42,12 @@
+--- src/defines.h~ 2013-06-16 11:57:51.000000000 +0200
++++ src/defines.h 2013-11-29 22:35:26.867434652 +0100
+@@ -42,6 +42,11 @@
#endif
}
-+#if defined(__FreeBSD__)
-+#define mbo32(x) htobe32(x)
-+#define htom32(x) htobe32(x)
-+#define mbo16(x) htobe16(x)
-+#define htom16(x) htobe16(x)
-+#else
++#ifdef __FreeBSD__
++#define __bswap_32(x) __bswap32(x)
++#define __bswap_16(x) __bswap16(x)
++#endif
++
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define mbo32(x) \
((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >> 8) | \
-@@ -55,5 +61,6 @@
- #define mbo16(x) (x)
- #define htom16(x) (x)
- #endif
-+#endif
-
- #endif
diff --git a/multimedia/dvbcut/files/patch-index.h b/multimedia/dvbcut/files/patch-index.h
index 83292ab970f9..565708ad2351 100644
--- a/multimedia/dvbcut/files/patch-index.h
+++ b/multimedia/dvbcut/files/patch-index.h
@@ -1,14 +1,12 @@
---- src/index.h.orig 2008-10-11 20:13:37.000000000 +0900
-+++ src/index.h 2009-03-27 01:33:10.000000000 +0900
-@@ -22,7 +22,11 @@
+--- src/index.h~ 2013-06-16 11:57:51.000000000 +0200
++++ src/index.h 2013-11-29 22:22:16.383291556 +0100
+@@ -22,7 +22,7 @@
#define _DVBCUT_INDEX_H
#include <stdint.h>
-+#if defined(__FreeBSD__)
-+#include <sys/endian.h>
-+#else
- #include <byteswap.h>
-+#endif
+-#include <byteswap.h>
++//#include <endian.h>
#include <set>
#include <vector>
#include "types.h"
+
diff --git a/multimedia/dvbcut/files/patch-lavfmuxer.cpp b/multimedia/dvbcut/files/patch-lavfmuxer.cpp
new file mode 100644
index 000000000000..a6ce94a9c1bd
--- /dev/null
+++ b/multimedia/dvbcut/files/patch-lavfmuxer.cpp
@@ -0,0 +1,13 @@
+--- src/lavfmuxer.cpp~ 2013-06-16 11:57:51.000000000 +0200
++++ src/lavfmuxer.cpp 2013-11-29 22:24:36.075415060 +0100
+@@ -40,6 +40,10 @@
+ #define CODEC_TYPE_AUDIO AVMEDIA_TYPE_AUDIO
+ #endif
+
++#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
++#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
++#endif
++
+ lavfmuxer::lavfmuxer(const char *format, uint32_t audiostreammask, mpgfile &mpg, const char *filename)
+ : muxer(), avfc(0), fileopened(false)
+ {
diff --git a/multimedia/dvbcut/files/patch-main.cpp b/multimedia/dvbcut/files/patch-main.cpp
deleted file mode 100644
index 7dc5323aed9e..000000000000
--- a/multimedia/dvbcut/files/patch-main.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/main.cpp~ 2011-04-22 23:51:29.000000000 +0200
-+++ src/main.cpp 2013-10-04 11:10:52.016225398 +0200
-@@ -21,6 +21,7 @@
- #include <cstring>
- #include <cstdlib>
- #include <cstdio>
-+#include <unistd.h>
- #include <cerrno>
- #include <clocale>
- #include <string>
diff --git a/multimedia/dvbcut/files/patch-src.pro b/multimedia/dvbcut/files/patch-src.pro
new file mode 100644
index 000000000000..d7f829ade992
--- /dev/null
+++ b/multimedia/dvbcut/files/patch-src.pro
@@ -0,0 +1,12 @@
+--- src/src.pro.orig 2013-06-16 11:57:51.000000000 +0200
++++ src/src.pro 2013-12-01 14:55:10.313369943 +0100
+@@ -70,8 +70,8 @@
+
+ QMAKE_EXTRA_TARGETS += verinfo
+
+-qtPrepareTool(LRELEASE, lrelease)
++qtPrepareTool(LRELEASE, lrelease-qt4)
+
+ l10n.commands = $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
+ l10n.input = TRANSLATIONS
+ l10n.output = ${QMAKE_FILE_BASE}.qm
diff --git a/multimedia/dvbcut/files/patch-src_playaudio.cpp b/multimedia/dvbcut/files/patch-src_playaudio.cpp
deleted file mode 100644
index 4f57642de540..000000000000
--- a/multimedia/dvbcut/files/patch-src_playaudio.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
---- src/playaudio.cpp.orig 2010-06-06 16:19:25.000000000 +0200
-+++ src/playaudio.cpp 2013-10-03 13:56:54.373309704 +0200
-@@ -19,6 +19,7 @@
- /* $Id: playaudio.cpp 58 2007-07-23 07:03:07Z too-tired $ */
-
- #include <stdint.h>
-+#include <string.h>
- #include <algorithm>
- #include <string>
- #include <sstream>
-@@ -55,6 +56,7 @@
-
- ao_sample_format format;
-
-+ memset(&format, 0, sizeof(format));
- format.bits = 16;
- format.channels = channels;
- format.rate = samplerate;
diff --git a/multimedia/dvbcut/files/use-qt4.diff.bz2 b/multimedia/dvbcut/files/use-qt4.diff.bz2
deleted file mode 100644
index 742af5aa97b2..000000000000
--- a/multimedia/dvbcut/files/use-qt4.diff.bz2
+++ /dev/null
Binary files differ
diff --git a/multimedia/dvbcut/pkg-descr b/multimedia/dvbcut/pkg-descr
index 736d7abb2b0b..00fb6f74a307 100644
--- a/multimedia/dvbcut/pkg-descr
+++ b/multimedia/dvbcut/pkg-descr
@@ -5,4 +5,4 @@ surgery" approach. Thus, the input video and audio data is mostly kept
unchanged, only very few frames at the beginning and/or end of the selected
range are recoded in order to obtain a valid MPEG file.
-WWW: http://dvbcut.sourceforge.net/
+WWW: http://github.com/nextghost/dvbcut-qt4
diff --git a/multimedia/dvbcut/pkg-plist b/multimedia/dvbcut/pkg-plist
index 34060bd3d8d0..ea9faaccdf1e 100644
--- a/multimedia/dvbcut/pkg-plist
+++ b/multimedia/dvbcut/pkg-plist
@@ -7,9 +7,7 @@ share/icons/dvbcut/dvbcut.svg
share/icons/dvbcut/play.svgz
share/icons/dvbcut/stop.png
share/icons/dvbcut/play.png
-share/icons/dvbcut/icons.qrc.orig
share/icons/dvbcut/bookmark.svgz
-share/icons/dvbcut/icons.qrc
share/icons/dvbcut/chapter.png
share/icons/dvbcut/stop.svgz
man/man1/dvbcut.1.gz