Gentoo Archives: gentoo-commits

From: Jonas Stein <jstein@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/lyx/
Date: Sat, 17 Feb 2018 14:28:45
Message-Id: 1518877709.e6572429168e1ee74dfec6b4849b308093254312.jstein@gentoo
1 commit: e6572429168e1ee74dfec6b4849b308093254312
2 Author: Jonas Stein <jstein <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 17 14:28:17 2018 +0000
4 Commit: Jonas Stein <jstein <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 17 14:28:29 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6572429
7
8 app-office/lyx: Prepare for font.eclass change
9
10 tc-export, newicon, get_libdir and doicon are used in this ebuild.
11 Adjusted the inherited eclasses accordingly.
12 This ebuild relied on eutils in font.eclas, which is on the way to get
13 removed for EAPI=6. -r3 is now ready for this step.
14
15 Package-Manager: Portage-2.3.24, Repoman-2.3.6
16
17 app-office/lyx/lyx-2.2.3-r3.ebuild | 187 +++++++++++++++++++++++++++++++++++++
18 1 file changed, 187 insertions(+)
19
20 diff --git a/app-office/lyx/lyx-2.2.3-r3.ebuild b/app-office/lyx/lyx-2.2.3-r3.ebuild
21 new file mode 100644
22 index 00000000000..fbb69f057bf
23 --- /dev/null
24 +++ b/app-office/lyx/lyx-2.2.3-r3.ebuild
25 @@ -0,0 +1,187 @@
26 +# Copyright 1999-2018 Gentoo Foundation
27 +# Distributed under the terms of the GNU General Public License v2
28 +
29 +EAPI=6
30 +
31 +PYTHON_COMPAT=( python2_7 )
32 +inherit gnome2-utils xdg-utils flag-o-matic font python-single-r1 qmake-utils toolchain-funcs multilib desktop
33 +
34 +MY_P="${P/_}"
35 +
36 +S="${WORKDIR}/${MY_P}"
37 +FONT_S="${S}/lib/fonts"
38 +FONT_SUFFIX="ttf"
39 +DESCRIPTION="WYSIWYM frontend for LaTeX, DocBook, etc."
40 +HOMEPAGE="https://www.lyx.org/"
41 +SRC_URI="ftp://ftp.lyx.org/pub/lyx/stable/2.2.x/${MY_P}.tar.xz
42 + ftp://ftp.lyx.org/pub/lyx/devel/lyx-2.2/${MY_P}/${MY_P}.tar.xz"
43 +
44 +LICENSE="GPL-2"
45 +SLOT="0"
46 +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x64-macos ~x86-macos"
47 +IUSE="aspell cups debug docbook dia dot enchant gnumeric html +hunspell +latex monolithic-build nls +qt5 rcs rtf subversion svg l10n_he"
48 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
49 +
50 +RDEPEND="${PYTHON_DEPS}
51 + dev-libs/boost:=
52 + dev-texlive/texlive-fontsextra
53 + sys-apps/file
54 + sys-libs/zlib
55 + virtual/imagemagick-tools[png,svg?]
56 + aspell? ( app-text/aspell )
57 + cups? ( net-print/cups )
58 + dia? ( app-office/dia )
59 + docbook? ( app-text/sgmltools-lite )
60 + dot? ( media-gfx/graphviz )
61 + enchant? ( app-text/enchant )
62 + gnumeric? ( app-office/gnumeric )
63 + html? ( dev-tex/html2latex )
64 + hunspell? ( app-text/hunspell )
65 + latex? (
66 + app-text/dvipng
67 + app-text/ghostscript-gpl
68 + app-text/noweb
69 + app-text/ps2eps
70 + app-text/texlive
71 + dev-tex/chktex
72 + dev-tex/dvipost
73 + dev-texlive/texlive-fontsrecommended
74 + dev-texlive/texlive-latexextra
75 + dev-texlive/texlive-pictures
76 + || ( dev-texlive/texlive-mathscience dev-texlive/texlive-science )
77 + || ( dev-texlive/texlive-plaingeneric dev-texlive/texlive-genericextra )
78 + || (
79 + dev-tex/hevea
80 + dev-tex/latex2html
81 + dev-tex/tex4ht[java]
82 + dev-tex/tth
83 + )
84 + )
85 + l10n_he? ( dev-tex/culmus-latex )
86 + !qt5? (
87 + dev-qt/qtcore:4
88 + dev-qt/qtgui:4
89 + )
90 + qt5? (
91 + dev-qt/qtcore:5
92 + dev-qt/qtgui:5
93 + dev-qt/qtsvg:5
94 + dev-qt/qtwidgets:5
95 + )
96 + rcs? ( dev-vcs/rcs )
97 + rtf? (
98 + app-text/unrtf
99 + dev-tex/html2latex
100 + dev-tex/latex2rtf
101 + )
102 + subversion? ( dev-vcs/subversion )
103 + svg? ( || ( gnome-base/librsvg media-gfx/inkscape ) )
104 +"
105 +DEPEND="${RDEPEND}
106 + virtual/pkgconfig
107 + nls? ( sys-devel/gettext )
108 + !qt5? ( dev-qt/qtsvg:4 )
109 + qt5? (
110 + dev-qt/qtconcurrent:5
111 + dev-qt/qtx11extras:5
112 + )
113 +"
114 +
115 +DOCS=( ANNOUNCE NEWS README RELEASE-NOTES UPGRADING )
116 +
117 +PATCHES=( "${FILESDIR}"/2.1-python.patch )
118 +
119 +pkg_setup() {
120 + python-single-r1_pkg_setup
121 + font_pkg_setup
122 +}
123 +
124 +src_prepare() {
125 + default
126 + sed "s:python -tt:${EPYTHON} -tt:g" -i lib/configure.py || die
127 +}
128 +
129 +src_configure() {
130 + tc-export CXX
131 + #bug 221921
132 + export VARTEXFONTS=${T}/fonts
133 +
134 + econf \
135 + $(use_with aspell) \
136 + $(use_enable debug) \
137 + $(use_with enchant) \
138 + $(use_with hunspell) \
139 + $(use_enable monolithic-build) \
140 + $(use_enable nls) \
141 + $(use_enable qt5) \
142 + --with-qt-dir=$(usex qt5 $(qt5_get_libdir)/qt5 $(qt4_get_libdir)) \
143 + --disable-stdlib-debug \
144 + --without-included-boost \
145 + --with-packaging=posix
146 +}
147 +
148 +src_install() {
149 + default
150 +
151 + if use l10n_he ; then
152 + echo "\bind_file cua" > "${T}"/hebrew.bind
153 + echo "\bind \"F12\" \"language hebrew\"" >> "${T}"/hebrew.bind
154 +
155 + insinto /usr/share/lyx/bind
156 + doins "${T}"/hebrew.bind
157 + fi
158 +
159 + newicon -s 32 "${S}/development/Win32/packaging/icons/lyx_32x32.png" ${PN}.png
160 + doicon -s 48 "${S}/lib/images/lyx.png"
161 + doicon -s scalable "${S}/lib/images/lyx.svg"
162 +
163 + # fix for bug 91108
164 + if use latex ; then
165 + dosym ../../../lyx/tex /usr/share/texmf-site/tex/latex/lyx
166 + fi
167 +
168 + # fonts needed for proper math display, see also bug #15629
169 + font_src_install
170 +
171 + python_fix_shebang "${ED}"/usr/share/${PN}
172 +
173 + if use hunspell ; then
174 + dosym ../myspell /usr/share/lyx/dicts
175 + dosym ../myspell /usr/share/lyx/thes
176 + fi
177 +}
178 +
179 +pkg_preinst() {
180 + gnome2_icon_savelist
181 +}
182 +
183 +pkg_postinst() {
184 + font_pkg_postinst
185 + gnome2_icon_cache_update
186 + xdg_desktop_database_update
187 +
188 + # fix for bug 91108
189 + if use latex ; then
190 + texhash
191 + fi
192 +
193 + # instructions for RTL support. See also bug 168331.
194 + if use l10n_he || has he ${LINGUAS} || has ar ${LINGUAS} ; then
195 + elog
196 + elog "Enabling RTL support in LyX:"
197 + elog "If you intend to use a RTL language (such as Hebrew or Arabic)"
198 + elog "You must enable RTL support in LyX. To do so start LyX and go to"
199 + elog "Tools->Preferences->Language settings->Language"
200 + elog "and make sure the \"Right-to-left language support\" is checked"
201 + elog
202 + fi
203 +}
204 +
205 +pkg_postrm() {
206 + gnome2_icon_cache_update
207 + xdg_desktop_database_update
208 +
209 + if use latex ; then
210 + texhash
211 + fi
212 +}