diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-07-10 22:22:26 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-08-01 04:38:33 +0530 |
commit | 2aa6d2ad8ce17e0e9dd66517f1b9e47cfb30364d (patch) | |
tree | 355262e942d9f1d27c59547fd769ea661c76105a | |
parent | 789e3d3cb8b78aa4b26b32ae3c81c3079229f894 (diff) |
cerbero: Ship plugin .pc files for all modules
We use the .la entries for this. This will always be correct because
we generate the .la files from the .pc files in the first place.
Fixes https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/157
-rw-r--r-- | cerbero/build/filesprovider.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/cerbero/build/filesprovider.py b/cerbero/build/filesprovider.py index 9c6a9325..706580dd 100644 --- a/cerbero/build/filesprovider.py +++ b/cerbero/build/filesprovider.py @@ -317,6 +317,11 @@ class FilesProvider(object): return [fmsvc, fmsvc[:-3] + 'pdb'] raise FatalError('GStreamer plugin {!r} not found'.format(f)) + @staticmethod + def _get_plugin_pc(f): + f = Path(f) + return str(f.parent / 'pkgconfig' / (f.name[3:-3] + '.pc')) + def _search_files(self, files): ''' Search plugin files and arbitrary files in the prefix, doing the @@ -326,10 +331,15 @@ class FilesProvider(object): files_expanded = [f % self.extensions for f in files] fs = [] for f in files_expanded: - if not f.endswith('.dll'): - fs.append(f) + if f.endswith('.dll'): + fs += self._find_plugin_dll_files(f) continue - fs += self._find_plugin_dll_files(f) + fs.append(f) + # For plugins, the .la file is generated using the .pc file, but we + # don't add the .pc to files_devel. It has the same name, so we can + # add it using the .la entry. + if f.startswith('lib/gstreamer-1.0/') and f.endswith('.la'): + fs.append(self._get_plugin_pc(f)) # fill directories dirs = [x for x in fs if os.path.isdir(os.path.join(self.config.prefix, x))] |