aboutsummaryrefslogtreecommitdiffstats
path: root/community/mtex2mml/APKBUILD
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-03-29 00:42:50 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-03-29 00:42:50 +0200
commitbfe5250596f762d16932f8de4e225b955badbcab (patch)
treede6a4a6502fad45755266469b0f3ede2b03dd27e /community/mtex2mml/APKBUILD
parenta6490e7f334684dc6e2b39313b58a121a1fdbbf0 (diff)
downloadaports-bfe5250596f762d16932f8de4e225b955badbcab.tar.bz2
aports-bfe5250596f762d16932f8de4e225b955badbcab.tar.xz
community/mtex2mml: move from testing
Diffstat (limited to 'community/mtex2mml/APKBUILD')
-rw-r--r--community/mtex2mml/APKBUILD63
1 files changed, 63 insertions, 0 deletions
diff --git a/community/mtex2mml/APKBUILD b/community/mtex2mml/APKBUILD
new file mode 100644
index 0000000000..c2fe141182
--- /dev/null
+++ b/community/mtex2mml/APKBUILD
@@ -0,0 +1,63 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=mtex2mml
+_pkgname=mtex2MML
+pkgver=1.3.1
+pkgrel=1
+pkgdesc="A Bison grammar to convert TeX math into MathML"
+url="https://github.com/gjtorikian/mtex2MML"
+arch="all"
+license="GPL2 MPL2 LGPL2.1"
+makedepends="cmake bison flex-dev python3"
+subpackages="$pkgname-dev $pkgname-libs $pkgname-fixtures::noarch"
+source="$pkgname-$pkgver.tar.gz::https://github.com/gjtorikian/$pkgname/archive/v$pkgver.tar.gz
+ cmake-fix-install.patch
+ fix-uthash-includes.patch"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+prepare() {
+ default_prepare
+
+ # Note: This bundled uthash is modified, so we can't replace it with
+ # system-provided. Thus we must move them to the other sources, where
+ # they really belongs.
+ # Upstream-Issue: https://github.com/gjtorikian/mtex2MML/issues/59
+ cd deps/uthash
+ mv utarray.h uthash.h utstring.h ../../src/
+ rm *.h
+}
+
+build() {
+ mkdir -p "$builddir"/build
+ cd "$builddir"/build
+
+ cmake .. \
+ -DCMAKE_BUILD_TYPE=MinSizeRel \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ -DCMAKE_VERBOSE_MAKEFILE=TRUE
+ make
+}
+
+check() {
+ cd "$builddir"/build
+ ctest -V
+}
+
+package() {
+ cd "$builddir"/build
+ make DESTDIR="$pkgdir" install
+}
+
+fixtures() {
+ pkgdesc="$pkgdesc (test fixtures)"
+ local destdir="$subpkgdir/usr/share/$_pkgname"
+
+ mkdir -p "$destdir"
+ mv "$builddir"/tests/fixtures "$destdir"/
+}
+
+sha512sums="584a02d8312233a08d527973ddca7d5d26429cd4d97e0a5db671d90ac1e9f2587746b38fbdb69366ed6e1f38a706335309a3fc04c10aa93658a7b773cc752fed mtex2mml-1.3.1.tar.gz
+54c8da2a63d4b2e9f5bccdcbc8130399c0772badda41f62dfb8ef91c10681e477e291b71fce95dda80f0c5b57277d5a94c597fe515b94eeb1c9178a587bcc3ff cmake-fix-install.patch
+1754951f71e085fd8c2e6cebf6c5cd07604c671b9ac027fc2cbc16be891ffcf433ba48135e08e51479fac1cf3b129de85929cef8151e776e9b50ed4be8728b3c fix-uthash-includes.patch"