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

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

SLACKREQ='libSDL2_32 gtk3_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=3       \
		--with-sdl         \
		--enable-html      \
		--enable-htmlhelp  \
		--enable-compat30  \
	" &&
	## --enable-compat28
	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.2/wx &&
	
	# multi-lib
	mv -v /usr/bin/wx-config /tmp/wx-config-32	
}
