xref: /OK3568_Linux_fs/buildroot/package/git/git.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# git
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunGIT_VERSION = 2.31.1
8*4882a593SmuzhiyunGIT_SOURCE = git-$(GIT_VERSION).tar.xz
9*4882a593SmuzhiyunGIT_SITE = $(BR2_KERNEL_MIRROR)/software/scm/git
10*4882a593SmuzhiyunGIT_LICENSE = GPL-2.0, LGPL-2.1+
11*4882a593SmuzhiyunGIT_LICENSE_FILES = COPYING LGPL-2.1
12*4882a593SmuzhiyunGIT_CPE_ID_VENDOR = git-scm
13*4882a593SmuzhiyunGIT_SELINUX_MODULES = apache git
14*4882a593SmuzhiyunGIT_DEPENDENCIES = zlib $(TARGET_NLS_DEPENDENCIES)
15*4882a593Smuzhiyun# We're patching configure.ac
16*4882a593SmuzhiyunGIT_AUTORECONF = YES
17*4882a593Smuzhiyun
18*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_OPENSSL),y)
19*4882a593SmuzhiyunGIT_DEPENDENCIES += host-pkgconf openssl
20*4882a593SmuzhiyunGIT_CONF_OPTS += --with-openssl
21*4882a593SmuzhiyunGIT_MAKE_OPTS += LIB_4_CRYPTO="`$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`"
22*4882a593Smuzhiyunelse
23*4882a593SmuzhiyunGIT_CONF_OPTS += --without-openssl
24*4882a593Smuzhiyunendif
25*4882a593Smuzhiyun
26*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_PCRE2),y)
27*4882a593SmuzhiyunGIT_DEPENDENCIES += pcre2
28*4882a593SmuzhiyunGIT_CONF_OPTS += --with-libpcre2
29*4882a593Smuzhiyunelse
30*4882a593SmuzhiyunGIT_CONF_OPTS += --without-libpcre2
31*4882a593Smuzhiyunendif
32*4882a593Smuzhiyun
33*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBCURL),y)
34*4882a593SmuzhiyunGIT_DEPENDENCIES += libcurl
35*4882a593SmuzhiyunGIT_CONF_OPTS += --with-curl
36*4882a593SmuzhiyunGIT_CONF_ENV += \
37*4882a593Smuzhiyun	ac_cv_prog_CURL_CONFIG=$(STAGING_DIR)/usr/bin/$(LIBCURL_CONFIG_SCRIPTS)
38*4882a593Smuzhiyunelse
39*4882a593SmuzhiyunGIT_CONF_OPTS += --without-curl
40*4882a593Smuzhiyunendif
41*4882a593Smuzhiyun
42*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_EXPAT),y)
43*4882a593SmuzhiyunGIT_DEPENDENCIES += expat
44*4882a593SmuzhiyunGIT_CONF_OPTS += --with-expat
45*4882a593Smuzhiyunelse
46*4882a593SmuzhiyunGIT_CONF_OPTS += --without-expat
47*4882a593Smuzhiyunendif
48*4882a593Smuzhiyun
49*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBICONV),y)
50*4882a593SmuzhiyunGIT_DEPENDENCIES += libiconv
51*4882a593SmuzhiyunGIT_CONF_ENV_LIBS += -liconv
52*4882a593SmuzhiyunGIT_CONF_OPTS += --with-iconv=/usr/lib
53*4882a593Smuzhiyunelse
54*4882a593SmuzhiyunGIT_CONF_OPTS += --without-iconv
55*4882a593Smuzhiyunendif
56*4882a593Smuzhiyun
57*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_TCL),y)
58*4882a593SmuzhiyunGIT_DEPENDENCIES += tcl
59*4882a593SmuzhiyunGIT_CONF_OPTS += --with-tcltk
60*4882a593Smuzhiyunelse
61*4882a593SmuzhiyunGIT_CONF_OPTS += --without-tcltk
62*4882a593Smuzhiyunendif
63*4882a593Smuzhiyun
64*4882a593Smuzhiyunifeq ($(BR2_SYSTEM_ENABLE_NLS),)
65*4882a593SmuzhiyunGIT_MAKE_OPTS += NO_GETTEXT=1
66*4882a593Smuzhiyunendif
67*4882a593Smuzhiyun
68*4882a593SmuzhiyunGIT_CFLAGS = $(TARGET_CFLAGS)
69*4882a593Smuzhiyun
70*4882a593Smuzhiyunifneq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180)$(BR2_TOOLCHAIN_HAS_GCC_BUG_93847),)
71*4882a593SmuzhiyunGIT_CFLAGS += -O0
72*4882a593Smuzhiyunendif
73*4882a593Smuzhiyun
74*4882a593SmuzhiyunGIT_CONF_OPTS += CFLAGS="$(GIT_CFLAGS)"
75*4882a593Smuzhiyun
76*4882a593SmuzhiyunGIT_INSTALL_TARGET_OPTS = $(GIT_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install
77*4882a593Smuzhiyun
78*4882a593Smuzhiyun# assume yes for these tests, configure will bail out otherwise
79*4882a593Smuzhiyun# saying error: cannot run test program while cross compiling
80*4882a593SmuzhiyunGIT_CONF_ENV += \
81*4882a593Smuzhiyun	ac_cv_fread_reads_directories=yes \
82*4882a593Smuzhiyun	ac_cv_snprintf_returns_bogus=yes LIBS='$(GIT_CONF_ENV_LIBS)'
83*4882a593Smuzhiyun
84*4882a593Smuzhiyun$(eval $(autotools-package))
85