[dora/daisy] package.bbclass: Add ASSUME_SONAME variable

Submitted by Aymeric Dumaz on Aug. 13, 2014, 12:17 a.m. | Patch ID: 78033


Message ID 1407889075-22290-1-git-send-email-aymeric.dumaz@gmail.com
State New
Headers show

Commit Message

Aymeric Dumaz Aug. 13, 2014, 12:17 a.m.
When libraries don't have a SONAME in their section, their name aren't added in
the .list/.ver files generated during do_package.
Other recipes are able to build against them but are not able to find them
afterwards, leading to missing dependencies.

For example, with qtbase and proprietary libraries for the OMAP3:
NOTE: Couldn't find shared library provider for libGLESv2.so, used by files:

This patch add the possibility to manually define a list of librairies that will
be exported in the .list/.ver files.
A hack in a lacking-SONAME recipe can be made on package_do_shlibs_append to
copy .list/.ver files manually made, but files from others PACKAGES in this
recipe will produce similar warnings during their creation because their name
aren't in the shlib_provider variable.

The darwin_so is not patched because it isn't relying on SONAME.

Signed-off-by: Aymeric Dumaz <aymeric.dumaz@gmail.com>
 meta/classes/package.bbclass | 8 ++++++++
 1 file changed, 8 insertions(+)

Patch hide | download patch | download mbox

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 5b1e902..9471e90 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1353,8 +1353,15 @@  python package_do_shlibs() {
                 if m.group(1) not in needed[pkg]:
             m = re.match("\s+SONAME\s+([^\s]*)", l)
+            this_soname = None
             if m:
                 this_soname = m.group(1)
+            if not this_soname:
+                file_basename = os.path.basename(file)
+                for s in assumed_sonames:
+                    if s in file_basename:
+                        this_soname = s
+            if this_soname:
                 if not this_soname in sonames:
                     # if library is private (only used by package) then do not build shlib for it
                     if not private_libs or -1 == private_libs.find(this_soname):
@@ -1452,6 +1459,7 @@  python package_do_shlibs() {
         needed[pkg] = []
         sonames = list()
         renames = list()
+        assumed_sonames = (d.getVar('ASSUME_SONAME_' + pkg, True) or "").split()
         for file in pkgfiles[pkg]:
                 soname = None
                 if cpath.islink(file):