# $Id$ PNAME="libmpeg3" PVER="1.8" PBUILD="r1" PCATEGORIE="media-libs" STATE="unstable" DESCRIPTION="The MPEG Library - version 3." HOMEPAGE="http://heroinewarrior.com/libmpeg3.php3" DEPEND=">= sys-libs/zlib-1.2 >= media-libs/libjpeg-6b >= media-libs/a52dec-0.7" SDEPEND=">= dev-lang/nasm-0.98" SRCFILE="${PNAME}-${PVER}-src.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mbuild mtools SRC_URI=( sourceforge://heroines/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-1.7-autoconf.patch mirror://${PNAME}/${PNAME}-1.7-textrel.patch mirror://${PNAME}/${PNAME}-1.7-gnustack.patch mirror://${PNAME}/${PNAME}-1.7-gcc4.patch mirror://${PNAME}/${PNAME}-1.7-pthread.patch mirror://${PNAME}/${PNAME}-1.7-mpeg3split.patch mirror://${PNAME}/${PNAME}-1.7-a52.patch mirror://${PNAME}/${PNAME}-1.7-fix-includes.patch ) UP2SUBSTITUTE="src" UP2DATE="updatecmd_sourceforge heroines releases - ${PNAME}" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # enable autoconf (-Np1 is neccessary) mpatch -Np1 ${PNAME}-1.7-autoconf.patch || die # fix hardcoded versions in the ac patch sed -i -e "s:^AM_INIT_AUTOMAKE(libmpeg3, 1.7):AM_INIT_AUTOMAKE(libmpeg3, ${PVER}):" \ -e "s:^AC_INIT([libmpeg3], [1.7], [mail]):AC_INIT([libmpeg3], [${PVER}], [mail]):" \ configure.ac || die sed -i "s:-release 1.7:-release ${PVER}:" Makefile.am || die # fixes textrels mpatch ${PNAME}-1.7-textrel.patch || die # fixes gnustack mpatch ${PNAME}-1.7-gnustack.patch || die # fixes gcc4 issues mpatch ${PNAME}-1.7-gcc4.patch || die # missing pthread include mpatch ${PNAME}-1.7-pthread.patch || die # fixes missing include mpatch ${PNAME}-1.7-mpeg3split.patch || die # fixes wrong include location mpatch ${PNAME}-1.7-a52.patch || die # rebuild configure autoreconf --verbose --install --force || die } src_compile() { cd ${SRCDIR} # css support is only fake, use libcss instead! mconfigure --enable-mmx --disable-css || die mmake || die } src_install () { cd ${SRCDIR} mmake DESTDIR=${BINDIR} install || die minstalldocs COPYING || die # fix headers to use global includes # patching done in src_install or all wants to be rebuilt cd ${BINDIR}/usr/include/libmpeg3 mpatch ${PNAME}-1.7-fix-includes.patch || die }