summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/git/git_2.35.2.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/git/git_2.35.2.bb')
-rw-r--r--meta/recipes-devtools/git/git_2.35.2.bb159
1 files changed, 159 insertions, 0 deletions
diff --git a/meta/recipes-devtools/git/git_2.35.2.bb b/meta/recipes-devtools/git/git_2.35.2.bb
new file mode 100644
index 0000000000..9812549221
--- /dev/null
+++ b/meta/recipes-devtools/git/git_2.35.2.bb
@@ -0,0 +1,159 @@
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"
6DEPENDS = "openssl zlib"
7
8PROVIDES:append:class-native = " git-replacement-native"
9
10SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \
11 file://fixsort.patch \
12 file://0001-config.mak.uname-do-not-force-RHEL-7-specific-build-.patch \
13 "
14
15S = "${WORKDIR}/git-${PV}"
16
17LIC_FILES_CHKSUM = "file://COPYING;md5=7c0d7ef03a7eb04ce795b0f60e68e7e1"
18
19CVE_PRODUCT = "git-scm:git"
20
21# This is about a manpage not mentioning --mirror may "leak" information
22# in mirrored git repos. Most OE users wouldn't build the docs and
23# we don't see this as a major issue for our general users/usecases.
24CVE_CHECK_IGNORE += "CVE-2022-24975"
25
26PACKAGECONFIG ??= "expat curl"
27PACKAGECONFIG[cvsserver] = ""
28PACKAGECONFIG[svn] = ""
29PACKAGECONFIG[manpages] = ",,asciidoc-native xmlto-native"
30PACKAGECONFIG[curl] = "--with-curl,--without-curl,curl"
31PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat"
32
33EXTRA_OECONF = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl \
34 --without-tcltk \
35 --without-iconv \
36"
37EXTRA_OECONF:append:class-nativesdk = " --with-gitconfig=/etc/gitconfig "
38
39# Needs brokensep as this doesn't use automake
40inherit autotools-brokensep perlnative bash-completion manpages
41
42EXTRA_OEMAKE = "NO_PYTHON=1 CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'"
43EXTRA_OEMAKE += "'PERL_PATH=/usr/bin/env perl'"
44EXTRA_OEMAKE += "COMPUTE_HEADER_DEPENDENCIES=no"
45EXTRA_OEMAKE:append:class-native = " NO_CROSS_DIRECTORY_HARDLINKS=1"
46
47do_compile:prepend () {
48 # Remove perl/perl.mak to fix the out-of-date perl.mak error
49 # during rebuild
50 rm -f perl/perl.mak
51
52 if [ "${@bb.utils.filter('PACKAGECONFIG', 'manpages', d)}" ]; then
53 oe_runmake man
54 fi
55}
56
57do_install () {
58 oe_runmake install DESTDIR="${D}" bindir=${bindir} \
59 template_dir=${datadir}/git-core/templates
60
61 install -d ${D}/${datadir}/bash-completion/completions/
62 install -m 644 ${S}/contrib/completion/git-completion.bash ${D}/${datadir}/bash-completion/completions/git
63
64 if [ "${@bb.utils.filter('PACKAGECONFIG', 'manpages', d)}" ]; then
65 oe_runmake install-man DESTDIR="${D}"
66 fi
67}
68
69perl_native_fixup () {
70 sed -i -e 's#${STAGING_BINDIR_NATIVE}/perl-native/#${bindir}/#' \
71 -e 's#${libdir}/perl-native/#${libdir}/#' \
72 ${@d.getVar("PERLTOOLS").replace(' /',d.getVar('D') + '/')}
73
74 if [ ! "${@bb.utils.filter('PACKAGECONFIG', 'cvsserver', d)}" ]; then
75 # Only install the git cvsserver command if explicitly requested
76 # as it requires the DBI Perl module, which does not exist in
77 # OE-Core.
78 rm ${D}${libexecdir}/git-core/git-cvsserver \
79 ${D}${bindir}/git-cvsserver
80 fi
81
82 if [ ! "${@bb.utils.filter('PACKAGECONFIG', 'svn', d)}" ]; then
83 # Only install the git svn command and all Git::SVN Perl modules
84 # if explicitly requested as they require the SVN::Core Perl
85 # module, which does not exist in OE-Core.
86 rm -r ${D}${libexecdir}/git-core/git-svn \
87 ${D}${datadir}/perl5/Git/SVN*
88 fi
89}
90
91REL_GIT_EXEC_PATH = "${@os.path.relpath(libexecdir, bindir)}/git-core"
92REL_GIT_TEMPLATE_DIR = "${@os.path.relpath(datadir, bindir)}/git-core/templates"
93
94do_install:append:class-target () {
95 perl_native_fixup
96}
97
98do_install:append:class-native() {
99 create_wrapper ${D}${bindir}/git \
100 GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \
101 GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR}
102}
103
104do_install:append:class-nativesdk() {
105 create_wrapper ${D}${bindir}/git \
106 GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \
107 GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR}
108 perl_native_fixup
109}
110
111FILES:${PN} += "${datadir}/git-core ${libexecdir}/git-core/"
112
113PERLTOOLS = " \
114 ${bindir}/git-cvsserver \
115 ${libexecdir}/git-core/git-add--interactive \
116 ${libexecdir}/git-core/git-archimport \
117 ${libexecdir}/git-core/git-cvsexportcommit \
118 ${libexecdir}/git-core/git-cvsimport \
119 ${libexecdir}/git-core/git-cvsserver \
120 ${libexecdir}/git-core/git-send-email \
121 ${libexecdir}/git-core/git-svn \
122 ${libexecdir}/git-core/git-instaweb \
123 ${datadir}/gitweb/gitweb.cgi \
124 ${datadir}/git-core/templates/hooks/prepare-commit-msg.sample \
125 ${datadir}/git-core/templates/hooks/pre-rebase.sample \
126 ${datadir}/git-core/templates/hooks/fsmonitor-watchman.sample \
127"
128
129# Git tools requiring perl
130PACKAGES =+ "${PN}-perltools"
131FILES:${PN}-perltools += " \
132 ${PERLTOOLS} \
133 ${libdir}/perl \
134 ${datadir}/perl5 \
135"
136
137RDEPENDS:${PN}-perltools = "${PN} perl perl-module-file-path findutils"
138
139# git-tk package with gitk and git-gui
140PACKAGES =+ "${PN}-tk"
141#RDEPENDS_${PN}-tk = "${PN} tk tcl"
142#EXTRA_OEMAKE = "TCL_PATH=${STAGING_BINDIR_CROSS}/tclsh"
143FILES:${PN}-tk = " \
144 ${bindir}/gitk \
145 ${datadir}/gitk \
146"
147
148PACKAGES =+ "gitweb"
149FILES:gitweb = "${datadir}/gitweb/"
150RDEPENDS:gitweb = "perl"
151
152BBCLASSEXTEND = "native nativesdk"
153
154EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
155 ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \
156 "
157EXTRA_OEMAKE += "NO_GETTEXT=1"
158
159SRC_URI[tarball.sha256sum] = "0decc02a47e792f522df3183c38a61ad8fbb38927502ca6781467a6599a888cb"