git.mk 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. ################################################################################
  2. #
  3. # git
  4. #
  5. ################################################################################
  6. GIT_VERSION = 2.45.2
  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. ifeq ($(BR2_PACKAGE_OPENSSL),y)
  15. GIT_DEPENDENCIES += host-pkgconf openssl
  16. GIT_CONF_OPTS += --with-openssl
  17. GIT_MAKE_OPTS += LIB_4_CRYPTO="`$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`"
  18. else
  19. GIT_CONF_OPTS += --without-openssl
  20. endif
  21. ifeq ($(BR2_PACKAGE_PCRE2),y)
  22. GIT_DEPENDENCIES += pcre2
  23. GIT_CONF_OPTS += --with-libpcre2
  24. else
  25. GIT_CONF_OPTS += --without-libpcre2
  26. endif
  27. ifeq ($(BR2_PACKAGE_LIBCURL),y)
  28. GIT_DEPENDENCIES += libcurl
  29. GIT_CONF_OPTS += --with-curl
  30. GIT_CONF_ENV += \
  31. ac_cv_prog_CURL_CONFIG=$(STAGING_DIR)/usr/bin/$(LIBCURL_CONFIG_SCRIPTS)
  32. else
  33. GIT_CONF_OPTS += --without-curl
  34. endif
  35. ifeq ($(BR2_PACKAGE_EXPAT),y)
  36. GIT_DEPENDENCIES += expat
  37. GIT_CONF_OPTS += --with-expat
  38. else
  39. GIT_CONF_OPTS += --without-expat
  40. endif
  41. ifeq ($(BR2_PACKAGE_LIBICONV),y)
  42. GIT_DEPENDENCIES += libiconv
  43. GIT_CONF_ENV_LIBS += -liconv
  44. GIT_CONF_OPTS += --with-iconv=$(STAGING_DIR)/usr
  45. GIT_CONF_ENV += ac_cv_iconv_omits_bom=no
  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))