summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/git/git_2.44.4.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/git/git_2.44.4.bb')
-rw-r--r--meta/recipes-devtools/git/git_2.44.4.bb175
1 files changed, 175 insertions, 0 deletions
diff --git a/meta/recipes-devtools/git/git_2.44.4.bb b/meta/recipes-devtools/git/git_2.44.4.bb
new file mode 100644
index 0000000000..66936417e1
--- /dev/null
+++ b/meta/recipes-devtools/git/git_2.44.4.bb
@@ -0,0 +1,175 @@
1SUMMARY = "Distributed version control system"
2HOMEPAGE = "http://git-scm.com"
3DESCRIPTION = "Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency."
4SECTION = "console/utils"
5LICENSE = "GPL-2.0-only & GPL-2.0-or-later & BSD-3-Clause & MIT & BSL-1.0 & LGPL-2.1-or-later"
6DEPENDS = "openssl zlib"
7DEPENDS:class-native += "ca-certificates"
8
9PROVIDES:append:class-native = " git-replacement-native"
10
11SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \
12 file://fixsort.patch \
13 file://0001-config.mak.uname-do-not-force-RHEL-7-specific-build-.patch \
14 "
15
16SRC_URI:append:class-nativesdk = " \
17 file://environment.d-git.sh \
18 "
19
20S = "${WORKDIR}/git-${PV}"
21
22LIC_FILES_CHKSUM = "\
23 file://COPYING;md5=7c0d7ef03a7eb04ce795b0f60e68e7e1 \
24 file://reftable/LICENSE;md5=1a6424cafc4c9c88c689848e165af33b \
25 file://sha1dc/LICENSE.txt;md5=9bbe4c990a9e98ea4b98ef5d3bcb8a7a \
26 file://compat/nedmalloc/License.txt;md5=e4224ccaecb14d942c71d31bef20d78c \
27 file://compat/inet_ntop.c;md5=76593c6f74e8ced5b24520175688d59b;endline=16 \
28 file://compat/obstack.h;md5=08ad25fee5428cd879ceef451ce3a22e;endline=18 \
29 file://compat/poll/poll.h;md5=9fc00170a53b8e3e52157c91ac688dd1;endline=19 \
30 file://compat/regex/regex.h;md5=30cc8af0e6f0f8a25acec6d8783bb763;beginline=4;endline=22 \
31"
32
33CVE_PRODUCT = "git-scm:git"
34
35PACKAGECONFIG ??= "expat curl"
36PACKAGECONFIG[cvsserver] = ""
37PACKAGECONFIG[svn] = ""
38PACKAGECONFIG[manpages] = ",,asciidoc-native xmlto-native"
39PACKAGECONFIG[curl] = "--with-curl,--without-curl,curl"
40PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat"
41
42EXTRA_OECONF = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl \
43 --without-tcltk \
44 --without-iconv \
45"
46EXTRA_OECONF:append:class-nativesdk = " --with-gitconfig=/etc/gitconfig "
47EXTRA_OECONF:append:class-native = " --with-gitconfig=/etc/gitconfig "
48
49# Needs brokensep as this doesn't use automake
50inherit autotools-brokensep perlnative bash-completion manpages
51
52EXTRA_OEMAKE = "NO_PYTHON=1 CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'"
53EXTRA_OEMAKE += "'PERL_PATH=/usr/bin/env perl'"
54EXTRA_OEMAKE += "COMPUTE_HEADER_DEPENDENCIES=no"
55EXTRA_OEMAKE:append:class-native = " NO_CROSS_DIRECTORY_HARDLINKS=1"
56
57do_compile:prepend () {
58 # Remove perl/perl.mak to fix the out-of-date perl.mak error
59 # during rebuild
60 rm -f perl/perl.mak
61
62 if [ "${@bb.utils.filter('PACKAGECONFIG', 'manpages', d)}" ]; then
63 oe_runmake man
64 fi
65}
66
67do_install () {
68 oe_runmake install DESTDIR="${D}" bindir=${bindir} \
69 template_dir=${datadir}/git-core/templates
70
71 install -d ${D}/${datadir}/bash-completion/completions/
72 install -m 644 ${S}/contrib/completion/git-completion.bash ${D}/${datadir}/bash-completion/completions/git
73
74 if [ "${@bb.utils.filter('PACKAGECONFIG', 'manpages', d)}" ]; then
75 # Needs to be serial with make 4.4 due to https://savannah.gnu.org/bugs/index.php?63362
76 make install-man DESTDIR="${D}"
77 fi
78}
79
80perl_native_fixup () {
81 sed -i -e 's#${STAGING_BINDIR_NATIVE}/perl-native/#${bindir}/#' \
82 -e 's#${libdir}/perl-native/#${libdir}/#' \
83 ${@d.getVar("PERLTOOLS").replace(' /',d.getVar('D') + '/')}
84
85 if [ ! "${@bb.utils.filter('PACKAGECONFIG', 'cvsserver', d)}" ]; then
86 # Only install the git cvsserver command if explicitly requested
87 # as it requires the DBI Perl module, which does not exist in
88 # OE-Core.
89 rm ${D}${libexecdir}/git-core/git-cvsserver \
90 ${D}${bindir}/git-cvsserver
91 fi
92
93 if [ ! "${@bb.utils.filter('PACKAGECONFIG', 'svn', d)}" ]; then
94 # Only install the git svn command and all Git::SVN Perl modules
95 # if explicitly requested as they require the SVN::Core Perl
96 # module, which does not exist in OE-Core.
97 rm -r ${D}${libexecdir}/git-core/git-svn \
98 ${D}${datadir}/perl5/Git/SVN*
99 fi
100}
101
102REL_GIT_EXEC_PATH = "${@os.path.relpath(libexecdir, bindir)}/git-core"
103REL_GIT_TEMPLATE_DIR = "${@os.path.relpath(datadir, bindir)}/git-core/templates"
104REL_GIT_SSL_CAINFO = "${@os.path.relpath(sysconfdir, bindir)}/ssl/certs/ca-certificates.crt"
105
106do_install:append:class-target () {
107 perl_native_fixup
108}
109
110do_install:append:class-native() {
111 create_wrapper ${D}${bindir}/git \
112 GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \
113 GIT_SSL_CAINFO='`dirname $''realpath`'/${REL_GIT_SSL_CAINFO} \
114 GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR}
115}
116
117do_install:append:class-nativesdk() {
118 create_wrapper ${D}${bindir}/git \
119 GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \
120 GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR}
121 perl_native_fixup
122
123 mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
124 install -m 644 ${WORKDIR}/environment.d-git.sh ${D}${SDKPATHNATIVE}/environment-setup.d/git.sh
125}
126
127FILES:${PN} += "${datadir}/git-core ${libexecdir}/git-core/"
128
129PERLTOOLS = " \
130 ${bindir}/git-cvsserver \
131 ${libexecdir}/git-core/git-archimport \
132 ${libexecdir}/git-core/git-cvsexportcommit \
133 ${libexecdir}/git-core/git-cvsimport \
134 ${libexecdir}/git-core/git-cvsserver \
135 ${libexecdir}/git-core/git-send-email \
136 ${libexecdir}/git-core/git-svn \
137 ${libexecdir}/git-core/git-instaweb \
138 ${datadir}/gitweb/gitweb.cgi \
139 ${datadir}/git-core/templates/hooks/prepare-commit-msg.sample \
140 ${datadir}/git-core/templates/hooks/pre-rebase.sample \
141 ${datadir}/git-core/templates/hooks/fsmonitor-watchman.sample \
142"
143
144# Git tools requiring perl
145PACKAGES =+ "${PN}-perltools"
146FILES:${PN}-perltools += " \
147 ${PERLTOOLS} \
148 ${libdir}/perl \
149 ${datadir}/perl5 \
150"
151
152RDEPENDS:${PN}-perltools = "${PN} perl perl-module-file-path findutils"
153
154# git-tk package with gitk and git-gui
155PACKAGES =+ "${PN}-tk"
156#RDEPENDS:${PN}-tk = "${PN} tk tcl"
157#EXTRA_OEMAKE = "TCL_PATH=${STAGING_BINDIR_CROSS}/tclsh"
158FILES:${PN}-tk = " \
159 ${bindir}/gitk \
160 ${datadir}/gitk \
161"
162
163PACKAGES =+ "gitweb"
164FILES:gitweb = "${datadir}/gitweb/"
165FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/git.sh"
166RDEPENDS:gitweb = "perl"
167
168BBCLASSEXTEND = "native nativesdk"
169
170EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
171 ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
172 "
173EXTRA_OEMAKE += "NO_GETTEXT=1"
174
175SRC_URI[tarball.sha256sum] = "302ebe0f4b1c5d1ee477b5ee74f7f2f69efd8fa7f27481e45087ba9a4bb4851c"