git.mk 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. ################################################################################
  2. #
  3. # git
  4. #
  5. ################################################################################
  6. GIT_VERSION = 2.31.5
  7. GIT_SOURCE = git-$(GIT_VERSION).tar.xz
  8. GIT_SITE = $(BR2_KERNEL_MIRROR)/software/scm/git
  9. GIT_LICENSE = GPL-2.0, LGPL-2.1+
  10. GIT_LICENSE_FILES = COPYING LGPL-2.1
  11. GIT_CPE_ID_VENDOR = git-scm
  12. GIT_SELINUX_MODULES = apache git xdg
  13. GIT_DEPENDENCIES = zlib $(TARGET_NLS_DEPENDENCIES)
  14. # We're patching configure.ac
  15. GIT_AUTORECONF = YES
  16. ifeq ($(BR2_PACKAGE_OPENSSL),y)
  17. GIT_DEPENDENCIES += host-pkgconf openssl
  18. GIT_CONF_OPTS += --with-openssl
  19. GIT_MAKE_OPTS += LIB_4_CRYPTO="`$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`"
  20. else
  21. GIT_CONF_OPTS += --without-openssl
  22. endif
  23. ifeq ($(BR2_PACKAGE_PCRE2),y)
  24. GIT_DEPENDENCIES += pcre2
  25. GIT_CONF_OPTS += --with-libpcre2
  26. else
  27. GIT_CONF_OPTS += --without-libpcre2
  28. endif
  29. ifeq ($(BR2_PACKAGE_LIBCURL),y)
  30. GIT_DEPENDENCIES += libcurl
  31. GIT_CONF_OPTS += --with-curl
  32. GIT_CONF_ENV += \
  33. ac_cv_prog_CURL_CONFIG=$(STAGING_DIR)/usr/bin/$(LIBCURL_CONFIG_SCRIPTS)
  34. else
  35. GIT_CONF_OPTS += --without-curl
  36. endif
  37. ifeq ($(BR2_PACKAGE_EXPAT),y)
  38. GIT_DEPENDENCIES += expat
  39. GIT_CONF_OPTS += --with-expat
  40. else
  41. GIT_CONF_OPTS += --without-expat
  42. endif
  43. ifeq ($(BR2_PACKAGE_LIBICONV),y)
  44. GIT_DEPENDENCIES += libiconv
  45. GIT_CONF_ENV_LIBS += -liconv
  46. GIT_CONF_OPTS += --with-iconv=$(STAGING_DIR)/usr
  47. GIT_CONF_ENV += ac_cv_iconv_omits_bom=no
  48. else
  49. GIT_CONF_OPTS += --without-iconv
  50. endif
  51. ifeq ($(BR2_PACKAGE_TCL),y)
  52. GIT_DEPENDENCIES += tcl
  53. GIT_CONF_OPTS += --with-tcltk
  54. else
  55. GIT_CONF_OPTS += --without-tcltk
  56. endif
  57. ifeq ($(BR2_SYSTEM_ENABLE_NLS),)
  58. GIT_MAKE_OPTS += NO_GETTEXT=1
  59. endif
  60. GIT_CFLAGS = $(TARGET_CFLAGS)
  61. ifneq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180)$(BR2_TOOLCHAIN_HAS_GCC_BUG_93847),)
  62. GIT_CFLAGS += -O0
  63. endif
  64. GIT_CONF_OPTS += CFLAGS="$(GIT_CFLAGS)"
  65. GIT_INSTALL_TARGET_OPTS = $(GIT_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install
  66. # assume yes for these tests, configure will bail out otherwise
  67. # saying error: cannot run test program while cross compiling
  68. GIT_CONF_ENV += \
  69. ac_cv_fread_reads_directories=yes \
  70. ac_cv_snprintf_returns_bogus=yes LIBS='$(GIT_CONF_ENV_LIBS)'
  71. $(eval $(autotools-package))