summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Kjellerstedt <pkj@axis.com>2017-06-14 16:40:35 +0200
committerMark Hatle <mark.hatle@windriver.com>2017-08-14 15:47:58 -0500
commit6aeccc3017205a77640355dace3b6872dcf25032 (patch)
tree8d71adeb50068eee3eca400d11e2aa70685bb726
parentf903497c08d3583a937ee9973fa61337bb72fc16 (diff)
downloadopenembedded-core-contrib-6aeccc3017205a77640355dace3b6872dcf25032.tar.gz
openembedded-core-contrib-6aeccc3017205a77640355dace3b6872dcf25032.tar.bz2
openembedded-core-contrib-6aeccc3017205a77640355dace3b6872dcf25032.zip
git: Do not install git cvsserver and git svn by default
These git commands require Perl modules that do not exist in OE-Core. Add PACKAGECONFIGs to enable them. Be aware though that if you enable them you must also provide the missing dependencies. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-rw-r--r--meta/recipes-devtools/git/git.inc21
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/recipes-devtools/git/git.inc b/meta/recipes-devtools/git/git.inc
index 4390b8d6f5..9b4c1284d2 100644
--- a/meta/recipes-devtools/git/git.inc
+++ b/meta/recipes-devtools/git/git.inc
@@ -13,6 +13,10 @@ S = "${WORKDIR}/git-${PV}"
LIC_FILES_CHKSUM = "file://COPYING;md5=7c0d7ef03a7eb04ce795b0f60e68e7e1"
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[cvsserver] = ""
+PACKAGECONFIG[svn] = ""
+
EXTRA_OECONF = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl \
--without-tcltk \
"
@@ -54,6 +58,23 @@ perl_native_fixup () {
mkdir -p ${D}${libdir}
mv ${D}${exec_prefix}/lib/perl-native/perl ${D}${libdir}
rmdir -p ${D}${exec_prefix}/lib/perl-native || true
+
+ if [ ! "${@bb.utils.filter('PACKAGECONFIG', 'cvsserver', d)}" ]; then
+ # Only install the git cvsserver command if explicitly requested
+ # as it requires the DBI Perl module, which does not exist in
+ # OE-Core.
+ rm ${D}${libexecdir}/git-core/git-cvsserver \
+ ${D}${bindir}/git-cvsserver
+ fi
+
+ if [ ! "${@bb.utils.filter('PACKAGECONFIG', 'svn', d)}" ]; then
+ # Only install the git svn command and all Git::SVN Perl modules
+ # if explicitly requested as they require the SVN::Core Perl
+ # module, which does not exist in OE-Core.
+ rm -r ${D}${libexecdir}/git-core/git-svn \
+ ${D}${libdir}/perl/site_perl/*/Git/SVN*
+ sed -i -e '/SVN/d' ${D}${libdir}/perl/site_perl/*/auto/Git/.packlist
+ fi
}
REL_GIT_EXEC_PATH = "${@os.path.relpath(libexecdir, bindir)}/git-core"