# $Header: /magellan-cvs/smage/mjpegtools/mjpegtools-1.8.0-r2.smage2,v 1.1 2008/04/03 18:28:22 niro Exp $ PNAME="mjpegtools" PVER="1.8.0" PBUILD="r2" PCATEGORIE="media-video" STATE="unstable" DESCRIPTION="Programs for MJPEG recording and playback." HOMEPAGE="http://mjpeg.sourceforge.net/" DEPEND=">= media-libs/libpng-1.2 >= media-libs/libjpeg-6b >= media-libs/libsdl-1.2 >= x11-libs/gtk2+-2 >= x11-libs/libX11-1 >= x11-libs/libXt-1" SDEPEND=">= dev-lang/nasm-0.98 >= dev-util/pkgconfig-0.15.0 >= sys-apps/sed-4" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mbuild mtools SRC_URI=( sourceforge://mjpeg/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-${PVER}-gcc41.patch mirror://${PNAME}/${PNAME}-${PVER}-parallelmake.patch mirror://${PNAME}/${PNAME}-${PVER}-pkgconfig.patch mirror://${PNAME}/${PNAME}-${PVER}-as-needed.patch mirror://${PNAME}/${PNAME}-${PVER}-fix-lav2mpeg.patch mirror://${PNAME}/${PNAME}-${PVER}-lavrec-memleak.patch mirror://${PNAME}/${PNAME}-${PVER}-no-jpeg-mmx.patch ) src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # fix gcc build issues mpatch ${PNAME}-${PVER}-gcc41.patch || die # fix parallel make mpatch ${PNAME}-${PVER}-parallelmake.patch || die # fix missing pkgconfig mpatch ${PNAME}-${PVER}-pkgconfig.patch || die # fix as-needed mpatch ${PNAME}-${PVER}-as-needed.patch || die # fix some bugs mpatch ${PNAME}-${PVER}-fix-lav2mpeg.patch || die mpatch ${PNAME}-${PVER}-lavrec-memleak.patch || die # fix hardcoded mmx mpatch ${PNAME}-${PVER}-no-jpeg-mmx.patch || die # rebuild configure autoreconf --install --force || die # do not use any hardcoded cflags sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure || die } src_compile() { cd ${SRCDIR} mconfigure \ --with-x \ --with-libpng \ --with-v4l \ --with-gtk \ --with-sdl \ --enable-xfree-ext \ --enable-simd-accel \ --enable-largefile \ --without-jpeg-mmx \ || die mmake || die } src_install () { cd ${SRCDIR} minstall || die minstalldocs AUTHORS ChangeLog Copyright LICENSE README || die }