diff options
Diffstat (limited to 'meta/recipes-core/util-linux/util-linux_2.21.2.bb')
-rw-r--r-- | meta/recipes-core/util-linux/util-linux_2.21.2.bb | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-core/util-linux/util-linux_2.21.2.bb b/meta/recipes-core/util-linux/util-linux_2.21.2.bb new file mode 100644 index 0000000000..7f2c2a915f --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux_2.21.2.bb | |||
@@ -0,0 +1,45 @@ | |||
1 | MAJOR_VERSION = "2.21" | ||
2 | PR = "r0" | ||
3 | require util-linux.inc | ||
4 | |||
5 | # note that `lscpu' is under GPLv3+ | ||
6 | LICENSE_${PN}-lscpu = "GPLv3+" | ||
7 | |||
8 | SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch \ | ||
9 | file://util-linux-ng-2.16-mount_lock_path.patch \ | ||
10 | file://uclibc-__progname-conflict.patch \ | ||
11 | " | ||
12 | |||
13 | SRC_URI[md5sum] = "b75b3cfecb943f74338382fde693c2c3" | ||
14 | SRC_URI[sha256sum] = "066f9d8e51bfabd809d266edcd54eefba1cdca57725b95c074fd47fe6fba3d30" | ||
15 | |||
16 | # Only lscpu part is gplv3; rest of the code is not, | ||
17 | # so take out the lscpu parts while running non-gplv3 build. | ||
18 | # The removal of the package should now occur during | ||
19 | # the build if INCOMPATIBLE_LICENSE is set to GPLv3 | ||
20 | |||
21 | python () { | ||
22 | d.setVar("REMOVELSCPU", "no") | ||
23 | if (d.getVar("INCOMPATIBLE_LICENSE", True) or "").find("GPLv3") != -1: | ||
24 | # avoid GPLv3 | ||
25 | d.setVar("REMOVELSCPU", "yes") | ||
26 | src_uri = (d.getVar("SRC_URI", False) or "").split() | ||
27 | src_uri.append("file://remove-lscpu.patch") | ||
28 | d.setVar("SRC_URI", " ".join(src_uri)) | ||
29 | } | ||
30 | |||
31 | do_remove_lscpu() { | ||
32 | if [ "x${REMOVELSCPU}" = "xyes" ]; then | ||
33 | rm -f sys-utils/lscpu.c sys-utils/lscpu.1 | ||
34 | rm -rf tests/ts/lscpu tests/expected/lscpu | ||
35 | fi | ||
36 | } | ||
37 | |||
38 | addtask remove_lscpu before do_configure after do_patch | ||
39 | |||
40 | CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=as" | ||
41 | EXTRA_OECONF_virtclass-native += "--disable-fallocate --disable-use-tty-group" | ||
42 | |||
43 | do_install_append () { | ||
44 | sed -i -e '1s,.*,#!${bindir}/env perl,' ${D}${bindir}/chkdupexe | ||
45 | } | ||