# Maintainer: AndyRTR <andyrtr@archlinux.org>

pkgname=libqxp
pkgver=0.0.3
pkgrel=1
pkgdesc="a library that parses the file format of QuarkXPress documents"
arch=('x86_64' 'aarch64')
url="https://wiki.documentfoundation.org/DLP/Libraries/libqxp"
license=('MPL-2.0')
depends=('librevenge' 'icu' 'glibc' 'libstdc++' 'libgcc')
makedepends=('boost' 'cppunit' 'doxygen')
source=("https://dev-www.libreoffice.org/src/$pkgname/$pkgname-$pkgver.tar.xz")
sha256sums=('4687a9cc96c32d7406e5072c4da150fca696c563e5cde62b024f82fa53d32332')

prepare() {
	cd "$pkgname-$pkgver"
	autoreconf -vfi
}

build() {
	cd "$pkgname-$pkgver"
	./configure --prefix=/usr
        sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
	make
}

check() {
	cd "$pkgname-$pkgver"
	make check
}

package() {
	cd "$pkgname-$pkgver"
	make DESTDIR="$pkgdir/" install
}
