# 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.122 2006/11/03 16:27:53 zzam Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/mjpegtools/ChangeLog,v 1.123 2006/11/19 17:22:56 zzam Exp $
+
+*mjpegtools-1.8.0-r2 (19 Nov 2006)
+
+ 19 Nov 2006; Matthias Schwarzott <zzam@gentoo.org>
+ +files/mjpegtools-1.8.0-fix-lav2mpeg.patch,
+ +files/mjpegtools-1.8.0-lavrec-memleak.patch, +mjpegtools-1.8.0-r2.ebuild:
+ Added fixes for various bugs (#152568, #128404 and #137530).
03 Nov 2006; Matthias Schwarzott <zzam@gentoo.org>
mjpegtools-1.8.0-r1.ebuild:
MD5 8f77bff6eec4cc801c85063d5d13a238 files/mjpegtools-1.8.0-as-needed.patch 1015
RMD160 10c6f59d6a30c33d9ce18eab603b7faca5f238f6 files/mjpegtools-1.8.0-as-needed.patch 1015
SHA256 ee21d2d19e3eaa446d0c6708f496ea9b485da51d487863ea198c04d991e2a2b6 files/mjpegtools-1.8.0-as-needed.patch 1015
+AUX mjpegtools-1.8.0-fix-lav2mpeg.patch 917 RMD160 de3d13fec902f188459273d46f45ac7bc2796462 SHA1 8a6c749baf4c76c1ae4b677d3d9cac3c260863eb SHA256 7e77c9e7f6fbc13f2bfc6d64a1c8521d40112db09b6f1d47b87b1d74146786ad
+MD5 51efcd77e826efed19bf40a1f1863c1f files/mjpegtools-1.8.0-fix-lav2mpeg.patch 917
+RMD160 de3d13fec902f188459273d46f45ac7bc2796462 files/mjpegtools-1.8.0-fix-lav2mpeg.patch 917
+SHA256 7e77c9e7f6fbc13f2bfc6d64a1c8521d40112db09b6f1d47b87b1d74146786ad files/mjpegtools-1.8.0-fix-lav2mpeg.patch 917
AUX mjpegtools-1.8.0-gcc41.patch 420 RMD160 e48e6d716f21e450cc26e7039c703005ed9a0bd9 SHA1 b1bd9604fa0eb6c8b54ee9d0836b0c61b233ffff SHA256 5e748deceb1af3179025ab42d274cc2941fe85bb0b7b512b49263a9ff6754446
MD5 803eccd889c60a442ee23ba65951fadc files/mjpegtools-1.8.0-gcc41.patch 420
RMD160 e48e6d716f21e450cc26e7039c703005ed9a0bd9 files/mjpegtools-1.8.0-gcc41.patch 420
SHA256 5e748deceb1af3179025ab42d274cc2941fe85bb0b7b512b49263a9ff6754446 files/mjpegtools-1.8.0-gcc41.patch 420
+AUX mjpegtools-1.8.0-lavrec-memleak.patch 2473 RMD160 fd6a6627659ab50f48d9f5c3d41c5239ed750820 SHA1 b9ced8e381bb6f8a2b407368e779640b278d226d SHA256 2256ebdbf69429d038908aef1d1e538c68f3d78318783ef57fb27845abf9875f
+MD5 a6641f75d761a01f78bc2bd478bb8c40 files/mjpegtools-1.8.0-lavrec-memleak.patch 2473
+RMD160 fd6a6627659ab50f48d9f5c3d41c5239ed750820 files/mjpegtools-1.8.0-lavrec-memleak.patch 2473
+SHA256 2256ebdbf69429d038908aef1d1e538c68f3d78318783ef57fb27845abf9875f files/mjpegtools-1.8.0-lavrec-memleak.patch 2473
AUX mjpegtools-1.8.0-libquicktime.patch 1186 RMD160 125fe4cfdecb5b98480d45670e3cb6d84f894c4f SHA1 205138f34d665174cb8f323669b8aa0ee4eb7785 SHA256 abf3043efbcdb29af2ee1b2a2e0b92b948a740d377d8e534635eb8599e6fb386
MD5 f24ed418a30be9f6a3c581312ff2137f files/mjpegtools-1.8.0-libquicktime.patch 1186
RMD160 125fe4cfdecb5b98480d45670e3cb6d84f894c4f files/mjpegtools-1.8.0-libquicktime.patch 1186
MD5 62dbd56ea57eca711a4bfa40a47b6cd3 mjpegtools-1.8.0-r1.ebuild 3155
RMD160 0fc8ecb1fcce183b0eedc799e6133f9bf5d12ae6 mjpegtools-1.8.0-r1.ebuild 3155
SHA256 b6362d20b5726421e37f75c4444abc3c4950d2290482eae4ab5bedd8a2a820c4 mjpegtools-1.8.0-r1.ebuild 3155
-MISC ChangeLog 21731 RMD160 057a0a5b10a59e733172d2a453cee1ca7338d207 SHA1 25e5d38a9570a5c0d1bce6d6f1303f0d1e0796b8 SHA256 18f1cb13a766b52787a2f9688f110e0073824a388f7667b80814516c48a6131f
-MD5 62e5a7fd2bf4df3456732a9933eb3143 ChangeLog 21731
-RMD160 057a0a5b10a59e733172d2a453cee1ca7338d207 ChangeLog 21731
-SHA256 18f1cb13a766b52787a2f9688f110e0073824a388f7667b80814516c48a6131f ChangeLog 21731
+EBUILD mjpegtools-1.8.0-r2.ebuild 2809 RMD160 2233b82fb042b5976633adde1ad3c5bbbaf4251e SHA1 0cc918e182dd89a61bc98cf4edbb7143d2b52cbc SHA256 be302c170a99c6431a598e0754f66075bd57ee79a86b57c8086f7e949abb1a56
+MD5 f547088b082bf9438aee582085e34d07 mjpegtools-1.8.0-r2.ebuild 2809
+RMD160 2233b82fb042b5976633adde1ad3c5bbbaf4251e mjpegtools-1.8.0-r2.ebuild 2809
+SHA256 be302c170a99c6431a598e0754f66075bd57ee79a86b57c8086f7e949abb1a56 mjpegtools-1.8.0-r2.ebuild 2809
+MISC ChangeLog 22007 RMD160 b49c41b96ac990ce186c67bdc86b5dcbd0430b5f SHA1 ccf1556a0359f835e8adfb36861d229099cdeb77 SHA256 61d6ff6b552a2058dff9b42371f4dd619744896f76b14bae4ddedc886c6cd76f
+MD5 680fd6b1098a681117647fb95786fc0a ChangeLog 22007
+RMD160 b49c41b96ac990ce186c67bdc86b5dcbd0430b5f ChangeLog 22007
+SHA256 61d6ff6b552a2058dff9b42371f4dd619744896f76b14bae4ddedc886c6cd76f ChangeLog 22007
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-r1 497
RMD160 9b325d098a5328604e081d42fe6633fe0036dd09 files/digest-mjpegtools-1.8.0-r1 497
SHA256 4b2cc5ce3875c7bd8e06e9dda7c0e3cc89ccd78dc4c8e163c42066537a25d175 files/digest-mjpegtools-1.8.0-r1 497
+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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
-iD8DBQFFTbzRamhnQswr0vIRAnlMAKCK5yXPvWQRgCT63+3UY/Fy5VjCNgCfU1Vh
-ptO1WmNvYtVnAoRqIEbI280=
-=QP3j
+iD8DBQFFYJMDt2vP6XvVdOcRAn1oAKDXdxbN/Hx6Axtlj4krCv1TeoBkAwCggL+z
+b1mBX1OL5+H3uaLJMwIHcRI=
+=eGU0
-----END PGP SIGNATURE-----
--- /dev/null
+MD5 6fd98362310480bdaf7171e9659f165f mjpegtools-1.8.0.tar.gz 1475998
+RMD160 4d97a6a721f29223975605e2a5e645b4d7d129b5 mjpegtools-1.8.0.tar.gz 1475998
+SHA256 d841575c72cd0e587c1bab703d0906e3d23bf428424000557739cf5d6097209a mjpegtools-1.8.0.tar.gz 1475998
+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/scripts/lav2mpeg mjpegtools-1.8.0-fixed-lav2mpeg/scripts/lav2mpeg
+--- mjpegtools-1.8.0-orig/scripts/lav2mpeg 2006-11-19 17:11:41.000000000 +0100
++++ mjpegtools-1.8.0-fixed-lav2mpeg/scripts/lav2mpeg 2006-11-19 17:22:21.000000000 +0100
+@@ -267,7 +267,8 @@
+
+ # lavinfo should set up video_frames, video_width
+ # video_height, video_inter, video_norm, audio_chans
+-eval $($LAVINFO $@ | grep "=") # grep for = to remove Warnings
++# Add backslashes to protect contained spaces
++eval $($LAVINFO $@ | grep "=" | sed -e 's: :\\ :g') # grep for = to remove Warnings
+ if [ "$video_frames" == "" ]; then
+ logIt "'lavinfo $@' died! exiting"
+ logIt " maybe you don't have lavinfo. or your input flags were wrong"
+@@ -401,7 +402,7 @@
+ fi
+ fi
+
+-if [ $video_inter -eq 1 ]; then
++if [[ ${video_inter/interlacing/} != ${video_inter} ]]; then
+ yuvdenoise_flags="$yuvdenoise_flags -F"
+ fi
+
--- /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
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/mjpegtools/mjpegtools-1.8.0-r2.ebuild,v 1.1 2006/11/19 17:22:56 zzam Exp $
+
+WANT_AUTOMAKE="latest"
+WANT_AUTOCONF="latest"
+
+inherit flag-o-matic toolchain-funcs eutils libtool autotools
+
+DESCRIPTION="Tools for MJPEG video"
+HOMEPAGE="http://mjpeg.sourceforge.net/"
+SRC_URI="mirror://sourceforge/mjpeg/${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"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ epatch "${FILESDIR}/${P}-gcc41.patch"
+ epatch "${FILESDIR}/${P}-parallelmake.patch"
+ epatch "${FILESDIR}/${P}-pkg-config.patch"
+ epatch "${FILESDIR}/${P}-as-needed.patch"
+ has_version ">=media-libs/libquicktime-0.9.9" && epatch "${FILESDIR}/${P}-libquicktime.patch"
+ epatch "${FILESDIR}/${P}-fix-lav2mpeg.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 \
+ ${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
+}