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-utils python-single-r1 readme.gentoo-r1 xdg-utils
11 DESCRIPTION="Multi-platform WYSIWYG ebook editor for ePub format"
12 HOMEPAGE="https://sigil-ebook.com/ https://github.com/Sigil-Ebook/Sigil"
13 SRC_URI="https://github.com/Sigil-Ebook/Sigil/archive/${PV}.tar.gz -> ${P}.tar.gz"
15 LICENSE="GPL-3+ Apache-2.0"
17 KEYWORDS="~amd64 ~x86"
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 dev-python/css-parser[${PYTHON_USEDEP}]
28 dev-python/lxml[${PYTHON_USEDEP}]
29 dev-python/six[${PYTHON_USEDEP}]
30 >=dev-qt/qtconcurrent-5.12:5
31 >=dev-qt/qtcore-5.12:5
33 >=dev-qt/qtprintsupport-5.12:5
34 >=dev-qt/qtwebengine-5.12:5[widgets]
35 >=dev-qt/qtwidgets-5.12:5
36 sys-libs/zlib[minizip]
38 dev-python/chardet[${PYTHON_USEDEP}]
39 dev-python/cssselect[${PYTHON_USEDEP}]
40 dev-python/cssutils[${PYTHON_USEDEP}]
41 dev-python/html5lib[${PYTHON_USEDEP}]
42 dev-python/pillow[${PYTHON_USEDEP}]
43 dev-python/regex[${PYTHON_USEDEP}]
45 system-mathjax? ( dev-libs/mathjax )
50 dev-qt/linguist-tools:5
54 S="${WORKDIR}/Sigil-${PV}"
56 DOCS=( ChangeLog.txt README.md )
58 DOC_CONTENTS="From Sigil's release notes:
59 When you fire up Sigil for the very first time:
60 navigate to the new General Preferences and select the default
61 epub version you plan to work with (epub2 or epub3) so that new
62 empty ebooks start with the correct code.
63 if you plan to work with epub3 epubs, you should change your
64 PreserveEntities setting to use ONLY NUMERIC entities.
66 For example use & # 1 6 0 ; for non-breaking spaces and etc.
68 We strongly recommend enabling Mend On Open in your settings
69 for best performance with Sigil."
72 python_export PYTHON_LIBPATH PYTHON_INCLUDEDIR
74 -DINSTALL_BUNDLED_DICTS=0
76 -DSYSTEM_LIBS_REQUIRED=1
77 -DPYTHON_EXECUTABLE="${PYTHON}"
78 -DPYTHON_LIBRARY="${PYTHON_LIBPATH}"
79 -DPYTHON_INCLUDE_DIR="${PYTHON_INCLUDEDIR}"
81 use system-mathjax && mycmakeargs+=( -DMATHJAX_DIR="${EPREFIX}"/usr/share/mathjax )
83 cmake-utils_src_configure
87 cmake-utils_src_install
88 python_fix_shebang "${ED}"/usr/share/sigil/
89 python_optimize "${ED}"/usr/share/sigil/
90 DISABLE_AUTOFORMATTING=true readme.gentoo_create_doc
94 xdg_desktop_database_update
95 readme.gentoo_print_elog
99 xdg_desktop_database_update