def _addELFRequirements(self, path, m, pkgFiles):
        """
        Add ELF and abi dependencies, including paths when not shlibs
        """

        def appendUnique(ul, items):
            for item in items:
                if item not in ul:
                    ul.append(item)

        def _canonicalRPATH(rpath, glob=False):
            # normalize all elements of RPATH
            l = [ util.normpath(x) for x in rpath.split(':') ] # CNY-3425
            # prune system paths and relative paths from RPATH
            l = [ x for x in l
                  if x not in self.systemLibPaths and x.startswith('/') ]
            if glob:
                destdir = self.macros.destdir
                dlen = len(destdir)
                gl = []
                for item in l:
                    # prefer destdir elements
                    paths = util.braceGlob(destdir + item)
                    paths = [ os.path.normpath(x[dlen:]) for x in paths ]
                    appendUnique(gl, paths)
                    # then look on system
                    paths = util.braceGlob(item)
                    paths = [ os.path.normpath(x) for x in paths ]
                    appendUnique(gl, paths)
                l = gl
            return l

        rpathList = []
        def _findSonameInRpath(soname):
            for rpath in rpathList:
                destpath = '/'.join((self.macros.destdir, rpath, soname))
                if os.path.exists(destpath):
                    return rpath
                destpath = '/'.join((rpath, soname))
                if os.path.exists(destpath):
                    return rpath
            # didn't find anything
            return None

        # fixup should come first so that its path elements can override
        # the included RPATH if necessary
        if self.rpathFixup:
            for f, rpath in self.rpathFixup:
                if f.match(path):
                    # synthetic RPATH items are globbed
                    rpathList = _canonicalRPATH(rpath, glob=True)
                    break

        if m and 'RPATH' in m.contents and m.contents['RPATH']:
            rpathList += _canonicalRPATH(m.contents['RPATH'])

        depSet = self._createELFDepSet(m, m.contents['requires'],
                                       libPathMap=self._privateDepMap,
                                       getRPATH=_findSonameInRpath,
                                       path=path, isProvides=False)
        for pkg, _ in pkgFiles:
            self._addDepSetToMap(path, pkg.requiresMap, depSet)