# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Roberto Oliveira <robertoguimaraes8@gmail.com>
pkgname=popl
pkgver=1.3.0
pkgrel=0
pkgdesc="Header-only C++ program options parser library"
url="https://github.com/badaix/popl"
arch="noarch"
license="MIT"
makedepends="cmake"
options="!check" # no tests
source="popl-$pkgver.tar.gz::https://github.com/badaix/popl/archive/v$pkgver.tar.gz"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		$CMAKE_CROSSOPTS
	make
}

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

sha512sums="
5a9e1363046b47ffb3a0664052e7466c0df78b6660d11d623c657e3805330f1ab7718665e6b59f61a6fae54a194f03b35e62595346746284318f3bb16dd180a7  popl-1.3.0.tar.gz
"
