#Packager: George Vlahavas <vlahavas~at~gmail~dot~com>

pkgname=the_foundation
pkgver=1.9.0
pkgrel=1gv
source=("https://git.skyjake.fi/skyjake/the_Foundation/archive/v${pkgver}.tar.gz")
docs=("readme.md" "install" "license" "changes.md" "authors" "news" "todo")
url=https://git.skyjake.fi/skyjake/the_Foundation

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"the_foundation (Opinionated C11 library for low-level functionality)"
"the_Foundation is an object-oriented C library whose API is designed"
"for a particular coding style, taking cues from C++ STL and Qt."
)


build() {
	cd $startdir/src/$pkgname
	
	if [ $arch = "i586" ]; then
		export SSE41=NO
	else
		export SSE41=YES
	fi

	mkdir build
	cd build
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=/usr/lib${LIBDIRSUFFIX} \
		-DTFDN_ENABLE_TESTS=OFF \
		-DTFDN_ENABLE_SSE41=$SSE41 \
		-DCMAKE_BUILD_TYPE=Release \
		..
	cmake --build .
	DESTDIR=$startdir/pkg cmake --install .
}