diff options
Diffstat (limited to 'meta/recipes-devtools/git/git_2.35.2.bb')
-rw-r--r-- | meta/recipes-devtools/git/git_2.35.2.bb | 159 |
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 @@ | |||
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" | ||
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 = "file://COPYING;md5=7c0d7ef03a7eb04ce795b0f60e68e7e1" | ||
18 | |||
19 | CVE_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. | ||
24 | CVE_CHECK_IGNORE += "CVE-2022-24975" | ||
25 | |||
26 | PACKAGECONFIG ??= "expat curl" | ||
27 | PACKAGECONFIG[cvsserver] = "" | ||
28 | PACKAGECONFIG[svn] = "" | ||
29 | PACKAGECONFIG[manpages] = ",,asciidoc-native xmlto-native" | ||
30 | PACKAGECONFIG[curl] = "--with-curl,--without-curl,curl" | ||
31 | PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat" | ||
32 | |||
33 | EXTRA_OECONF = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl \ | ||
34 | --without-tcltk \ | ||
35 | --without-iconv \ | ||
36 | " | ||
37 | EXTRA_OECONF:append:class-nativesdk = " --with-gitconfig=/etc/gitconfig " | ||
38 | |||
39 | # Needs brokensep as this doesn't use automake | ||
40 | inherit autotools-brokensep perlnative bash-completion manpages | ||
41 | |||
42 | EXTRA_OEMAKE = "NO_PYTHON=1 CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'" | ||
43 | EXTRA_OEMAKE += "'PERL_PATH=/usr/bin/env perl'" | ||
44 | EXTRA_OEMAKE += "COMPUTE_HEADER_DEPENDENCIES=no" | ||
45 | EXTRA_OEMAKE:append:class-native = " NO_CROSS_DIRECTORY_HARDLINKS=1" | ||
46 | |||
47 | do_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 | |||
57 | do_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 | |||
69 | perl_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 | |||
91 | REL_GIT_EXEC_PATH = "${@os.path.relpath(libexecdir, bindir)}/git-core" | ||
92 | REL_GIT_TEMPLATE_DIR = "${@os.path.relpath(datadir, bindir)}/git-core/templates" | ||
93 | |||
94 | do_install:append:class-target () { | ||
95 | perl_native_fixup | ||
96 | } | ||
97 | |||
98 | do_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 | |||
104 | do_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 | |||
111 | FILES:${PN} += "${datadir}/git-core ${libexecdir}/git-core/" | ||
112 | |||
113 | PERLTOOLS = " \ | ||
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 | ||
130 | PACKAGES =+ "${PN}-perltools" | ||
131 | FILES:${PN}-perltools += " \ | ||
132 | ${PERLTOOLS} \ | ||
133 | ${libdir}/perl \ | ||
134 | ${datadir}/perl5 \ | ||
135 | " | ||
136 | |||
137 | RDEPENDS:${PN}-perltools = "${PN} perl perl-module-file-path findutils" | ||
138 | |||
139 | # git-tk package with gitk and git-gui | ||
140 | PACKAGES =+ "${PN}-tk" | ||
141 | #RDEPENDS_${PN}-tk = "${PN} tk tcl" | ||
142 | #EXTRA_OEMAKE = "TCL_PATH=${STAGING_BINDIR_CROSS}/tclsh" | ||
143 | FILES:${PN}-tk = " \ | ||
144 | ${bindir}/gitk \ | ||
145 | ${datadir}/gitk \ | ||
146 | " | ||
147 | |||
148 | PACKAGES =+ "gitweb" | ||
149 | FILES:gitweb = "${datadir}/gitweb/" | ||
150 | RDEPENDS:gitweb = "perl" | ||
151 | |||
152 | BBCLASSEXTEND = "native nativesdk" | ||
153 | |||
154 | EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \ | ||
155 | ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \ | ||
156 | " | ||
157 | EXTRA_OEMAKE += "NO_GETTEXT=1" | ||
158 | |||
159 | SRC_URI[tarball.sha256sum] = "0decc02a47e792f522df3183c38a61ad8fbb38927502ca6781467a6599a888cb" | ||