# ChangeLog for media-video/mjpegtools
-# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/mjpegtools/ChangeLog,v 1.125 2006/11/20 13:02:30 zzam Exp $
+# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/mjpegtools/ChangeLog,v 1.126 2007/02/25 22:43:21 zzam Exp $
+
+*mjpegtools-1.9.0_rc1 (25 Feb 2007)
+
+ 25 Feb 2007; Matthias Schwarzott <zzam@gentoo.org>
+ +files/mjpegtools-1.9.0_rc1-as-needed.patch,
+ +files/mjpegtools-1.9.0_rc1-lavrec-memleak.patch,
+ +files/mjpegtools-1.9.0_rc1-pkg-config.patch,
+ +mjpegtools-1.9.0_rc1.ebuild:
+ Version bumped.
20 Nov 2006; Matthias Schwarzott <zzam@gentoo.org>
+files/mjpegtools-1.8.0-no-jpeg-mmx.patch, mjpegtools-1.8.0-r1.ebuild,
MD5 d50c3cb88e659af5e2679530e645c0bf files/mjpegtools-1.8.0-pkg-config.patch 423
RMD160 2d3d55fb7561a9c0ceeb7ce880953cb12662489c files/mjpegtools-1.8.0-pkg-config.patch 423
SHA256 3b26122803c1ea805534308137323ee119fbc29777fa4a588ebe6dade0a8d490 files/mjpegtools-1.8.0-pkg-config.patch 423
+AUX mjpegtools-1.9.0_rc1-as-needed.patch 1015 RMD160 10c6f59d6a30c33d9ce18eab603b7faca5f238f6 SHA1 82c76d7caae15360ab11835b6667f63cfa8f2c89 SHA256 ee21d2d19e3eaa446d0c6708f496ea9b485da51d487863ea198c04d991e2a2b6
+MD5 8f77bff6eec4cc801c85063d5d13a238 files/mjpegtools-1.9.0_rc1-as-needed.patch 1015
+RMD160 10c6f59d6a30c33d9ce18eab603b7faca5f238f6 files/mjpegtools-1.9.0_rc1-as-needed.patch 1015
+SHA256 ee21d2d19e3eaa446d0c6708f496ea9b485da51d487863ea198c04d991e2a2b6 files/mjpegtools-1.9.0_rc1-as-needed.patch 1015
+AUX mjpegtools-1.9.0_rc1-lavrec-memleak.patch 2473 RMD160 fd6a6627659ab50f48d9f5c3d41c5239ed750820 SHA1 b9ced8e381bb6f8a2b407368e779640b278d226d SHA256 2256ebdbf69429d038908aef1d1e538c68f3d78318783ef57fb27845abf9875f
+MD5 a6641f75d761a01f78bc2bd478bb8c40 files/mjpegtools-1.9.0_rc1-lavrec-memleak.patch 2473
+RMD160 fd6a6627659ab50f48d9f5c3d41c5239ed750820 files/mjpegtools-1.9.0_rc1-lavrec-memleak.patch 2473
+SHA256 2256ebdbf69429d038908aef1d1e538c68f3d78318783ef57fb27845abf9875f files/mjpegtools-1.9.0_rc1-lavrec-memleak.patch 2473
+AUX mjpegtools-1.9.0_rc1-pkg-config.patch 436 RMD160 f81c036f402b6e409919a2c85c77ff22173cc35b SHA1 1f8e2ebc29872de35c0b82034f44313ea2ab9bf6 SHA256 2db469cf2d43961fef06db27cb3d4e0abf970008895471f82fc1eff09a619c1a
+MD5 a5a24e8026f477aa625d5a722859bde3 files/mjpegtools-1.9.0_rc1-pkg-config.patch 436
+RMD160 f81c036f402b6e409919a2c85c77ff22173cc35b files/mjpegtools-1.9.0_rc1-pkg-config.patch 436
+SHA256 2db469cf2d43961fef06db27cb3d4e0abf970008895471f82fc1eff09a619c1a files/mjpegtools-1.9.0_rc1-pkg-config.patch 436
DIST mjpegtools-1.8.0.tar.gz 1475998 RMD160 4d97a6a721f29223975605e2a5e645b4d7d129b5 SHA1 e11d68298a64b52f98724dbf3fd14f168e140290 SHA256 d841575c72cd0e587c1bab703d0906e3d23bf428424000557739cf5d6097209a
+DIST mjpegtools-1.9.0rc1.tar.gz 2339752 RMD160 403e5504f5de42ab043fe6a8dcb938a25eebefd4 SHA1 b6f4d4bb7669212b56faae9e4826856dfbe41e16 SHA256 50439edf61e58da8ef7143529bce86ed1f5a4711497bd5ea0f026ec9ec77ee81
DIST mjpegtools-m4-1.tar.bz2 4547 RMD160 b81b89bb6364023606a1d3ca9519e143fe053ab4 SHA1 4c69f9918dcc56fc544fef9af9aaed968da1ae67 SHA256 10de1e206ee9c84aae111e95f655ad9394be749bfed01d337f7ff9a983aab522
EBUILD mjpegtools-1.8.0-r1.ebuild 3221 RMD160 edac4c080eaa1becff9118220b141e7d855c2019 SHA1 1431cb62a4afa13966f4886d31cf01c3e8fd169c SHA256 a5f501d066ea78b67c61d774584a2d33beab05033fad58fa94b77d6d9733dfba
MD5 6e46772475aa320926fd58b6988f5cc1 mjpegtools-1.8.0-r1.ebuild 3221
MD5 4f11832f1f17f68336ee83a2288ec1a7 mjpegtools-1.8.0-r2.ebuild 2877
RMD160 131b226c8a3a8a0d2efeca6fd95c8fa383976b28 mjpegtools-1.8.0-r2.ebuild 2877
SHA256 0509f917817eefcd5d8823e380ce612ed5f7b9251daf63f2fb3508c5623b9abb mjpegtools-1.8.0-r2.ebuild 2877
-MISC ChangeLog 22378 RMD160 07ca5e314a9d3f103c1f047b72041636ecbdb2e7 SHA1 8fadc47269b682cafaa9098b39816d6f51710c3d SHA256 e50f69306bf72de9c6b376bb533e0c74bb642f2fcc4cfe3c59c012796c7bbc96
-MD5 1e3e198fb88a24eb5526bf9e137f01e6 ChangeLog 22378
-RMD160 07ca5e314a9d3f103c1f047b72041636ecbdb2e7 ChangeLog 22378
-SHA256 e50f69306bf72de9c6b376bb533e0c74bb642f2fcc4cfe3c59c012796c7bbc96 ChangeLog 22378
+EBUILD mjpegtools-1.9.0_rc1.ebuild 2648 RMD160 4e54402bc1ad6b5cb76eba9d7bd4e3a4a4b0bfd5 SHA1 845fd6e1eebc0001929431c5e78bcb83d52f0167 SHA256 ed21e3accb05ede28c56409166c550d633e48354a44f41bcc254a1e234f0ffdb
+MD5 5daca1015a363278039f92b71fc20d81 mjpegtools-1.9.0_rc1.ebuild 2648
+RMD160 4e54402bc1ad6b5cb76eba9d7bd4e3a4a4b0bfd5 mjpegtools-1.9.0_rc1.ebuild 2648
+SHA256 ed21e3accb05ede28c56409166c550d633e48354a44f41bcc254a1e234f0ffdb mjpegtools-1.9.0_rc1.ebuild 2648
+MISC ChangeLog 22666 RMD160 02f98ded586c8c5c8d2165ac47d5c50c2617a9b7 SHA1 1fcf60e4c2de7368f9cf8e61f5c3ed89404d74a5 SHA256 6429b8f3ae2f9af8aa6a79ffeb2479cee1064f5161a686907ad336c3fac6d3da
+MD5 51c41518b1d1e9173cc0577d2cba56c0 ChangeLog 22666
+RMD160 02f98ded586c8c5c8d2165ac47d5c50c2617a9b7 ChangeLog 22666
+SHA256 6429b8f3ae2f9af8aa6a79ffeb2479cee1064f5161a686907ad336c3fac6d3da ChangeLog 22666
MISC metadata.xml 311 RMD160 5d2d2fac1a97018f75e5ff1e8e7c90fb02511cb9 SHA1 228093feb5989936d0480ac2bc543df959b06dfa SHA256 74869f2267904c0a7409e16cc0d2e54f41b186683c4f5bb6e0127b275e66b4b0
MD5 fe49014257499366bdc6903a9aa33fe5 metadata.xml 311
RMD160 5d2d2fac1a97018f75e5ff1e8e7c90fb02511cb9 metadata.xml 311
MD5 1d7f555dfd98b8b2b6e1d05fb898002c files/digest-mjpegtools-1.8.0-r2 497
RMD160 9b325d098a5328604e081d42fe6633fe0036dd09 files/digest-mjpegtools-1.8.0-r2 497
SHA256 4b2cc5ce3875c7bd8e06e9dda7c0e3cc89ccd78dc4c8e163c42066537a25d175 files/digest-mjpegtools-1.8.0-r2 497
+MD5 ae07dab0fb1e284d05cda4e2e8c1c13d files/digest-mjpegtools-1.9.0_rc1 506
+RMD160 f2b9e82a7f9081ff36eb4b2e148831096a62dfa4 files/digest-mjpegtools-1.9.0_rc1 506
+SHA256 5df3e755ff44c837939791447daeba05b5c6b2d540d4ad5fca0b14e95cebd69d files/digest-mjpegtools-1.9.0_rc1 506
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.5 (GNU/Linux)
+Version: GnuPG v2.0.2 (GNU/Linux)
-iD8DBQFFYad8t2vP6XvVdOcRAijnAJ924sPdaIuiA2RImuxDo+yhLmGiMQCfWPmB
-m3ikJfvYnADvxcVu6yKcoes=
-=vHD8
+iD8DBQFF4hETt2vP6XvVdOcRAqs9AJ9UyTYEZ+bSN2a90C8QY/uaBHyeCQCg4318
+61/F8Q/WUtAYE6r69JRQ6sw=
+=kGSE
-----END PGP SIGNATURE-----
--- /dev/null
+MD5 35359d4e0947602f2851e7351f574ac9 mjpegtools-1.9.0rc1.tar.gz 2339752
+RMD160 403e5504f5de42ab043fe6a8dcb938a25eebefd4 mjpegtools-1.9.0rc1.tar.gz 2339752
+SHA256 50439edf61e58da8ef7143529bce86ed1f5a4711497bd5ea0f026ec9ec77ee81 mjpegtools-1.9.0rc1.tar.gz 2339752
+MD5 cd55f55ddd646eb79d4e4df99d4c777f mjpegtools-m4-1.tar.bz2 4547
+RMD160 b81b89bb6364023606a1d3ca9519e143fe053ab4 mjpegtools-m4-1.tar.bz2 4547
+SHA256 10de1e206ee9c84aae111e95f655ad9394be749bfed01d337f7ff9a983aab522 mjpegtools-m4-1.tar.bz2 4547
--- /dev/null
+diff -ru mjpegtools-1.8.0-orig/lavtools/Makefile.am mjpegtools-1.8.0/lavtools/Makefile.am
+--- mjpegtools-1.8.0-orig/lavtools/Makefile.am 2006-08-25 15:09:51.542109878 +0200
++++ mjpegtools-1.8.0/lavtools/Makefile.am 2006-08-25 15:11:37.920337695 +0200
+@@ -51,10 +51,17 @@
+ liblavrec_la_SOURCES = liblavrec.c audiolib.c frequencies.c
+ liblavrec_la_CPPFLAGS = $(AM_CPPFLAGS) # so automake doesn't complain about audiolib & frequencies
+ liblavrec_la_LDFLAGS = $(LAV_ALL_LIB_OPTS)
++liblavrec_la_LIBADD = -llavfile -llavjpeg
++liblavrec_la_DEPENDENCIES = liblavfile.la liblavjpeg.la
+
+ liblavplay_la_SOURCES = liblavplay.c audiolib.c
+ liblavplay_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDV_CFLAGS) $(X_CFLAGS)
+ liblavplay_la_LDFLAGS = $(LAV_ALL_LIB_OPTS)
++liblavplay_la_LIBADD = -llavfile $(SDL_LIBS) -llavjpeg
++liblavplay_la_DEPENDENCIES = liblavfile.la liblavjpeg.la
++if HAVE_X
++ liblavplay_la_LIBADD += $(X_LIBS) -lX11
++endif
+
+ # *********************************************************************
+ # The tools themselves
--- /dev/null
+--- mjpegtools-1.8.0/lavtools/lav_io.c 2005-08-27 13:47:20.000000000 +0200
++++ mjpegtools-1.8.0___fixed/lavtools/lav_io.c 2006-05-14 05:45:48.000000000 +0200
+@@ -540,15 +540,12 @@
+
+ int lav_write_audio(lav_file_t *lav_file, uint8_t *buff, long samps)
+ {
+- int res;
++ int res = -1;
+ #ifdef HAVE_LIBQUICKTIME
+ int i, j;
+- int16_t *qt_audio = (int16_t *)buff, **qt_audion;
++ int16_t *buff16 = (int16_t *)buff, **qt_audion;
+ int channels = lav_audio_channels(lav_file);
+-
+- qt_audion = malloc(channels * sizeof (int16_t **));
+- for (i = 0; i < channels; i++)
+- qt_audion[i] = (int16_t *)malloc(samps * lav_file->bps);
++ int bits = lav_audio_bits(lav_file);
+ #endif
+
+ video_format = lav_file->format; internal_error = 0; /* for error messages */
+@@ -557,24 +554,43 @@
+ {
+ case 'a':
+ case 'A':
+- res = AVI_write_audio( lav_file->avi_fd, buff, samps*lav_file->bps);
++ res = AVI_write_audio(lav_file->avi_fd, buff, samps*lav_file->bps);
+ break;
+ #ifdef HAVE_LIBQUICKTIME
+ case 'q':
+- /* Deinterleave the audio into the two channels. */
+- for (i = 0; i < samps; i++)
+- {
+- for (j = 0; j < channels; j++)
+- qt_audion[j][i] = qt_audio[(channels*i) + j];
+- }
+- res = lqt_encode_audio_track(lav_file->qt_fd, qt_audion, NULL,samps,0);
+- for (j = 0; j < channels; j++)
+- free(qt_audion[j]);
+- free(qt_audion);
+- break;
++ if (bits != 16 || channels > 1)
++ {
++ /* Deinterleave the audio into the two channels and/or convert
++ * bits per sample to the required format.
++ */
++ qt_audion = malloc(channels * sizeof(*qt_audion));
++ for (i = 0; i < channels; i++)
++ qt_audion[i] = malloc(samps * sizeof(**qt_audion));
++
++ if (bits == 16)
++ for (i = 0; i < samps; i++)
++ for (j = 0; j < channels; j++)
++ qt_audion[j][i] = buff16[channels * i + j];
++ else
++ if (bits == 8)
++ for (i = 0; i < samps; i++)
++ for (j = 0; j < channels; j++)
++ qt_audion[j][i] = ((int16_t)(buff[channels * i + j]) << 8) ^ 0x8000;
++
++ if (bits == 8 || bits == 16)
++ res = lqt_encode_audio_track(lav_file->qt_fd, qt_audion, NULL, samps, 0);
++
++ for (i = 0; i < channels; i++)
++ free(qt_audion[i]);
++ free(qt_audion);
++ } else {
++ qt_audion = &buff16;
++ res = lqt_encode_audio_track(lav_file->qt_fd, qt_audion, NULL, samps, 0);
++ }
++ break;
+ #endif
+ default:
+- res = -1;
++ break;
+ }
+
+ return res;
--- /dev/null
+diff -ru mjpegtools-1.8.0-orig/configure.ac mjpegtools-1.8.0/configure.ac
+--- mjpegtools-1.8.0-orig/configure.ac 2006-08-20 20:39:40.719351212 +0200
++++ mjpegtools-1.8.0/configure.ac 2006-08-20 20:20:43.652651808 +0200
+@@ -233,6 +233,8 @@
+ AC_SUBST(JPEG_LIBS)
+ AC_SUBST(JPEG_CFLAGS)
+
++PKG_PROG_PKG_CONFIG
++
+ have_libquicktime=false
+ if test x$with_libquicktime != xno ; then
+ PKG_CHECK_MODULES(LIBQUICKTIME, [libquicktime >= 0.9.7],
--- /dev/null
+# Copyright 1999-2007 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_rc1.ebuild,v 1.1 2007/02/25 22:43:21 zzam Exp $
+
+WANT_AUTOMAKE="latest"
+WANT_AUTOCONF="latest"
+
+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
+ mirror://gentoo/${PN}-m4-1.tar.bz2"
+
+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
+ gtk? ( >=x11-libs/gtk+-2.0 )
+ 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
+ )
+ virtual/x11
+ )
+ )"
+
+DEPEND="${RDEPEND}
+ mmx? ( dev-lang/nasm )
+ >=sys-apps/sed-4
+ dev-util/pkgconfig"
+
+S="${WORKDIR}/${MY_P}"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ epatch "${FILESDIR}/${P}-pkg-config.patch"
+ epatch "${FILESDIR}/${P}-as-needed.patch"
+ epatch "${FILESDIR}/${P}-lavrec-memleak.patch"
+
+ # eautoreconf instead of elibtoolize
+ # as pkg-config-patch changes configure.in
+ #
+ # use m4-files from additional tarball as mjpegtools the fails if
+ # package providing m4-file is not installed
+ AT_M4DIR=${WORKDIR}/m4 eautoreconf
+
+ sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure
+}
+
+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 README.AltiVec README.avilib \
+ README.DV README.glav README.lavpipe README.transist TODO \
+ HINTS BUGS ChangeLog AUTHORS CHANGES
+}