summaryrefslogtreecommitdiffstats
path: root/meta/classes/gettext.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-10-18 18:26:26 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-02 08:58:03 +0000
commitb090fde5c184a64d3dd77c5f87b9596854e272ec (patch)
tree8e32d651888a27a5170c4222a4bd7134fb4ab09e /meta/classes/gettext.bbclass
parent9497b27110d9a6857fc2befeedf57a4bb4555506 (diff)
downloadpoky-b090fde5c184a64d3dd77c5f87b9596854e272ec.tar.gz
gettext: Switch to disabling nls and reducing -native build dependencies to a set of pre built m4 macros
When analysing our build performance, its apparent that binutils-cross takes an age to get built. This is due to its dependencies on flex-native and bison-native which in turn depend on gettext-native. gettext-native is problematic as it has a significant dependency chain of its own and takes an age to build. What is worse is that we never care about the native language support in -native and -cross packages since we always force the C locale. This patch therefore disables nls for all -native packages (its already disabled for -cross) and adds a new gettext-minimal-native package which contains the m4 macros to keep autoconf/automake happy. This means we gain a significant build time speedup by the removal of gettext-native from most dependency chains (only being part of gettext for the target now). For now the LICENCE field says GPLv3, the macros are actually under a FSF MIT like licence so we need to update this part of the patch in due course. (From OE-Core rev: 01b2a16beb4a924077b74943ad4d6e7976563ff1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/gettext.bbclass')
-rw-r--r--meta/classes/gettext.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/gettext.bbclass b/meta/classes/gettext.bbclass
index d5b3d701e9..1793748af2 100644
--- a/meta/classes/gettext.bbclass
+++ b/meta/classes/gettext.bbclass
@@ -3,9 +3,13 @@ def gettext_dependencies(d):
3 return "" 3 return ""
4 if d.getVar('INHIBIT_DEFAULT_DEPS', True) and not oe.utils.inherits(d, 'cross-canadian'): 4 if d.getVar('INHIBIT_DEFAULT_DEPS', True) and not oe.utils.inherits(d, 'cross-canadian'):
5 return "" 5 return ""
6 if oe.utils.inherits(d, 'native'):
7 return "gettext-minimal-native"
6 return d.getVar('DEPENDS_GETTEXT', False) 8 return d.getVar('DEPENDS_GETTEXT', False)
7 9
8def gettext_oeconf(d): 10def gettext_oeconf(d):
11 if oe.utils.inherits(d, 'native'):
12 return '--disable-nls'
9 # Remove the NLS bits if USE_NLS is no. 13 # Remove the NLS bits if USE_NLS is no.
10 if d.getVar('USE_NLS', True) == 'no' and not oe.utils.inherits(d, 'native', 'nativesdk', 'cross', 'cross-canadian'): 14 if d.getVar('USE_NLS', True) == 'no' and not oe.utils.inherits(d, 'native', 'nativesdk', 'cross', 'cross-canadian'):
11 return '--disable-nls' 15 return '--disable-nls'