diff options
Diffstat (limited to 'yocto-poky/meta/recipes-devtools/git')
-rw-r--r-- | yocto-poky/meta/recipes-devtools/git/git.inc | 130 | ||||
-rw-r--r-- | yocto-poky/meta/recipes-devtools/git/git_2.5.0.bb | 11 |
2 files changed, 141 insertions, 0 deletions
diff --git a/yocto-poky/meta/recipes-devtools/git/git.inc b/yocto-poky/meta/recipes-devtools/git/git.inc new file mode 100644 index 000000000..4da4a2754 --- /dev/null +++ b/yocto-poky/meta/recipes-devtools/git/git.inc @@ -0,0 +1,130 @@ +SUMMARY = "Distributed version control system" +HOMEPAGE = "http://git-scm.com" +SECTION = "console/utils" +LICENSE = "GPLv2" +DEPENDS = "openssl curl zlib expat" + +PROVIDES_append_class-native = " git-replacement-native" + +SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \ + ${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages" + +S = "${WORKDIR}/git-${PV}" + +LIC_FILES_CHKSUM = "file://COPYING;md5=7c0d7ef03a7eb04ce795b0f60e68e7e1" + +EXTRA_OECONF = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl \ + --without-tcltk \ +" + +inherit autotools-brokensep perlnative + +EXTRA_OEMAKE = "NO_PYTHON=1 CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'" +EXTRA_OEMAKE += "'PERL_PATH=/usr/bin/env perl'" +EXTRA_OEMAKE_append_class-native = " NO_CROSS_DIRECTORY_HARDLINKS=1" + +do_compile_prepend () { + # Remove perl/perl.mak to fix the out-of-date perl.mak error + # during rebuild + rm -f perl/perl.mak +} + +do_install () { + oe_runmake install DESTDIR="${D}" bindir=${bindir} \ + template_dir=${datadir}/git-core/templates \ + GIT_PYTHON_DIR=${D}${datadir}/git-core/python + install -d ${D}/${mandir}/man1 + install -d ${D}/${mandir}/man5 + install -d ${D}/${mandir}/man7 + install -t ${D}/${mandir}/man1 ${WORKDIR}/man1/* + install -t ${D}/${mandir}/man5 ${WORKDIR}/man5/* + install -t ${D}/${mandir}/man7 ${WORKDIR}/man7/* + install -d ${D}/${datadir}/bash-completion/completions/ + install -m 644 ${S}/contrib/completion/git-completion.bash ${D}/${datadir}/bash-completion/completions/git +} + +perl_native_fixup () { + sed -i -e 's#${STAGING_BINDIR_NATIVE}/perl-native/#${bindir}/#' \ + -e 's#${libdir}/perl-native/#${libdir}/#' \ + ${@d.getVar("PERLTOOLS", True).replace(' /',d.getVar('D', True) + '/')} + + # ${libdir} is not applicable here, perl-native files are always + # installed to /usr/lib on both 32/64 bits targets. + mv ${D}${exec_prefix}/lib/perl-native/perl ${D}${libdir} + rmdir -p ${D}${exec_prefix}/lib/perl-native || true +} + +REL_GIT_EXEC_PATH = "${@os.path.relpath(libexecdir, bindir)}/git-core" +REL_GIT_TEMPLATE_DIR = "${@os.path.relpath(datadir, bindir)}/git-core/templates" + +do_install_append_class-target () { + perl_native_fixup +} + +do_install_append_class-native() { + create_wrapper ${D}${bindir}/git \ + GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \ + GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR} +} + +do_install_append_class-nativesdk() { + create_wrapper ${D}${bindir}/git \ + GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \ + GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR} + perl_native_fixup +} + +FILES_${PN} += "${datadir}/git-core ${libexecdir}/git-core/" +FILES_${PN}-dbg += "${libexecdir}/git-core/.debug" + +PERLTOOLS = " \ + ${libexecdir}/git-core/git-add--interactive \ + ${libexecdir}/git-core/git-archimport \ + ${libexecdir}/git-core/git-cvsexportcommit \ + ${libexecdir}/git-core/git-cvsimport \ + ${libexecdir}/git-core/git-cvsserver \ + ${bindir}/git-cvsserver \ + ${libexecdir}/git-core/git-difftool \ + ${libexecdir}/git-core/git-relink \ + ${libexecdir}/git-core/git-send-email \ + ${libexecdir}/git-core/git-svn \ + ${libexecdir}/git-core/git-instaweb \ + ${libexecdir}/git-core/git-submodule \ + ${libexecdir}/git-core/git-am \ + ${libexecdir}/git-core/git-request-pull \ + ${datadir}/gitweb/gitweb.cgi \ + ${datadir}/git-core/templates/hooks/prepare-commit-msg.sample \ + ${datadir}/git-core/templates/hooks/pre-rebase.sample \ +" + +# Basic tab completion support +PACKAGES =+ "${PN}-bash-completion" +FILES_${PN}-bash-completion = "${datadir}/bash-completion/completions/*" + +# Git tools requiring perl +PACKAGES =+ "${PN}-perltools" +FILES_${PN}-perltools += " \ + ${PERLTOOLS} \ + ${libdir}/perl \ + ${datadir}/perl \ +" +RDEPENDS_${PN}-perltools = "${PN} perl perl-module-file-path findutils" + +PACKAGES =+ "${PN}-python" +FILES_${PN}-python = "${libdir}/python*" + + +# git-tk package with gitk and git-gui +PACKAGES =+ "${PN}-tk" +#RDEPENDS_${PN}-tk = "${PN} tk tcl" +#EXTRA_OEMAKE = "TCL_PATH=${STAGING_BINDIR_CROSS}/tclsh" +FILES_${PN}-tk = " \ + ${bindir}/gitk \ + ${datadir}/gitk \ +" + +PACKAGES =+ "gitweb" +FILES_gitweb = "${datadir}/gitweb/" + + +BBCLASSEXTEND = "native nativesdk" diff --git a/yocto-poky/meta/recipes-devtools/git/git_2.5.0.bb b/yocto-poky/meta/recipes-devtools/git/git_2.5.0.bb new file mode 100644 index 000000000..de686c2b2 --- /dev/null +++ b/yocto-poky/meta/recipes-devtools/git/git_2.5.0.bb @@ -0,0 +1,11 @@ +require git.inc + +EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \ + ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \ + " +EXTRA_OEMAKE += "NO_GETTEXT=1" + +SRC_URI[tarball.md5sum] = "3bc9b0a803ae8ec6c5316cc64f0b7f78" +SRC_URI[tarball.sha256sum] = "8fa13ba8434ff83d24f57f831d55dbb9046434c266641180a37744facfce72ac" +SRC_URI[manpages.md5sum] = "134b049e51420a336049aac21c88a75a" +SRC_URI[manpages.sha256sum] = "745e4e797fe5061e781c880d370b1beb480199127da5acaf4e376e0b09d4d685" |