# $Header: /magellan-cvs/smage/libmpeg3/libmpeg3-1.7-r2.smage2,v 1.1 2008/04/03 21:01:08 niro Exp $ PNAME="libmpeg3" PVER="1.7" PBUILD="r2" 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}-${PVER}-autoconf.patch mirror://${PNAME}/${PNAME}-${PVER}-textrel.patch mirror://${PNAME}/${PNAME}-${PVER}-gnustack.patch mirror://${PNAME}/${PNAME}-${PVER}-gcc4.patch mirror://${PNAME}/${PNAME}-${PVER}-pthread.patch mirror://${PNAME}/${PNAME}-${PVER}-mpeg3split.patch mirror://${PNAME}/${PNAME}-${PVER}-a52.patch mirror://${PNAME}/${PNAME}-${PVER}-fix-includes.patch ) src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # enable autoconf (-Np1 is neccessary) mpatch -Np1 ${PNAME}-${PVER}-autoconf.patch || die # fixes textrels mpatch ${PNAME}-${PVER}-textrel.patch || die # fixes gnustack mpatch ${PNAME}-${PVER}-gnustack.patch || die # fixes gcc4 issues mpatch ${PNAME}-${PVER}-gcc4.patch || die # missing pthread include mpatch ${PNAME}-${PVER}-pthread.patch || die # fixes missing include mpatch ${PNAME}-${PVER}-mpeg3split.patch || die # fixes wrong include location mpatch ${PNAME}-${PVER}-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}-${PVER}-fix-includes.patch || die }