# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=unifdef
pkgver=2.12
pkgrel=3
pkgdesc="Selectively remove C preprocessor conditionals"
url="https://github.com/fanf2/unifdef"
arch="all"
license="BSD-2-Clause AND BSD-3-Clause"
checkdepends="diffutils"
subpackages="$pkgname-doc"
source="https://dotat.at/prog/unifdef/unifdef-$pkgver.tar.xz"

build() {
	make CFLAGS="$CFLAGS -flto=auto"
}

check() {
	make -j1 test
}

package() {
	make DESTDIR="$pkgdir" prefix=/usr install
}

sha512sums="
df78cf931989b5e604e68e0bf00490782d385a575b51584e4be44535b6bde5f9e2abff14510f8f426670d9f6f1abfb5768da5e108bdefd6c9d0c8356a05164b5  unifdef-2.12.tar.xz
"
