blob: 0be14246bfd53ea0ce6bce8c46348cbdee7598f6 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001def gettext_dependencies(d):
Brad Bishop6e60e8b2018-02-01 10:27:11 -05002 if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'):
Patrick Williamsc124f4f2015-09-15 14:41:29 -05003 return ""
Brad Bishop6e60e8b2018-02-01 10:27:11 -05004 if d.getVar('USE_NLS') == 'no':
Patrick Williamsc124f4f2015-09-15 14:41:29 -05005 return "gettext-minimal-native"
6 return d.getVar('DEPENDS_GETTEXT', False)
7
8def gettext_oeconf(d):
Brad Bishop6e60e8b2018-02-01 10:27:11 -05009 if d.getVar('USE_NLS') == 'no':
Patrick Williamsc124f4f2015-09-15 14:41:29 -050010 return '--disable-nls'
11 # Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set
Brad Bishop6e60e8b2018-02-01 10:27:11 -050012 if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'):
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013 return '--disable-nls'
14 return "--enable-nls"
15
16DEPENDS_GETTEXT ??= "virtual/gettext gettext-native"
17
18BASEDEPENDS =+ "${@gettext_dependencies(d)}"
19EXTRA_OECONF_append = " ${@gettext_oeconf(d)}"