diff options
Diffstat (limited to 'meta/recipes-devtools/git/git_2.49.0.bb')
-rw-r--r-- | meta/recipes-devtools/git/git_2.49.0.bb | 173 |
1 files changed, 173 insertions, 0 deletions
diff --git a/meta/recipes-devtools/git/git_2.49.0.bb b/meta/recipes-devtools/git/git_2.49.0.bb new file mode 100644 index 0000000000..e1b501d62b --- /dev/null +++ b/meta/recipes-devtools/git/git_2.49.0.bb | |||
@@ -0,0 +1,173 @@ | |||
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 | SRC_URI:append:class-nativesdk = " \ | ||
16 | file://environment.d-git.sh \ | ||
17 | " | ||
18 | |||
19 | S = "${UNPACKDIR}/git-${PV}" | ||
20 | |||
21 | LIC_FILES_CHKSUM = "\ | ||
22 | file://COPYING;md5=7c0d7ef03a7eb04ce795b0f60e68e7e1 \ | ||
23 | file://reftable/LICENSE;md5=1a6424cafc4c9c88c689848e165af33b \ | ||
24 | file://sha1dc/LICENSE.txt;md5=9bbe4c990a9e98ea4b98ef5d3bcb8a7a \ | ||
25 | file://compat/nedmalloc/License.txt;md5=e4224ccaecb14d942c71d31bef20d78c \ | ||
26 | file://compat/inet_ntop.c;md5=76593c6f74e8ced5b24520175688d59b;endline=16 \ | ||
27 | file://compat/obstack.h;md5=08ad25fee5428cd879ceef451ce3a22e;endline=18 \ | ||
28 | file://compat/poll/poll.h;md5=9fc00170a53b8e3e52157c91ac688dd1;endline=19 \ | ||
29 | file://compat/regex/regex.h;md5=30cc8af0e6f0f8a25acec6d8783bb763;beginline=4;endline=22 \ | ||
30 | " | ||
31 | |||
32 | CVE_PRODUCT = "git-scm:git" | ||
33 | |||
34 | PACKAGECONFIG ??= "expat curl" | ||
35 | PACKAGECONFIG[cvsserver] = "" | ||
36 | PACKAGECONFIG[svn] = "" | ||
37 | PACKAGECONFIG[manpages] = ",,asciidoc-native xmlto-native" | ||
38 | PACKAGECONFIG[curl] = "--with-curl,--without-curl,curl" | ||
39 | PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat" | ||
40 | |||
41 | EXTRA_OECONF = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl \ | ||
42 | --without-tcltk \ | ||
43 | --without-iconv \ | ||
44 | " | ||
45 | EXTRA_OECONF:append:class-nativesdk = " --with-gitconfig=/etc/gitconfig " | ||
46 | EXTRA_OECONF:append:class-native = " --with-gitconfig=/etc/gitconfig " | ||
47 | |||
48 | # Needs brokensep as this doesn't use automake | ||
49 | inherit autotools-brokensep perlnative bash-completion manpages | ||
50 | |||
51 | EXTRA_OEMAKE = "NO_PYTHON=1 CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'" | ||
52 | EXTRA_OEMAKE += "'PERL_PATH=/usr/bin/env perl'" | ||
53 | EXTRA_OEMAKE += "COMPUTE_HEADER_DEPENDENCIES=no" | ||
54 | EXTRA_OEMAKE:append:class-native = " NO_CROSS_DIRECTORY_HARDLINKS=1" | ||
55 | |||
56 | do_compile:prepend () { | ||
57 | # Remove perl/perl.mak to fix the out-of-date perl.mak error | ||
58 | # during rebuild | ||
59 | rm -f perl/perl.mak | ||
60 | |||
61 | if [ "${@bb.utils.filter('PACKAGECONFIG', 'manpages', d)}" ]; then | ||
62 | oe_runmake man | ||
63 | fi | ||
64 | } | ||
65 | |||
66 | do_install () { | ||
67 | oe_runmake install DESTDIR="${D}" bindir=${bindir} \ | ||
68 | template_dir=${datadir}/git-core/templates | ||
69 | |||
70 | install -d ${D}/${datadir}/bash-completion/completions/ | ||
71 | install -m 644 ${S}/contrib/completion/git-completion.bash ${D}/${datadir}/bash-completion/completions/git | ||
72 | |||
73 | if [ "${@bb.utils.filter('PACKAGECONFIG', 'manpages', d)}" ]; then | ||
74 | # Needs to be serial with make 4.4 due to https://savannah.gnu.org/bugs/index.php?63362 | ||
75 | make install-man DESTDIR="${D}" | ||
76 | fi | ||
77 | } | ||
78 | |||
79 | perl_native_fixup () { | ||
80 | sed -i -e 's#${STAGING_BINDIR_NATIVE}/perl-native/#${bindir}/#' \ | ||
81 | -e 's#${libdir}/perl-native/#${libdir}/#' \ | ||
82 | ${@d.getVar("PERLTOOLS").replace(' /',d.getVar('D') + '/')} | ||
83 | |||
84 | if [ ! "${@bb.utils.filter('PACKAGECONFIG', 'cvsserver', d)}" ]; then | ||
85 | # Only install the git cvsserver command if explicitly requested | ||
86 | # as it requires the DBI Perl module, which does not exist in | ||
87 | # OE-Core. | ||
88 | rm ${D}${libexecdir}/git-core/git-cvsserver \ | ||
89 | ${D}${bindir}/git-cvsserver | ||
90 | fi | ||
91 | |||
92 | if [ ! "${@bb.utils.filter('PACKAGECONFIG', 'svn', d)}" ]; then | ||
93 | # Only install the git svn command and all Git::SVN Perl modules | ||
94 | # if explicitly requested as they require the SVN::Core Perl | ||
95 | # module, which does not exist in OE-Core. | ||
96 | rm -r ${D}${libexecdir}/git-core/git-svn \ | ||
97 | ${D}${datadir}/perl5/Git/SVN* | ||
98 | fi | ||
99 | } | ||
100 | |||
101 | REL_GIT_EXEC_PATH = "${@os.path.relpath(libexecdir, bindir)}/git-core" | ||
102 | REL_GIT_TEMPLATE_DIR = "${@os.path.relpath(datadir, bindir)}/git-core/templates" | ||
103 | |||
104 | do_install:append:class-target () { | ||
105 | perl_native_fixup | ||
106 | } | ||
107 | |||
108 | do_install:append:class-native() { | ||
109 | create_wrapper ${D}${bindir}/git \ | ||
110 | GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \ | ||
111 | GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR} | ||
112 | } | ||
113 | |||
114 | do_install:append:class-nativesdk() { | ||
115 | create_wrapper ${D}${bindir}/git \ | ||
116 | GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \ | ||
117 | GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR} | ||
118 | perl_native_fixup | ||
119 | |||
120 | mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d | ||
121 | install -m 644 ${UNPACKDIR}/environment.d-git.sh ${D}${SDKPATHNATIVE}/environment-setup.d/git.sh | ||
122 | } | ||
123 | |||
124 | FILES:${PN} += "${datadir}/git-core ${libexecdir}/git-core/" | ||
125 | |||
126 | PERLTOOLS = " \ | ||
127 | ${bindir}/git-cvsserver \ | ||
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 | |||
163 | FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/git.sh" | ||
164 | RDEPENDS:gitweb = "perl" | ||
165 | |||
166 | BBCLASSEXTEND = "native nativesdk" | ||
167 | |||
168 | EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \ | ||
169 | ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \ | ||
170 | " | ||
171 | EXTRA_OEMAKE += "NO_GETTEXT=1" | ||
172 | |||
173 | SRC_URI[tarball.sha256sum] = "f8047f572f665bebeb637fd5f14678f31b3ca5d2ff9a18f20bd925bd48f75d3c" | ||