# Contributor: Eloi Torrents <eloitor@disroot.org>
# Maintainer: Eloi Torrents <eloitor@disroot.org>
pkgname=lyx
_pkgver=2.3.7-1
pkgver=${_pkgver/-/.}
pkgrel=3
pkgdesc="Advanced WYSIWYM document processor & LaTeX front-end"
url="https://www.lyx.org"
arch="all"
license="GPL-2.0-or-later"
makedepends="
	boost-dev
	enchant2-dev
	file-dev
	mythes-dev
	qt5-qtbase-dev
	qt5-qtsvg-dev
	"
depends="
	imagemagick
	python3
	"
subpackages="$pkgname-doc $pkgname-lang $pkgname-pyc"
source="https://ftp.lip6.fr/pub/lyx/stable/2.3.x/lyx-$_pkgver.tar.xz
	"
builddir="$srcdir/$pkgname-${_pkgver%-*}"

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--enable-qt5 \
		--without-included-boost \
		--without-included-mythes
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

pyc() {
	default_pyc
	local IFS=$'\n'
	amove $(find usr/share/lyx -type d -name __pycache__)
}

sha512sums="
b8aaefb68993032354fea3c6fd87d6da161395c92b5def4ecf92a7d6873ec59e01cdfb45c51ae1aaa62aa54db8e100b00ff9c2c9e0f1307c2f46860cd8c6eefe  lyx-2.3.7-1.tar.xz
"
