aboutsummaryrefslogtreecommitdiff
path: root/multimedia/dvbcut
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2016-11-14 07:51:32 +0000
committerStefan Eßer <se@FreeBSD.org>2016-11-14 07:51:32 +0000
commita04f98fb3eae163851d5f32005340fdd39d8d42a (patch)
tree081853db110af5f08ee6498cbd9b6a4b939cba22 /multimedia/dvbcut
parent20d2527ed8ffb6195d04ef50e40493dc503e433a (diff)
downloadports-a04f98fb3eae163851d5f32005340fdd39d8d42a.tar.gz
ports-a04f98fb3eae163851d5f32005340fdd39d8d42a.zip
Notes
Diffstat (limited to 'multimedia/dvbcut')
-rw-r--r--multimedia/dvbcut/Makefile29
-rw-r--r--multimedia/dvbcut/distinfo5
-rw-r--r--multimedia/dvbcut/files/patch-avframe.cpp17
-rw-r--r--multimedia/dvbcut/files/patch-defines.h2
-rw-r--r--multimedia/dvbcut/files/patch-dvbcut.cpp11
-rw-r--r--multimedia/dvbcut/files/patch-dvbcut.h19
-rw-r--r--multimedia/dvbcut/files/patch-index.h8
-rw-r--r--multimedia/dvbcut/files/patch-lavfmuxer.cpp13
-rw-r--r--multimedia/dvbcut/files/patch-main.cpp11
-rw-r--r--multimedia/dvbcut/files/patch-src.pro20
-rw-r--r--multimedia/dvbcut/pkg-plist2
11 files changed, 78 insertions, 59 deletions
diff --git a/multimedia/dvbcut/Makefile b/multimedia/dvbcut/Makefile
index 69a87dc6f97f..95da08e45f31 100644
--- a/multimedia/dvbcut/Makefile
+++ b/multimedia/dvbcut/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= dvbcut
-PORTVERSION= 0.6.2.a1
-PORTREVISION= 4
+PORTVERSION= 0.7.0
CATEGORIES= multimedia
MAINTAINER= se@FreeBSD.org
@@ -20,21 +19,27 @@ LIB_DEPENDS= liba52.so:audio/liba52 \
RUN_DEPENDS:= ${BUILD_DEPENDS}
USE_GITHUB= yes
-GH_ACCOUNT= nextghost
-GH_PROJECT= dvbcut-qt4
-GH_TAGNAME= 81c31ed
+GH_ACCOUNT= bernhardu
+GH_PROJECT= dvbcut-deb
+GH_TAGNAME= 381549c
-USES= desktop-file-utils pkgconfig qmake shared-mime-info
-USE_QT4= corelib gui xml linguisttools_build moc_build rcc_build \
- uic_build
+USES= qmake:outsource pkgconfig desktop-file-utils shared-mime-info
CXXFLAGS+= -I${LOCALBASE}/include \
-I${LOCALBASE}/include/libavcodec \
-I${LOCALBASE}/include/libavformat \
- -I${LOCALBASE}/include/libswscale
+ -I${LOCALBASE}/include/libswscale \
+ -D DVBCUT_VERSION=$(PORTVERSION)
-post-configure:
- @${REINPLACE_CMD} -e '/CXX.*moc_progress/s/ -o / -O0 -o /' ${WRKSRC}/src/Makefile
+QMAKE_SOURCE_PATH=${WRKSRC}/src
+QMAKE_ARGS= LRELEASE="${LRELEASE}"
+
+OPTIONS_RADIO= QT
+OPTIONS_RADIO_QT= QT4 QT5
+OPTIONS_DEFAULT= QT4
+
+QT4_USE= QT4=corelib,gui,xml,qt3support,linguisttools_build,moc_build,rcc_build,uic_build
+QT5_USE= QT5=core,gui,widgets,xml,buildtools_build,linguisttools_build GL=gl
post-build:
@${SED} -e 's;@prefix@;${PREFIX};' \
@@ -42,7 +47,7 @@ post-build:
> ${WRKSRC}/dvbcut.desktop
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/bin/dvbcut ${STAGEDIR}${PREFIX}/bin/
+ ${INSTALL_PROGRAM} ${WRKDIR}/.build/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 3fb134d94ba3..7ef33103cd50 100644
--- a/multimedia/dvbcut/distinfo
+++ b/multimedia/dvbcut/distinfo
@@ -1,2 +1,3 @@
-SHA256 (nextghost-dvbcut-qt4-0.6.2.a1-81c31ed_GH0.tar.gz) = 4bc54dfa29bdb1aa54cf0969da60d0372fbdd5f7a5e63a2620fc81596ce4dcf5
-SIZE (nextghost-dvbcut-qt4-0.6.2.a1-81c31ed_GH0.tar.gz) = 1122176
+TIMESTAMP = 1478854634
+SHA256 (bernhardu-dvbcut-deb-0.7.0-381549c_GH0.tar.gz) = 176104ec3edb438161e96b21f04057670c23611f938baac510b6e4fc4a976298
+SIZE (bernhardu-dvbcut-deb-0.7.0-381549c_GH0.tar.gz) = 183544
diff --git a/multimedia/dvbcut/files/patch-avframe.cpp b/multimedia/dvbcut/files/patch-avframe.cpp
index 33256c6cef34..3d691e4f5fca 100644
--- a/multimedia/dvbcut/files/patch-avframe.cpp
+++ b/multimedia/dvbcut/files/patch-avframe.cpp
@@ -1,10 +1,11 @@
---- src/avframe.cpp.orig 2013-06-16 09:57:51 UTC
+--- src/avframe.cpp.orig 2016-06-23 12:34:35 UTC
+++ src/avframe.cpp
-@@ -22,6 +22,7 @@
- #include <QImage>
- #include <cstdlib>
- #include <cstdio>
-+#include <types.h>
- #include "avframe.h"
+@@ -52,7 +52,7 @@ avframe::avframe(AVFrame *src, AVCodecCo
+ tobefreed = (uint8_t *)malloc(avpicture_get_size(ctx->pix_fmt, ctx->width, ctx->height));
- #ifdef HAVE_LIB_SWSCALE
+ avpicture_fill((AVPicture *)f,
+- (u_int8_t*)tobefreed,
++ (uint8_t*)tobefreed,
+ ctx->pix_fmt,ctx->width,ctx->height);
+
+ av_picture_copy((AVPicture *)f, (const AVPicture *) src,
diff --git a/multimedia/dvbcut/files/patch-defines.h b/multimedia/dvbcut/files/patch-defines.h
index fadc31a748b0..a49e4205885d 100644
--- a/multimedia/dvbcut/files/patch-defines.h
+++ b/multimedia/dvbcut/files/patch-defines.h
@@ -1,4 +1,4 @@
---- src/defines.h.orig 2013-06-16 09:57:51 UTC
+--- src/defines.h.orig 2016-06-23 12:34:35 UTC
+++ src/defines.h
@@ -42,6 +42,11 @@ static inline int videostream(int s=0)
#endif
diff --git a/multimedia/dvbcut/files/patch-dvbcut.cpp b/multimedia/dvbcut/files/patch-dvbcut.cpp
new file mode 100644
index 000000000000..c3b0d0f33146
--- /dev/null
+++ b/multimedia/dvbcut/files/patch-dvbcut.cpp
@@ -0,0 +1,11 @@
+--- src/dvbcut.cpp.orig 2016-06-23 12:34:35 UTC
++++ src/dvbcut.cpp
+@@ -1232,7 +1232,7 @@ void dvbcut::playPlay()
+ arguments << "-geometry" << QString().sprintf("%dx%d+0+0",int(ui->imagedisplay->width()),int(ui->imagedisplay->height()));
+
+ if (currentaudiotrack>=0 && currentaudiotrack<mpg->getaudiostreams()) {
+- arguments << "-aid" << QString().sprintf("0x%x",int(currentaudiotrack));
++ arguments << "-aid" << QString().sprintf("0x%x", int(mpg->mplayeraudioid(currentaudiotrack)));
+ }
+
+ // for now, pass all filenames from the current one up to the last one
diff --git a/multimedia/dvbcut/files/patch-dvbcut.h b/multimedia/dvbcut/files/patch-dvbcut.h
new file mode 100644
index 000000000000..50f94d9bd062
--- /dev/null
+++ b/multimedia/dvbcut/files/patch-dvbcut.h
@@ -0,0 +1,19 @@
+--- src/dvbcut.h.orig 2016-06-23 12:34:35 UTC
++++ src/dvbcut.h
+@@ -22,11 +22,14 @@
+ #define _DVBCUT_DVBCUT_H
+
+ #if !defined(DVBCUT_VERSION)
+-#define DVBCUT_VERSION "git"
++#define DVBCUT_VERSION git
+ #endif
+
++#define STRINGIFY(x) STRINGIFY1(x)
++#define STRINGIFY1(x) #x
++
+ #ifndef VERSION_STRING
+-#define VERSION_STRING "dvbcut-" DVBCUT_VERSION
++#define VERSION_STRING "dvbcut-" STRINGIFY(DVBCUT_VERSION)
+ #endif
+
+ #include <string>
diff --git a/multimedia/dvbcut/files/patch-index.h b/multimedia/dvbcut/files/patch-index.h
index 4462cdd5f48c..22f324b709bc 100644
--- a/multimedia/dvbcut/files/patch-index.h
+++ b/multimedia/dvbcut/files/patch-index.h
@@ -1,10 +1,12 @@
---- src/index.h.orig 2013-06-16 09:57:51 UTC
+--- src/index.h.orig 2016-06-23 12:34:35 UTC
+++ src/index.h
-@@ -22,7 +22,6 @@
+@@ -22,7 +22,9 @@
#define _DVBCUT_INDEX_H
#include <stdint.h>
--#include <byteswap.h>
++#ifndef __FreeBSD__
+ #include <byteswap.h>
++#endif
#include <set>
#include <vector>
#include "types.h"
diff --git a/multimedia/dvbcut/files/patch-lavfmuxer.cpp b/multimedia/dvbcut/files/patch-lavfmuxer.cpp
deleted file mode 100644
index 191991e5834c..000000000000
--- a/multimedia/dvbcut/files/patch-lavfmuxer.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/lavfmuxer.cpp.orig 2013-06-16 09:57:51 UTC
-+++ src/lavfmuxer.cpp
-@@ -40,6 +40,10 @@ extern "C" {
- #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
new file mode 100644
index 000000000000..0e344e418810
--- /dev/null
+++ b/multimedia/dvbcut/files/patch-main.cpp
@@ -0,0 +1,11 @@
+--- src/main.cpp.orig 2016-06-23 12:34:35 UTC
++++ src/main.cpp
+@@ -52,7 +52,7 @@ static char *argv0;
+ void
+ usage_exit(int rv=1) {
+ fprintf(stderr,
+- "Usage ("VERSION_STRING"):\n"
++ "Usage (" VERSION_STRING "):\n"
+ " %s -generateidx [-idx <idxfilename>] [<mpgfilename> ...]\n"
+ " %s -batch [ OPTIONS ] <prjfilename> | <mpgfilename> ...\n\n"
+ "OPTIONS: -cut 4:3|16:9|TS|TS2|<list>, -exp <expfilename>,\n"
diff --git a/multimedia/dvbcut/files/patch-src.pro b/multimedia/dvbcut/files/patch-src.pro
deleted file mode 100644
index a46afff8afac..000000000000
--- a/multimedia/dvbcut/files/patch-src.pro
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/src.pro.orig 2013-06-16 09:57:51 UTC
-+++ src/src.pro
-@@ -12,6 +12,8 @@ QT += xml
- system(pkg-config --exists libavcodec) {
- message(Building with external FFMPEG)
- PKGCONFIG += libavformat libavcodec libavutil
-+ QMAKE_CXXFLAGS += -DHAVE_LIB_A52
-+ LIBS += -la52
-
- system(pkg-config --exists libswscale) {
- message(Building with libswscale support)
-@@ -70,7 +72,7 @@ verinfo.commands = ../setversion.sh $$SO
-
- QMAKE_EXTRA_TARGETS += verinfo
-
--qtPrepareTool(LRELEASE, lrelease)
-+qtPrepareTool(LRELEASE, lrelease-qt4)
-
- l10n.commands = $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
- l10n.input = TRANSLATIONS
diff --git a/multimedia/dvbcut/pkg-plist b/multimedia/dvbcut/pkg-plist
index b76b3a3ba52f..08808d9e528f 100644
--- a/multimedia/dvbcut/pkg-plist
+++ b/multimedia/dvbcut/pkg-plist
@@ -1,6 +1,8 @@
+@comment %%QT_BINDIR%%/dvbcut
bin/dvbcut
share/applications/dvbcut.desktop
share/mime/packages/dvbcut.xml
+share/icons/dvbcut/icons.qrc
share/icons/dvbcut/bookmark.png
share/icons/dvbcut/chapter.svgz
share/icons/dvbcut/dvbcut.svg