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

# source: BLFS svn 2018-5-26 updated to LFS 11.3
TARBALL=elfutils-$PKGVER.tar.bz2
MD5SUM=efb25a91873b2eec4df9f31e6a4f4e5c
BUNDLE=fatdog-base-11.3.tar
SRC_URL=http://distro.ibiblio.org/fatdog/source/900/$BUNDLE
#SRC_URL=https://sourceware.org/ftp/elfutils/$PKGVER/$TARBALL

SLACKREQ=
SLACKDESC="elfutils: elfutils $PKGVER (ELF utils)  
elfutils:  
elfutils: The elfutils package contains set of utilities and libraries for 
elfutils: handling ELF (Executable and Linkable Format) files. It provides 
elfutils: similar utilities to binutils. This package is needed to build 
elfutils: radeon 3D Mesa drivers.  
elfutils: 
elfutils: 
elfutils: 
elfutils: 
elfutils:
"

### 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
### default pkg_package
### build
pkg_build() {
	CONFFLAGS="$CONFFLAGS            \
		--disable-debuginfod         \
		--enable-libdebuginfod=dummy \
		--program-prefix=eu-         \
	"
	
	# have to use this CFLAGS on gcc 12.2.0 to avoid build failure
	CFLAGS="$CFLAGS -Wno-error=use-after-free"
	
	pkg_build_autoconf && pkg_build_slackdesc
}


