diff options
author | Matthias Schwarzott <zzam@gentoo.org> | 2007-02-25 22:43:21 +0000 |
---|---|---|
committer | Matthias Schwarzott <zzam@gentoo.org> | 2007-02-25 22:43:21 +0000 |
commit | bc18457e82aafed71b691c8c9cb5e8a2f8f8377f (patch) | |
tree | 2fdcd5466ae7ff5617722fdcfd69dbb25bd399e6 /media-video/mjpegtools | |
parent | Dropped old version. Corrected dependencies, added examples USE-flag, cleanup. (diff) | |
download | gentoo-2-bc18457e82aafed71b691c8c9cb5e8a2f8f8377f.tar.gz gentoo-2-bc18457e82aafed71b691c8c9cb5e8a2f8f8377f.tar.bz2 gentoo-2-bc18457e82aafed71b691c8c9cb5e8a2f8f8377f.zip |
Version bumped.
(Portage version: 2.1.2-r11)
Diffstat (limited to 'media-video/mjpegtools')
6 files changed, 232 insertions, 2 deletions
diff --git a/media-video/mjpegtools/ChangeLog b/media-video/mjpegtools/ChangeLog index 1b577b66c9fe..35d4b85e7747 100644 --- a/media-video/mjpegtools/ChangeLog +++ b/media-video/mjpegtools/ChangeLog @@ -1,6 +1,15 @@ # 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, diff --git a/media-video/mjpegtools/files/digest-mjpegtools-1.9.0_rc1 b/media-video/mjpegtools/files/digest-mjpegtools-1.9.0_rc1 new file mode 100644 index 000000000000..8f5a281faf25 --- /dev/null +++ b/media-video/mjpegtools/files/digest-mjpegtools-1.9.0_rc1 @@ -0,0 +1,6 @@ +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 diff --git a/media-video/mjpegtools/files/mjpegtools-1.9.0_rc1-as-needed.patch b/media-video/mjpegtools/files/mjpegtools-1.9.0_rc1-as-needed.patch new file mode 100644 index 000000000000..d08ac625cbe6 --- /dev/null +++ b/media-video/mjpegtools/files/mjpegtools-1.9.0_rc1-as-needed.patch @@ -0,0 +1,21 @@ +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 diff --git a/media-video/mjpegtools/files/mjpegtools-1.9.0_rc1-lavrec-memleak.patch b/media-video/mjpegtools/files/mjpegtools-1.9.0_rc1-lavrec-memleak.patch new file mode 100644 index 000000000000..47705044ebdb --- /dev/null +++ b/media-video/mjpegtools/files/mjpegtools-1.9.0_rc1-lavrec-memleak.patch @@ -0,0 +1,78 @@ +--- 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; diff --git a/media-video/mjpegtools/files/mjpegtools-1.9.0_rc1-pkg-config.patch b/media-video/mjpegtools/files/mjpegtools-1.9.0_rc1-pkg-config.patch new file mode 100644 index 000000000000..512206ce060f --- /dev/null +++ b/media-video/mjpegtools/files/mjpegtools-1.9.0_rc1-pkg-config.patch @@ -0,0 +1,12 @@ +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], diff --git a/media-video/mjpegtools/mjpegtools-1.9.0_rc1.ebuild b/media-video/mjpegtools/mjpegtools-1.9.0_rc1.ebuild new file mode 100644 index 000000000000..deb2a84ee249 --- /dev/null +++ b/media-video/mjpegtools/mjpegtools-1.9.0_rc1.ebuild @@ -0,0 +1,104 @@ +# 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 +} |