summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2024-02-14 15:45:21 -0500
committerSam James <sam@gentoo.org>2024-02-15 13:50:03 +0000
commit3b5964f5819822fa8b8bf6d30802b06eb7976a2d (patch)
tree62a10b85a9d2f4050c3102918fbd74ac89ce71f9 /dev-libs/mathjax
parentdev-libs/mathjax: add myself as a maintainer (diff)
downloadgentoo-3b5964f5819822fa8b8bf6d30802b06eb7976a2d.tar.gz
gentoo-3b5964f5819822fa8b8bf6d30802b06eb7976a2d.tar.bz2
gentoo-3b5964f5819822fa8b8bf6d30802b06eb7976a2d.zip
dev-libs/mathjax: add subslot
Necessary for app-text/calibre to rebuild its javascript assets when the system mathjax changes. Closes: https://bugs.gentoo.org/916037 Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-libs/mathjax')
-rw-r--r--dev-libs/mathjax/mathjax-3.2.2-r2.ebuild48
1 files changed, 48 insertions, 0 deletions
diff --git a/dev-libs/mathjax/mathjax-3.2.2-r2.ebuild b/dev-libs/mathjax/mathjax-3.2.2-r2.ebuild
new file mode 100644
index 000000000000..d207b55ab0dd
--- /dev/null
+++ b/dev-libs/mathjax/mathjax-3.2.2-r2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2024 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"
+# Some applications need to know which mathjax version they built against.
+SLOT="0/${PV}"
+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"
+}