summaryrefslogtreecommitdiff
path: root/meta/classes/gettext.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-04 00:32:48 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-04 00:38:06 +0100
commitd19735ad5a45f969918fb73ea4845bef48d9ee24 (patch)
tree7892305a2996f09a56be4464bed4b463a4b5fcc3 /meta/classes/gettext.bbclass
parentfe2f1e1708e34758c70db37ce480453e10fc4eb1 (diff)
downloadopenembedded-core-d19735ad5a45f969918fb73ea4845bef48d9ee24.tar.gz
openembedded-core-d19735ad5a45f969918fb73ea4845bef48d9ee24.tar.bz2
openembedded-core-d19735ad5a45f969918fb73ea4845bef48d9ee24.zip
gettext.bbclass: Updates to better handle gettext alternatives
* Change gettext dependency to virtual/gettext * Ensure INHIBIT_DEFAULT_DEPS removes gettext dependencies * Use BASEDEPENDS to ensure dependencies are added in native/nativesdk cases Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/gettext.bbclass')
-rw-r--r--meta/classes/gettext.bbclass28
1 files changed, 14 insertions, 14 deletions
diff --git a/meta/classes/gettext.bbclass b/meta/classes/gettext.bbclass
index a40e74f819..6f79e5ee76 100644
--- a/meta/classes/gettext.bbclass
+++ b/meta/classes/gettext.bbclass
@@ -1,17 +1,17 @@
-def gettext_after_parse(d):
- # Remove the NLS bits if USE_NLS is no.
- if bb.data.getVar('USE_NLS', d, 1) == 'no':
- cfg = oe_filter_out('^--(dis|en)able-nls$', bb.data.getVar('EXTRA_OECONF', d, 1) or "", d)
- cfg += " --disable-nls"
- depends = bb.data.getVar('DEPENDS', d, 1) or ""
- bb.data.setVar('DEPENDS', oe_filter_out('^(virtual/libiconv|virtual/libintl)$', depends, d), d)
- bb.data.setVar('EXTRA_OECONF', cfg, d)
+def gettext_dependencies(d):
+ if d.getVar('USE_NLS', True) == 'no':
+ return ""
+ if bb.data.getVar('INHIBIT_DEFAULT_DEPS', d, True) and not oe.utils.inherits(d, 'cross-canadian'):
+ return ""
+ return d.getVar('DEPENDS_GETTEXT', False)
-python () {
- gettext_after_parse(d)
-}
+def gettext_oeconf(d):
+ # Remove the NLS bits if USE_NLS is no.
+ if d.getVar('USE_NLS', True) == 'no':
+ return '--disable-nls'
+ return "--enable-nls"
-DEPENDS_GETTEXT = "gettext gettext-native"
+DEPENDS_GETTEXT = "virtual/gettext gettext-native"
-DEPENDS =+ "${DEPENDS_GETTEXT}"
-EXTRA_OECONF += "--enable-nls"
+BASEDEPENDS =+ "${@gettext_dependencies(d)}"
+EXTRA_OECONF += "${@gettext_oeconf(d)}"