summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/coreutils/coreutils_8.28.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/coreutils/coreutils_8.28.bb')
-rw-r--r--meta/recipes-core/coreutils/coreutils_8.28.bb143
1 files changed, 143 insertions, 0 deletions
diff --git a/meta/recipes-core/coreutils/coreutils_8.28.bb b/meta/recipes-core/coreutils/coreutils_8.28.bb
new file mode 100644
index 0000000000..a98072425c
--- /dev/null
+++ b/meta/recipes-core/coreutils/coreutils_8.28.bb
@@ -0,0 +1,143 @@
1SUMMARY = "The basic file, shell and text manipulation utilities"
2DESCRIPTION = "The GNU Core Utilities provide the basic file, shell and text \
3manipulation utilities. These are the core utilities which are expected to exist on \
4every system."
5HOMEPAGE = "http://www.gnu.org/software/coreutils/"
6BUGTRACKER = "http://debbugs.gnu.org/coreutils"
7LICENSE = "GPLv3+"
8LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
9 file://src/ls.c;beginline=5;endline=16;md5=38b79785ca88537b75871782a2a3c6b8"
10DEPENDS = "gmp libcap"
11DEPENDS_class-native = ""
12
13inherit autotools gettext texinfo
14
15SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz;name=tarball \
16 http://distfiles.gentoo.org/distfiles/${BP}-man.tar.xz;name=manpages \
17 file://man-decouple-manpages-from-build.patch \
18 file://remove-usr-local-lib-from-m4.patch \
19 file://fix-selinux-flask.patch \
20 file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
21 file://0001-uname-report-processor-and-hardware-correctly.patch \
22 file://disable-ls-output-quoting.patch \
23 file://0001-local.mk-fix-cross-compiling-problem.patch \
24 file://0001-doc-fix-Up-field-of-realpath-usage-examples.patch \
25 "
26
27SRC_URI[tarball.md5sum] = "e7cb20d0572cc40d9f47ede6454406d1"
28SRC_URI[tarball.sha256sum] = "1117b1a16039ddd84d51a9923948307cfa28c2cea03d1a2438742253df0a0c65"
29SRC_URI[manpages.md5sum] = "3a7c626aad1c9077f254e5c2553a2f60"
30SRC_URI[manpages.sha256sum] = "d72c3fa79ae328a4fd1107102e8946755aa2e908044e1efcf1e71ef206dca042"
31
32EXTRA_OECONF_class-native = "--without-gmp"
33EXTRA_OECONF_class-target = "--enable-install-program=arch --libexecdir=${libdir}"
34EXTRA_OECONF_class-nativesdk = "--enable-install-program=arch"
35
36# acl and xattr are not default features
37#
38PACKAGECONFIG_class-target ??= "\
39 ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)} \
40"
41
42# The lib/oe/path.py requires xattr
43PACKAGECONFIG_class-native ??= "xattr"
44
45# with, without, depends, rdepends
46#
47PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
48PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
49
50# [ df mktemp base64 gets a special treatment and is not included in this
51bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname du \
52 env expand expr factor fmt fold groups head hostid id install \
53 join link logname md5sum mkfifo nice nl nohup nproc od paste pathchk \
54 pinky pr printenv printf ptx readlink realpath runcon seq sha1sum sha224sum sha256sum \
55 sha384sum sha512sum shred shuf sort split stdbuf sum tac tail tee test timeout\
56 tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
57
58# hostname gets a special treatment and is not included in this
59base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
60 mknod mv pwd rm rmdir sleep stty sync touch true uname stat"
61
62sbindir_progs= "chroot"
63
64# Let aclocal use the relative path for the m4 file rather than the
65# absolute since coreutils has a lot of m4 files, otherwise there might
66# be an "Argument list too long" error when it is built in a long/deep
67# directory.
68acpaths = "-I ./m4"
69
70# Deal with a separate builddir failure if src doesn't exist when creating version.c/version.h
71do_compile_prepend () {
72 mkdir -p ${B}/src
73}
74
75do_install_class-native() {
76 autotools_do_install
77 # remove groups to fix conflict with shadow-native
78 rm -f ${D}${STAGING_BINDIR_NATIVE}/groups
79 # The return is a must since native doesn't need the
80 # do_install_append() in the below.
81 return
82}
83
84do_install_append() {
85 for i in df mktemp base64; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${BPN}; done
86
87 install -d ${D}${base_bindir}
88 [ "${base_bindir}" != "${bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${BPN}; done
89
90 install -d ${D}${sbindir}
91 [ "${sbindir}" != "${bindir}" ] && for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${BPN}; done
92
93 # [ requires special handling because [.coreutils will cause the sed stuff
94 # in update-alternatives to fail, therefore use lbracket - the name used
95 # for the actual source file.
96 mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
97
98 # prebuilt man pages
99 install -d ${D}/${mandir}/man1
100 install -t ${D}/${mandir}/man1 ${S}/man/*.1
101 # prebuilt man pages don't do a separate man page for [ vs test.
102 # see comment above r.e. sed and update-alternatives
103 cp -R --no-dereference --preserve=mode,links -v ${D}${mandir}/man1/test.1 ${D}${mandir}/man1/lbracket.1.${BPN}
104}
105
106inherit update-alternatives
107
108ALTERNATIVE_PRIORITY = "100"
109ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base64 mktemp df"
110ALTERNATIVE_${PN}-doc = "base64.1 mktemp.1 df.1 lbracket.1 groups.1 kill.1 uptime.1 stat.1 hostname.1"
111
112ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
113
114ALTERNATIVE_LINK_NAME[base64] = "${base_bindir}/base64"
115ALTERNATIVE_TARGET[base64] = "${bindir}/base64.${BPN}"
116ALTERNATIVE_LINK_NAME[base64.1] = "${mandir}/man1/base64.1"
117
118ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp"
119ALTERNATIVE_TARGET[mktemp] = "${bindir}/mktemp.${BPN}"
120ALTERNATIVE_LINK_NAME[mktemp.1] = "${mandir}/man1/mktemp.1"
121
122ALTERNATIVE_LINK_NAME[df] = "${base_bindir}/df"
123ALTERNATIVE_TARGET[df] = "${bindir}/df.${BPN}"
124ALTERNATIVE_LINK_NAME[df.1] = "${mandir}/man1/df.1"
125
126ALTERNATIVE_LINK_NAME[lbracket] = "${bindir}/["
127ALTERNATIVE_TARGET[lbracket] = "${bindir}/lbracket.${BPN}"
128ALTERNATIVE_LINK_NAME[lbracket.1] = "${mandir}/man1/lbracket.1"
129
130ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1"
131ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
132ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
133ALTERNATIVE_LINK_NAME[stat.1] = "${mandir}/man1/stat.1"
134
135python __anonymous() {
136 for prog in d.getVar('base_bindir_progs').split():
137 d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog))
138
139 for prog in d.getVar('sbindir_progs').split():
140 d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir'), prog))
141}
142
143BBCLASSEXTEND = "native nativesdk"