util-linux_2.19.1.bb 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. MAJOR_VERSION = "2.19"
  2. PR = "r3"
  3. require util-linux.inc
  4. # note that `lscpu' is under GPLv3+
  5. LICENSE_util-linux-lscpu = "GPLv3+"
  6. SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch \
  7. file://util-linux-ng-2.16-mount_lock_path.patch \
  8. file://uclibc-__progname-conflict.patch \
  9. file://remove_sigsetmark.patch \
  10. "
  11. SRC_URI[md5sum] = "3eab06f05163dfa65479c44e5231932c"
  12. SRC_URI[sha256sum] = "d3eac4afcc687b3ae1ffedcab2dc12df84c7ba7045cce31386d2b7040a011c7d"
  13. # Only lscpu part is gplv3; rest of the code is not,
  14. # so take out the lscpu parts while running non-gplv3 build.
  15. python () {
  16. d.setVar("REMOVELSCPU", "no")
  17. if (d.getVar("INCOMPATIBLE_LICENSE", True) or "").find("GPLv3") != -1:
  18. # avoid GPLv3
  19. d.setVar("REMOVELSCPU", "yes")
  20. packages = (d.getVar("PACKAGES", False) or "").split()
  21. if "util-linux-lscpu" in packages:
  22. packages.remove("util-linux-lscpu")
  23. d.setVar("PACKAGES", " ".join(packages))
  24. src_uri = (d.getVar("SRC_URI", False) or "").split()
  25. src_uri.append("file://remove-lscpu.patch")
  26. d.setVar("SRC_URI", " ".join(src_uri))
  27. }
  28. do_remove_lscpu() {
  29. if [ "x${REMOVELSCPU}" = "xyes" ]; then
  30. rm -f sys-utils/lscpu.c sys-utils/lscpu.1
  31. rm -rf tests/ts/lscpu tests/expected/lscpu
  32. fi
  33. }
  34. addtask remove_lscpu before do_configure after do_patch
  35. # fallocate is glibc 2.10, fallocate64 is glibc 2.11
  36. # we need to disable it for older versions
  37. EXTRA_OECONF += "ac_cv_func_fallocate=no"
  38. EXTRA_OECONF_virtclass-native += "--disable-fallocate --disable-use-tty-group"