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

# source: james
TARBALL=mupdf-$PKGVER-source.tar.gz
MD5SUM=3205256d78d8524d67dd2a47c7a345fa
SRC_URL=http://www.mupdf.com/downloads/$TARBALL
BUNDLE=

SLACKREQ='freetype2 libjpeg-turbo libopenjpeg' # 
SLACKDESC="mupdf: mupdf $PKGVER (PDF and XPS Viewer)  
mupdf:  
mupdf: MuPDF is a lightweight PDF and XPS viewer. It is small, fast, and yet 
mupdf: complete. It supports PDF 1.7 with transparency, encryption, 
mupdf: hyperlinks, annotations, searching and more. It also reads XPS and 
mupdf: OpenXPS documents.  
mupdf: 
mupdf: 
mupdf: 
mupdf: 
mupdf:
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/mupdf* &&
	for p in curl freetype jpeg zlib; do
		rm -rf thirdparty/$p
	done &&
	sed -i -e 's|-O2|-Os|g' Makerules && # build with -Os &&
	make $MAKEFLAGS         \
		build=release       \
		largefile=yes       \
		XCFLAGS=-DNOCJKFONT \
		prefix=/usr         \
		libdir=/usr/$LIBDIR \
		all install  &&
	rm -f /usr/bin/mujstest && # don't need this
	pkg_build_slackdesc
}
