summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/git/git.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/git/git.inc')
-rw-r--r--meta/recipes-devtools/git/git.inc99
1 files changed, 99 insertions, 0 deletions
diff --git a/meta/recipes-devtools/git/git.inc b/meta/recipes-devtools/git/git.inc
new file mode 100644
index 0000000..f5013f1
--- /dev/null
+++ b/meta/recipes-devtools/git/git.inc
@@ -0,0 +1,99 @@
1SUMMARY = "Distributed version control system"
2SECTION = "console/utils"
3LICENSE = "GPLv2"
4DEPENDS = "openssl curl zlib expat"
5
6PROVIDES_append_class-native = " git-replacement-native"
7
8S = "${WORKDIR}/git-${PV}"
9
10LIC_FILES_CHKSUM = "file://COPYING;md5=7c0d7ef03a7eb04ce795b0f60e68e7e1"
11
12EXTRA_OECONF = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl \
13 --without-tcltk \
14"
15
16inherit autotools-brokensep perlnative
17
18EXTRA_OEMAKE = "NO_PYTHON=1 RUNTIME_PREFIX=1"
19
20do_compile_prepend () {
21 # Remove perl/perl.mak to fix the out-of-date perl.mak error
22 # during rebuild
23 rm -f perl/perl.mak
24}
25
26do_install () {
27 oe_runmake install DESTDIR="${D}" bindir=${bindir} \
28 template_dir=${datadir}/git-core/templates \
29 GIT_PYTHON_DIR=${D}${datadir}/git-core/python
30
31 # ${libdir} is not applicable here, perl-native files are always
32 # installed to /usr/lib on both 32/64 bits targets.
33 rm -rf ${D}${exec_prefix}/lib/perl-native
34 rmdir ${D}${exec_prefix}/lib || true
35}
36
37PERLSEDFIXUP = " \
38 sed -i -e 's#${STAGING_BINDIR_NATIVE}/perl-native/#${bindir}/#' \
39 -e 's#${libdir}/perl-native/#${libdir}/#' \
40 ${@d.getVar("PERLTOOLS", True).replace(' /',d.getVar('D', True) + '/')} \
41"
42
43do_install_append_class-target () {
44 ${PERLSEDFIXUP}
45}
46
47do_install_append_class-nativesdk () {
48 ${PERLSEDFIXUP}
49}
50
51FILES_${PN} += "${datadir}/git-core ${libxecdir}/git-core/"
52FILES_${PN}-dbg += "${libexecdir}/git-core/.debug"
53
54PERLTOOLS = " \
55 ${libexecdir}/git-core/git-add--interactive \
56 ${libexecdir}/git-core/git-archimport \
57 ${libexecdir}/git-core/git-cvsexportcommit \
58 ${libexecdir}/git-core/git-cvsimport \
59 ${libexecdir}/git-core/git-cvsserver \
60 ${bindir}/git-cvsserver \
61 ${libexecdir}/git-core/git-difftool \
62 ${libexecdir}/git-core/git-relink \
63 ${libexecdir}/git-core/git-send-email \
64 ${libexecdir}/git-core/git-svn \
65 ${libexecdir}/git-core/git-instaweb \
66 ${libexecdir}/git-core/git-submodule \
67 ${libexecdir}/git-core/git-am \
68 ${libexecdir}/git-core/git-request-pull \
69 ${datadir}/gitweb/gitweb.cgi \
70 ${datadir}/git-core/templates/hooks/prepare-commit-msg.sample \
71 ${datadir}/git-core/templates/hooks/pre-rebase.sample \
72"
73
74# Git tools requiring perl
75PACKAGES =+ "${PN}-perltools"
76FILES_${PN}-perltools += " \
77 ${PERLTOOLS} \
78 ${datadir}/perl \
79"
80RDEPENDS_${PN}-perltools = "${PN} perl perl-module-file-path findutils"
81
82PACKAGES =+ "${PN}-python"
83FILES_${PN}-python = "${libdir}/python*"
84
85
86# git-tk package with gitk and git-gui
87PACKAGES =+ "${PN}-tk"
88#RDEPENDS_${PN}-tk = "${PN} tk tcl"
89#EXTRA_OEMAKE = "TCL_PATH=${STAGING_BINDIR_CROSS}/tclsh"
90FILES_${PN}-tk = " \
91 ${bindir}/gitk \
92 ${datadir}/gitk \
93"
94
95PACKAGES =+ "gitweb"
96FILES_gitweb = "${datadir}/gitweb/"
97
98
99BBCLASSEXTEND = "native nativesdk"