Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-text/sigil/
Date: Sun, 21 Jul 2019 11:58:54
Message-Id: 1563710315.8e92d34680b2ce1aa600fc43030d0bfc1f45e1c3.asturm@gentoo
1 commit: 8e92d34680b2ce1aa600fc43030d0bfc1f45e1c3
2 Author: Zamarin Arthur <arthurzam <AT> gmail <DOT> com>
3 AuthorDate: Sun Jul 21 05:46:03 2019 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 21 11:58:35 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e92d346
7
8 app-text/sigil: add USE=plugins
9
10 USE flag to disable Python libs deps if no plugin support is desired
11 depend on system css-parser instead of bundled
12
13 Package-Manager: Portage-2.3.69, Repoman-2.3.16
14 Signed-off-by: Zamarin Arthur <arthurzam <AT> gmail.com>
15 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
16
17 app-text/sigil/metadata.xml | 1 +
18 app-text/sigil/sigil-0.9.16.ebuild | 23 ++++++++++++++++-------
19 2 files changed, 17 insertions(+), 7 deletions(-)
20
21 diff --git a/app-text/sigil/metadata.xml b/app-text/sigil/metadata.xml
22 index 745afeddf71..ec9790cba78 100644
23 --- a/app-text/sigil/metadata.xml
24 +++ b/app-text/sigil/metadata.xml
25 @@ -12,6 +12,7 @@
26 <longdescription lang="en">Sigil is a multi-platform WYSIWYG ebook editor.
27 It is designed to edit books in ePub format.</longdescription>
28 <use>
29 + <flag name="plugins">Installed needed Python packages for using Sigil plugins</flag>
30 <flag name="system-mathjax">Use the system-wide <pkg>dev-libs/mathjax</pkg> instead of bundled</flag>
31 </use>
32 <upstream>
33
34 diff --git a/app-text/sigil/sigil-0.9.16.ebuild b/app-text/sigil/sigil-0.9.16.ebuild
35 index 1ee490a23ec..2faaf3abb78 100644
36 --- a/app-text/sigil/sigil-0.9.16.ebuild
37 +++ b/app-text/sigil/sigil-0.9.16.ebuild
38 @@ -15,7 +15,7 @@ SRC_URI="https://github.com/Sigil-Ebook/Sigil/archive/${PV}.tar.gz -> ${P}.tar.g
39 LICENSE="GPL-3+ Apache-2.0"
40 SLOT="0"
41 KEYWORDS="~amd64 ~x86"
42 -IUSE="system-mathjax"
43 +IUSE="+plugins system-mathjax"
44 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
45
46 RDEPEND="
47 @@ -24,13 +24,8 @@ RDEPEND="
48 dev-libs/boost:=[threads]
49 dev-libs/libpcre:3=[pcre16]
50 dev-libs/xerces-c[icu]
51 - dev-python/chardet[${PYTHON_USEDEP}]
52 - dev-python/cssselect[${PYTHON_USEDEP}]
53 - dev-python/cssutils[${PYTHON_USEDEP}]
54 - dev-python/html5lib[${PYTHON_USEDEP}]
55 + dev-python/css-parser[${PYTHON_USEDEP}]
56 dev-python/lxml[${PYTHON_USEDEP}]
57 - dev-python/pillow[${PYTHON_USEDEP}]
58 - dev-python/regex[${PYTHON_USEDEP}]
59 dev-python/six[${PYTHON_USEDEP}]
60 >=dev-qt/qtconcurrent-5.12:5
61 >=dev-qt/qtcore-5.12:5
62 @@ -40,6 +35,14 @@ RDEPEND="
63 >=dev-qt/qtwidgets-5.12:5
64 >=dev-qt/qtxmlpatterns-5.12:5
65 sys-libs/zlib[minizip]
66 + plugins? (
67 + dev-python/chardet[${PYTHON_USEDEP}]
68 + dev-python/cssselect[${PYTHON_USEDEP}]
69 + dev-python/cssutils[${PYTHON_USEDEP}]
70 + dev-python/html5lib[${PYTHON_USEDEP}]
71 + dev-python/pillow[${PYTHON_USEDEP}]
72 + dev-python/regex[${PYTHON_USEDEP}]
73 + )
74 system-mathjax? ( dev-libs/mathjax )
75 "
76 DEPEND="${RDEPEND}"
77 @@ -66,6 +69,12 @@ For example use & # 1 6 0 ; for non-breaking spaces and etc.
78 We strongly recommend enabling Mend On Open in your settings
79 for best performance with Sigil."
80
81 +src_prepare() {
82 + # bundled is a exact copy of the package, and upstream plan to switch soon
83 + rm -r src/Resource_Files/plugin_launchers/python/css_parser/ || die
84 + cmake-utils_src_prepare
85 +}
86 +
87 src_configure() {
88 python_export PYTHON_LIBPATH PYTHON_INCLUDEDIR
89 local mycmakeargs=(