1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 PYTHON_COMPAT=( python3_6 )
10 DESCRIPTION="Python package for the generation of encapsulated PostScript figures"
11 HOMEPAGE="https://pyx.sourceforge.net/
12 https://pypi.org/project/PyX/"
13 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
17 KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
20 RDEPEND="virtual/tex-base
21 dev-texlive/texlive-basic"
24 doc? ( virtual/latex-base
25 dev-python/sphinx[latex,${PYTHON_USEDEP}] )"
27 S="${WORKDIR}/${MY_P}"
28 PATCHES=( "${FILESDIR}"/${P}-unicode-latex.patch )
31 distutils-r1_src_prepare
33 -e 's/^build_t1code=.*/build_t1code=1/' \
34 -e 's/^build_pykpathsea=.*/build_pykpathsea=1/' \
35 setup.cfg || die "setup.cfg fix failed"
38 python_compile_all() {
40 VARTEXFONTS="${T}"/fonts
41 emake -C "${S}"/manual latexpdf
42 emake -C "${S}"/faq latexpdf
46 python_install_all() {
47 use doc && dodoc manual/_build/latex/manual.pdf faq/_build/latex/pyxfaq.pdf
48 distutils-r1_python_install_all