#Maintainer: George Vlahavas (vlahavas~at~gmail~dot~com)

pkgname=gtkhtml
pkgver=3.32.2
pkgrel=1rl
source=("http://ftp.acc.umu.se/pub/GNOME/sources/gtkhtml/3.32/gtkhtml-3.32.2.tar.bz2")
docs=("readme" "install" "copying*" "changelog" "authors" "news" "todo" "bugs")

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"gtkhtml (a lightweight HTML rendering/editing library)"
"GtkHTML is a HTML rendering/editing library. It is not designed to be"
"the ultimate HTML browser/editor; instead, it is designed to be easily"
"embedded into applications that require lightweight HTML functionality"
)


build() {
	cd $startdir/src/$pkgname-$pkgver

	# G_CONST_RETURN is deprecated in recent glib. It was just an
	# alias for const
	sed -i "s/G_CONST_RETURN/const/" a11y/hyperlink.c
	sed -i "s/G_CONST_RETURN/const/" a11y/text.c
	sed -i "s/G_CONST_RETURN/const/" a11y/image.c
	sed -i "s/G_CONST_RETURN/const/" a11y/object.c

	./configure --prefix=/usr \
		--libdir=/usr/lib${LIBDIRSUFFIX} \
		--localstatedir=/var \
		--sysconfdir=/etc \
		--disable-static \
		--disable-deprecated-warning-flags \
		--build=$arch-slackware-linux
	make || return 1
	make install DESTDIR=$startdir/pkg

	rm $startdir/pkg/usr/bin/gtkhtml-editor-test
	rmdir $startdir/pkg/usr/bin
}