[oe] [PATCH] binconfig: use / instead empty prefix/exec_prefix in get_binconfig_mangle
Martin Jansa
martin.jansa at gmail.com
Tue Nov 16 13:30:06 UTC 2010
* 952e5e2b7a5c1deefc939594d40b81a71fb16a54 appends / in sed call,
but it breaks ie =/usr replacement ie in libmikmod
* using at least / in SLASH_PREFIX/SLASH_EXEC_PREFIX is needed ie for micro
distribution where prefix/exec_prefix are empty (/usr collapsed to /)
* thanks to GNUtoo!
---
classes/binconfig.bbclass | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/classes/binconfig.bbclass b/classes/binconfig.bbclass
index b3b2236..df2c283 100644
--- a/classes/binconfig.bbclass
+++ b/classes/binconfig.bbclass
@@ -2,14 +2,20 @@ FILES_${PN}-dev += "${bindir}/*-config"
# The namespaces can clash here hence the two step replace
def get_binconfig_mangle(d):
+ SLASH_PREFIX = "${prefix}"
+ if SLASH_PREFIX is "":
+ SLASH_PREFIX = "/"
+ SLASH_EXEC_PREFIX = "${exec_prefix}"
+ if SLASH_EXEC_PREFIX is "":
+ SLASH_EXEC_PREFIX = "/"
s = "-e ''"
if not bb.data.inherits_class('native', d):
optional_quote = r"\(\"\?\)"
s += " -e 's:=%s${libdir}:=\\1OELIBDIR:;'" % optional_quote
s += " -e 's:=%s${includedir}:=\\1OEINCDIR:;'" % optional_quote
s += " -e 's:=%s${datadir}:=\\1OEDATADIR:'" % optional_quote
- s += " -e 's:=%s${prefix}/:=\\1OEPREFIX/:'" % optional_quote
- s += " -e 's:=%s${exec_prefix}/:=\\1OEEXECPREFIX/:'" % optional_quote
+ s += " -e 's:=%s%s:=\\1OEPREFIX:'" % (optional_quote, SLASH_PREFIX)
+ s += " -e 's:=%s%s:=\\1OEEXECPREFIX:'" % (optional_quote, SLASH_EXEC_PREFIX)
s += " -e 's:-L${libdir}:-LOELIBDIR:;'"
s += " -e 's:-I${includedir}:-IOEINCDIR:;'"
s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"
--
1.7.3.2
More information about the Openembedded-devel
mailing list