* [PATCH V3 0/4] uclibc support in oe-core v3
@ 2011-04-30 22:06 Khem Raj
2011-04-30 22:06 ` [PATCH 1/4] gettext.bbclass: Use _append instead of =+ Khem Raj
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Khem Raj @ 2011-04-30 22:06 UTC (permalink / raw)
To: OE core
This patchset works well with both uclibc and eglibc
For uclibc one would need meta-openembedded layer for now
I have included the feedback on v2
Additionally inherit gettext for libx11 recipes
alsa-utils needs to fix exp10 references for uclibc
Pull URL: git://git.openembedded.org/openembedded-core-contrib
Branch: kraj/uclibc
Browse: http://git.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/uclibc
Thanks,
Khem Raj <raj.khem@gmail.com>
---
Khem Raj (4):
gettext.bbclass: Use _append instead of =+
insane.bbclass: Checking for NLS too when checking gettext dependency
libx11: Use inherit gettext
alsa-utils_1.0.24.2.bb: Fix build for uclibc targets
meta/classes/gettext.bbclass | 30 ++++++++++++++-----
meta/classes/insane.bbclass | 9 +++--
meta/recipes-graphics/xorg-lib/libx11_1.3.4.bb | 3 +-
meta/recipes-graphics/xorg-lib/libx11_git.bb | 6 ++-
.../uclibc-exp10-replacement.patch | 21 ++++++++++++++
.../recipes-multimedia/alsa/alsa-utils_1.0.24.2.bb | 4 ++-
6 files changed, 57 insertions(+), 16 deletions(-)
create mode 100644 meta/recipes-multimedia/alsa/alsa-utils-1.0.24.2/uclibc-exp10-replacement.patch
--
1.7.4.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/4] gettext.bbclass: Use _append instead of =+
2011-04-30 22:06 [PATCH V3 0/4] uclibc support in oe-core v3 Khem Raj
@ 2011-04-30 22:06 ` Khem Raj
2011-04-30 22:06 ` [PATCH 2/4] insane.bbclass: Checking for NLS too when checking gettext dependency Khem Raj
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2011-04-30 22:06 UTC (permalink / raw)
To: OE core
Ensure gettext and gettext-native are removed from DEPENDS when
not using NLS
Use append instead of += to get gettext dependecies processed
correctly in all cases
Dont remove gettext-native for native recipes as ENABLE_NLS is
only for target and not for native recipes
Replace using 1 for a boolean type with True
Honor INHIBIT_DEFAULT_DEPS
Remove the added dependencies for gettext if INHIBIT_DEFAULT_DEPS is non
null
operate on virtclass overrides individually
virtclass classes are parsed at the end hence
just doing DEPENDS munging is not enough since
it will be overridden
When inheriting cross-canadian we should not remove
gettext from default deps
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/classes/gettext.bbclass | 30 ++++++++++++++++++++++--------
1 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/meta/classes/gettext.bbclass b/meta/classes/gettext.bbclass
index a40e74f..492eb68 100644
--- a/meta/classes/gettext.bbclass
+++ b/meta/classes/gettext.bbclass
@@ -1,17 +1,31 @@
def gettext_after_parse(d):
# Remove the NLS bits if USE_NLS is no.
- if bb.data.getVar('USE_NLS', d, 1) == 'no':
+ if bb.data.getVar('USE_NLS', d, True) == '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)
+ depends = bb.data.getVar('DEPENDS', d, True) or ""
+ depends = oe_filter_out('^(virtual/libiconv|virtual/libintl|virtual/gettext|gettext)$', depends, d)
+ if not oe.utils.inherits(d, 'native', 'nativesdk', 'cross', 'crosssdk'):
+ depends = oe_filter_out('^(gettext-native)$', depends, d)
+ bb.data.setVar('DEPENDS', depends, d)
bb.data.setVar('EXTRA_OECONF', cfg, d)
-
+ # check if INHIBIT_DEFAULT_DEPS is 1 then we forcibly remove dependencies
+ # added by this class through DEPENDS_GETTEXT
+ if bb.data.getVar('INHIBIT_DEFAULT_DEPS', d, True) and not oe.utils.inherits(d, 'cross-canadian'):
+ depends_native = bb.data.getVar('DEPENDS_virtclass-native', d, True) or ""
+ depends_nativesdk = bb.data.getVar('DEPENDS_virtclass-nativesdk', d, True) or ""
+ depends = bb.data.getVar('DEPENDS', d, True) or ""
+ gettext_deps = bb.data.getVar('DEPENDS_GETTEXT', d, True).replace(' ','|')
+ gettext_deps = '^(' + gettext_deps + ')$'
+ depends_native = oe_filter_out(gettext_deps, depends_native, d)
+ depends_nativesdk = oe_filter_out(gettext_deps, depends_nativesdk, d)
+ depends = oe_filter_out(gettext_deps, depends, d)
+ bb.data.setVar('DEPENDS_virtclass-native', depends, d)
+ bb.data.setVar('DEPENDS_virtclass-nativesdk', depends, d)
+ bb.data.setVar('DEPENDS', depends, d)
python () {
gettext_after_parse(d)
}
-
-DEPENDS_GETTEXT = "gettext gettext-native"
-
-DEPENDS =+ "${DEPENDS_GETTEXT}"
EXTRA_OECONF += "--enable-nls"
+DEPENDS_GETTEXT = "virtual/gettext gettext-native"
+DEPENDS =+ "${DEPENDS_GETTEXT}"
--
1.7.4.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/4] insane.bbclass: Checking for NLS too when checking gettext dependency
2011-04-30 22:06 [PATCH V3 0/4] uclibc support in oe-core v3 Khem Raj
2011-04-30 22:06 ` [PATCH 1/4] gettext.bbclass: Use _append instead of =+ Khem Raj
@ 2011-04-30 22:06 ` Khem Raj
2011-04-30 22:06 ` [PATCH 3/4] libx11: Use inherit gettext Khem Raj
2011-04-30 22:07 ` [PATCH 4/4] alsa-utils_1.0.24.2.bb: Fix build for uclibc targets Khem Raj
3 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2011-04-30 22:06 UTC (permalink / raw)
To: OE core
Checking for gettext is not needed when --disable-nls is used
Let user know what variant of gettext is missing e.g. gettext-native,
gettext-nativesdk etc, reveals a bit more for user
Check for virtual/gettext
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/classes/insane.bbclass | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 98acf7f..742be5e 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -578,20 +578,21 @@ Rerun configure task after fixing this. The path was '%s'""" % root)
if "configure.in" in files:
configs.append(os.path.join(root, "configure.in"))
- if "gettext" not in bb.data.getVar('P', d, True) and "gcc-runtime" not in bb.data.getVar('P', d, True):
+ cnf = bb.data.getVar('EXTRA_OECONF', d, True) or ""
+ if "gettext" not in bb.data.getVar('P', d, True) and "gcc-runtime" not in bb.data.getVar('P', d, True) and "--disable-nls" not in cnf:
if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('nativesdk', d):
gt = "gettext-native"
elif bb.data.inherits_class('cross-canadian', d):
gt = "gettext-nativesdk"
else:
- gt = "gettext"
+ gt = "virtual/gettext"
deps = bb.utils.explode_deps(bb.data.getVar('DEPENDS', d, True) or "")
if gt not in deps:
for config in configs:
gnu = "grep \"^[[:space:]]*AM_GNU_GETTEXT\" %s >/dev/null" % config
if os.system(gnu) == 0:
- bb.fatal("""Gettext required but not in DEPENDS for file %s.
-Missing inherit gettext?""" % config)
+ bb.fatal("""%s required but not in DEPENDS for file %s.
+Missing inherit gettext?""" % (gt, config))
if not package_qa_check_license(workdir, d):
bb.fatal("Licensing Error: LIC_FILES_CHKSUM does not match, please fix")
--
1.7.4.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/4] libx11: Use inherit gettext
2011-04-30 22:06 [PATCH V3 0/4] uclibc support in oe-core v3 Khem Raj
2011-04-30 22:06 ` [PATCH 1/4] gettext.bbclass: Use _append instead of =+ Khem Raj
2011-04-30 22:06 ` [PATCH 2/4] insane.bbclass: Checking for NLS too when checking gettext dependency Khem Raj
@ 2011-04-30 22:06 ` Khem Raj
2011-04-30 22:07 ` [PATCH 4/4] alsa-utils_1.0.24.2.bb: Fix build for uclibc targets Khem Raj
3 siblings, 0 replies; 6+ messages in thread
From: Khem Raj @ 2011-04-30 22:06 UTC (permalink / raw)
To: OE core
Avoid direct depependency on gettext, inherit class instead
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-graphics/xorg-lib/libx11_1.3.4.bb | 3 ++-
meta/recipes-graphics/xorg-lib/libx11_git.bb | 6 ++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-graphics/xorg-lib/libx11_1.3.4.bb b/meta/recipes-graphics/xorg-lib/libx11_1.3.4.bb
index c572d5e..08ba07b 100644
--- a/meta/recipes-graphics/xorg-lib/libx11_1.3.4.bb
+++ b/meta/recipes-graphics/xorg-lib/libx11_1.3.4.bb
@@ -1,4 +1,5 @@
require libx11.inc
+inherit gettext
LICENSE = "MIT & MIT-style & BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=bf75bfe4d05068311b5e6862d4b5f2c5"
@@ -14,7 +15,7 @@ SRC_URI[md5sum] = "f65c9c7ecbfb64c19dbd7927160d63fd"
SRC_URI[sha256sum] = "88d7238ce5f7cd123450567de7a3b56a43556e4ccc45df38b8324147c889a844"
DEPENDS += "bigreqsproto xproto xextproto xtrans libxau xcmiscproto \
- libxdmcp xf86bigfontproto kbproto inputproto xproto-native gettext"
+ libxdmcp xf86bigfontproto kbproto inputproto xproto-native"
EXTRA_OECONF += "--without-xcb"
diff --git a/meta/recipes-graphics/xorg-lib/libx11_git.bb b/meta/recipes-graphics/xorg-lib/libx11_git.bb
index a976a16..aa69f4a 100644
--- a/meta/recipes-graphics/xorg-lib/libx11_git.bb
+++ b/meta/recipes-graphics/xorg-lib/libx11_git.bb
@@ -1,11 +1,13 @@
require libx11.inc
require libx11_git.inc
+inherit gettext
+
PR = "r2"
DEPENDS = "xproto xextproto xcmiscproto xf86bigfontproto kbproto inputproto \
- bigreqsproto xtrans libxau libxcb libxdmcp util-macros gettext"
+ bigreqsproto xtrans libxau libxcb libxdmcp util-macros"
DEFAULT_PREFERENCE = "-1"
-BBCLASSEXTEND = "nativesdk"
\ No newline at end of file
+BBCLASSEXTEND = "nativesdk"
--
1.7.4.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/4] alsa-utils_1.0.24.2.bb: Fix build for uclibc targets
2011-04-30 22:06 [PATCH V3 0/4] uclibc support in oe-core v3 Khem Raj
` (2 preceding siblings ...)
2011-04-30 22:06 ` [PATCH 3/4] libx11: Use inherit gettext Khem Raj
@ 2011-04-30 22:07 ` Khem Raj
2011-05-01 22:56 ` Otavio Salvador
3 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2011-04-30 22:07 UTC (permalink / raw)
To: OE core
uclibc does not have exp10() implemented so we obtain
same behaviour using pow()
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../uclibc-exp10-replacement.patch | 21 ++++++++++++++++++++
.../recipes-multimedia/alsa/alsa-utils_1.0.24.2.bb | 4 ++-
2 files changed, 24 insertions(+), 1 deletions(-)
create mode 100644 meta/recipes-multimedia/alsa/alsa-utils-1.0.24.2/uclibc-exp10-replacement.patch
diff --git a/meta/recipes-multimedia/alsa/alsa-utils-1.0.24.2/uclibc-exp10-replacement.patch b/meta/recipes-multimedia/alsa/alsa-utils-1.0.24.2/uclibc-exp10-replacement.patch
new file mode 100644
index 0000000..038c90d
--- /dev/null
+++ b/meta/recipes-multimedia/alsa/alsa-utils-1.0.24.2/uclibc-exp10-replacement.patch
@@ -0,0 +1,21 @@
+uclibc does not have exp10 function which is glibc extension.
+Bur we can get the same behavior by using pow()
+
+Upstream-status: Pending
+
+Khem Raj <raj.khem@gmail.com>
+
+Index: alsa-utils-1.0.24.2/alsamixer/volume_mapping.c
+===================================================================
+--- alsa-utils-1.0.24.2.orig/alsamixer/volume_mapping.c
++++ alsa-utils-1.0.24.2/alsamixer/volume_mapping.c
+@@ -36,6 +36,9 @@
+ #include <math.h>
+ #include <stdbool.h>
+ #include "volume_mapping.h"
++#ifdef __UCLIBC__
++#define exp10(x) (pow(10, (x)))
++#endif /* __UCLIBC__ */
+
+ #define MAX_LINEAR_DB_SCALE 24
+
diff --git a/meta/recipes-multimedia/alsa/alsa-utils_1.0.24.2.bb b/meta/recipes-multimedia/alsa/alsa-utils_1.0.24.2.bb
index c882bfd..4cb31a9 100644
--- a/meta/recipes-multimedia/alsa/alsa-utils_1.0.24.2.bb
+++ b/meta/recipes-multimedia/alsa/alsa-utils_1.0.24.2.bb
@@ -9,7 +9,9 @@ DEPENDS = "alsa-lib ncurses"
PR = "r0"
SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
- file://ncursesfix.patch"
+ file://ncursesfix.patch \
+ file://uclibc-exp10-replacement.patch \
+ "
SRC_URI[md5sum] = "8238cd57cb301d1c36bcf0ecb59ce6b2"
SRC_URI[sha256sum] = "95127f740291086486c06c28118cabca0814bde48fd14dac041a9812a5ac1be2"
--
1.7.4.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 4/4] alsa-utils_1.0.24.2.bb: Fix build for uclibc targets
2011-04-30 22:07 ` [PATCH 4/4] alsa-utils_1.0.24.2.bb: Fix build for uclibc targets Khem Raj
@ 2011-05-01 22:56 ` Otavio Salvador
0 siblings, 0 replies; 6+ messages in thread
From: Otavio Salvador @ 2011-05-01 22:56 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer
On Sat, Apr 30, 2011 at 19:07, Khem Raj <raj.khem@gmail.com> wrote:
...
> +uclibc does not have exp10 function which is glibc extension.
> +Bur we can get the same behavior by using pow()
...
Typo! s/Bur/But/
--
Otavio Salvador O.S. Systems
E-mail: otavio@ossystems.com.br http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-05-01 22:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-30 22:06 [PATCH V3 0/4] uclibc support in oe-core v3 Khem Raj
2011-04-30 22:06 ` [PATCH 1/4] gettext.bbclass: Use _append instead of =+ Khem Raj
2011-04-30 22:06 ` [PATCH 2/4] insane.bbclass: Checking for NLS too when checking gettext dependency Khem Raj
2011-04-30 22:06 ` [PATCH 3/4] libx11: Use inherit gettext Khem Raj
2011-04-30 22:07 ` [PATCH 4/4] alsa-utils_1.0.24.2.bb: Fix build for uclibc targets Khem Raj
2011-05-01 22:56 ` Otavio Salvador
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox