coreutils_8.30.bb 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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=dbe356a88b09c29232b083d1ff8ac82a"
  10. DEPENDS = "gmp libcap"
  11. DEPENDS_class-native = ""
  12. inherit autotools gettext texinfo
  13. SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \
  14. file://remove-usr-local-lib-from-m4.patch \
  15. file://fix-selinux-flask.patch \
  16. file://0001-uname-report-processor-and-hardware-correctly.patch \
  17. file://disable-ls-output-quoting.patch \
  18. file://0001-local.mk-fix-cross-compiling-problem.patch \
  19. "
  20. SRC_URI[md5sum] = "ab06d68949758971fe744db66b572816"
  21. SRC_URI[sha256sum] = "e831b3a86091496cdba720411f9748de81507798f6130adeaef872d206e1b057"
  22. EXTRA_OECONF_class-native = "--without-gmp"
  23. EXTRA_OECONF_class-target = "--enable-install-program=arch,hostname --libexecdir=${libdir}"
  24. EXTRA_OECONF_class-nativesdk = "--enable-install-program=arch,hostname"
  25. # acl and xattr are not default features
  26. #
  27. PACKAGECONFIG_class-target ??= "\
  28. ${@bb.utils.filter('DISTRO_FEATURES', 'acl xattr', d)} \
  29. "
  30. # The lib/oe/path.py requires xattr
  31. PACKAGECONFIG_class-native ??= "xattr"
  32. # with, without, depends, rdepends
  33. #
  34. PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
  35. PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
  36. PACKAGECONFIG[single-binary] = "--enable-single-binary,--disable-single-binary,,"
  37. # [ df mktemp nice printenv base64 gets a special treatment and is not included in this
  38. bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname du \
  39. env expand expr factor fmt fold groups head hostid id install \
  40. join link logname md5sum mkfifo nl nohup nproc od paste pathchk \
  41. pinky pr printf ptx readlink realpath runcon seq sha1sum sha224sum sha256sum \
  42. sha384sum sha512sum shred shuf sort split stdbuf sum tac tail tee test timeout \
  43. tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
  44. # hostname gets a special treatment and is not included in this
  45. base_bindir_progs = "cat chgrp chmod chown cp date dd echo false hostname kill ln ls mkdir \
  46. mknod mv pwd rm rmdir sleep stty sync touch true uname stat"
  47. sbindir_progs= "chroot"
  48. # Let aclocal use the relative path for the m4 file rather than the
  49. # absolute since coreutils has a lot of m4 files, otherwise there might
  50. # be an "Argument list too long" error when it is built in a long/deep
  51. # directory.
  52. acpaths = "-I ./m4"
  53. # Deal with a separate builddir failure if src doesn't exist when creating version.c/version.h
  54. do_compile_prepend () {
  55. mkdir -p ${B}/src
  56. }
  57. do_install_class-native() {
  58. autotools_do_install
  59. # remove groups to fix conflict with shadow-native
  60. rm -f ${D}${STAGING_BINDIR_NATIVE}/groups
  61. # The return is a must since native doesn't need the
  62. # do_install_append() in the below.
  63. return
  64. }
  65. do_install_append() {
  66. for i in df mktemp nice printenv base64; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${BPN}; done
  67. install -d ${D}${base_bindir}
  68. [ "${base_bindir}" != "${bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${BPN}; done
  69. install -d ${D}${sbindir}
  70. [ "${sbindir}" != "${bindir}" ] && for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${BPN}; done
  71. # [ requires special handling because [.coreutils will cause the sed stuff
  72. # in update-alternatives to fail, therefore use lbracket - the name used
  73. # for the actual source file.
  74. mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
  75. }
  76. inherit update-alternatives
  77. ALTERNATIVE_PRIORITY = "100"
  78. # Make hostname's priority higher than busybox but lower than net-tools
  79. ALTERNATIVE_PRIORITY[hostname] = "90"
  80. ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base64 nice printenv mktemp df"
  81. ALTERNATIVE_${PN}-doc = "base64.1 nice.1 mktemp.1 df.1 groups.1 kill.1 uptime.1 stat.1 hostname.1"
  82. ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1"
  83. ALTERNATIVE_LINK_NAME[base64] = "${base_bindir}/base64"
  84. ALTERNATIVE_TARGET[base64] = "${bindir}/base64.${BPN}"
  85. ALTERNATIVE_LINK_NAME[base64.1] = "${mandir}/man1/base64.1"
  86. ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp"
  87. ALTERNATIVE_TARGET[mktemp] = "${bindir}/mktemp.${BPN}"
  88. ALTERNATIVE_LINK_NAME[mktemp.1] = "${mandir}/man1/mktemp.1"
  89. ALTERNATIVE_LINK_NAME[df] = "${base_bindir}/df"
  90. ALTERNATIVE_TARGET[df] = "${bindir}/df.${BPN}"
  91. ALTERNATIVE_LINK_NAME[df.1] = "${mandir}/man1/df.1"
  92. ALTERNATIVE_LINK_NAME[nice] = "${base_bindir}/nice"
  93. ALTERNATIVE_TARGET[nice] = "${bindir}/nice.${BPN}"
  94. ALTERNATIVE_LINK_NAME[nice.1] = "${mandir}/man1/nice.1"
  95. ALTERNATIVE_LINK_NAME[printenv] = "${base_bindir}/printenv"
  96. ALTERNATIVE_TARGET[printenv] = "${bindir}/printenv.${BPN}"
  97. ALTERNATIVE_LINK_NAME[lbracket] = "${bindir}/["
  98. ALTERNATIVE_TARGET[lbracket] = "${bindir}/lbracket.${BPN}"
  99. ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1"
  100. ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
  101. ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
  102. ALTERNATIVE_LINK_NAME[stat.1] = "${mandir}/man1/stat.1"
  103. python __anonymous() {
  104. for prog in d.getVar('base_bindir_progs').split():
  105. d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir'), prog))
  106. for prog in d.getVar('sbindir_progs').split():
  107. d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir'), prog))
  108. }
  109. BBCLASSEXTEND = "native nativesdk"