### this file is sourced not run
PKGVER=3.0.5
PKGBUILD=1
PKGARCH=i686

# source: Kirk updated to 3.0.4
TARBALL=wxWidgets-$PKGVER.tar.bz2
MD5SUM=b4304777652acee8358066cdce5f6f27
SRC_URL=https://github.com/wxWidgets/wxWidgets/releases/download/v$PKGVER/$TARBALL
BUNDLE=

SLACKREQ='libSDL2_32 gtk2_32'
SLACKDESC="wxwidgets32: wxwidgets32 $PKGVER (C++ GUI framework)
wxwidgets32:  
wxwidgets32: Welcome to wxWidgets, a sophisticated cross-platform C++
wxwidgets32: framework for writing advanced GUI applications using
wxwidgets32: native controls where possible.
wxwidgets32: 
wxwidgets32: https://wxwidgets.org
wxwidgets32: 
wxwidgets32: This is 32-bit version of the library
wxwidgets32: 
wxwidgets32: 
"

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/wxWidgets* &&
	patch -Np1 -i ../pkg/non-fatal-abi.patch
}

### package - only collect the libraries
pkg_package() {
	rm -rf bin sbin usr/bin usr/sbin usr/include usr/share etc &&
	mkdir -p usr/bin &&
	mv -v tmp/wx-config-32 usr/bin
}

### build
pkg_build() {
	cd /tmp/wxWidgets*
	CONFFLAGS="$CONFFLAGS --with-gtk --enable-gtk2 \
		--with-sdl --with-gnomeprint --enable-unicode --enable-html"
	pkg_build_autoconf &&
	# cd contrib && make $MAKEFLAGS && make install &&
	pkg_build_slackdesc &&
	
	# CBLFS - copy setup.h?
	cp include/msvc/wx/setup.h /usr/include/wx-3.0/wx &&
	
	# multi-lib
	mv -v /usr/bin/wx-config /tmp/wx-config-32	
}
