# Contributor: Alan Lacerda <alacerda@alpinelinux.org>
# Maintainer: Alan Lacerda <alacerda@alpinelinux.org>
pkgname=mate-desktop
pkgver=1.28.2
pkgrel=1
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
	startup-notification-time-types.patch
	"

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
8e90cde54d2c4ffcc3b4ac76e3fac504aae12d2227f4291ab344c66dbd9206931a1fe4c2e546e716de714364be0625d79a6ed72e300645276782338a4236ff0d  startup-notification-time-types.patch
"
