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