Skip to contentSkip to conversation

attr: Fix uclibc builds

PATCH In review Richard Purdie 2 participants 2 messages May 8, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 attr: Fix uclibc builds

attr needs libintl headers and libs. Add in the missing dependency and ensure the linker flag gets passed in multilib builds by replacing the PN == BPN check with a class-target override instead.

---

meta/recipes-support/attr/attr.inc +1 -1
index 873c1ff..01ad59c 100644
@@ -2,7 +2,7 @@ SUMMARY = "Utilities for manipulating filesystem extended attributes"
 HOMEPAGE = "http://savannah.nongnu.org/projects/attr/"
 SECTION = "libs"
 
-DEPENDS = "ncurses"
+DEPENDS = "ncurses virtual/libintl"
 
 LICENSE = "LGPLv2.1+ & GPLv2+"
 LICENSE_${PN} = "GPLv2+"
meta/recipes-support/attr/ea-acl.inc +2 -2
index 785ce0c..72f623e 100644
@@ -34,8 +34,8 @@ FILES_lib${BPN}-doc = "${mandir}/man2 \
 
 BBCLASSEXTEND = "native"
 # Only append ldflags for target recipe and if USE_NLS is enabled
-LDFLAGS_append_libc-uclibc = "${@['', ' -lintl '][(d.getVar('PN', True) == d.getVar('BPN', True)) and (d.getVar('USE_NLS', True) == 'yes')]}"
-EXTRA_OECONF_append_libc-uclibc = "${@['', ' --disable-gettext '][(d.getVar('PN', True) == d.getVar('BPN', True)) and (d.getVar('USE_NLS', True) == 'no')]}"
+LDFLAGS_append_libc-uclibc_class-target = "${@['', ' -lintl '][(d.getVar('USE_NLS', True) == 'yes')]}"
+EXTRA_OECONF_append_libc-uclibc_class-target = "${@['', ' --disable-gettext '][(d.getVar('USE_NLS', True) == 'no')]}"
 
 fix_symlink () {
 	if test "${libdir}" = "${base_libdir}" ; then
#1 lore raw

meta/recipes-support/attr/ea-acl.inc FILES_lib${BPN}-doc = "${mandir}/man2 \ · line 38

Quoted 2 lines · Richard Purdie
meta/recipes-support/attr/ea-acl.inc +2 -0
+LDFLAGS_append_libc-uclibc_class-target = "${@['', ' -lintl '][(d.getVar('USE_NLS', True) == 'yes')]}"
+EXTRA_OECONF_append_libc-uclibc_class-target = "${@['', ' --disable-gettext '][(d.getVar('USE_NLS', True) == 'no')]}"

I think we can drop class-target override. this was needed when libc override arched into native recipes as well and
we would get attr-native compiled differently for uclibc and glibc but thats been fixed