# $Id$ PNAME="libjasper" PVER="1.900.1" PBUILD="r5" PCAT="media-libs" DESCRIPTION="A software-based implementation of the codec specified in the emerging JPEG-2000 Part-1 standard." HOMEPAGE="http://www.ece.uvic.ca/~mdadams/jasper/" DEPEND=">= virtual/opengl >= virtual/glut >= media-libs/libjpeg-8" SDEPEND=">= app-arch/unzip-5" SRCFILE="${PNAME/lib}-${PVER}.zip" SRCDIR="${BUILDDIR}/${PNAME/lib}-${PVER}" sminclude multilib SRC_URI=( http://www.ece.uvic.ca/~mdadams/jasper/software/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-${PVER}-fixes-20081208.patch ) UP2DATE="updatecmd ${HOMEPAGE} | grep ${PNAME/lib}- | sed 's/.*-\(.*\).zip.*/\1/;q'" src_prepare() { # must use mesa as opengl-headers! [[ $(opengl-update --get-implementation) != xorg ]] && die "please change to xorg opengl-headers: opengl-update xorg" munpack ${SRCFILE} || die # fixes serveral issues mpatch ${PNAME}-${PVER}-fixes-20081208.patch || die } src_compile() { mconfigure --enable-shared --enable-libjpeg --enable-opengl || die mmake || die }