[arch-commits] Commit in mathjax/trunk (PKGBUILD mathjax.install)

Antonio Rojas arojas at archlinux.org
Mon Mar 2 20:28:19 UTC 2015


    Date: Monday, March 2, 2015 @ 21:28:19
  Author: arojas
Revision: 128581

Trim some unnecessary stuff

Modified:
  mathjax/trunk/PKGBUILD
  mathjax/trunk/mathjax.install

-----------------+
 PKGBUILD        |   18 +++++++++++++++---
 mathjax.install |    4 ++--
 2 files changed, 17 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-03-02 20:25:25 UTC (rev 128580)
+++ PKGBUILD	2015-03-02 20:28:19 UTC (rev 128581)
@@ -5,17 +5,30 @@
 
 pkgname=mathjax
 pkgver=2.5.1
-pkgrel=2
+pkgrel=3
 pkgdesc='An open source JavaScript display engine for mathematics that works in all modern browsers'
 url='https://www.mathjax.org/'
 arch=(any)
 license=(Apache)
 depends=(xorg-mkfontdir fontconfig)
-provides=(otf-stix)
 install=$pkgname.install
 source=("$pkgname-$pkgver.tar.gz::https://github.com/mathjax/MathJax/archive/$pkgver.tar.gz")
 sha256sums=('e294ea66e87900a0a803281d6c13025db38d27e103f4d9e960bfc554ad92c602')
 
+prepare() {
+  cd MathJax-$pkgver
+
+# don't warn about missing PNG fonts
+  sed -e 's|imageFont: "TeX",|imageFont: null,|' -i config/default.js
+
+# Remove unneeded stuff, see https://github.com/mathjax/MathJax-docs/wiki/Guide%3A-reducing-size-of-a-mathjax-installation
+  rm -r docs test unpacked
+  rm -r fonts/HTML-CSS/TeX/png
+  for _format in eot otf svg ; do
+   find . -type d -name "$_format" -prune -exec rm -rf {} \;
+  done
+}
+
 package() {
   mkdir -p "$pkgdir"/usr/share/{fonts,licenses/mathjax}
   cp -a MathJax-$pkgver "$pkgdir"/usr/share/mathjax
@@ -22,5 +35,4 @@
   mv "$pkgdir"/usr/share/mathjax/fonts "$pkgdir"/usr/share/fonts/mathjax
   ln -s /usr/share/fonts/mathjax "$pkgdir"/usr/share/mathjax/fonts
   mv "$pkgdir"/usr/share/mathjax/LICENSE "$pkgdir"/usr/share/licenses/mathjax/LICENSE
-  rm -r "$pkgdir"/usr/share/mathjax/unpacked
 }

Modified: mathjax.install
===================================================================
--- mathjax.install	2015-03-02 20:25:25 UTC (rev 128580)
+++ mathjax.install	2015-03-02 20:28:19 UTC (rev 128581)
@@ -1,7 +1,7 @@
 post_install() {
 	fc-cache -s
-	find /usr/share/fonts/mathjax -type d -exec mkfontscale -- {} +
-	find /usr/share/fonts/mathjax -type d -exec mkfontdir -- {} +
+	find /usr/share/fonts/mathjax -type d -name 'woff' -exec mkfontscale -- {} +
+	find /usr/share/fonts/mathjax -type d -name 'woff' -exec mkfontdir -- {} +
 }
 
 post_remove() {



More information about the arch-commits mailing list