blob: 33154f783bc5f2029027da44075e5122ad97b461 (
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
|
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit vcs-clean
DESCRIPTION="JavaScript display engine for LaTeX, MathML and AsciiMath"
HOMEPAGE="https://www.mathjax.org/"
SRC_URI="https://github.com/mathjax/MathJax/archive/${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/MathJax-${PV}"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
IUSE="doc"
RDEPEND="doc? ( ~app-doc/mathjax-docs-${PV} )"
src_prepare() {
default
egit_clean
}
src_install() {
local DOCS=( CONTRIBUTING.md README.md )
default
if use doc; then
# We need best_version to determine the right revision for
# app-doc/mathjax-docs.
local docsPF=$(best_version app-doc/mathjax-docs)
# Strip the (known) category from the best_version output.
docsPF=${docsPF#app-doc/}
dosym "../${docsPF}/html" "/usr/share/doc/${PF}/html"
fi
insinto "/usr/share/${PN}"
# Start the install beneath the "es5" directory for compatibility with
# Arch, Solus, and Void Linux, but leave a fake "es5" symlink for
# packages (like doxygen) that expect it.
doins -r es5/*
dosym -r "/usr/share/${PN}" "/usr/share/${PN}/es5"
}
|