app-text/sigil: add system-mathjax USE flag
authorZamarin Arthur <arthurzam@gmail.com>
Sun, 21 Jul 2019 05:45:16 +0000 (08:45 +0300)
committerAndreas Sturmlechner <asturm@gentoo.org>
Sun, 21 Jul 2019 11:58:35 +0000 (13:58 +0200)
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Zamarin Arthur <arthurzam@gmail.com>
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
app-text/sigil/metadata.xml
app-text/sigil/sigil-0.9.16.ebuild

index d0bbc366660ad3948f7d0311577af937e423e1bf..745afeddf711b823c417edb9d3ab2acbf361d369 100644 (file)
@@ -11,6 +11,9 @@
        </maintainer>
        <longdescription lang="en">Sigil is a multi-platform WYSIWYG ebook editor.
                It is designed to edit books in ePub format.</longdescription>
+       <use>
+               <flag name="system-mathjax">Use the system-wide <pkg>dev-libs/mathjax</pkg> instead of bundled</flag>
+       </use>
        <upstream>
                <remote-id type="github">Sigil-Ebook/Sigil</remote-id>
                <maintainer status="active">
index 7f5b6030154fed2046401766063cb3124d794ce4..1ee490a23ec7fdf29463556b4b6ee0de32681e16 100644 (file)
@@ -15,6 +15,7 @@ SRC_URI="https://github.com/Sigil-Ebook/Sigil/archive/${PV}.tar.gz -> ${P}.tar.g
 LICENSE="GPL-3+ Apache-2.0"
 SLOT="0"
 KEYWORDS="~amd64 ~x86"
+IUSE="system-mathjax"
 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
 
 RDEPEND="
@@ -22,7 +23,6 @@ RDEPEND="
        app-text/hunspell:=
        dev-libs/boost:=[threads]
        dev-libs/libpcre:3=[pcre16]
-       dev-libs/mathjax
        dev-libs/xerces-c[icu]
        dev-python/chardet[${PYTHON_USEDEP}]
        dev-python/cssselect[${PYTHON_USEDEP}]
@@ -40,6 +40,7 @@ RDEPEND="
        >=dev-qt/qtwidgets-5.12:5
        >=dev-qt/qtxmlpatterns-5.12:5
        sys-libs/zlib[minizip]
+       system-mathjax? ( dev-libs/mathjax )
 "
 DEPEND="${RDEPEND}"
 
@@ -69,13 +70,14 @@ src_configure() {
        python_export PYTHON_LIBPATH PYTHON_INCLUDEDIR
        local mycmakeargs=(
                -DINSTALL_BUNDLED_DICTS=0
-               -DMATHJAX_DIR="${EPREFIX}"/usr/share/mathjax
                -DUSE_SYSTEM_LIBS=1
                -DSYSTEM_LIBS_REQUIRED=1
                -DPYTHON_EXECUTABLE="${PYTHON}"
                -DPYTHON_LIBRARY="${PYTHON_LIBPATH}"
                -DPYTHON_INCLUDE_DIR="${PYTHON_INCLUDEDIR}"
        )
+       use system-mathjax && mycmakeargs+=( -DMATHJAX_DIR="${EPREFIX}"/usr/share/mathjax )
+
        cmake-utils_src_configure
 }