summaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass21
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index d5c2d82bc8..299ea120d9 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1613,6 +1613,25 @@ python package_do_shlibs() {
1613 if name and name not in needed[pkg]: 1613 if name and name not in needed[pkg]:
1614 needed[pkg].append((name, file, [])) 1614 needed[pkg].append((name, file, []))
1615 1615
1616 def mingw_dll(file, needed, sonames, renames, pkgver):
1617 if not os.path.exists(file):
1618 return
1619
1620 if file.endswith(".dll"):
1621 # assume all dlls are shared objects provided by the package
1622 sonames.append((os.path.basename(file), os.path.dirname(file).replace(pkgdest + "/" + pkg, ''), pkgver))
1623
1624 if (file.endswith(".dll") or file.endswith(".exe")):
1625 # use objdump to search for "DLL Name: .*\.dll"
1626 p = sub.Popen([d.expand("${HOST_PREFIX}objdump"), "-p", file], stdout = sub.PIPE, stderr= sub.PIPE)
1627 out, err = p.communicate()
1628 # process the output, grabbing all .dll names
1629 if p.returncode == 0:
1630 for m in re.finditer("DLL Name: (.*?\.dll)$", out.decode(), re.MULTILINE | re.IGNORECASE):
1631 dllname = m.group(1)
1632 if dllname:
1633 needed[pkg].append((dllname, file, []))
1634
1616 if d.getVar('PACKAGE_SNAP_LIB_SYMLINKS') == "1": 1635 if d.getVar('PACKAGE_SNAP_LIB_SYMLINKS') == "1":
1617 snap_symlinks = True 1636 snap_symlinks = True
1618 else: 1637 else:
@@ -1644,6 +1663,8 @@ python package_do_shlibs() {
1644 continue 1663 continue
1645 if targetos == "darwin" or targetos == "darwin8": 1664 if targetos == "darwin" or targetos == "darwin8":
1646 darwin_so(file, needed, sonames, renames, pkgver) 1665 darwin_so(file, needed, sonames, renames, pkgver)
1666 elif targetos.startswith("mingw"):
1667 mingw_dll(file, needed, sonames, renames, pkgver)
1647 elif os.access(file, os.X_OK) or lib_re.match(file): 1668 elif os.access(file, os.X_OK) or lib_re.match(file):
1648 ldconfig = linux_so(file, needed, sonames, renames, pkgver) 1669 ldconfig = linux_so(file, needed, sonames, renames, pkgver)
1649 needs_ldconfig = needs_ldconfig or ldconfig 1670 needs_ldconfig = needs_ldconfig or ldconfig