public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jory Pratt" <anarchy@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/anarchy:master commit in: media-video/mjpegtools/, media-video/mjpegtools/files/
Date: Tue, 19 Apr 2011 13:34:52 +0000 (UTC)	[thread overview]
Message-ID: <53e4c30e4552ff3039cefb6c1ed59556404fdf58.anarchy@gentoo> (raw)

commit:     53e4c30e4552ff3039cefb6c1ed59556404fdf58
Author:     Jory A. Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 19 13:34:18 2011 +0000
Commit:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Tue Apr 19 13:34:18 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/anarchy.git;a=commit;h=53e4c30e

Fix mjpegtools compilation, thanks Ed Catmur for the patch bug #359491

---
 media-video/mjpegtools/Manifest                    |    5 +
 .../files/mjpegtools-1.9.0-glibc-2.10.patch        |   11 +++
 .../mjpegtools/files/mjpegtools-1.9.0-jpeg-7.patch |   24 +++++
 .../files/mjpegtools-1.9.0-v4l-automagic.patch     |   35 ++++++++
 media-video/mjpegtools/mjpegtools-1.9.0-r1.ebuild  |   90 ++++++++++++++++++++
 5 files changed, 165 insertions(+), 0 deletions(-)

diff --git a/media-video/mjpegtools/Manifest b/media-video/mjpegtools/Manifest
new file mode 100644
index 0000000..db18198
--- /dev/null
+++ b/media-video/mjpegtools/Manifest
@@ -0,0 +1,5 @@
+AUX mjpegtools-1.9.0-glibc-2.10.patch 429 RMD160 ef7f706aeda7ebfa04dbd43b70a5e3e6faf24610 SHA1 3029f0e835e693b144298ed9f8143c9566be26f3 SHA256 0a76b418df4daa1603c827001ede6a1b3da4457b5d3aefeda0a656cd88ad446b
+AUX mjpegtools-1.9.0-jpeg-7.patch 774 RMD160 22c50dd28617159eaa89aefb4647e21d4d9972e7 SHA1 2bdb1b3b8591cede11d4a133a758e8ead35db4dd SHA256 2c9b90a283e8e6d95bd9573cd16310107c654d0d701a7dff7e47ee1a773da7cf
+AUX mjpegtools-1.9.0-v4l-automagic.patch 1302 RMD160 cbcee4a47d664b9d7c57c81abd1748289511757d SHA1 4bfe472fd8c56dae931303205ad8b75f34da7803 SHA256 eb85dcabdc06b07b30d7208e5667b04fa962cb96bf1fd4ccc665e6f67fa40ff9
+DIST mjpegtools-1.9.0.tar.gz 1718063 RMD160 79e0eb4bce468bb8f12da336e29abe8fab390a5f SHA1 1701233354c7ea86b5b7808c4dd5d03a71118e48 SHA256 a9322aaab1e0835fbaa00fc10e58e885833454fa0ad6f57c60c89a78f7ed1711
+EBUILD mjpegtools-1.9.0-r1.ebuild 2145 RMD160 e6334739839bc490166b7e35530f52f4bbebefe0 SHA1 361a3eea1afb618cbc2af09fb4ce95ee66180907 SHA256 4d4c2f6924b6021cefabd8c480b20f6e0042f717e0f76af5ad637544f448f24b

diff --git a/media-video/mjpegtools/files/mjpegtools-1.9.0-glibc-2.10.patch b/media-video/mjpegtools/files/mjpegtools-1.9.0-glibc-2.10.patch
new file mode 100644
index 0000000..e161560
--- /dev/null
+++ b/media-video/mjpegtools/files/mjpegtools-1.9.0-glibc-2.10.patch
@@ -0,0 +1,11 @@
+--- mjpegtools-1.9.0/mplex/lpcmstrm_in.cpp.orig	2009-05-27 01:31:46.000000000 -0700
++++ mjpegtools-1.9.0/mplex/lpcmstrm_in.cpp	2009-05-27 01:33:09.000000000 -0700
+@@ -53,7 +53,7 @@
+ 
+ bool LPCMStream::Probe(IBitStream &bs )
+ {
+-    char *last_dot = strrchr( bs.StreamName(), '.' );
++    const char *last_dot = strrchr( bs.StreamName(), '.' );
+     return 
+         last_dot != NULL 
+         && strcmp( last_dot+1, "lpcm") == 0;

diff --git a/media-video/mjpegtools/files/mjpegtools-1.9.0-jpeg-7.patch b/media-video/mjpegtools/files/mjpegtools-1.9.0-jpeg-7.patch
new file mode 100644
index 0000000..ec36731
--- /dev/null
+++ b/media-video/mjpegtools/files/mjpegtools-1.9.0-jpeg-7.patch
@@ -0,0 +1,24 @@
+Fix segmentation fault with jpeg-7 and above where dinfo.do_fancy_upsampling isn't set by default to FALSE anymore.
+
+Patch by: Salah Coronya
+
+http://bugs.gentoo.org/show_bug.cgi?id=293919
+
+--- lavtools/jpegutils.c
++++ lavtools/jpegutils.c
+@@ -502,6 +502,7 @@
+ 
+    jpeg_read_header (&dinfo, TRUE);
+    dinfo.raw_data_out = TRUE;
++   dinfo.do_fancy_upsampling = FALSE;
+    dinfo.out_color_space = JCS_YCbCr;
+    dinfo.dct_method = JDCT_IFAST;
+    guarantee_huff_tables(&dinfo);
+@@ -599,6 +600,7 @@
+       if (field > 0) {
+          jpeg_read_header (&dinfo, TRUE);
+          dinfo.raw_data_out = TRUE;
++         dinfo.do_fancy_upsampling = FALSE;
+          dinfo.out_color_space = JCS_YCbCr;
+          dinfo.dct_method = JDCT_IFAST;
+          jpeg_start_decompress (&dinfo);

diff --git a/media-video/mjpegtools/files/mjpegtools-1.9.0-v4l-automagic.patch b/media-video/mjpegtools/files/mjpegtools-1.9.0-v4l-automagic.patch
new file mode 100644
index 0000000..1dde282
--- /dev/null
+++ b/media-video/mjpegtools/files/mjpegtools-1.9.0-v4l-automagic.patch
@@ -0,0 +1,35 @@
+diff --git a/autogen.sh b/autogen.sh
+index c894008..f5c6a7c 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -1,4 +1,3 @@
+ #!/bin/sh
+ # Run this to generate all the initial makefiles, etc.
+-export ACLOCAL="aclocal -I missing_M4"
+ autoreconf -f -i
+diff --git a/configure.ac b/configure.ac
+index f06488a..443aa8d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -152,6 +152,8 @@ dnl *********************************************************************
+ dnl Test whether we're linux or not. If so, define HAVE_V4L and build the
+ dnl video4linux/hardware dependent tools. Else, undefine HAVE_V4L
+ 
++AC_ARG_WITH([v4l], AC_HELP_STRING([--without-v4l], [Disable v4l1 API]))
++AS_IF([test "x$with_v4l" != "xno"], [
+ have_video4linux=false
+ case $host in
+   *-*-linux*)
+@@ -159,9 +161,9 @@ case $host in
+                   [have_video4linux=true
+                    AC_DEFINE(HAVE_V4L, 1,
+ 		             [Building for Linux - using the video4linux API])],
++                  []);; esac])
++AS_IF([test "x$have_video4linux" != "xtrue" && test "x$with_v4l" != "xno"],
+                   [AC_MSG_ERROR([videodev.h not found - please install the linux kernel headers])])
+-   ;;
+-esac
+ AM_CONDITIONAL(HAVE_V4L, test x$have_video4linux = xtrue)
+ 
+ dnl *********************************************************************
+

