1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 )
9 inherit desktop flag-o-matic font python-single-r1 qmake-utils toolchain-funcs xdg-utils
11 DESCRIPTION="WYSIWYM frontend for LaTeX, DocBook, etc."
12 HOMEPAGE="https://www.lyx.org/"
13 SRC_URI="ftp://ftp.lyx.org/pub/lyx/stable/2.3.x/${MY_P}.tar.xz
14 ftp://ftp.lyx.org/pub/lyx/devel/lyx-2.3/${MY_P}/${MY_P}.tar.xz"
18 KEYWORDS="amd64 ~ppc ~ppc64 ~sparc x86 ~x64-macos ~x86-macos"
19 IUSE="aspell cups debug docbook dia dot enchant gnumeric html +hunspell +latex monolithic-build nls rcs rtf subversion svg l10n_he"
20 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
22 RDEPEND="${PYTHON_DEPS}
30 dev-texlive/texlive-fontsextra
33 virtual/imagemagick-tools[png,svg?]
34 aspell? ( app-text/aspell )
35 cups? ( net-print/cups )
36 dia? ( app-office/dia )
37 docbook? ( app-text/sgmltools-lite )
38 dot? ( media-gfx/graphviz )
39 enchant? ( app-text/enchant:0 )
40 gnumeric? ( app-office/gnumeric )
41 html? ( dev-tex/html2latex )
42 hunspell? ( app-text/hunspell )
43 l10n_he? ( dev-tex/culmus-latex )
46 app-text/ghostscript-gpl
51 dev-texlive/texlive-fontsrecommended
52 dev-texlive/texlive-latexextra
53 dev-texlive/texlive-mathscience
54 dev-texlive/texlive-pictures
55 dev-texlive/texlive-plaingeneric
69 subversion? ( dev-vcs/subversion )
70 svg? ( || ( gnome-base/librsvg media-gfx/inkscape ) )
75 nls? ( sys-devel/gettext )
78 DOCS=( ANNOUNCE NEWS README RELEASE-NOTES UPGRADING )
80 PATCHES=( "${FILESDIR}"/${PN}-2.3.0-python.patch )
82 S="${WORKDIR}/${MY_P}"
84 FONT_S="${S}/lib/fonts"
88 python-single-r1_pkg_setup
94 sed "s:python -tt:${EPYTHON} -tt:g" -i lib/configure.py || die
100 export VARTEXFONTS="${T}"/fonts
104 $(use_enable debug) \
105 $(use_with enchant) \
106 $(use_with hunspell) \
107 $(use_enable monolithic-build) \
110 --with-qt-dir=$(qt5_get_libdir)/qt5 \
111 --disable-stdlib-debug \
112 --without-included-boost \
113 --with-packaging=posix
119 if use l10n_he ; then
120 echo "\bind_file cua" > "${T}"/hebrew.bind || die
121 echo "\bind \"F12\" \"language hebrew\"" >> "${T}"/hebrew.bind || die
123 insinto /usr/share/lyx/bind
124 doins "${T}"/hebrew.bind
127 newicon -s 32 "development/Win32/packaging/icons/lyx_32x32.png" ${PN}.png
128 doicon -s 48 "lib/images/lyx.png"
129 doicon -s scalable "lib/images/lyx.svg"
133 dosym ../../../lyx/tex /usr/share/texmf-site/tex/latex/lyx
136 # fonts needed for proper math display, see also bug #15629
139 python_fix_shebang "${ED}"/usr/share/${PN}
141 if use hunspell ; then
142 dosym ../myspell /usr/share/lyx/dicts
143 dosym ../myspell /usr/share/lyx/thes
149 xdg_icon_cache_update
150 xdg_desktop_database_update
157 # instructions for RTL support. See also bug 168331.
158 if use l10n_he || has he ${LINGUAS} || has ar ${LINGUAS} ; then
160 elog "Enabling RTL support in LyX:"
161 elog "If you intend to use a RTL language (such as Hebrew or Arabic)"
162 elog "You must enable RTL support in LyX. To do so start LyX and go to"
163 elog "Tools->Preferences->Language settings->Language"
164 elog "and make sure the \"Right-to-left language support\" is checked"
170 xdg_icon_cache_update
171 xdg_desktop_database_update