### this file is sourced not run
PKGVER=2015.04
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=mgp-snap-20150420.tar.gz
MD5SUM=1a0b393a4dc0d7d618d9e40a16c283c6
SRC_URL=ftp://sh.wide.ad.jp/WIDE/free-ware/mgp-snap/$TARBALL
BUNDLE=

SLACKREQ='libX11 imlib2 giflib freetype2' # 
SLACKDESC='mgp: mgp 2015.04 (X11 Presentation tool)
mgp: 
mgp: Magic Point is an X11 based presentation tool. It is designed to make 
mgp: simple presentations easy while to make complicated presentations 
mgp: possible. Its presentation file (whose suffix is typically .mgp) is 
mgp: just text so that you can create presentation files quickly with your 
mgp: favorite editor (e.g. Emacs, vi).
mgp: 
mgp: http://member.wide.ad.jp/wg/mgp/
mgp: 
mgp: 
'

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/kit*
	find . -name Imakefile.in | while read -r p; do
		sed -i -e 's|LIBDIR=/lib|&64|' $p
	done &&
	
	./configure $CONFFLAGS --enable-imlib &&
	find . -type d | while read -r p; do (cd $p; xmkmf); done &&
	make && make install &&
	install -m755 contrib/mgp2html.pl /usr/bin &&
	install -dm755 /usr/share/doc/mgp/sample &&
	install -m644 sample/* /usr/share/doc/mgp/sample &&
	
	pkg_build_slackdesc
}
