# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 #Ebuild based on bgo-overlay and imaging overlays EAPI=7 inherit autotools DESCRIPTION="Film-Quality Vector Animation (core engine)" HOMEPAGE="https://www.synfig.org/" SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="debug dv ffmpeg fontconfig imagemagick jpeg libavcodec magickpp mng nls opencl openexr -opengl png truetype" # TODO: Implement static use flag. DEPEND=" dev-libs/boost =dev-cpp/ETL-${PV} virtual/pkgconfig >=dev-util/intltool-0.50.0 nls? ( sys-devel/gettext ) " RDEPEND=" dev-cpp/libxmlpp:2.6 media-libs/mlt sys-libs/zlib sci-libs/fftw x11-libs/pango dev-libs/libsigc++:2 dv? ( media-libs/libdv ) ffmpeg? ( virtual/ffmpeg ) fontconfig? ( media-libs/fontconfig ) imagemagick? ( media-gfx/imagemagick ) jpeg? ( virtual/jpeg ) libavcodec? ( virtual/ffmpeg ) magickpp? ( media-gfx/imagemagick ) mng? ( media-libs/libmng ) opencl? ( virtual/opencl ) openexr? ( media-libs/openexr ) opengl? ( virtual/opengl ) png? ( media-libs/libpng ) truetype? ( media-libs/freetype ) " S=${WORKDIR}/${P}/${PN}-core B=${WORKDIR}/${P}/${PN}-core_build src_prepare() { if use nls ; then eautopoint fi eautoreconf eapply_user mkdir ${B} } src_configure() { if use opengl ; then ewarn "The use flag opengl may brake the compilation" ewarn "of ${P}! If this happens, try to disable it." fi # FIXME: If both imagemagick and magickpp are off there's an error # about 'conditional "HAVE_LIBMAGICKPP" was never defined'. cd ${B}; ECONF_SOURCE=${S} econf \ --disable-static --enable-shared \ $(use_enable debug) \ $(use_enable nls) \ $(use_with imagemagick) \ $(use imagemagick && use_with magickpp) \ $(use_with ffmpeg) \ $(use_with dv libdv) \ $(use_with libavcodec) \ $(use_with truetype freetype) \ $(use_with fontconfig) \ $(use_with openexr) \ $(use_with jpeg) \ $(use_with opengl) \ $(use_with opencl) } src_compile() { cd ${B}; emake } src_install() { cd ${B}; emake DESTDIR="${D}" install if use nls ; then dodoc ${S}/ABOUT-NLS fi dodoc ${S}/{AUTHORS,ChangeLog.old,NEWS,README,TODO} }