#Packager: George Vlahavas <vlahavas~at~gmail~dot~com>
# Included in Slint by Didier Spaier <didier~at~slint~dot~fr> 


pkgname=pluma
pkgver=1.24.0
_majorver=`echo $pkgver | sed "s/\(.*\)\.\(.*\)/\1/"`
pkgrel=1slint
source=("http://pub.mate-desktop.org/releases/${_majorver}/${pkgname}-${pkgver}.tar.xz")
docs=("readme" "install" "copying" "changelog" "authors" "news*" "todo" "hacking")
options=("noautodotnew" "nosrcpack")

doinst() {
# compile schemas
if [ -x usr/bin/glib-compile-schemas ]; then
	usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas
fi
}

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"pluma (A powerful text editor for MATE)"
"pluma is a small and lightweight UTF-8 text editor for the MATE"
"desktop."
)

# the patch settings.for.slint.diff makes the 'cobalt' style the default
# as I prefer it for Slint. Also set the default editor font as
# 'DejaVu Sans Mono 12' - Didier Spaier <didier~at~slint~dot~fr>
# Well, no since 1.24.0. Don't impose my choices to others. Didier
build() {
	cd $SRC/$pkgname-$pkgver

#	patch -p1 --verbose < $startdir/settings.for.slint.diff
	./configure --prefix=/usr \
		--libdir=/usr/lib${LIBDIRSUFFIX} \
		--localstatedir=/var \
		--sysconfdir=/etc \
		--disable-gtk-doc \
		--disable-gtk-doc-pdf \
		--disable-gtk-doc-html \
		--disable-schemas-compile \
		--build=$arch-slackware-linux
# from Sudiarto Raharjo <willysr@slackware-id.org>
# This is needed in -current, but should be harmless in -stable as well
sed -i "s|--strict --dry-run|--dry-run|" data/Makefile
	make -j $numjobs || return 1
	make install DESTDIR=$startdir/pkg
} 
