libk  Artifact [fbbd050911]

Artifact fbbd050911410bf5eb443ba4a868f0bae757b3ed6124c5843102c80399d6b7af:


pkgname=libk
pkgver=live
pkgrel=1
pkgdesc='a modern base library for C to replace libc'
url='https://c.comint.su/libk'
license=(AGPL)
source=('https://c.comint.su/libk/tarball/trunk/libk.tar.gz')
md5sums=(SKIP)
arch=(i686 x86_64 aarch64 armv7l)
depends=()
makedepends=(binutils bash yasm)

build() {
	export os=lin library=both
	case $(uname -m) in
		# i have no idea why, but the "arch" environment variable name
		# appears tainted somehow, and gets blanked between here and
		# the call to the build script. ugly hack but it works
		i386|i686) kind=x86; export bits=32;;
		   x86_64) kind=x86; export bits=64;;
		   armv7l) kind=arm; export bits=32;;
		  aarch64) kind=arm; export bits=64;;

		*) echo "(error) your architecture is currently not supported by the libk project"
		   return 1;;
	esac
	if pacman -T cmark; then
		export doc=yes
	else
		echo "(warning) cmark not installed; docs will not be built"
		export doc=no
	fi

	cd "$srcdir/libk"
	arch=$kind ./build.sh
}

package() {
	export prefix="$pkgdir/usr" build="$srcdir/$pkgname/out"
	cd "$srcdir/$pkgname" && install.sh
}