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

# source: BLFS 11.3
TARBALL=swig-$PKGVER.tar.gz
MD5SUM=c7d55a1bca26752f3846c85b43c1a69c
SRC_URL=http://downloads.sourceforge.net/swig/$TARBALL
BUNDLE=

SLACKREQ=libpcre2 # py3c build-time only
SLACKDESC="swig: swig $PKGVER (Interface Generator)  
swig:  
swig: SWIG (Simplified Wrapper and Interface Generator) is a compiler that 
swig: integrates C and C++ with languages including Perl, Python, Tcl, Ruby, 
swig: PHP, Java, C#, D, Go, Lua, Octave, R, Scheme, Ocaml, Modula-3, Common 
swig: Lisp, and Pike. SWIG can also export its parse tree into Lisp 
swig: s-expressions and XML. SWIG reads annotated C/C++ header files and 
swig: creates wrapper code (glue code) in order to make the corresponding 
swig: C/C++ libraries available to the listed languages, or to extend C/C++ 
swig: programs with a scripting language.  
swig:
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	CONFFLAGS="$CONFFLAGS \
		--without-javascript               \
        --without-maximum-compile-warnings \
    " &&
	pkg_build_autoconf && pkg_build_slackdesc &&

	# docs
	install -v -m755 -d /usr/share/doc/swig-$PKGVER &&
	cp -v -R Doc/* /usr/share/doc/swig-$PKGVER &&
	
	# multlib
	mv -v /usr/bin/swig{,-64} &&
	mv -v /usr/bin/ccache-swig{,-64} &&
	ln -sfv multiarch_wrapper /usr/bin/swig &&
	ln -sfv multiarch_wrapper /usr/bin/ccache-swig
}


