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

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

SLACKREQ='gtk2 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: Small as a mouse, fast as a cheetah and available for free. NetSurf 
netsurf-fb: is a multi-platform web browser for RISC OS, UNIX-like platforms 
netsurf-fb: (including Linux), Mac OS X, and more. Whether you want to check your 
netsurf-fb: webmail, read the news or post to discussion forums, NetSurf is your 
netsurf-fb: lightweight gateway to the world wide web. Actively developed, 
netsurf-fb: NetSurf is continually evolving and improving.  
netsurf-fb: Note: Netsurf does not support Flash.
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
}
