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

# source: james
TARBALL=netsurf-all-${PKGVER}.tar.gz
MD5SUM=1554bb1093ef582da6b81883e181a3cf
SRC_URL=http://download.netsurf-browser.org/netsurf/releases/source-full/$TARBALL
BUNDLE=

SLACKREQ='librsvg expat libpng openssl libjpeg-turbo' # build-time only: libidn 
SLACKDESC="netsurf-fb: netsurf-fb $PKGVER (Fast and lightweight web browser)
netsurf-fb: 
netsurf-fb: This is framebuffer version of netsurf, the multi-platform web 
netsurf-fb: browser for RISC OS, UNIX-like platforms (including Linux), 
netsurf-fb: Mac OS X, and more.
netsurf-fb: 
netsurf-fb: You don't need Xorg or wayland or any other graphical desktop
netsurf-fb: to run this, in fact you cannot run this anywhere other than 
netsurf-fb: on the Linux console.
netsurf-fb: 
netsurf-fb: http://www.netsurf-browser.org/
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/netsurf*

	# our pkg-config can't operate with a blank PKG_CONFIG_PATH
	sed -i -e "/PKG_CONFIG_PATH/ s|$|:${PKG_CONFIG_PATH}|" Makefile &&

	cat << "EOF" > netsurf/Makefile.config &&
override NETSURF_FB_FONTLIB := freetype
override NETSURF_FB_FONTPATH := /usr/share/fonts/X11/TTF
EOF

	make TARGET=framebuffer PREFIX=/usr &&
	make TARGET=framebuffer PREFIX=/usr install &&
	pkg_build_slackdesc &&
	rm -rf /root/.ccache
}
