]> code.ossystems Code Review - openembedded-core.git/commitdiff
man/texinfo: conditionally add gzip/bzip2/xz to RDEPENDS
authorHongxu Jia <hongxu.jia@windriver.com>
Thu, 25 Sep 2014 06:31:59 +0000 (14:31 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 29 Sep 2014 11:12:34 +0000 (12:12 +0100)
Conditionally add 'xz/bz2/gzip' to info/man's RDEPENDS
according to DOC_COMPRESS.

[YOCTO #6750]
[YOCTO #6751]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-extended/man/man_1.6g.bb
meta/recipes-extended/texinfo/texinfo_5.2.bb

index a66e01cb9ac7f243322e786e1e1ed71c8ec1237b..03fffd60152d48f8937e7256971ab8ce0f83bf6f 100644 (file)
@@ -9,6 +9,19 @@ PR = "r1"
 
 DEPENDS = "groff less"
 
+def compress_pkg(d):
+    if "compress_doc" in (d.getVar("INHERIT", True) or "").split():
+         compress = d.getVar("DOC_COMPRESS", True)
+         if compress == "gz":
+             return "gzip"
+         elif compress == "bz2":
+             return "bzip2"
+         elif compress == "xz":
+             return "xz"
+    return ""
+
+RDEPENDS_${PN} += "${@compress_pkg(d)}"
+
 SRC_URI = "http://primates.ximian.com/~flucifredi/${BPN}/${BPN}-${PV}.tar.gz \
            file://man-1.5k-confpath.patch;striplevel=0 \
            file://man-1.5h1-make.patch \
index 7b5a11a874449077bfa9f31bd1aece1156d77366..cf9dcfd5de0b8c52b62755c6901f2f953c9bf431 100644 (file)
@@ -9,6 +9,19 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
 PROVIDES_append_class-native = " texinfo-replacement-native"
 
+def compress_pkg(d):
+    if "compress_doc" in (d.getVar("INHERIT", True) or "").split():
+         compress = d.getVar("DOC_COMPRESS", True)
+         if compress == "gz":
+             return "gzip"
+         elif compress == "bz2":
+             return "bzip2"
+         elif compress == "xz":
+             return "xz"
+    return ""
+
+RDEPENDS_info += "${@compress_pkg(d)}"
+
 DEPENDS = "zlib ncurses texinfo-replacement-native"
 DEPENDS_class-native = "zlib-native ncurses-native"