diff --git a/multimedia/mjpegtools/Makefile b/multimedia/mjpegtools/Makefile index ad5d6e24c1b8..b8d9f6376f6a 100644 --- a/multimedia/mjpegtools/Makefile +++ b/multimedia/mjpegtools/Makefile @@ -1,57 +1,67 @@ PORTNAME= mjpegtools -PORTVERSION= 2.1.0 -PORTREVISION= 18 +PORTVERSION= 2.2.1 CATEGORIES= multimedia MASTER_SITES= SF/${PORTNAME:S/tools//}/${PORTNAME}/${PORTVERSION} MAINTAINER= multimedia@FreeBSD.org COMMENT= Set of tools to record/playback/edit videos in MPEG format WWW= http://mjpeg.sourceforge.net/ LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING BUILD_DEPENDS= v4l_compat>0:multimedia/v4l_compat +RUN_DEPENDS= bash:shells/bash -CONFLICTS= mplex - -USES= compiler:c++11-lang gmake gnome jpeg libtool localbase pathfix \ - pkgconfig +USES= compiler:c++14-lang gmake gnome jpeg libtool localbase pathfix \ + pkgconfig shebangfix USE_CXXSTD= c++14 USE_LDCONFIG= yes -GNU_CONFIGURE= yes -GNU_CONFIGURE_MANPREFIX= ${PREFIX}/share -CONFIGURE_ARGS= --without-dga --without-libquicktime --without-x +SHEBANG_FILES= scripts/lav2avi.sh \ + scripts/lav2mpeg \ + scripts/lavtc.sh + +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --without-dga \ + --without-libquicktime \ + --without-x CONFIGURE_TARGET= ${ARCH:S/amd64/x86_64/}-portbld-${OPSYS:tl}${OSREL} +INSTALL_TARGET= install-strip + +CONFLICTS= mplex INFO= mjpeg-howto OPTIONS_DEFINE= DOCS DV GTK2 PNG SDL OPTIONS_DEFAULT= GTK2 PNG SDL OPTIONS_SUB= yes DV_LIB_DEPENDS= libdv.so:multimedia/libdv DV_CONFIGURE_WITH= libdv + GTK2_USE= GNOME=gtk20 GTK2_CONFIGURE_WITH= gtk + PNG_LIB_DEPENDS= libpng.so:graphics/png PNG_CONFIGURE_WITH= libpng -SDL_USES= sdl -SDL_USE= SDL=gfx,sdl -SDL_CONFIGURE_OFF= --without-libsdl --without-sdlgfx + +SDL_USES= sdl xorg +SDL_USE= SDL=gfx,sdl \ + XORG=x11 +SDL_CONFIGURE_WITH= libsdl \ + sdlgfx post-patch: @${REINPLACE_CMD} \ -e 's| \*-\*-linux\*)| *-*-*)|' \ -e '/ARCHFLAGS=/d' ${WRKSRC}/configure post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} .for i in AUTHORS BUGS CHANGES ChangeLog HINTS NEWS PLANS README README.DV \ - README.avilib README.glav README.AltiVec README.lavpipe \ - README.transist TODO + README.avilib README.AltiVec README.lavpipe README.transist TODO (cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${STAGEDIR}${DOCSDIR}) .endfor .include diff --git a/multimedia/mjpegtools/distinfo b/multimedia/mjpegtools/distinfo index 3d0726fc4df6..f0a5ff85cf17 100644 --- a/multimedia/mjpegtools/distinfo +++ b/multimedia/mjpegtools/distinfo @@ -1,2 +1,3 @@ -SHA256 (mjpegtools-2.1.0.tar.gz) = 864f143d7686377f8ab94d91283c696ebd906bf256b2eacc7e9fb4dddcedc407 -SIZE (mjpegtools-2.1.0.tar.gz) = 1844336 +TIMESTAMP = 1727141024 +SHA256 (mjpegtools-2.2.1.tar.gz) = b180536d7d9960b05e0023a197b00dcb100929a49aab71d19d55f4a1b210f49a +SIZE (mjpegtools-2.2.1.tar.gz) = 2326425 diff --git a/multimedia/mjpegtools/files/patch-lavtools__lavrec.c b/multimedia/mjpegtools/files/patch-lavtools__lavrec.c index b5619c32116c..aba2d3c93d30 100644 --- a/multimedia/mjpegtools/files/patch-lavtools__lavrec.c +++ b/multimedia/mjpegtools/files/patch-lavtools__lavrec.c @@ -1,28 +1,28 @@ ---- lavtools/lavrec.c.orig +--- lavtools/lavrec.c.orig 2021-09-05 06:14:13 UTC +++ lavtools/lavrec.c @@ -196,7 +196,9 @@ #include #include #include +#ifdef __linux #include +#endif #include #include #include -@@ -1149,6 +1151,7 @@ +@@ -1149,6 +1151,7 @@ int main(int argc, char **argv) sigset_t sigmask; pthread_t input_thread; +#ifdef __linux /* no root please (only during audio setup) */ if (getuid() != geteuid()) { -@@ -1159,6 +1162,7 @@ +@@ -1159,6 +1162,7 @@ int main(int argc, char **argv) return 0; } } +#endif info = lavrec_malloc(); info->state_changed = statechanged; diff --git a/multimedia/mjpegtools/files/patch-lavtools__lavvideo.c b/multimedia/mjpegtools/files/patch-lavtools__lavvideo.c index 46be0dfb484e..daef5d24f0eb 100644 --- a/multimedia/mjpegtools/files/patch-lavtools__lavvideo.c +++ b/multimedia/mjpegtools/files/patch-lavtools__lavvideo.c @@ -1,18 +1,18 @@ ---- lavtools/lavvideo.c.orig +--- lavtools/lavvideo.c.orig 2021-09-05 06:14:13 UTC +++ lavtools/lavvideo.c -@@ -49,6 +49,7 @@ +@@ -49,6 +49,7 @@ Copyright by Gernot Ziegler. #include #include +#ifdef __linux #include /* Because of some really cool feature in video4linux1, also known as * 'not including sys/types.h and sys/time.h', we had to include it -@@ -63,6 +64,7 @@ +@@ -63,6 +64,7 @@ Copyright by Gernot Ziegler. * errors here, check your linux/time.h && sys/time.h header setup. */ #define _LINUX_TIME_H +#endif #include #include diff --git a/multimedia/mjpegtools/files/patch-lavtools__liblavplay.c b/multimedia/mjpegtools/files/patch-lavtools__liblavplay.c index 99e7debd4fd6..94a29a04b124 100644 --- a/multimedia/mjpegtools/files/patch-lavtools__liblavplay.c +++ b/multimedia/mjpegtools/files/patch-lavtools__liblavplay.c @@ -1,15 +1,15 @@ ---- lavtools/liblavplay.c.orig +--- lavtools/liblavplay.c.orig 2021-09-05 06:14:13 UTC +++ lavtools/liblavplay.c -@@ -43,7 +43,12 @@ +@@ -44,7 +44,12 @@ #include #include #ifdef HAVE_V4L +#ifdef __linux #include +#else +#include +#include +#endif #endif #ifndef X_DISPLAY_MISSING diff --git a/multimedia/mjpegtools/files/patch-lavtools__liblavrec.c b/multimedia/mjpegtools/files/patch-lavtools__liblavrec.c index 8a5c12743600..671065e4bd6f 100644 --- a/multimedia/mjpegtools/files/patch-lavtools__liblavrec.c +++ b/multimedia/mjpegtools/files/patch-lavtools__liblavrec.c @@ -1,30 +1,30 @@ ---- lavtools/liblavrec.c.orig +--- lavtools/liblavrec.c.orig 2021-09-05 06:14:13 UTC +++ lavtools/liblavrec.c @@ -45,9 +45,14 @@ #include #include #include +#ifdef __linux #include -#include #include +#else +#include +#include +#endif +#include #include /* Because of some really cool feature in video4linux1, also known as -@@ -758,7 +763,11 @@ +@@ -758,7 +763,11 @@ static int lavrec_output_video_frame(lavrec_t *info, u { int fd = lav_fileno( settings->video_file ); if( fd >= 0 ) +#ifdef __linux fdatasync(fd); +#else + fsync(fd); +#endif } return 1; } diff --git a/multimedia/mjpegtools/files/patch-mpeg2enc_encoderparams.hh b/multimedia/mjpegtools/files/patch-mpeg2enc_encoderparams.hh index 87d751233614..f9e81fe4cb8e 100644 --- a/multimedia/mjpegtools/files/patch-mpeg2enc_encoderparams.hh +++ b/multimedia/mjpegtools/files/patch-mpeg2enc_encoderparams.hh @@ -1,14 +1,14 @@ Use class RateCtl instead of struct. Class RateCtl is defined in ratectl.hh and used elsewhere in the code too. ---- ./mpeg2enc/encoderparams.hh.orig 2014-07-21 16:50:46.000000000 +0200 -+++ ./mpeg2enc/encoderparams.hh 2014-07-21 16:50:56.000000000 +0200 -@@ -79,7 +79,7 @@ +--- mpeg2enc/encoderparams.hh.orig 2021-09-05 06:14:13 UTC ++++ mpeg2enc/encoderparams.hh +@@ -79,7 +79,7 @@ struct motion_data { }; -struct RateCtl; +class RateCtl; class MPEG2EncOptions; class EncoderParams diff --git a/multimedia/mjpegtools/files/patch-mpeg2enc_ontheflyratectlpass1.hh b/multimedia/mjpegtools/files/patch-mpeg2enc_ontheflyratectlpass1.hh deleted file mode 100644 index 2ab2038a0a60..000000000000 --- a/multimedia/mjpegtools/files/patch-mpeg2enc_ontheflyratectlpass1.hh +++ /dev/null @@ -1,9 +0,0 @@ ---- mpeg2enc/ontheflyratectlpass1.hh.orig 2014-07-21 16:51:41.000000000 +0200 -+++ mpeg2enc/ontheflyratectlpass1.hh 2014-07-21 16:52:29.000000000 +0200 -@@ -1,5 +1,5 @@ - #ifndef _ONTHEFLYRATECTLPASS1_HH --#define _ONTHELFYRATECTLPASS1_HH -+#define _ONTHEFLYRATECTLPASS1_HH - - /* (C) 2003 Andrew Stevens */ - diff --git a/multimedia/mjpegtools/files/patch-mpeg2enc_ontheflyratectlpass2.hh b/multimedia/mjpegtools/files/patch-mpeg2enc_ontheflyratectlpass2.hh deleted file mode 100644 index 9353f0068a32..000000000000 --- a/multimedia/mjpegtools/files/patch-mpeg2enc_ontheflyratectlpass2.hh +++ /dev/null @@ -1,9 +0,0 @@ ---- mpeg2enc/ontheflyratectlpass2.hh.orig 2014-07-21 16:51:46.000000000 +0200 -+++ mpeg2enc/ontheflyratectlpass2.hh 2014-07-21 16:52:33.000000000 +0200 -@@ -1,5 +1,5 @@ - #ifndef _ONTHEFLYRATECTLPASS2_HH --#define _ONTHELFYRATECTLPASS2_HH -+#define _ONTHEFLYRATECTLPASS2_HH - - /* (C) 2003 Andrew Stevens */ - diff --git a/multimedia/mjpegtools/files/patch-mplex_main.cpp b/multimedia/mjpegtools/files/patch-mplex_main.cpp index 4ac18785ae52..718e2c9be5e5 100644 --- a/multimedia/mjpegtools/files/patch-mplex_main.cpp +++ b/multimedia/mjpegtools/files/patch-mplex_main.cpp @@ -1,54 +1,53 @@ ---- mplex/main.cpp.orig Wed Jun 20 13:40:39 2007 -+++ mplex/main.cpp Wed Jun 20 13:41:49 2007 -@@ -38,6 +38,7 @@ +--- mplex/main.cpp.orig 2021-09-05 06:14:13 UTC ++++ mplex/main.cpp +@@ -39,6 +39,7 @@ #endif #include #include +#include #include "cpu_accel.h" #include "mjpeg_types.h" #include "mjpeg_logging.h" -@@ -107,6 +108,14 @@ - { +@@ -120,6 +121,13 @@ int FileOutputStream::Open() mjpeg_error_exit1( "Could not open for writing: %s", cur_filename ); } -+ { -+ int flags; -+ -+ (void)fcntl(fileno(strm), F_GETFL, &flags); -+ (void)fcntl(fileno(strm), F_SETFL, flags & ~O_NONBLOCK); -+ } + ++ { ++ int flags; + ++ (void)fcntl(fileno(strm), F_GETFL, &flags); ++ (void)fcntl(fileno(strm), F_SETFL, flags & ~O_NONBLOCK); ++ } + - return 0; } -@@ -143,6 +152,13 @@ + +@@ -155,6 +163,13 @@ FileOutputStream::NextSegment( ) mjpeg_error_exit1( "Could not open for writing: %s", cur_filename ); } segment_len = 0; -+ { -+ int flags; ++ { ++ int flags; + -+ (void)fcntl(fileno(strm), F_GETFL, &flags); -+ (void)fcntl(fileno(strm), F_SETFL, flags & ~O_NONBLOCK); -+ } ++ (void)fcntl(fileno(strm), F_GETFL, &flags); ++ (void)fcntl(fileno(strm), F_SETFL, flags & ~O_NONBLOCK); ++ } + } void -@@ -200,6 +216,14 @@ - { - mjpeg_error_exit1( "Unable to open file %s for reading.", bs_filename); - } +@@ -208,6 +223,14 @@ IFileBitStream::IFileBitStream( const char *bs_filenam + { + if ((fileh = fopen(bs_filename, "rb")) == NULL) + mjpeg_error_exit1( "Unable to open file %s for reading.", bs_filename); + -+ { -+ int flags; ++ { ++ int flags; + -+ (void)fcntl(fileno(fileh), F_GETFL, &flags); -+ (void)fcntl(fileno(fileh), F_SETFL, flags & ~O_NONBLOCK); -+ } ++ (void)fcntl(fileno(fileh), F_GETFL, &flags); ++ (void)fcntl(fileno(fileh), F_SETFL, flags & ~O_NONBLOCK); ++ } + filename = strcpy( new char[strlen(bs_filename)+1], bs_filename ); streamname = filename; diff --git a/multimedia/mjpegtools/pkg-plist b/multimedia/mjpegtools/pkg-plist index 68972c66e50e..40baa7251d69 100644 --- a/multimedia/mjpegtools/pkg-plist +++ b/multimedia/mjpegtools/pkg-plist @@ -1,184 +1,182 @@ bin/anytovcd.sh %%GTK2%%bin/glav bin/jpeg2yuv bin/lav2avi.sh bin/lav2mpeg bin/lav2wav bin/lav2yuv bin/lavaddwav bin/lavinfo bin/lavpipe bin/lavplay bin/lavrec bin/lavtc.sh bin/lavtrans bin/lavvideo bin/matteblend.flt bin/mjpeg_simd_helper bin/mp2enc bin/mpeg2enc bin/mpegtranscode bin/mplex bin/multiblend.flt bin/pgmtoy4m %%PNG%%bin/png2yuv bin/pnmtoy4m bin/ppmtoy4m bin/transist.flt bin/y4mblack bin/y4mcolorbars bin/y4mdenoise bin/y4mhist bin/y4minterlace bin/y4mivtc bin/y4mscaler bin/y4mshift bin/y4mspatialfilter bin/y4mstabilizer bin/y4mtopnm bin/y4mtoppm bin/y4mtoyuv bin/y4munsharp bin/ypipe bin/yuv2lav bin/yuv4mpeg bin/yuvcorrect bin/yuvcorrect_tune bin/yuvdeinterlace bin/yuvdenoise bin/yuvfps bin/yuvinactive bin/yuvkineco bin/yuvmedianfilter %%SDL%%bin/yuvplay bin/yuvscaler bin/yuvycsnoise bin/yuyvtoy4m include/mjpegtools/audiolib.h include/mjpegtools/avilib.h include/mjpegtools/editlist.h include/mjpegtools/format_codes.h include/mjpegtools/frequencies.h include/mjpegtools/jpegutils.h include/mjpegtools/lav_io.h include/mjpegtools/liblavplay.h include/mjpegtools/liblavrec.h include/mjpegtools/mjpeg_logging.h include/mjpegtools/mjpeg_types.h include/mjpegtools/motionsearch.h include/mjpegtools/mpeg2enc/elemstrmwriter.hh include/mjpegtools/mpeg2enc/encoderparams.hh include/mjpegtools/mpeg2enc/encodertypes.h include/mjpegtools/mpeg2enc/imageplanes.hh include/mjpegtools/mpeg2enc/macroblock.hh include/mjpegtools/mpeg2enc/mpeg2coder.hh include/mjpegtools/mpeg2enc/mpeg2encoder.hh include/mjpegtools/mpeg2enc/mpeg2encoptions.hh include/mjpegtools/mpeg2enc/mpeg2encparams.h include/mjpegtools/mpeg2enc/mpeg2syntaxcodes.h include/mjpegtools/mpeg2enc/ontheflyratectlpass1.hh include/mjpegtools/mpeg2enc/ontheflyratectlpass2.hh include/mjpegtools/mpeg2enc/picture.hh include/mjpegtools/mpeg2enc/picturereader.hh include/mjpegtools/mpeg2enc/predict_ref.h include/mjpegtools/mpeg2enc/quantize.hh include/mjpegtools/mpeg2enc/quantize_ref.h include/mjpegtools/mpeg2enc/ratectl.hh include/mjpegtools/mpeg2enc/seqencoder.hh include/mjpegtools/mpeg2enc/streamstate.h -include/mjpegtools/mpeg2enc/synchrolib.h include/mjpegtools/mpeg2enc/syntaxconsts.h include/mjpegtools/mpegconsts.h include/mjpegtools/mpegtimecode.h include/mjpegtools/mplex/audiostrm.hpp include/mjpegtools/mplex/aunit.hpp include/mjpegtools/mplex/aunitbuffer.hpp include/mjpegtools/mplex/bits.hpp include/mjpegtools/mplex/decodebufmodel.hpp include/mjpegtools/mplex/inputstrm.hpp include/mjpegtools/mplex/interact.hpp include/mjpegtools/mplex/mplexconsts.hpp include/mjpegtools/mplex/multiplexor.hpp include/mjpegtools/mplex/outputstrm.hpp include/mjpegtools/mplex/padstrm.hpp include/mjpegtools/mplex/stillsstream.hpp include/mjpegtools/mplex/stream_params.hpp include/mjpegtools/mplex/systems.hpp include/mjpegtools/mplex/videostrm.hpp include/mjpegtools/yuv4mpeg.h -lib/liblavfile-2.1.so.0 -lib/liblavfile-2.1.so.0.0.0 +lib/liblavfile-2.2.so.0 +lib/liblavfile-2.2.so.0.0.0 lib/liblavfile.a lib/liblavfile.so -lib/liblavjpeg-2.1.so.0 -lib/liblavjpeg-2.1.so.0.0.0 +lib/liblavjpeg-2.2.so.0 +lib/liblavjpeg-2.2.so.0.0.0 lib/liblavjpeg.a lib/liblavjpeg.so -lib/liblavplay-2.1.so.0 -lib/liblavplay-2.1.so.0.0.0 +lib/liblavplay-2.2.so.0 +lib/liblavplay-2.2.so.0.0.0 lib/liblavplay.a lib/liblavplay.so -lib/liblavrec-2.1.so.0 -lib/liblavrec-2.1.so.0.0.0 +lib/liblavrec-2.2.so.0 +lib/liblavrec-2.2.so.0.0.0 lib/liblavrec.a lib/liblavrec.so -lib/libmjpegutils-2.1.so.0 -lib/libmjpegutils-2.1.so.0.0.0 +lib/libmjpegutils-2.2.so.0 +lib/libmjpegutils-2.2.so.0.0.0 lib/libmjpegutils.a lib/libmjpegutils.so -lib/libmpeg2encpp-2.1.so.0 -lib/libmpeg2encpp-2.1.so.0.0.0 +lib/libmpeg2encpp-2.2.so.0 +lib/libmpeg2encpp-2.2.so.0.0.0 lib/libmpeg2encpp.a lib/libmpeg2encpp.so -lib/libmplex2-2.1.so.0 -lib/libmplex2-2.1.so.0.0.0 +lib/libmplex2-2.2.so.0 +lib/libmplex2-2.2.so.0.0.0 lib/libmplex2.a lib/libmplex2.so libdata/pkgconfig/mjpegtools.pc +%%PORTDOCS%%%%DOCSDIR%%/AUTHORS +%%PORTDOCS%%%%DOCSDIR%%/BUGS +%%PORTDOCS%%%%DOCSDIR%%/CHANGES +%%PORTDOCS%%%%DOCSDIR%%/ChangeLog +%%PORTDOCS%%%%DOCSDIR%%/HINTS +%%PORTDOCS%%%%DOCSDIR%%/NEWS +%%PORTDOCS%%%%DOCSDIR%%/PLANS +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/README.AltiVec +%%PORTDOCS%%%%DOCSDIR%%/README.DV +%%PORTDOCS%%%%DOCSDIR%%/README.avilib +%%PORTDOCS%%%%DOCSDIR%%/README.lavpipe +%%PORTDOCS%%%%DOCSDIR%%/README.transist +%%PORTDOCS%%%%DOCSDIR%%/TODO share/man/man1/jpeg2yuv.1.gz share/man/man1/lav2mpeg.1.gz share/man/man1/lav2wav.1.gz share/man/man1/lav2yuv.1.gz share/man/man1/lavpipe.1.gz share/man/man1/lavplay.1.gz share/man/man1/lavrec.1.gz share/man/man1/lavtrans.1.gz share/man/man1/mjpegtools.1.gz share/man/man1/mp2enc.1.gz share/man/man1/mpeg2enc.1.gz share/man/man1/mplex.1.gz share/man/man1/pgmtoy4m.1.gz share/man/man1/png2yuv.1.gz share/man/man1/pnmtoy4m.1.gz share/man/man1/ppmtoy4m.1.gz share/man/man1/y4mcolorbars.1.gz share/man/man1/y4mdenoise.1.gz share/man/man1/y4mscaler.1.gz share/man/man1/y4mtopnm.1.gz share/man/man1/y4mtoppm.1.gz share/man/man1/y4munsharp.1.gz share/man/man1/yuv2lav.1.gz share/man/man1/yuvdenoise.1.gz share/man/man1/yuvfps.1.gz share/man/man1/yuvinactive.1.gz share/man/man1/yuvkineco.1.gz share/man/man1/yuvmedianfilter.1.gz share/man/man1/yuvplay.1.gz share/man/man1/yuvscaler.1.gz share/man/man1/yuvycsnoise.1.gz share/man/man5/yuv4mpeg.5.gz -%%PORTDOCS%%%%DOCSDIR%%/AUTHORS -%%PORTDOCS%%%%DOCSDIR%%/BUGS -%%PORTDOCS%%%%DOCSDIR%%/CHANGES -%%PORTDOCS%%%%DOCSDIR%%/ChangeLog -%%PORTDOCS%%%%DOCSDIR%%/HINTS -%%PORTDOCS%%%%DOCSDIR%%/NEWS -%%PORTDOCS%%%%DOCSDIR%%/PLANS -%%PORTDOCS%%%%DOCSDIR%%/README -%%PORTDOCS%%%%DOCSDIR%%/README.AltiVec -%%PORTDOCS%%%%DOCSDIR%%/README.DV -%%PORTDOCS%%%%DOCSDIR%%/README.avilib -%%PORTDOCS%%%%DOCSDIR%%/README.glav -%%PORTDOCS%%%%DOCSDIR%%/README.lavpipe -%%PORTDOCS%%%%DOCSDIR%%/README.transist -%%PORTDOCS%%%%DOCSDIR%%/TODO