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

# source: BLFS 11.3
TARBALL=graphite2-$PKGVER.tgz
MD5SUM=1bccb985a7da01092bfb53bb5041e836
SRC_URL=https://github.com/silnrsi/graphite/releases/download/$PKGVER/$TARBALL
BUNDLE=

SLACKREQ=
SLACKDESC="libgraphite2: libgraphite2 $PKGVER (Font rendering engine)
libgraphite2: 
libgraphite2: Graphite2 is a rendering engine for graphite fonts. These are 
libgraphite2: TrueType fonts with additional tables containing smart rendering 
libgraphite2: information and were originally developed to support complex 
libgraphite2: non-Roman writing systems. They may contain rules for e.g. ligatures, 
libgraphite2: glyph substitution, kerning, justification - this can make them 
libgraphite2: useful even on text written in Roman writing systems such as English.
libgraphite2: 
libgraphite2: 
libgraphite2: 
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	CMAKEFLAGS="$CMAKEFLAGS -DLIB_SUFFIX=64"

	# BLFS 11.3 disable test that depends on FontTools
	cd /tmp/graphite2* &&
	sed -i '/cmptest/d' tests/CMakeLists.txt &&

	# remove tests
	sed -i 's/add_subdirectory(tests)//' CMakeLists.txt &&
	
	pkg_build_cmake &&

	# build docs
	make docs &&
	install -v -d -m755 /usr/share/doc/graphite2-$PKGVER &&
	cp      -v -f    doc/{GTF,manual}.html \
						/usr/share/doc/graphite2-$PKGVER &&

	# we don't build pdf so there isn't anything to copy						
	#cp      -v -f    doc/{GTF,manual}.pdf \
	#					/usr/share/doc/graphite2-$PKGVER &&

	# finish it
	pkg_build_slackdesc
}


