binconfig.bbclass: Fix path rewriting for staged packages.
authorPaul Sokolovsky <pmiscml@gmail.com>
Thu, 14 Sep 2006 02:47:34 +0000 (02:47 +0000)
committerPaul Sokolovsky <pmiscml@gmail.com>
Thu, 14 Sep 2006 02:47:34 +0000 (02:47 +0000)
* This bbclass does path rewriting within *-config scripts for packages
being staged. However, it used to expect variable assignments in form foo=bar,
whereas some packages (e.g. libpng) have foo="bar". Fixed to understand both
formats.
* Note: I consider this fix a workaround, as it uses overquoted regexps passed
via command line. Instead, whole rewriting should be reimplemented in Python.

classes/binconfig.bbclass

index bf15ebc..3402184 100644 (file)
@@ -5,11 +5,12 @@ def get_binconfig_mangle(d):
        import bb.data
        s = "-e ''"
        if not bb.data.inherits_class('native', d):
-               s += " -e 's:=${libdir}:=OELIBDIR:;'"
-               s += " -e 's:=${includedir}:=OEINCDIR:;'"
-               s += " -e 's:=${datadir}:=OEDATADIR:'"
-               s += " -e 's:=${prefix}:=OEPREFIX:'"
-               s += " -e 's:=${exec_prefix}:=OEEXECPREFIX:'"
+               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:-L${libdir}:-LOELIBDIR:;'"
                s += " -e 's:-I${includedir}:-IOEINCDIR:;'"
                s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"