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

# source: BLFS 11.3
TARBALL=gc-$PKGVER.tar.gz
MD5SUM=787177b1b15aa19ffa0d61d8f508b69d
SRC_URL=http://www.hboehm.info/gc/gc_source/$TARBALL
BUNDLE=

SLACKREQ='libatomic_ops'
SLACKDESC="libgc: libgc $PKGVER (Garbage Collector library)  
libgc:  
libgc: The GC package contains the Boehm-Demers-Weiser conservative garbage 
libgc: collector, which can be used as a garbage collecting replacement for 
libgc: the C malloc function or C++ new operator. It allows you to allocate 
libgc: memory basically as you normally would, without explicitly deallocating 
libgc: memory that is no longer useful. The collector automatically recycles 
libgc: memory when it determines that it can no longer be otherwise accessed.  
libgc: 
libgc: https://www.hboehm.info/gc/
libgc: https://github.com/ivmai/bdwgc/
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/gc*

	CONFFLAGS="$CONFFLAGS  \
		--enable-cplusplus \
		--disable-static   \
		--docdir=/usr/share/doc/gc-$PKGVER \
		--with-libatomic-ops=yes \
	" &&
	
	pkg_build_autoconf &&
	install -v -m644 doc/gc.man /usr/share/man/man3/gc_malloc.3 &&
	ln -sfv gc_malloc.3 /usr/share/man/man3/gc.3 &&
	pkg_build_slackdesc
}


