git: 178fc4713a68 - main - multimedia/mjpegtools: Update to 2.2.1

From: Jason E. Hale <jhale_at_FreeBSD.org>
Date: Tue, 24 Sep 2024 05:11:59 UTC
The branch main has been updated by jhale:

URL: https://cgit.FreeBSD.org/ports/commit/?id=178fc4713a68db254fc85c07fe5303c49c5b8d52

commit 178fc4713a68db254fc85c07fe5303c49c5b8d52
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2024-09-24 04:40:57 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2024-09-24 05:11:54 +0000

    multimedia/mjpegtools: Update to 2.2.1
    
    Catch up to the latest release from over 3 years ago.
---
 multimedia/mjpegtools/Makefile                     | 38 ++++++++------
 multimedia/mjpegtools/distinfo                     |  5 +-
 .../mjpegtools/files/patch-lavtools__lavrec.c      |  6 +--
 .../mjpegtools/files/patch-lavtools__lavvideo.c    |  6 +--
 .../mjpegtools/files/patch-lavtools__liblavplay.c  |  4 +-
 .../mjpegtools/files/patch-lavtools__liblavrec.c   |  4 +-
 .../files/patch-mpeg2enc_encoderparams.hh          |  6 +--
 .../files/patch-mpeg2enc_ontheflyratectlpass1.hh   |  9 ----
 .../files/patch-mpeg2enc_ontheflyratectlpass2.hh   |  9 ----
 multimedia/mjpegtools/files/patch-mplex_main.cpp   | 53 ++++++++++----------
 multimedia/mjpegtools/pkg-plist                    | 58 +++++++++++-----------
 11 files changed, 94 insertions(+), 104 deletions(-)

diff --git a/multimedia/mjpegtools/Makefile b/multimedia/mjpegtools/Makefile
index ad5d6e24c1b8..b8d9f6376f6a 100644
--- a/multimedia/mjpegtools/Makefile
+++ b/multimedia/mjpegtools/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	mjpegtools
-PORTVERSION=	2.1.0
-PORTREVISION=	18
+PORTVERSION=	2.2.1
 CATEGORIES=	multimedia
 MASTER_SITES=	SF/${PORTNAME:S/tools//}/${PORTNAME}/${PORTVERSION}
 
@@ -12,18 +11,25 @@ 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
 
@@ -33,13 +39,18 @@ 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} \
@@ -49,8 +60,7 @@ post-patch:
 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
 
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,4 +1,4 @@
---- lavtools/lavrec.c.orig
+--- lavtools/lavrec.c.orig	2021-09-05 06:14:13 UTC
 +++ lavtools/lavrec.c
 @@ -196,7 +196,9 @@
  #include <stdlib.h>
@@ -10,7 +10,7 @@
  #include <signal.h>
  #include <fcntl.h>
  #include <errno.h>
-@@ -1149,6 +1151,7 @@
+@@ -1149,6 +1151,7 @@ int main(int argc, char **argv)
    sigset_t sigmask;
    pthread_t input_thread;
  
@@ -18,7 +18,7 @@
    /* 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;
      }
    }
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,6 +1,6 @@
---- 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 <sys/stat.h>
  #include <sys/ioctl.h>
  
@@ -8,7 +8,7 @@
  #include <linux/types.h>
  /* 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
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,6 +1,6 @@
---- 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 <sys/resource.h>
  #include <sys/wait.h>
  #ifdef HAVE_V4L
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,4 +1,4 @@
---- lavtools/liblavrec.c.orig
+--- lavtools/liblavrec.c.orig	2021-09-05 06:14:13 UTC
 +++ lavtools/liblavrec.c
 @@ -45,9 +45,14 @@
  #include <sys/time.h>
@@ -16,7 +16,7 @@
  #include <stdlib.h>
  
  /* 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 )
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,9 +1,9 @@
 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 {
  };
  
  
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,6 +1,6 @@
---- 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 <ctype.h>
  #include <math.h>
@@ -8,46 +8,45 @@
  #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
@@ -86,7 +86,6 @@ 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
@@ -106,35 +105,49 @@ 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
@@ -167,18 +180,3 @@ 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