1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python3_{6,7} )
9 inherit cmake python-single-r1 readme.gentoo-r1 xdg-utils
11 DESCRIPTION="Multi-platform WYSIWYG ebook editor for ePub format"
12 HOMEPAGE="https://sigil-ebook.com/"
13 SRC_URI="https://github.com/Sigil-Ebook/Sigil/archive/${PV}.tar.gz -> ${P}.tar.gz"
15 LICENSE="GPL-3+ Apache-2.0"
18 IUSE="+plugins system-mathjax"
19 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
24 dev-libs/boost:=[threads]
25 dev-libs/libpcre:3=[pcre16]
26 dev-libs/xerces-c[icu]
27 $(python_gen_cond_dep \
28 'dev-python/css-parser[${PYTHON_MULTI_USEDEP}]
29 dev-python/lxml[${PYTHON_MULTI_USEDEP}]
30 dev-python/six[${PYTHON_MULTI_USEDEP}]')
31 >=dev-qt/qtconcurrent-5.12:5
32 >=dev-qt/qtcore-5.12:5
34 >=dev-qt/qtprintsupport-5.12:5
35 >=dev-qt/qtwebengine-5.12:5[widgets]
36 >=dev-qt/qtwidgets-5.12:5
37 >=dev-qt/qtxmlpatterns-5.12:5
38 sys-libs/zlib[minizip]
39 plugins? ( $(python_gen_cond_dep \
40 'dev-python/chardet[${PYTHON_MULTI_USEDEP}]
41 dev-python/cssselect[${PYTHON_MULTI_USEDEP}]
42 dev-python/cssutils[${PYTHON_MULTI_USEDEP}]
43 dev-python/html5lib[${PYTHON_MULTI_USEDEP}]
44 dev-python/pillow[${PYTHON_MULTI_USEDEP}]
45 dev-python/regex[${PYTHON_MULTI_USEDEP}]') )
46 system-mathjax? ( dev-libs/mathjax )
51 dev-qt/linguist-tools:5
55 S="${WORKDIR}/Sigil-${PV}"
57 DOCS=( ChangeLog.txt README.md )
59 DOC_CONTENTS="From Sigil's release notes:
60 When you fire up Sigil for the very first time:
61 navigate to the new General Preferences and select the default
62 epub version you plan to work with (epub 2 or epub3) so that new
63 empty ebooks start with the correct code.
64 if you plan to work with epub3 epubs, you should change your
65 PreserveEntities setting to use ONLY NUMERIC entities.
67 For example use & # 1 6 0 ; for non-breaking spaces and etc.
69 We strongly recommend enabling Mend On Open in your settings
70 for best performance with Sigil."
73 # bundled is a exact copy of the package, and upstream plan to switch soon
74 rm -r src/Resource_Files/plugin_launchers/python/css_parser/ || die
79 python_export PYTHON_LIBPATH PYTHON_INCLUDEDIR
81 -DINSTALL_BUNDLED_DICTS=0
83 -DSYSTEM_LIBS_REQUIRED=1
84 -DPYTHON_EXECUTABLE="${PYTHON}"
85 -DPYTHON_LIBRARY="${PYTHON_LIBPATH}"
86 -DPYTHON_INCLUDE_DIR="${PYTHON_INCLUDEDIR}"
88 use system-mathjax && mycmakeargs+=( -DMATHJAX_DIR="${EPREFIX}"/usr/share/mathjax )
95 python_fix_shebang "${ED}"/usr/share/sigil/
96 python_optimize "${ED}"/usr/share/sigil/
97 DISABLE_AUTOFORMATTING=true readme.gentoo_create_doc
101 xdg_desktop_database_update
102 readme.gentoo_print_elog
106 xdg_desktop_database_update