2024-09-09 08:52:07 +00:00
|
|
|
def gettext_dependencies(d):
|
|
|
|
if d.getVar('INHIBIT_DEFAULT_DEPS', True) and not oe.utils.inherits(d, 'cross-canadian'):
|
|
|
|
return ""
|
2024-09-09 08:57:42 +00:00
|
|
|
if d.getVar('USE_NLS', True) == 'no':
|
2024-09-09 08:52:07 +00:00
|
|
|
return "gettext-minimal-native"
|
|
|
|
return d.getVar('DEPENDS_GETTEXT', False)
|
|
|
|
|
|
|
|
def gettext_oeconf(d):
|
2024-09-09 08:57:42 +00:00
|
|
|
if d.getVar('USE_NLS', True) == 'no':
|
2024-09-09 08:52:07 +00:00
|
|
|
return '--disable-nls'
|
2024-09-09 08:57:42 +00:00
|
|
|
# Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set
|
|
|
|
if d.getVar('INHIBIT_DEFAULT_DEPS', True) and not oe.utils.inherits(d, 'cross-canadian'):
|
2024-09-09 08:52:07 +00:00
|
|
|
return '--disable-nls'
|
|
|
|
return "--enable-nls"
|
|
|
|
|
2024-09-09 08:57:42 +00:00
|
|
|
DEPENDS_GETTEXT ??= "virtual/gettext gettext-native"
|
2024-09-09 08:52:07 +00:00
|
|
|
|
|
|
|
BASEDEPENDS =+ "${@gettext_dependencies(d)}"
|
|
|
|
EXTRA_OECONF_append = " ${@gettext_oeconf(d)}"
|