summaryrefslogtreecommitdiff
path: root/media-video/mjpegtools
diff options
context:
space:
mode:
Diffstat (limited to 'media-video/mjpegtools')
-rw-r--r--media-video/mjpegtools/Manifest8
-rw-r--r--media-video/mjpegtools/files/mjpegtools-2.1.0-no_format.patch70
-rw-r--r--media-video/mjpegtools/files/mjpegtools-2.1.0-pic.patch69
-rw-r--r--media-video/mjpegtools/files/mjpegtools-2.1.0-sdl-cflags.patch11
-rw-r--r--media-video/mjpegtools/metadata.xml18
-rw-r--r--media-video/mjpegtools/mjpegtools-2.1.0-r2.ebuild116
6 files changed, 292 insertions, 0 deletions
diff --git a/media-video/mjpegtools/Manifest b/media-video/mjpegtools/Manifest
new file mode 100644
index 000000000000..4985996e08dd
--- /dev/null
+++ b/media-video/mjpegtools/Manifest
@@ -0,0 +1,8 @@
+AUX mjpegtools-2.1.0-no_format.patch 2800 SHA256 52e16f3fbc8181fb6da424c422dad2add38127f6dc570810fa7fd3efc1b8d4fd SHA512 234c02625898f67994261e00ca940bbd597c60d2060507ee1e7391ea61353e00906325aec608d2ba545a7b4725d1ad645bd9d2cd33d23669490de3646998005b WHIRLPOOL 1f68e2961eb95796190ee490ffca8a1df3c76c4e96b8bc84511baf0b755d4fdbcf6728fb86b209733da7e4723166db3911f0928e8183640f2e7b13b86f2bc649
+AUX mjpegtools-2.1.0-pic.patch 2282 SHA256 1b8c08c993d01838b6fe04094c00fd07220ae543c8f115c79ffaae32edc8c5c2 SHA512 3ad9d0b488a4fcc29fab8c0cc8322d99e63c755234c02a7fe7ad7efa974f67871460f43db05ca8097c358fdf7aafcc852967959a2abc83460c258aa38a448e28 WHIRLPOOL 6986af27769fa540706e7dd575b6d42f9a5c5e817929db2c08de2842d32c9cb361f97ecadc0b00bb37563a0be12727e4e4c6719b2dacfe3a684949589314c05a
+AUX mjpegtools-2.1.0-sdl-cflags.patch 387 SHA256 fcba002f1f12f1fd864179f2c9971acab1bf298d9a719f74ceacc231e7232a99 SHA512 67b43ab22d1358755a6e109b8eaf21b14058c6a4f4dc511e27162c4205274eacbe4fb9016a5c8a3938ca071f6d4f1898801ed3ab0571b011aab170771a1b7602 WHIRLPOOL 1eb9815a12d425acc8345a825258f7e71c2e362e79cf064484edc4dfdd67164f4935c1b9de44f8460e791340e315fd9a40127d1899a45a81b74c6a7a880e24c8
+DIST mjpegtools-2.1.0.tar.gz 1844336 SHA256 864f143d7686377f8ab94d91283c696ebd906bf256b2eacc7e9fb4dddcedc407 SHA512 10d3288f47d7cc4de87fa63f65e0fd4bd0a9af95db77155eecccecae7a7e60ebab83eaec44cf7a2c3d9e627f0cc086eda208abee1a7a74cbf3f85e87bb979ac5 WHIRLPOOL e2e869a328e95dab22331ea1f03a669553ee01682a8e76d27d33da8b1cda46e042d252ff2b1974d08b2109ab1a664f4d5247ee92d7846876d496c7e63b472af9
+EBUILD mjpegtools-2.1.0-r2.ebuild 3009 SHA256 b93536eecf62616a7ef023d383d42365cb1c420b77009600b1b425d1eff24f2d SHA512 48572d402737cf8c045abccc31b0641224f7a776380246687187463b6daa4a0a62279b7a2c0d4f39ddd0fb2cb81ad864c2bfc0fb9d8c8c02aef166b5ce593e83 WHIRLPOOL 4e8518dc7cd252ecf44b4e0791ca940aa6042851adefc721b02aea615798553e04e61b0d41905475bcc03f764d118b28824295e19ae342534061caf3ccdc456e
+MISC ChangeLog 2567 SHA256 3a2a4fd539baa9598d93130545c3b9372c3be8b286a23683cbeee50ffe498813 SHA512 a328dd96c408a13a4c7c2a00db5a351d308ee68dffdba40152008137111b4af62a8d0b15a4ee1436548384893c71fe259e2e6c65c397a40c0f2a11f85cdfc4fa WHIRLPOOL bc1f96c9035be540409c1a6287f684333e3bba42ef53e29ba15aa9984479393089ca249fa354e69ed5cf7a436d29117eb8fc7b9147af828e61a10f9a66108955
+MISC ChangeLog-2015 38180 SHA256 441b93a970eba4d2bddfd53f7ffcc86b6aedd089dc151a5ebe681ae531e11949 SHA512 bfdd9db2501f604ec3d3cb82501d3a2e7baa766bb35a9130bfd68269371d227b9f8f9bfa248d27d8e6d237540fca0a08f42f6f3657d4b1aae1e1cd629e3d7398 WHIRLPOOL 56568ec9dd36575cd6092cb464c8638c7b7673c9d6bb55815037aca49033bd9b2ba5c77d8b6c6ec7c2524012d50dca2c2186a81c179706ae28c1edaaf86dc21c
+MISC metadata.xml 537 SHA256 6c1d8efef49e1c977cabf6587b8bdfc3fa758948e415d35cffe4d9f9c4f14c4b SHA512 f3360892e77c064d2062bb963b91f031587ebed6a31b8ba2c698d969cf88998daec9ef910689f477e36921df60d2aa8bdfbe569dda701b0e375d75acfd31d79d WHIRLPOOL 8643f100211c703ac6ec479d98d0d8dcfeffc6a33e1902f0f54137f994cd55783a8cbe862ec51c7c8ec339266e45c317db11957b18b6289e9a194bda6e73174a
diff --git a/media-video/mjpegtools/files/mjpegtools-2.1.0-no_format.patch b/media-video/mjpegtools/files/mjpegtools-2.1.0-no_format.patch
new file mode 100644
index 000000000000..20ed99628fb6
--- /dev/null
+++ b/media-video/mjpegtools/files/mjpegtools-2.1.0-no_format.patch
@@ -0,0 +1,70 @@
+--- ./lavtools/lav_io.c.orig 2014-07-27 17:48:21.474622974 +0100
++++ ./lavtools/lav_io.c 2014-07-27 17:48:48.838881166 +0100
+@@ -926,7 +926,7 @@ lav_file_t *lav_open_input_file(char *fi
+ strcat(errmsg, ", quicktime");
+ #endif
+ strcat(errmsg, ").\n");
+- fprintf(stderr, errmsg);
++ fprintf(stderr, "%s", errmsg);
+ free(lav_fd);
+ internal_error = ERROR_FORMAT; /* Format not recognized */
+ return 0;
+--- ./lavtools/lavtrans.c.orig 2014-07-27 17:58:09.410282056 +0100
++++ ./lavtools/lavtrans.c 2014-07-27 17:59:24.769016140 +0100
+@@ -275,7 +275,7 @@ int main(int argc, char ** argv)
+ if (process_image_frame != -1)
+ {
+ nv = el_get_video_frame(vbuff, process_image_frame, &el);
+- sprintf(imgfname,outfile);
++ sprintf(imgfname, "%s", outfile);
+ imgfd = fopen(imgfname,"wb");
+ if (imgfd==0) system_error("opening image file","fopen");
+ res = fwrite(vbuff,nv,1,imgfd);
+--- ./lavtools/jpeg2yuv.c.orig 2014-07-27 18:00:55.600900476 +0100
++++ ./lavtools/jpeg2yuv.c 2014-07-27 18:01:36.848301893 +0100
+@@ -451,7 +451,7 @@ static int generate_YUV4MPEG(parameters_
+
+ if (firstjpeg) {
+ p = firstjpeg;
+- sprintf(jpegname, firstjpeg);
++ sprintf(jpegname, "%s", firstjpeg);
+ firstjpeg = NULL;
+ }
+ else {
+--- ./mplex/main.cpp.orig 2014-07-27 18:11:38.282143657 +0100
++++ ./mplex/main.cpp 2014-07-27 18:06:40.352252415 +0100
+@@ -614,7 +614,7 @@ bool CmdLineMultiplexJob::ParseWorkaroun
+ if( flag_table[flag].longname != 0 )
+ message += sep;
+ }
+- mjpeg_error( message.c_str() );
++ mjpeg_error( "%s", message.c_str() );
+ return false;
+ }
+
+--- ./yuvfilters/yuvkineco.c.orig 2014-07-27 18:15:01.476097522 +0100
++++ ./yuvfilters/yuvkineco.c 2014-07-27 18:15:29.540366245 +0100
+@@ -48,7 +48,7 @@ buf_debug(char *buf, FILE *fp, const cha
+ } else {
+ #ifdef MJPEGTOOLS
+ buf[n] = '\0';
+- mjpeg_debug(buf);
++ mjpeg_debug("%s", buf);
+ #else
+ fputs(buf, stderr);
+ #endif
+--- ./yuvfilters/yuvfilters.h.orig 2014-07-27 18:37:02.712645244 +0100
++++ ./yuvfilters/yuvfilters.h 2014-07-27 19:13:28.156101800 +0100
+@@ -34,9 +34,9 @@ extern "C" {
+
+ #ifdef MJPEGTOOLS
+ # define perror(MSG) mjpeg_error("%s: %s", MSG, strerror(errno))
+-# define WERROR(MSG) mjpeg_error(MSG)
+-# define WERRORL(MSG) mjpeg_error(MSG)
+-# define WWARN(MSG) mjpeg_warn(MSG)
++# define WERROR(MSG) mjpeg_error("%s", MSG)
++# define WERRORL(MSG) mjpeg_error("%s", MSG)
++# define WWARN(MSG) mjpeg_warn("%s", MSG)
+ #else
+ # define WERROR(MSG) write(2, MSG "\n", sizeof MSG)
+ # define WERRORL(MSG) do { write(2, MSG, strlen(MSG)); write(2, "\n", 1); } while (0)
diff --git a/media-video/mjpegtools/files/mjpegtools-2.1.0-pic.patch b/media-video/mjpegtools/files/mjpegtools-2.1.0-pic.patch
new file mode 100644
index 000000000000..7d0d1b60c017
--- /dev/null
+++ b/media-video/mjpegtools/files/mjpegtools-2.1.0-pic.patch
@@ -0,0 +1,69 @@
+Index: y4mdenoise/Makefile.am
+===================================================================
+RCS file: /cvsroot/mjpeg/mjpeg_play/y4mdenoise/Makefile.am,v
+retrieving revision 1.12
+retrieving revision 1.13
+diff -u -r1.12 -r1.13
+--- y4mdenoise/Makefile.am 1 Apr 2012 08:44:49 -0000 1.12
++++ y4mdenoise/Makefile.am 28 Nov 2013 22:39:41 -0000 1.13
+@@ -4,8 +4,8 @@
+
+ EXTRA_DIST = implementation.html
+
+-AM_CFLAGS = -DNDEBUG -finline-functions @PROGRAM_NOPIC@
+-AM_CXXFLAGS = -DNDEBUG -finline-functions @PROGRAM_NOPIC@
++AM_CFLAGS = -DNDEBUG -finline-functions
++AM_CXXFLAGS = -DNDEBUG -finline-functions
+
+ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/utils
+
+Index: y4munsharp/Makefile.am
+===================================================================
+RCS file: /cvsroot/mjpeg/mjpeg_play/y4munsharp/Makefile.am,v
+retrieving revision 1.2
+retrieving revision 1.3
+diff -u -r1.2 -r1.3
+--- y4munsharp/Makefile.am 16 Jun 2005 17:09:38 -0000 1.2
++++ y4munsharp/Makefile.am 28 Nov 2013 22:39:41 -0000 1.3
+@@ -4,7 +4,7 @@
+
+ INCLUDES = -I $(top_srcdir)/utils -I $(top_srcdir)
+
+-y4munharp_CFLAGS=@PROGRAM_NOPIC@
++y4munharp_CFLAGS=
+
+ bin_PROGRAMS = y4munsharp
+
+Index: y4mutils/Makefile.am
+===================================================================
+RCS file: /cvsroot/mjpeg/mjpeg_play/y4mutils/Makefile.am,v
+retrieving revision 1.7
+retrieving revision 1.8
+diff -u -r1.7 -r1.8
+--- y4mutils/Makefile.am 1 Apr 2012 08:44:49 -0000 1.7
++++ y4mutils/Makefile.am 28 Nov 2013 22:39:41 -0000 1.8
+@@ -2,7 +2,7 @@
+
+ MAINTAINERCLEANFILES = Makefile.in
+
+-AM_CFLAGS = @PROGRAM_NOPIC@
++AM_CFLAGS =
+ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/utils
+
+ LIBMJPEGUTILS = $(top_builddir)/utils/libmjpegutils.la
+Index: yuvscaler/Makefile.am
+===================================================================
+RCS file: /cvsroot/mjpeg/mjpeg_play/yuvscaler/Makefile.am,v
+retrieving revision 1.5
+retrieving revision 1.6
+diff -u -r1.5 -r1.6
+--- yuvscaler/Makefile.am 1 Apr 2012 08:44:49 -0000 1.5
++++ yuvscaler/Makefile.am 28 Nov 2013 22:39:41 -0000 1.6
+@@ -18,6 +18,6 @@
+
+ EXTRA_DIST = yuvscaler_implementation.txt
+
+-yuvscaler_CFLAGS=@PROGRAM_NOPIC@
++yuvscaler_CFLAGS=
+ yuvscaler_SOURCES = yuvscaler.c yuvscaler_resample.c yuvscaler_bicubic.c
+ yuvscaler_LDADD = $(LIBMJPEGUTILS) $(LIBM_LIBS)
diff --git a/media-video/mjpegtools/files/mjpegtools-2.1.0-sdl-cflags.patch b/media-video/mjpegtools/files/mjpegtools-2.1.0-sdl-cflags.patch
new file mode 100644
index 000000000000..3bb7563caaa3
--- /dev/null
+++ b/media-video/mjpegtools/files/mjpegtools-2.1.0-sdl-cflags.patch
@@ -0,0 +1,11 @@
+diff a/y4mutils/Makefile.am b/y4mutils/Makefile.am
+--- a/y4mutils/Makefile.am
++++ b/y4mutils/Makefile.am
+@@ -44,6 +44,7 @@ y4mspatialfilter_LDADD = $(LIBMJPEGUTILS) $(LIBM_LIBS)
+
+ y4mhist_SOURCES = y4mhist.c
+ y4mhist_LDADD = $(SDL_LIBS) $(SDLgfx_LIBS) $(LIBMJPEGUTILS)
++y4mhist_CPPFLAGS = $(AM_CPPFLAGS) $(SDL_CFLAGS)
+
+ y4mblack_SOURCES = y4mblack.c
+ y4mblack_LDADD = $(LIBMJPEGUTILS)
diff --git a/media-video/mjpegtools/metadata.xml b/media-video/mjpegtools/metadata.xml
new file mode 100644
index 000000000000..484e22f07a72
--- /dev/null
+++ b/media-video/mjpegtools/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>billie@gentoo.org</email>
+ <name>Daniel Pielmeier</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>media-video@gentoo.org</email>
+ <name>Gentoo Video project</name>
+ </maintainer>
+ <use>
+ <flag name="sdlgfx">Enables y4mhist to display a graphical histogram</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">mjpeg</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-video/mjpegtools/mjpegtools-2.1.0-r2.ebuild b/media-video/mjpegtools/mjpegtools-2.1.0-r2.ebuild
new file mode 100644
index 000000000000..4c26bb3b89e5
--- /dev/null
+++ b/media-video/mjpegtools/mjpegtools-2.1.0-r2.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools eutils flag-o-matic multilib-minimal toolchain-funcs
+
+DESCRIPTION="Tools for MJPEG video"
+HOMEPAGE="http://mjpeg.sourceforge.net/"
+SRC_URI="mirror://sourceforge/mjpeg/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="1"
+KEYWORDS="alpha amd64 ~arm ~arm64 hppa ia64 ppc ppc64 sparc x86 ~amd64-fbsd"
+IUSE="dv gtk cpu_flags_x86_mmx png quicktime sdl sdlgfx static-libs"
+REQUIRED_USE="sdlgfx? ( sdl )"
+
+RDEPEND="virtual/jpeg:0=[${MULTILIB_USEDEP}]
+ quicktime? ( >=media-libs/libquicktime-1.2.4-r1[${MULTILIB_USEDEP}] )
+ dv? ( >=media-libs/libdv-1.0.0-r3[${MULTILIB_USEDEP}] )
+ png? ( media-libs/libpng:0= )
+ gtk? ( x11-libs/gtk+:2 )
+ sdl? ( >=media-libs/libsdl-1.2.15-r4[${MULTILIB_USEDEP}]
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
+ sdlgfx? ( media-libs/sdl-gfx )
+ )"
+
+DEPEND="${RDEPEND}
+ cpu_flags_x86_mmx? ( dev-lang/nasm )
+ >=sys-apps/sed-4
+ virtual/awk
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
+
+RDEPEND="${RDEPEND}
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-medialibs-20140508-r4
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ )"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-pic.patch
+ # https://sourceforge.net/p/mjpeg/bugs/139/
+ epatch "${FILESDIR}"/${P}-sdl-cflags.patch
+ epatch "${FILESDIR}"/mjpegtools-2.1.0-no_format.patch
+ eautoreconf
+ sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure
+}
+
+multilib_src_configure() {
+ [[ $(gcc-major-version) -eq 3 ]] && append-flags -mno-sse2
+
+ local myconf=(
+ --enable-compile-warnings
+ $(use_enable cpu_flags_x86_mmx simd-accel)
+ $(use_enable static-libs static)
+ --enable-largefile
+
+ $(use_with quicktime libquicktime)
+ $(use_with dv libdv)
+ $(use_with sdl libsdl)
+ --without-v4l
+ $(use_with sdl x)
+
+ # used by tools only
+ $(multilib_native_use_with gtk)
+ $(multilib_native_use_with png libpng)
+ $(multilib_native_use_with sdlgfx)
+
+ # used only in V4LCONF_LIBS that is not used anywhere...
+ --without-dga
+ )
+
+ ECONF_SOURCE=${S} \
+ econf "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # avoid building programs
+ emake bin_PROGRAMS=
+ fi
+}
+
+multilib_src_test() {
+ # there are no tests at the moment, so it would just build
+ # all programs in non-native ABIs...
+ multilib_is_native_abi && default
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install \
+ bin_PROGRAMS=
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dodoc mjpeg_howto.txt PLANS HINTS docs/FAQ.txt
+
+ prune_libtool_files --all
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ elog "mjpegtools installs user contributed scripts which require additional"
+ elog "dependencies not pulled in by the installation."
+ elog "These have to be installed manually."
+ elog "Currently known extra dpendencies are: ffmpeg, mencoder from mplayer,"
+ elog "parts of transcode, mpeg2dec from libmpeg2, sox, toolame, vcdimager, python."
+ fi
+}