# $Id$ PNAME="libwmf" PVER="0.2.8.4" PBUILD="r11" PCAT="media-libs" DESCRIPTION="Library for converting WMF files." HOMEPAGE="http://wvware.sourceforge.net/" DEPEND=">= x11-libs/libICE-1 >= x11-libs/libSM-1.2 >= x11-libs/libX11-1.6 >= x11-libs/gdk-pixbuf-2.36 >= dev-libs/libxml2-2.9 >= media-libs/freetype-2.6 >= sys-libs/zlib-1.2.8 >= media-libs/libpng-1.5 >= virtual/libjpeg >= app-text/ghostscript-gpl-9" SDEPEND=">= dev-util/pkgconfig-0.25 >= x11-libs/libXt-1.1 >= x11-libs/libXpm-3" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mbuild SRC_URI=( sourceforge://wvware/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-${PVER}-intoverflow.patch mirror://${PNAME}/${PNAME}-${PVER}-build.patch mirror://${PNAME}/${PNAME}-${PVER}-pngfix.patch mirror://${PNAME}/${PNAME}-${PVER}-libpng-1.5.patch mirror://${PNAME}/${PNAME}-${PVER}-gdk-pixbuf.patch mirror://${PNAME}/${PNAME}-${PVER}-useafterfree-CVE-2009-1364.patch mirror://${PNAME}/${PNAME}-${PVER}-CAN-2004-0941.patch mirror://${PNAME}/${PNAME}-${PVER}-CVE-2007-0455.patch mirror://${PNAME}/${PNAME}-${PVER}-CVE-2007-2756.patch mirror://${PNAME}/${PNAME}-${PVER}-CVE-2007-3472.patch mirror://${PNAME}/${PNAME}-${PVER}-CVE-2007-3473.patch mirror://${PNAME}/${PNAME}-${PVER}-CVE-2007-3477.patch mirror://${PNAME}/${PNAME}-${PVER}-CVE-2009-3546.patch mirror://${PNAME}/${PNAME}-${PVER}-CVE-2015-0848+CVE-2015-4588.patch mirror://${PNAME}/${PNAME}-${PVER}-CVE-2015-4695.patch mirror://${PNAME}/${PNAME}-${PVER}-CVE-2015-4696.patch mirror://${PNAME}/${PNAME}-${PVER}-CVE-2016-9011.patch ) UP2DATE="updatecmd_sourceforge wvware ${PNAME} - ${PNAME}" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} mpatch ${PNAME}-${PVER}-intoverflow.patch || die mpatch ${PNAME}-${PVER}-build.patch || die mpatch ${PNAME}-${PVER}-pngfix.patch || die mpatch ${PNAME}-${PVER}-libpng-1.5.patch || die mpatch ${PNAME}-${PVER}-gdk-pixbuf.patch || die mpatch ${PNAME}-${PVER}-useafterfree-CVE-2009-1364.patch || die mpatch ${PNAME}-${PVER}-CAN-2004-0941.patch || die mpatch ${PNAME}-${PVER}-CVE-2007-0455.patch || die mpatch ${PNAME}-${PVER}-CVE-2007-2756.patch || die mpatch ${PNAME}-${PVER}-CVE-2007-3472.patch || die mpatch ${PNAME}-${PVER}-CVE-2007-3473.patch || die mpatch ${PNAME}-${PVER}-CVE-2007-3477.patch || die mpatch ${PNAME}-${PVER}-CVE-2009-3546.patch || die mpatch ${PNAME}-${PVER}-CVE-2015-0848+CVE-2015-4588.patch || die mpatch ${PNAME}-${PVER}-CVE-2015-4695.patch || die mpatch ${PNAME}-${PVER}-CVE-2015-4696.patch || die mpatch ${PNAME}-${PVER}-CVE-2016-9011.patch || die libtoolize --verbose --install --force || die mautoreconf || die } src_compile() { cd ${SRCDIR} mconfigure \ --with-gsfontdir=/usr/share/ghostscript/fonts \ --with-fontdir=/usr/share/libwmf/fonts/ \ --with-docdir=/usr/share/doc/${PNAME}-${PVER} \ --disable-gd \ --with-sys-gd \ --with-libxml2 \ || die mmake || die } src_install() { cd ${SRCDIR} mmake DESTDIR=${BINDIR} \ fontdir=/usr/share/libwmf/fonts \ wmfonedocdir=/usr/share/doc/${PNAME}-${PVER}/caolan \ wmfdocdir=/usr/share/doc/${PNAME}-${PVER} \ install || die minstalldocs README AUTHORS COPYING CREDITS ChangeLog NEWS TODO || die }