# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header:$ inherit flag-o-matic #toolchain-funcs DESCRIPTION="GIMP plug-in with G'MIC large number of predefined filters" HOMEPAGE="http://gmic.sourceforge.net/gimp.shtml" SRC_URI="mirror://sourceforge/gmic/gmic_${PV}.tar.gz" LICENSE="CeCILL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" RDEPEND=">=media-gfx/gimp-2.4.0" DEPEND="${RDEPEND} media-gfx/imagemagick sci-libs/fftw sys-libs/zlib" S="${WORKDIR}/gmic-${PV}/src" pkg_setup() { if ! built_with_use media-gfx/gimp tiff; then eerror "You need to build gimp with tiff support before installing ${PN}" die "Building ${PN} requires gimp to ve built with tiff support." fi if ! built_with_use media-gfx/gimp png; then eerror "You need to build gimp with png support before installing ${PN}" die "Building ${PN} requires gimp to ve built with png support." fi if ! built_with_use media-gfx/gimp jpeg; then eerror "You need to build gimp with jpeg support before installing ${PN}" die "Building ${PN} requires gimp to ve built with jpeg support." fi } src_unpack() { unpack ${A} # sed -i -e "s:plugins/../CImg.h:CImg.h:" "${S}"/greycstoration4gimp.cpp || die "sed failed" # if use smp ; then # sed -i -e "s:^#define NTHREADS 1:#define NTHREADS 4:" "${S}"/greycstoration4gimp.cpp || die "sed failed" # fi } src_compile() { # $(tc-getCXX) -o greycstoration greycstoration4gimp.cpp \ # $(gimptool-2.0 --cflags) $(gimptool-2.0 --libs) \ # -lpthread ${CXXFLAGS} ${LDFLAGS} -fno-tree-pre \ # || die "Compilation failed" # cd ${S} emake gimp || die "Compilation failed" } src_install() { exeinto $(gimptool-2.0 --gimpplugindir)/plug-ins doexe gmic_gimp || die "Installation failed" } pkg_postinst() { elog "The G'MIC plugin is accessible from the menu :" elog "Filters -> G'MIC" }