# vim: ft=make ts=4 sw=4 noet
.DEFAULT_GOAL := all
NAME    = git
VERSION = 2.51.0
GARTYPE = v2

MASTER_SITES = https://mirrors.edge.kernel.org/pub/software/scm/git/
DISTFILES   += $(DISTNAME).tar.gz
LICENSE = COPYING

BUILD_DEP_PKGS                 += OZSWcurl OZSWopenssl OZSWzlib OZSWperl OZSWlibiconv OZSWgettext
RUNTIME_DEP_PKGS_OZSWgit       += OZSWcurl OZSWopenssl OZSWzlib OZSWperl OZSWlibiconv
PACKAGES           += OZSWgit
SPKG_DESC_OZSWgit   = Git distributed version control system
CATALOGNAME_OZSWgit = git

EXTENSIONS = 1

EXTRA_CONFIGURE_ARGS += --with-curl=$(prefix)
EXTRA_CONFIGURE_ARGS += --with-openssl=$(prefix)
EXTRA_CONFIGURE_ARGS += --without-tcltk
EXTRA_CONFIGURE_ARGS += --with-iconv=$(prefix)

EXTRA_LD_FLAGS += -liconv -lintl -lm

post-configure:
	@find $(WORKSRC) -name "libtool" -type f -exec \
	    gsed -i 's/ECHO="print -r --"/ECHO="printf %s\\n"/g' {} \;
	@$(MAKECOOKIE)

include gar/category.mk
