2011-05-03 23:32:48 +00:00
|
|
|
def gettext_dependencies(d):
|
2011-05-05 16:57:56 +00:00
|
|
|
if d.getVar('USE_NLS', True) == 'no' and not oe.utils.inherits(d, 'native', 'nativesdk', 'cross'):
|
2011-05-03 23:32:48 +00:00
|
|
|
return ""
|
2011-05-05 16:57:56 +00:00
|
|
|
if d.getVar('INHIBIT_DEFAULT_DEPS', True) and not oe.utils.inherits(d, 'cross-canadian'):
|
2011-05-03 23:32:48 +00:00
|
|
|
return ""
|
2011-12-14 09:08:45 +00:00
|
|
|
if oe.utils.inherits(d, 'native', 'cross'):
|
2011-10-18 17:26:26 +00:00
|
|
|
return "gettext-minimal-native"
|
2011-05-03 23:32:48 +00:00
|
|
|
return d.getVar('DEPENDS_GETTEXT', False)
|
2006-11-20 09:16:34 +00:00
|
|
|
|
2011-05-03 23:32:48 +00:00
|
|
|
def gettext_oeconf(d):
|
2011-12-14 09:08:45 +00:00
|
|
|
if oe.utils.inherits(d, 'native', 'cross'):
|
2011-10-18 17:26:26 +00:00
|
|
|
return '--disable-nls'
|
2011-05-03 23:32:48 +00:00
|
|
|
# Remove the NLS bits if USE_NLS is no.
|
2011-12-14 09:08:45 +00:00
|
|
|
if d.getVar('USE_NLS', True) == 'no' and not oe.utils.inherits(d, 'nativesdk', 'cross-canadian'):
|
2011-05-03 23:32:48 +00:00
|
|
|
return '--disable-nls'
|
|
|
|
return "--enable-nls"
|
2005-08-31 10:45:47 +00:00
|
|
|
|
2012-04-19 07:48:25 +00:00
|
|
|
DEPENDS_GETTEXT ??= "virtual/gettext gettext-native"
|
2010-01-05 21:10:47 +00:00
|
|
|
|
2011-05-03 23:32:48 +00:00
|
|
|
BASEDEPENDS =+ "${@gettext_dependencies(d)}"
|
2011-05-05 16:57:56 +00:00
|
|
|
EXTRA_OECONF_append = " ${@gettext_oeconf(d)}"
|