summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-02-02 19:27:32 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-03 09:05:14 +0000
commit177437eea2a5015ddc1ef659bb6cb7e71ba60299 (patch)
tree428a84926f3fa669cf79f91cfba249f2eb4e46cb /meta/recipes-devtools
parent39d35877c983806b00d7c56206d0f418de29c543 (diff)
downloadpoky-177437eea2a5015ddc1ef659bb6cb7e71ba60299.tar.gz
git: merge .inc into .bb
(From OE-Core rev: a315afb79964a9a9b6e493bf20eec80af46fd4a6) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/git/git.inc141
-rw-r--r--meta/recipes-devtools/git/git_2.34.1.bb142
2 files changed, 141 insertions, 142 deletions
diff --git a/meta/recipes-devtools/git/git.inc b/meta/recipes-devtools/git/git.inc
deleted file mode 100644
index 1d74270fdd..0000000000
--- a/meta/recipes-devtools/git/git.inc
+++ /dev/null
@@ -1,141 +0,0 @@
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 ${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages \
12 file://fixsort.patch \
13"
14
15S = "${WORKDIR}/git-${PV}"
16
17LIC_FILES_CHKSUM = "file://COPYING;md5=7c0d7ef03a7eb04ce795b0f60e68e7e1"
18
19CVE_PRODUCT = "git-scm:git"
20
21PACKAGECONFIG ??= ""
22PACKAGECONFIG[cvsserver] = ""
23PACKAGECONFIG[svn] = ""
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
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
45do_install () {
46 oe_runmake install DESTDIR="${D}" bindir=${bindir} \
47 template_dir=${datadir}/git-core/templates
48
49 for section in man1 man5 man7; do
50 install -d ${D}/${mandir}/$section
51 install -t ${D}/${mandir}/$section ${WORKDIR}/$section/*
52 done
53
54 install -d ${D}/${datadir}/bash-completion/completions/
55 install -m 644 ${S}/contrib/completion/git-completion.bash ${D}/${datadir}/bash-completion/completions/git
56}
57
58perl_native_fixup () {
59 sed -i -e 's#${STAGING_BINDIR_NATIVE}/perl-native/#${bindir}/#' \
60 -e 's#${libdir}/perl-native/#${libdir}/#' \
61 ${@d.getVar("PERLTOOLS").replace(' /',d.getVar('D') + '/')}
62
63 if [ ! "${@bb.utils.filter('PACKAGECONFIG', 'cvsserver', d)}" ]; then
64 # Only install the git cvsserver command if explicitly requested
65 # as it requires the DBI Perl module, which does not exist in
66 # OE-Core.
67 rm ${D}${libexecdir}/git-core/git-cvsserver \
68 ${D}${bindir}/git-cvsserver
69 fi
70
71 if [ ! "${@bb.utils.filter('PACKAGECONFIG', 'svn', d)}" ]; then
72 # Only install the git svn command and all Git::SVN Perl modules
73 # if explicitly requested as they require the SVN::Core Perl
74 # module, which does not exist in OE-Core.
75 rm -r ${D}${libexecdir}/git-core/git-svn \
76 ${D}${datadir}/perl5/Git/SVN*
77 fi
78}
79
80REL_GIT_EXEC_PATH = "${@os.path.relpath(libexecdir, bindir)}/git-core"
81REL_GIT_TEMPLATE_DIR = "${@os.path.relpath(datadir, bindir)}/git-core/templates"
82
83do_install:append:class-target () {
84 perl_native_fixup
85}
86
87do_install:append:class-native() {
88 create_wrapper ${D}${bindir}/git \
89 GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \
90 GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR}
91}
92
93do_install:append:class-nativesdk() {
94 create_wrapper ${D}${bindir}/git \
95 GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \
96 GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR}
97 perl_native_fixup
98}
99
100FILES:${PN} += "${datadir}/git-core ${libexecdir}/git-core/"
101
102PERLTOOLS = " \
103 ${bindir}/git-cvsserver \
104 ${libexecdir}/git-core/git-add--interactive \
105 ${libexecdir}/git-core/git-archimport \
106 ${libexecdir}/git-core/git-cvsexportcommit \
107 ${libexecdir}/git-core/git-cvsimport \
108 ${libexecdir}/git-core/git-cvsserver \
109 ${libexecdir}/git-core/git-send-email \
110 ${libexecdir}/git-core/git-svn \
111 ${libexecdir}/git-core/git-instaweb \
112 ${datadir}/gitweb/gitweb.cgi \
113 ${datadir}/git-core/templates/hooks/prepare-commit-msg.sample \
114 ${datadir}/git-core/templates/hooks/pre-rebase.sample \
115 ${datadir}/git-core/templates/hooks/fsmonitor-watchman.sample \
116"
117
118# Git tools requiring perl
119PACKAGES =+ "${PN}-perltools"
120FILES:${PN}-perltools += " \
121 ${PERLTOOLS} \
122 ${libdir}/perl \
123 ${datadir}/perl5 \
124"
125
126RDEPENDS:${PN}-perltools = "${PN} perl perl-module-file-path findutils"
127
128# git-tk package with gitk and git-gui
129PACKAGES =+ "${PN}-tk"
130#RDEPENDS_${PN}-tk = "${PN} tk tcl"
131#EXTRA_OEMAKE = "TCL_PATH=${STAGING_BINDIR_CROSS}/tclsh"
132FILES:${PN}-tk = " \
133 ${bindir}/gitk \
134 ${datadir}/gitk \
135"
136
137PACKAGES =+ "gitweb"
138FILES:gitweb = "${datadir}/gitweb/"
139RDEPENDS:gitweb = "perl"
140
141BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/git/git_2.34.1.bb b/meta/recipes-devtools/git/git_2.34.1.bb
index 24081764a2..a762ebac99 100644
--- a/meta/recipes-devtools/git/git_2.34.1.bb
+++ b/meta/recipes-devtools/git/git_2.34.1.bb
@@ -1,4 +1,144 @@
1require git.inc 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 ${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages \
12 file://fixsort.patch \
13"
14
15S = "${WORKDIR}/git-${PV}"
16
17LIC_FILES_CHKSUM = "file://COPYING;md5=7c0d7ef03a7eb04ce795b0f60e68e7e1"
18
19CVE_PRODUCT = "git-scm:git"
20
21PACKAGECONFIG ??= ""
22PACKAGECONFIG[cvsserver] = ""
23PACKAGECONFIG[svn] = ""
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
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
45do_install () {
46 oe_runmake install DESTDIR="${D}" bindir=${bindir} \
47 template_dir=${datadir}/git-core/templates
48
49 for section in man1 man5 man7; do
50 install -d ${D}/${mandir}/$section
51 install -t ${D}/${mandir}/$section ${WORKDIR}/$section/*
52 done
53
54 install -d ${D}/${datadir}/bash-completion/completions/
55 install -m 644 ${S}/contrib/completion/git-completion.bash ${D}/${datadir}/bash-completion/completions/git
56}
57
58perl_native_fixup () {
59 sed -i -e 's#${STAGING_BINDIR_NATIVE}/perl-native/#${bindir}/#' \
60 -e 's#${libdir}/perl-native/#${libdir}/#' \
61 ${@d.getVar("PERLTOOLS").replace(' /',d.getVar('D') + '/')}
62
63 if [ ! "${@bb.utils.filter('PACKAGECONFIG', 'cvsserver', d)}" ]; then
64 # Only install the git cvsserver command if explicitly requested
65 # as it requires the DBI Perl module, which does not exist in
66 # OE-Core.
67 rm ${D}${libexecdir}/git-core/git-cvsserver \
68 ${D}${bindir}/git-cvsserver
69 fi
70
71 if [ ! "${@bb.utils.filter('PACKAGECONFIG', 'svn', d)}" ]; then
72 # Only install the git svn command and all Git::SVN Perl modules
73 # if explicitly requested as they require the SVN::Core Perl
74 # module, which does not exist in OE-Core.
75 rm -r ${D}${libexecdir}/git-core/git-svn \
76 ${D}${datadir}/perl5/Git/SVN*
77 fi
78}
79
80REL_GIT_EXEC_PATH = "${@os.path.relpath(libexecdir, bindir)}/git-core"
81REL_GIT_TEMPLATE_DIR = "${@os.path.relpath(datadir, bindir)}/git-core/templates"
82
83do_install:append:class-target () {
84 perl_native_fixup
85}
86
87do_install:append:class-native() {
88 create_wrapper ${D}${bindir}/git \
89 GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \
90 GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR}
91}
92
93do_install:append:class-nativesdk() {
94 create_wrapper ${D}${bindir}/git \
95 GIT_EXEC_PATH='`dirname $''realpath`'/${REL_GIT_EXEC_PATH} \
96 GIT_TEMPLATE_DIR='`dirname $''realpath`'/${REL_GIT_TEMPLATE_DIR}
97 perl_native_fixup
98}
99
100FILES:${PN} += "${datadir}/git-core ${libexecdir}/git-core/"
101
102PERLTOOLS = " \
103 ${bindir}/git-cvsserver \
104 ${libexecdir}/git-core/git-add--interactive \
105 ${libexecdir}/git-core/git-archimport \
106 ${libexecdir}/git-core/git-cvsexportcommit \
107 ${libexecdir}/git-core/git-cvsimport \
108 ${libexecdir}/git-core/git-cvsserver \
109 ${libexecdir}/git-core/git-send-email \
110 ${libexecdir}/git-core/git-svn \
111 ${libexecdir}/git-core/git-instaweb \
112 ${datadir}/gitweb/gitweb.cgi \
113 ${datadir}/git-core/templates/hooks/prepare-commit-msg.sample \
114 ${datadir}/git-core/templates/hooks/pre-rebase.sample \
115 ${datadir}/git-core/templates/hooks/fsmonitor-watchman.sample \
116"
117
118# Git tools requiring perl
119PACKAGES =+ "${PN}-perltools"
120FILES:${PN}-perltools += " \
121 ${PERLTOOLS} \
122 ${libdir}/perl \
123 ${datadir}/perl5 \
124"
125
126RDEPENDS:${PN}-perltools = "${PN} perl perl-module-file-path findutils"
127
128# git-tk package with gitk and git-gui
129PACKAGES =+ "${PN}-tk"
130#RDEPENDS_${PN}-tk = "${PN} tk tcl"
131#EXTRA_OEMAKE = "TCL_PATH=${STAGING_BINDIR_CROSS}/tclsh"
132FILES:${PN}-tk = " \
133 ${bindir}/gitk \
134 ${datadir}/gitk \
135"
136
137PACKAGES =+ "gitweb"
138FILES:gitweb = "${datadir}/gitweb/"
139RDEPENDS:gitweb = "perl"
140
141BBCLASSEXTEND = "native nativesdk"
2 142
3EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \ 143EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
4 ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \ 144 ac_cv_fread_reads_directories=${ac_cv_fread_reads_directories=yes} \