summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Pranaitis <jens@chaox.net>2010-08-29 16:04:39 +0200
committerJens Pranaitis <jens@chaox.net>2010-08-29 16:04:39 +0200
commit0a90d6dfc0974249ce313d27335e48b1ff8b5223 (patch)
tree856478ed830e73e00081649a5db8ab7027b74149
parentbumped lsyncd (see gentoo bug 333317) (diff)
downloadjensp-0a90d6dfc0974249ce313d27335e48b1ff8b5223.tar.gz
jensp-0a90d6dfc0974249ce313d27335e48b1ff8b5223.tar.bz2
jensp-0a90d6dfc0974249ce313d27335e48b1ff8b5223.zip
added mjpegtools with patch for hardened gcc
-rw-r--r--media-video/mjpegtools/Manifest5
-rw-r--r--media-video/mjpegtools/files/mjpegtools-1.9.0-glibc-2.10.patch11
-rw-r--r--media-video/mjpegtools/files/mjpegtools-1.9.0-jpeg-7.patch24
-rw-r--r--media-video/mjpegtools/files/mjpegtools-1.9.0-nopic.patch41
-rw-r--r--media-video/mjpegtools/mjpegtools-1.9.0-r1.ebuild88
5 files changed, 169 insertions, 0 deletions
diff --git a/media-video/mjpegtools/Manifest b/media-video/mjpegtools/Manifest
new file mode 100644
index 0000000..5a67e58
--- /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-nopic.patch 1156 RMD160 3af31c58a646c4928e2e3fd4a78bbc1118c846fb SHA1 7ab0fefd615e6d7a1e5683de0b591d638efb4334 SHA256 10514e88edadad4874d84fc94f68826d5caf7c0cb9ed291a7a24fe8287f344ac
+DIST mjpegtools-1.9.0.tar.gz 1718063 RMD160 79e0eb4bce468bb8f12da336e29abe8fab390a5f SHA1 1701233354c7ea86b5b7808c4dd5d03a71118e48 SHA256 a9322aaab1e0835fbaa00fc10e58e885833454fa0ad6f57c60c89a78f7ed1711
+EBUILD mjpegtools-1.9.0-r1.ebuild 2187 RMD160 7ee3c8c76de83f54a0728b7a09a1d50e8cfd4431 SHA1 71674ebe888338aa4cff39c831d0e063b25a93cf SHA256 047623ef0dae34d40beda214b705276865e701a040f953396feb5b72a2111631
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-nopic.patch b/media-video/mjpegtools/files/mjpegtools-1.9.0-nopic.patch
new file mode 100644
index 0000000..9689acb
--- /dev/null
+++ b/media-video/mjpegtools/files/mjpegtools-1.9.0-nopic.patch
@@ -0,0 +1,41 @@
+diff -Naur org/configure new/configure
+--- org/configure 2009-07-29 17:35:00.000000000 +0100
++++ new/configure 2009-07-29 17:36:35.000000000 +0100
+@@ -25818,7 +25818,7 @@
+ _ACEOF
+
+ have_x86cpu=true
+- PROGRAM_NOPIC="-fno-PIC"
++ PROGRAM_NOPIC=""
+ ;;
+ x86_64*)
+ { echo "$as_me:$LINENO: result: x86_64" >&5
+@@ -25830,7 +25830,7 @@
+
+ have_x86cpu=true
+ have_x86_64cpu=true
+- PROGRAM_NOPIC="-fno-PIC"
++ PROGRAM_NOPIC=""
+ ;;
+ powerpc | powerpc64)
+ { echo "$as_me:$LINENO: result: PowerPC" >&5
+diff -Naur org/configure.ac new/configure.ac
+--- org/configure.ac 2009-01-06 06:33:48.000000000 +0000
++++ new/configure.ac 2009-07-29 17:38:15.000000000 +0100
+@@ -315,14 +315,14 @@
+ AC_MSG_RESULT(IA32)
+ AC_DEFINE(HAVE_X86CPU,1, [Compiling for x86 architecture CPU])
+ have_x86cpu=true
+- PROGRAM_NOPIC="-fno-PIC"
++ PROGRAM_NOPIC=""
+ ;;
+ x86_64*)
+ AC_MSG_RESULT(x86_64)
+ AC_DEFINE(HAVE_X86CPU,1, [Compiling for x86-64 architecture CPU])
+ have_x86cpu=true
+ have_x86_64cpu=true
+- PROGRAM_NOPIC="-fno-PIC"
++ PROGRAM_NOPIC=""
+ ;;
+ powerpc | powerpc64)
+ AC_MSG_RESULT(PowerPC)
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..453cf90
--- /dev/null
+++ b/media-video/mjpegtools/mjpegtools-1.9.0-r1.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2010 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.6 2010/02/20 14:46:51 armin76 Exp $
+
+EAPI="1"
+
+inherit flag-o-matic toolchain-funcs eutils libtool
+
+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 X yv12 v4l dga png mmx"
+
+RDEPEND="media-libs/jpeg:0
+ gtk? ( x11-libs/gtk+:2 )
+ dv? ( >=media-libs/libdv-0.99 )
+ quicktime? ( virtual/quicktime )
+ png? ( media-libs/libpng )
+ sdl? ( >=media-libs/libsdl-1.2.7-r3 )
+ X? ( 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}-nopic.patch
+}
+
+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 \
+ $(use_with X 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} || die "configure failed"
+
+ emake || die "emake failed"
+
+ 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 "install failed"
+ dodoc mjpeg_howto.txt README* PLANS NEWS TODO HINTS BUGS ChangeLog \
+ AUTHORS CHANGES
+}