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

# source: BLFS 11.3 updated to SVR r890
TARBALL=libxml2-$PKGVER.tar.xz
MD5SUM=76808c467a58c31e2dbd511e71d5fd13
SRC_URL=https://download.gnome.org/sources/libxml2/2.10/$TARBALL
BUNDLE=

# Note: This is the same recipe as libxml2. But we collect only the python modules
# Reason why we need this: libxml2 was built before python, thus it cannot build
# python modules.

SLACKREQ=libreadline
SLACKDESC="python-libxml2: python-libxml2 $PKGVER (Python module for libxml2)
python-libxml2: 
python-libxml2: This is a python module for libxml2.
python-libxml2: 
python-libxml2: 
python-libxml2: 
python-libxml2: 
python-libxml2: 
python-libxml2: 
python-libxml2: 
python-libxml2: 
"

### default pkg_download
### default pkg_prepare

### package - only keep python modules
pkg_package() {
	rm -f usr/$LIBDIR/* 2> /dev/null
	rm -r usr/include usr/bin usr/share usr/$LIBDIR/cmake usr/$LIBDIR/pkgconfig
}

### build
pkg_build() {
	CONFFLAGS="$CONFFLAGS --disable-static --with-history --with-threads PYTHON=/usr/bin/python2"
	
	pkg_build_autoconf && 
	pkg_build_slackdesc &&
	
	# multilib
	mv -v /usr/bin/xml2-config{,-64} &&
	ln -sfv multiarch_wrapper /usr/bin/xml2-config	
}


