# Contributor: Alan Lacerda <alacerda@alpinelinux.org>
# Maintainer: Alan Lacerda <alacerda@alpinelinux.org>
pkgname=mate-desktop
pkgver=1.28.2
pkgrel=0
pkgdesc="The MATE Desktop Environment"
url="https://mate-desktop.org/"
arch="all"
license="GPL-2.0-or-later AND LGPL-2.0-or-later"
depends="
	mate-common
	yelp-tools
	"
makedepends="
	dconf-dev
	gtk+3.0-dev
	intltool
	iso-codes-dev
	itstool
	librsvg
	libxml2-utils
	libxrandr-dev
	startup-notification-dev
	"
subpackages="$pkgname-lang $pkgname-dev $pkgname-doc"
source="https://pub.mate-desktop.org/releases/${pkgver%.*}/mate-desktop-$pkgver.tar.xz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--enable-static=no \
		--sysconfdir=/etc \
		--prefix=/usr
	# https://bugzilla.gnome.org/show_bug.cgi?id=656231
	sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
	make
}

check() {
	make check
}

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

sha512sums="
74e3cdb2bba218d06f7d95c1cd94794363fe6e2aa1b42af0b844e647a1f052109c7d5d01d9554dc8cd49e84a79cbc7563c9df96fde8248bf60b6554300779c9d  mate-desktop-1.28.2.tar.xz
"
