: nply/foundationpkgs

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
# Lowest-common-denominator host-toolchain presence check, used when no
# OS-specific build-essentials-stub exists (e.g. *BSD hosts). See
# Darwin/build-essentials-stub for the general idea.
pkgname=build-essentials-stub
pkgver=0
pkgrel=0
pkgdesc="verifies baseline POSIX build toolchain presence (cc, make, tar, curl)"
arch="all"

checkdeps="cc make tar curl"

verify() {
	_missing=""
	for _tool in $checkdeps; do
		command -v "$_tool" >/dev/null 2>&1 || _missing="$_missing $_tool"
	done

	[ -z "$_missing" ] && return 0

	for _tool in $_missing; do
		echo "! missing required tool: $_tool (install it via your OS's package manager)" >&2
	done
	return 1
}