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

TARBALL=bison-$PKGVER.tar.xz
MD5SUM=c28f119f405a2304ff0a7ccdcc629713
BUNDLE=fatdog-base-11.3.tar
SRC_URL=http://distro.ibiblio.org/fatdog/source/900/$BUNDLE

SLACKREQ=
SLACKDESC="bison32: bison32 $PKGVER (Bison parser generator)  
bison32:  
bison32: Bison is a general-purpose parser generator that converts an annotated 
bison32: context-free grammar into a deterministic LR or generalized LR (GLR) 
bison32: parser employing LALR(1) parser tables. As an experimental feature, 
bison32: Bison can also generate IELR(1) or canonical LR(1) parser tables. Once 
bison32: you are proficient with Bison, you can use it to develop a wide range 
bison32: of language parsers, from those used in simple desk calculators to 
bison32: complex programming languages. Bison is upward compatible with Yacc.  
bison32: 
bison32: This is 32-bit version of bison.
"


### override download for LFS sources bundle
# $1-src-dir $2-tarball 
pkg_download() {
	echo downloading $BUNDLE for $TARBALL
	wget -P $1 $SRC_URL
	tar -xf $1/$BUNDLE --strip-components=1 -C $1 
	rm $1/$BUNDLE
}

### default pkg_prepare
### package - only collect the libraries
pkg_package() {
	rm -rf bin sbin usr/bin usr/sbin usr/include usr/share
}

### build
pkg_build() {
	cd /tmp/bison*
	CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" \
		./configure --prefix=/usr &&
	 make $MAKEFLAGS && make install &&
	 pkg_build_slackdesc
}

