blob: 1eee5a8d8056677db807aed85573fcb817678d1a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{10..13} )
inherit distutils-r1 latex-package
DESCRIPTION="LaTeX package for source code syntax highlighting"
HOMEPAGE="https://github.com/gpoore/minted/"
SRC_URI="
https://github.com/gpoore/${PN}/archive/refs/tags/latex/v${PV}.tar.gz
-> ${P}.tar.gz
https://github.com/gpoore/minted/commit/45ccea404689680513be3b78d2c0579f6250f963.patch
-> ${PN}-3.4.0-explicitly-set-build-backend.patch
"
S="${WORKDIR}"/${PN}-latex-v${PV}
LICENSE="|| ( BSD LPPL-1.3 )"
SLOT="0"
KEYWORDS="~amd64"
IUSE="doc"
RDEPEND="
>=dev-python/latexrestricted-0.6.0
>=dev-python/pygments-2.17.0
>=dev-tex/latex2pydata-0.4.0
dev-texlive/texlive-latexextra
"
BDEPEND="
doc? (
dev-texlive/texlive-fontsextra
)
"
PATCHES=(
"${DISTDIR}"/${PN}-3.4.0-explicitly-set-build-backend.patch
)
src_prepare() {
default
rm latex/minted/${PN}.pdf || die
}
src_compile() {
pushd python &> /dev/null || die
distutils-r1_src_compile
popd &> /dev/null || die
pushd latex/minted &> /dev/null || die
latex-package_src_compile
popd &> /dev/null || die
}
src_install() {
dodoc README.md
pushd python &> /dev/null || die
docinto python
dodoc *.md
distutils-r1_src_install
popd &> /dev/null || die
pushd latex &> /dev/null || die
docinto latex
dodoc *.md
popd &> /dev/null || die
pushd latex/minted &> /dev/null || die
latex-package_src_doinstall styles fonts bin
if use doc; then
python_setup
local -x LATEX_DOC_ARGUMENTS="-shell-escape"
local -x PYTHONPATH="${ED}/usr/lib/${EPYTHON}/site-packages"
local -x PATH="${ED}/usr/lib/python-exec/${EPYTHON}:${PATH}"
latex-package_src_doinstall doc
fi
popd &> /dev/null || die
}
|