xref: /OK3568_Linux_fs/buildroot/package/libgit2/libgit2.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# libgit2
4#
5################################################################################
6
7LIBGIT2_VERSION = 1.3.0
8LIBGIT2_SITE = $(call github,libgit2,libgit2,v$(LIBGIT2_VERSION))
9LIBGIT2_LICENSE = GPL-2.0 with linking exception, MIT (sha1), wildmatch license (wildmatch)
10LIBGIT2_LICENSE_FILES = COPYING
11LIBGIT2_CPE_ID_VENDOR = libgit2_project
12LIBGIT2_INSTALL_STAGING = YES
13
14LIBGIT2_CONF_OPTS = \
15	-DUSE_GSSAPI=OFF \
16	-DBUILD_CLAR=OFF \
17	-DUSE_ICONV=ON \
18	-DREGEX_BACKEND=regcomp \
19	-DUSE_HTTP_PARSER=system \
20	-DUSE_NTLMCLIENT=OFF \
21	-DTHREADSAFE=$(if $(BR2_TOOLCHAIN_HAS_THREADS),ON,OFF)
22
23LIBGIT2_DEPENDENCIES = zlib libhttpparser
24
25# If libiconv is available (for !locale toolchains), then we can use
26# it for iconv support. Note that USE_ICONV=ON is still correct even
27# without libiconv because (1) most toolchain have iconv support
28# without libiconv and (2) even if USE_ICONV=ON but iconv support is
29# not available, libgit2 simply avoids using iconv.
30ifeq ($(BR2_PACKAGE_LIBICONV),y)
31LIBGIT2_DEPENDENCIES += libiconv
32endif
33
34ifeq ($(BR2_PACKAGE_LIBSSH2),y)
35LIBGIT2_DEPENDENCIES += libssh2
36LIBGIT2_CONF_OPTS += -DUSE_SSH=ON
37else
38LIBGIT2_CONF_OPTS += -DUSE_SSH=OFF
39endif
40
41ifeq ($(BR2_PACKAGE_OPENSSL),y)
42LIBGIT2_DEPENDENCIES += openssl
43LIBGIT2_CONF_OPTS += -DUSE_HTTPS=OpenSSL
44else
45LIBGIT2_CONF_OPTS += -DUSE_HTTPS=OFF
46endif
47
48$(eval $(cmake-package))
49