# $Header: /magellan-cvs/smage/smpeg/smpeg-0.4.4-r9.smage2,v 1.1 2008/03/23 23:48:50 niro Exp $ PNAME="smpeg" PVER="0.4.4" PBUILD="r9" PCATEGORIE="media-libs" STATE="unstable" DESCRIPTION="SDL MPEG library." HOMEPAGE="http://www.lokigames.com/development/smpeg.php3" DEPEND=">= media-libs/libsdl-1.2.13 >= virtual/opengl >= x11-libs/libXext-1 >= x11-libs/libXi-1 >= x11-libs/libX11-1" SDEPEND=">= sys-apps/sed-4" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mbuild SRC_URI=( mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-${PVER}-m4-underquoted.patch mirror://${PNAME}/${PNAME}-${PVER}-libstdc++.patch mirror://${PNAME}/${PNAME}-${PVER}-gnu-stack.patch mirror://${PNAME}/${PNAME}-${PVER}-config.patch mirror://${PNAME}/${PNAME}-${PVER}-pic.patch mirror://${PNAME}/${PNAME}-${PVER}-gcc41.patch mirror://${PNAME}/${PNAME}-${PVER}-cflags.patch mirror://${PNAME}/${PNAME}-${PVER}-mmx.patch mirror://${PNAME}/${PNAME}-${PVER}-missing-init.patch ) src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # fixes m4 warnings mpatch ${PNAME}-${PVER}-m4-underquoted.patch || die # changes linking from using g++ to gcc and then makes gcc use libstdc++ # see http://lists.libsdl.org/pipermail/sdl-libsdl.org/2002-August/029943.html mpatch ${PNAME}-${PVER}-libstdc++.patch || die # non-executable gnu stack marking for libsmpeg.so mpatch ${PNAME}-${PVER}-gnu-stack.patch || die # only dump -L/-rpath if libdir is non-standard mpatch ${PNAME}-${PVER}-config.patch || die # fixes textrels in mmx asm code mpatch ${PNAME}-${PVER}-pic.patch || die # fixes build issues with gcc-4.1 mpatch ${PNAME}-${PVER}-gcc41.patch || die # fixes CFLAGS handling; also supports newer autotools mpatch ${PNAME}-${PVER}-cflags.patch || die # fixes undefined references to cpu_flags and IDCT_mmx mpatch ${PNAME}-${PVER}-mmx.patch || die # fixes segfaults when opening non exisiting files mpatch ${PNAME}-${PVER}-missing-init.patch || die autoreconf --install --force || die } src_compile() { cd ${SRCDIR} mconfigure \ --disable-debug \ --disable-assertions \ --disable-gtk-player \ --with-x \ --enable-opengl-player \ --enable-mmx \ || die mmake || die }