backport commit c06e7ca02 "cerbero: Ship plugin .pc files for all modules" to 1.16 branch so that lib/pkgconfig files are installed when using cerbero to build from source
Hello,
I downloaded gstreamer-1.0-android-universal-1.16.0.tar.xz and I see that it has the folder lib/pkgconfig with all pc files however I need to build from source and so I did the following:
$ git clone https://gitlab.freedesktop.org/gstreamer/cerbero -b 1.16
$ cerbero-uninstalled bootstrap
$ cerbero-uninstalled -c config/cross-android-armv7.cbc package gstreamer-1.0
I was able to build successfully however the lib/pkgconfig directory was not found
The issue I'm experiencing was also seen here (#157 (closed))
So I took the patch provided by issue/157 and attempted to cherry-pick into 1.16 branch:
From df719b59340a735c3f8f1ef76b01f27c06e7ca02 Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Fri, 10 Jul 2020 22:22:26 +0530
Subject: [PATCH] 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
However it had conflicts so I resolved them as best I could and ended up with this:
From df719b59340a735c3f8f1ef76b01f27c06e7ca02 Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Fri, 10 Jul 2020 22:22:26 +0530
Subject: [PATCH] cerbero: Ship plugin .pc files for all modules
We use the .la entries for this. This will always be correct becauselib/pkgconfig
we generate the .la files from the .pc files in the first place.
Fixes https://gitlab.freedesktop.org/gstreamer/cerbero/-/issues/157
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/550>
---
cerbero/build/filesprovider.py | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/cerbero/build/filesprovider.py b/cerbero/build/filesprovider.py
index 9c6a9325..7ca89426 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
@@ -330,6 +335,19 @@ class FilesProvider(object):
fs.append(f)
continue
fs += self._find_plugin_dll_files(f)
+ # Look for a PDB file and add it
+ if self.using_msvc() and self.config.variants.debug:
+ # We try to find a pdb file corresponding to the plugin's .a
+ # file instead of the .dll because we want it to go into the
+ # devel package, not the runtime package.
+ m = self._FILES_STATIC_PLUGIN_REGEX.match(f)
+ if m:
+ fs += self._search_pdb_files(f, ''.join(m.groups()))
+ # 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))]
--
2.17.1
At this point, I performed a clean build thinking this would resolve my issue but unfortunately the lib/pkgconfig directory was still not found.
So I imagine I either cherry-picked the wrong commit or did not resolve the conflicts correctly or perhaps a better question would be, what exact version of cerbero would I need to regenerate gstreamer-1.0-android-universal-1.16.0.tar.xz from source as this tarball has everything I need.
Any suggestions would be greatly appreciated.
Thank you,
Davis