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