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