All of lore.kernel.org
 help / color / mirror / Atom feed
From: Graham Gower <graham.gower@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [PATCH] iputils_20071127.bb: Don't build ipv6 utils if DISTRO_FEATURES lacks ipv6.
Date: Wed, 01 Dec 2010 10:49:24 +1030	[thread overview]
Message-ID: <4CF5948C.8020901@gmail.com> (raw)


Signed-off-by: Graham Gower <graham.gower@gmail.com>
---
 recipes/iputils/iputils_20071127.bb |   29 ++++++++++++++++++++---------
 1 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/recipes/iputils/iputils_20071127.bb b/recipes/iputils/iputils_20071127.bb
index e5861eb..bcb35c4 100644
--- a/recipes/iputils/iputils_20071127.bb
+++ b/recipes/iputils/iputils_20071127.bb
@@ -5,7 +5,7 @@ SECTION = "console/network"
 LICENSE ="BSD"
 DEPENDS = "docbook-utils-native sgmlspl-native"
 
-PR = "r2"
+PR = "r3"
 
 DEFAULT_PREFERENCE_angstrom = "2"
 
@@ -22,10 +22,14 @@ SRC_URI = "http://ftp.de.debian.org/debian/pool/main/i/iputils/iputils_${PV}.ori
 
 S = "${WORKDIR}/iputils_20071127.orig"
 
-PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6"
+PACKAGES_IPV4 = "${PN}-ping ${PN}-arping ${PN}-tracepath"
+PACKAGES_IPV6 = "${PN}-ping6 ${PN}-tracepath6 ${PN}-traceroute6"
+all_pkgs = "${PACKAGES_IPV4} \
+	${@base_contains('DISTRO_FEATURES', 'ipv6', '${PACKAGES_IPV6}', '', d)}"
+PACKAGES += "${all_pkgs}"
 
 ALLOW_EMPTY_${PN} = "1"
-RDEPENDS_{PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6"
+RDEPENDS_{PN} += "${all_pkgs}"
 
 FILES_${PN}		= ""
 FILES_${PN}-ping	= "${base_bindir}/ping.${PN}"
@@ -37,25 +41,32 @@ FILES_${PN}-traceroute6	= "${bindir}/traceroute6"
 FILES_${PN}-doc		= "${mandir}/man8"
 
 do_compile () {
+	make_targets="${@base_contains('DISTRO_FEATURES', 'ipv6', 'all', 'tracepath ping arping', d)}"
 	oe_runmake 'CC=${CC}' \
 		   KERNEL_INCLUDE="${STAGING_INCDIR}" \
-		   LIBC_INCLUDE="${STAGING_INCDIR}" all man
+		   LIBC_INCLUDE="${STAGING_INCDIR}" ${make_targets} man
 }
 
+do_install_ipv6 () {
+	install -m 4555 ping6 ${D}${base_bindir}/ping6.${PN}
+	install -m 4555 traceroute6 ${D}${bindir}/
+	install -m 0755 tracepath6 ${D}${bindir}/
+	install -m 0644 doc/traceroute6.8 ${D}${mandir}/man8/ || true
+}
 do_install () {
 	install -m 0755 -d ${D}${base_bindir} ${D}${bindir} ${D}${mandir}/man8
 	# SUID root programs
 	install -m 4555 ping ${D}${base_bindir}/ping.${PN}
-	install -m 4555 ping6 ${D}${base_bindir}/ping6.${PN}
-	install -m 4555 traceroute6 ${D}${bindir}/
-	# Other programgs
-	for i in arping tracepath tracepath6; do
+	# Other programs
+	for i in arping tracepath; do
 	  install -m 0755 $i ${D}${bindir}/
 	done
 	# Manual pages for things we build packages for
-	for i in tracepath.8 traceroute6.8 ping.8 arping.8; do
+	for i in tracepath.8 ping.8 arping.8; do
 	  install -m 0644 doc/$i ${D}${mandir}/man8/ || true
 	done
+
+	${@base_contains('DISTRO_FEATURES', 'ipv6', 'do_install_ipv6', '', d)}
 }
 
 # Busybox also provides ping and ping6, so use update-alternatives
-- 
1.7.1




                 reply	other threads:[~2010-12-01  0:20 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CF5948C.8020901@gmail.com \
    --to=graham.gower@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.