# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=poedit
pkgver=3.4.3
pkgrel=0
pkgdesc="cross-platform translations editor"
url="https://www.poedit.net"
# s390x: cpprestsdk; nobody would use this there
arch="all !s390x"
license="MIT"
depends="gettext"
makedepends="
	boost-dev
	cpprestsdk-dev
	enchant2-dev
	gettext-dev
	gtk+3.0-dev
	gtkspell3-dev
	lucene++-dev
	pugixml-dev
	wxwidgets-dev
	"
subpackages="$pkgname-lang $pkgname-doc"
source="https://github.com/vslavik/poedit/releases/download/v$pkgver-oss/poedit-$pkgver.tar.gz
	include-ctime.patch
	"

prepare(){
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

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

sha512sums="
98dff841ad5f4efad752e5d58ee83fb2a501bbcf7ca11860c1f9a5f7e5a989288f624041c9b6f70d64fe1ee547349b0b1b89690abcfa23cbb50ebbfced8e125f  poedit-3.4.3.tar.gz
fe8b946aaa12d3c6c989f9cd8182c4e7e0ebb81fd7d6efa0b8e0a2284c41691dfc3b8267cde81f62c4478df188350af79dc9ba669059e8ca68f939e61e5f1648  include-ctime.patch
"
