# Template file for 'libgit2'
pkgname=libgit2
reverts=0.23.0_1
version=0.22.3
revision=2
build_style=cmake
hostmakedepends="cmake python git pkg-config"
makedepends="zlib-devel libressl-devel http-parser-devel libssh2-devel"
short_desc="The Git linkable library"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://libgit2.github.com/"
license="GPL-2 with Linking Exception"
distfiles="https://github.com/libgit2/libgit2/archive/v${version}.tar.gz"
checksum=511fe60e7c12c3525b4e0489861e5c1fe0e331d604bee9a3dfb8420c2f288f60

case "$XBPS_TARGET_MACHINE" in
	*-musl)
		# Don't use qsort_r, see src/util.c
		CFLAGS="-D__ANDROID_API__"
		;;
esac

libgit2-devel_package() {
	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove "usr/lib/*.so"
	}
}
