# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka global pkgname := 'mtex2mml' global _pkgname := 'mtex2MML' global pkgver := '1.3.1' global pkgrel := '1' global pkgdesc := '"A Bison grammar to convert TeX math into MathML'" global url := '"https://github.com/gjtorikian/mtex2MML'" global arch := '"all'" global license := '"GPL2 MPL2 LGPL2.1'" global makedepends := '"cmake bison flex-dev python3'" global subpackages := ""$pkgname-dev $pkgname-libs $pkgname-fixtures::noarch"" global source := ""$pkgname-$pkgver.tar.gz::https://github.com/gjtorikian/$pkgname/archive/v$pkgver.tar.gz cmake-fix-install.patch fix-uthash-includes.patch"" global builddir := ""$srcdir/$_pkgname-$pkgver"" proc 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 } proc 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 } proc check { cd "$builddir"/build ctest -V } proc package { cd "$builddir"/build make DESTDIR="$pkgdir" install } proc fixtures { global pkgdesc := ""$pkgdesc (test fixtures)"" var destdir = ""$subpkgdir/usr/share/$_pkgname"" mkdir -p $destdir mv "$builddir"/tests/fixtures "$destdir"/ } global sha512sums := '"584a02d8312233a08d527973ddca7d5d26429cd4d97e0a5db671d90ac1e9f2587746b38fbdb69366ed6e1f38a706335309a3fc04c10aa93658a7b773cc752fed mtex2mml-1.3.1.tar.gz 54c8da2a63d4b2e9f5bccdcbc8130399c0772badda41f62dfb8ef91c10681e477e291b71fce95dda80f0c5b57277d5a94c597fe515b94eeb1c9178a587bcc3ff cmake-fix-install.patch 1754951f71e085fd8c2e6cebf6c5cd07604c671b9ac027fc2cbc16be891ffcf433ba48135e08e51479fac1cf3b129de85929cef8151e776e9b50ed4be8728b3c fix-uthash-includes.patch'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(mtex2mml)} spids:[6])] spids: [6] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:_pkgname) op:Equal rhs:{(mtex2MML)} spids:[9])] spids: [9] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(1.3.1)} spids:[12])] spids: [12] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgrel) op:Equal rhs:{(1)} spids:[15])] spids: [15] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("A Bison grammar to convert TeX math into MathML"))} spids: [18] ) ] spids: [18] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("https://github.com/gjtorikian/mtex2MML"))} spids: [23] ) ] spids: [23] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (all))} spids:[28])] spids: [28] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:license) op: Equal rhs: {(DQ ("GPL2 MPL2 LGPL2.1"))} spids: [33] ) ] spids: [33] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: {(DQ ("cmake bison flex-dev python3"))} spids: [38] ) ] spids: [38] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: { (DQ ($ VSub_Name "$pkgname") ("-dev ") ($ VSub_Name "$pkgname") ("-libs ") ($ VSub_Name "$pkgname") ("-fixtures::noarch") ) } spids: [43] ) ] spids: [43] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: { (DQ ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver") (".tar.gz::https://github.com/gjtorikian/") ($ VSub_Name "$pkgname") (/archive/v) ($ VSub_Name "$pkgver") (".tar.gz\n") ("\tcmake-fix-install.patch\n") ("\tfix-uthash-includes.patch") ) } spids: [53] ) ] spids: [53] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:builddir) op: Equal rhs: {(DQ ($ VSub_Name "$srcdir") (/) ($ VSub_Name "$_pkgname") (-) ($ VSub_Name "$pkgver"))} spids: [67] ) ] spids: [67] ) (FuncDef name: prepare body: (BraceGroup children: [ (C {(default_prepare)}) (C {(cd)} {(deps/uthash)}) (C {(mv)} {(utarray.h)} {(uthash.h)} {(utstring.h)} {(../../src/)}) (C {(rm)} {(Lit_Other "*") (.h)}) ] spids: [81] ) spids: [77 80] ) (FuncDef name: build body: (BraceGroup children: [ (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$builddir")) (/build)}) (C {(cd)} {(DQ ($ VSub_Name "$builddir")) (/build)}) (C {(cmake)} {(..)} {(-DCMAKE_BUILD_TYPE) (Lit_Other "=") (MinSizeRel)} {(-DCMAKE_INSTALL_PREFIX) (Lit_Other "=") (/usr)} {(-DCMAKE_CXX_FLAGS) (Lit_Other "=") (DQ ($ VSub_Name "$CXXFLAGS"))} {(-DCMAKE_C_FLAGS) (Lit_Other "=") (DQ ($ VSub_Name "$CFLAGS"))} {(-DCMAKE_VERBOSE_MAKEFILE) (Lit_Other "=") (TRUE)} ) (C {(make)}) ] spids: [132] ) spids: [128 131] ) (FuncDef name: check body: (BraceGroup children: [(C {(cd)} {(DQ ($ VSub_Name "$builddir")) (/build)}) (C {(ctest)} {(-V)})] spids: [202] ) spids: [198 201] ) (FuncDef name: package body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir")) (/build)}) (C {(make)} {(Lit_VarLike "DESTDIR=") (DQ ($ VSub_Name "$pkgdir"))} {(install)}) ] spids: [224] ) spids: [220 223] ) (FuncDef name: fixtures body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ($ VSub_Name "$pkgdesc") (" (test fixtures)"))} spids: [254] ) ] spids: [254] ) (Assignment keyword: Assign_Local pairs: [ (assign_pair lhs: (LhsName name:destdir) op: Equal rhs: {(DQ ($ VSub_Name "$subpkgdir") (/usr/share/) ($ VSub_Name "$_pkgname"))} spids: [263] ) ] spids: [261] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$destdir"))}) (C {(mv)} {(DQ ($ VSub_Name "$builddir")) (/tests/fixtures)} {(DQ ($ VSub_Name "$destdir")) (/)} ) ] spids: [251] ) spids: [247 250] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "584a02d8312233a08d527973ddca7d5d26429cd4d97e0a5db671d90ac1e9f2587746b38fbdb69366ed6e1f38a706335309a3fc04c10aa93658a7b773cc752fed mtex2mml-1.3.1.tar.gz\n" ) ( "54c8da2a63d4b2e9f5bccdcbc8130399c0772badda41f62dfb8ef91c10681e477e291b71fce95dda80f0c5b57277d5a94c597fe515b94eeb1c9178a587bcc3ff cmake-fix-install.patch\n" ) ( "1754951f71e085fd8c2e6cebf6c5cd07604c671b9ac027fc2cbc16be891ffcf433ba48135e08e51479fac1cf3b129de85929cef8151e776e9b50ed4be8728b3c fix-uthash-includes.patch" ) ) } spids: [296] ) ] spids: [296] ) ] )