blob: c2fe141182a813fc469646bf8c82e36a9af8f3d1 (
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
|
# 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"
|