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