diff --git a/media-video/mjpegtools/mjpegtools-1.9.0-r1.ebuild b/media-video/mjpegtools/mjpegtools-1.9.0-r1.ebuild
new file mode 100644
index 0000000..284b00f
--- /dev/null
+++ b/media-video/mjpegtools/mjpegtools-1.9.0-r1.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/mjpegtools/mjpegtools-1.9.0-r1.ebuild,v 1.9 2011/04/01 09:48:15 ssuominen Exp $
+
+EAPI="1"
+
+inherit flag-o-matic toolchain-funcs eutils libtool autotools
+
+MY_P=${P/_/}
+
+DESCRIPTION="Tools for MJPEG video"
+HOMEPAGE="http://mjpeg.sourceforge.net/"
+SRC_URI="mirror://sourceforge/mjpeg/${MY_P}.tar.gz"
+
+LICENSE="as-is"
+SLOT="1"
+KEYWORDS="alpha amd64 ppc ppc64 sparc x86"
+IUSE="gtk dv quicktime sdl yv12 v4l dga png mmx"
+
+RDEPEND="virtual/jpeg
+	gtk? ( x11-libs/gtk+:2 )
+	dv? ( >=media-libs/libdv-0.99 )
+	quicktime? ( media-libs/libquicktime )
+	png? ( media-libs/libpng )
+	sdl? ( >=media-libs/libsdl-1.2.7-r3 )
+	x11-libs/libX11
+	x11-libs/libXt"
+
+DEPEND="${RDEPEND}
+	mmx? ( dev-lang/nasm )
+	>=sys-apps/sed-4
+	dev-util/pkgconfig"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+	unpack ${A}
+	cd "${S}"
+	sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure
+	epatch "${FILESDIR}"/${P}-glibc-2.10.patch \
+		"${FILESDIR}"/${P}-jpeg-7.patch \
+		"${FILESDIR}"/${P}-v4l-automagic.patch
+
+	eautoreconf
+}
+
+src_compile() {
+	local myconf
+
+	if use yv12 && use dv; then
+		myconf="${myconf} --with-dv-yv12"
+	elif use yv12; then
+		ewarn "yv12 support is possible when 'dv' is in your USE flags."
+	fi
+
+	[[ $(gcc-major-version) -eq 3 ]] && append-flags -mno-sse2
+
+	append-flags -fno-strict-aliasing
+
+	econf \
+		--with-x \
+		$(use_enable dga xfree-ext) \
+		$(use_with quicktime libquicktime) \
+		$(use_with png libpng) \
+		$(use_with v4l) \
+		$(use_with gtk) \
+		$(use_with sdl) \
+		$(use_with dv libdv /usr) \
+		$(use_enable mmx simd-accel) \
+		--enable-largefile \
+		--without-jpeg-mmx \
+		${myconf}
+
+	emake || die
+
+	cd docs
+	local infofile
+	for infofile in mjpeg*info*; do
+		echo "INFO-DIR-SECTION Miscellaneous" >> ${infofile}
+		echo "START-INFO-DIR-ENTRY" >> ${infofile}
+		echo "* mjpeg-howto: (mjpeg-howto).					 How to use the mjpeg-tools" >> ${infofile}
+		echo "END-INFO-DIR-ENTRY" >> ${infofile}
+	done
+}
+
+src_install() {
+	einstall || die
+	dodoc mjpeg_howto.txt README* PLANS NEWS TODO HINTS BUGS ChangeLog \
+		AUTHORS CHANGES
+}



                 reply	other threads:[~2011-04-19 13:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53e4c30e4552ff3039cefb6c1ed59556404fdf58.anarchy@gentoo \
    --to=anarchy@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox