git.mk 2.1 KB

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