# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 EAPI=6 inherit bash-completion-r1 git-r3 DESCRIPTION="GREYC's Magic Image Converter" HOMEPAGE="http://gmic.eu/ https://github.com/dtschump/gmic" REPO_URI_2="https://github.com/c-koi/gmic-qt.git" # REPO_URI_2="https://github.com/dtschump/gmic-qt.git" REPO_URI_3="https://github.com/dtschump/gmic-community.git" REPO_URI_4="https://github.com/c-koi/zart.git" EGIT_REPO_URI="https://github.com/dtschump/gmic.git" KEYWORDS="" LICENSE="CeCILL-2 GPL-3" SLOT="0" IUSE="" COMMON_DEPEND=" sci-libs/fftw:3.0[threads] dev-qt/qtcore:5 dev-qt/qtgui:5 dev-qt/qtnetwork:5 dev-qt/qtwidgets:5 dev-qt/qtxml:5 >=media-gfx/gimp-2.8.0 net-misc/curl >=media-libs/opencv-2.3.1a-r1 media-libs/ilmbase media-libs/openexr media-libs/libpng:0= sys-libs/zlib media-libs/tiff:0 x11-libs/libX11 x11-libs/libXext " RDEPEND="${COMMON_DEPEND} media-video/ffmpeg:0 " DEPEND="${COMMON_DEPEND} dev-qt/linguist-tools:5 virtual/pkgconfig " S="${WORKDIR}/${PN}" MAKEOPTS+=" -j1" src_unpack() { EGIT_CHECKOUT_DIR="${S}" git-r3_src_unpack EGIT_REPO_URI="${REPO_URI_2}" EGIT_CHECKOUT_DIR="${WORKDIR}/gmic-qt" git-r3_src_unpack EGIT_REPO_URI="${REPO_URI_3}" EGIT_CHECKOUT_DIR="${WORKDIR}/gmic-community" git-r3_src_unpack EGIT_REPO_URI="${REPO_URI_4}" EGIT_CHECKOUT_DIR="${WORKDIR}/zart" git-r3_src_unpack pushd "${S}/src" wget --no-check-certificate --quiet -O CImg.h https://github.com/dtschump/CImg/raw/master/CImg.h touch CImg.h wget --no-check-certificate --quiet -O gmic_stdlib.h http://gmic.eu/gmic_stdlib.h touch gmic_stdlib.h popd } src_compile() { pushd src emake QMAKE="/usr/lib64/qt5/bin/qmake" cli lib gimp gmic_qt zart # emake QMAKE="/usr/lib64/qt5/bin/qmake" popd } src_install() { dodoc README # - the Gimp plugin dir is also searched by non-Gimp tools, and it's # hardcoded in gmic_stdlib.gmic # - using the GMIC_SYSTEM_PATH env var to specify another system dir here # might mean that this big file will be automatically downloaded in # ~/.config/gmic/ when the user runs a tool before updating and sourcing # the new environment local PLUGIN_DIR="/usr/lib/gimp/2.0/plug-ins/" insinto "${PLUGIN_DIR}" doins "resources/gmic_film_cluts.gmz" default dobin "${WORKDIR}/gmic/src/gmic" exeinto "${PLUGIN_DIR}" doexe "${WORKDIR}/gmic-qt/gmic_gimp_qt" dobin "${WORKDIR}/gmic-qt/gmic_qt" dobin "${WORKDIR}/zart/zart" }