libgit2.mk 1.4 KB

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