### this file is sourced not run
PKGVER=4.49.1
PKGBUILD=1
PKGARCH=noarch

# source: james
TARBALL=terminus-font-$PKGVER.tar.gz
MD5SUM=1b6acbd221957e33c8a792ebfaf3a659
SRC_URL=http://downloads.sourceforge.net/terminus-font/$TARBALL
BUNDLE=

X11_FONT_PATH=/usr/share/fonts/X11

SLACKREQ= # python3, bdftopcf build-time (if we build PCF variant)
SLACKDESC="font-terminus-otb: font-terminus-otb $PKGVER (Terminus Bitmap Font)
font-terminus-otb: 
font-terminus-otb: Terminus Font is a clean, fixed width bitmap font, designed for long 
font-terminus-otb: (8 and more hours per day) work with computers. It contains 1356 
font-terminus-otb: characters, and covers about 120 language sets. This package contains 
font-terminus-otb: the OpenType Bitmap (OTB) fonts for use with X11. It contains the ll2 
font-terminus-otb: td1 and br1 variant.
font-terminus-otb: 
font-terminus-otb: https://terminus-font.sourceforge.net/
font-terminus-otb: 
font-terminus-otb:
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&

	# enable variants: ll2, td1 and br1
	cd tmp/terminus* &&
	patch -Np1 -i alt/ll2.diff &&
	patch -Np1 -i alt/td1.diff &&
	patch -Np1 -i alt/br1.diff &&
	true
}

### default pkg_package

### build
pkg_build() {
	cd /tmp/terminus* &&
	./configure --prefix=/usr        \
		--x11dir=$X11_FONT_PATH/misc \
		--otbdir=$X11_FONT_PATH/TTF  \
	&&
	make -j8 otb &&     # psf pcf
	make install-otb && # install-psf install-pcf

	pkg_build_slackdesc
}
