[oe-commits] Hongxu Jia : man/texinfo: conditionally add gzip/bzip2/xz to RDEPENDS

git at git.openembedded.org git at git.openembedded.org
Mon Sep 29 11:14:20 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: 610220a95f9ef78590acb1b8f18abc984464da96
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=610220a95f9ef78590acb1b8f18abc984464da96

Author: Hongxu Jia <hongxu.jia at windriver.com>
Date:   Thu Sep 25 14:31:59 2014 +0800

man/texinfo: conditionally add gzip/bzip2/xz to RDEPENDS

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 at windriver.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>

---

 meta/recipes-extended/man/man_1.6g.bb        | 13 +++++++++++++
 meta/recipes-extended/texinfo/texinfo_5.2.bb | 13 +++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/meta/recipes-extended/man/man_1.6g.bb b/meta/recipes-extended/man/man_1.6g.bb
index a66e01c..03fffd6 100644
--- a/meta/recipes-extended/man/man_1.6g.bb
+++ b/meta/recipes-extended/man/man_1.6g.bb
@@ -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 \
diff --git a/meta/recipes-extended/texinfo/texinfo_5.2.bb b/meta/recipes-extended/texinfo/texinfo_5.2.bb
index 7b5a11a..cf9dcfd 100644
--- a/meta/recipes-extended/texinfo/texinfo_5.2.bb
+++ b/meta/recipes-extended/texinfo/texinfo_5.2.bb
@@ -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"
 



More information about the Openembedded-commits mailing list