# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 inherit xdg-utils leechcraft DESCRIPTION="Monocle, the modular document viewer for LeechCraft" SLOT="0" KEYWORDS="" IUSE="debug +djvu doc +epub +fb2 +imagemagick +mobi +pdf +postscript" REQUIRED_USE="postscript? ( pdf )" DEPEND="~app-leechcraft/lc-core-${PV} dev-qt/qtbase:6[concurrent,cups,sql,widgets,xml] imagemagick? ( media-gfx/imagemagick[cxx] ) djvu? ( app-text/djvu ) epub? ( dev-libs/quazip ) pdf? ( app-text/poppler:= ) " RDEPEND="${DEPEND} postscript? ( app-text/ghostscript-gpl ) " BDEPEND=" doc? ( app-text/doxygen[dot] ) " src_configure() { local mycmakeargs=( -DWITH_DOCS=$(usex doc) -DWITH_MONOCLE_IMAGEMAGICK=$(usex imagemagick) -DENABLE_MONOCLE_BOOP=$(usex epub) -DENABLE_MONOCLE_DIK=$(usex mobi) -DENABLE_MONOCLE_FXB=$(usex fb2) -DENABLE_MONOCLE_PDF=$(usex pdf) -DENABLE_MONOCLE_POSTRUS=$(usex postscript) -DENABLE_MONOCLE_SEEN=$(usex djvu) ) cmake_src_configure } src_install() { cmake_src_install use doc && dodoc -r "${CMAKE_BUILD_DIR}"/out/html/* } pkg_postinst() { xdg_desktop_database_update } pkg_postrm() { xdg_desktop_database_update }