Commit 43b26c94 authored by Nirbheek Chauhan's avatar Nirbheek Chauhan 🐜
Browse files

pkg-config.recipe: Make it a runtime dep on all platforms

It was supposed to be a runtime dep on Windows, but because we had the
same recipe twice inside the recipes/ dir, only the first one was
being parsed, so it was not a runtime dep even when we previously
wanted it to be.

By making it a runtime dep everywhere, we're ensuring that it is built
as the very first thing when building anything. This unfortunately
means that the recipe will be built twice: once in bootstrap and then
again in package.

Even more unfortunately, we actually need that because we need to ship
the built pkg-config in our binary releases. For instance, because
people that consume the built binaries need a pkg-config (because
macOS and Windows do not ship it) or they need a pkg-config that
defaults to `--define-prefix` (on Linux).

Fixes gstreamer/cerbero#346
parent b2ee8889
Pipeline #563555 waiting for manual action with stages
......@@ -11,14 +11,14 @@ class Package(custom.GStreamer, package.Package):
deps = ['base-system-1.0']
files = ['gstreamer-1.0', 'gst-plugins-base-1.0:bins:libs:core:lang:typelibs',
'gst-shell',
'gst-shell', 'pkg-config',
'gst-plugins-good-1.0:plugins_core:lang',
'gst-plugins-bad-1.0:plugins_core:lang:libs:typelibs',
'gst-plugins-ugly-1.0:plugins_core:lang']
files_devel = ['gstreamer-1.0', 'gst-plugins-base-1.0:plugins_core_devel',
'gst-plugins-good-1.0:plugins_core_devel', 'gst-plugins-bad-1.0:plugins_core_devel']
platform_files = {
Platform.DARWIN: ['gstreamer-1.0-osx-framework', 'pkg-config'],
Platform.DARWIN: ['gstreamer-1.0-osx-framework'],
Platform.IOS: ['gstreamer-ios-templates'],
Platform.ANDROID: ['gst-android-1.0'],
Platform.LINUX: ['bash-completion'],
......
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python
class Recipe(recipe.Recipe):
name = 'pkg-config'
version = '0.29.2'
licenses = [License.GPLv2Plus]
stype = SourceType.TARBALL
url = 'https://pkgconfig.freedesktop.org/releases/pkg-config-%(version)s.tar.gz'
tarball_checksum = '6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591'
configure_options = '--with-internal-glib --disable-host-tool '
override_libtool = False
files_bins = ['pkg-config']
files_share = ['share/aclocal/pkg.m4']
def prepare(self):
# --define-prefix is too unreliable on Debian-like distros that have
# pkgconfig in /usr/lib/x86_64-linux-gnu etc. instead of in /usr/lib
if self.config.platform != Platform.LINUX:
self.configure_options += '--enable-define-prefix '
self.append_env('CFLAGS', '-Wno-error=format-nonliteral')
......@@ -9,7 +9,7 @@ class Recipe(recipe.Recipe):
version = '0.1'
stype = SourceType.CUSTOM
btype = BuildType.CUSTOM
deps = ['pkg-config', 'gstreamer-1.0', 'gst-plugins-base-1.0', 'gst-plugins-bad-1.0']
deps = ['gstreamer-1.0', 'gst-plugins-base-1.0', 'gst-plugins-bad-1.0']
files_library = ['lib/GStreamer']
......
......@@ -10,15 +10,14 @@ class Recipe(recipe.Recipe):
tarball_checksum = '6fc69c01688c9458a57eb9a1664c9aba372ccda420a02bf4429fe610e7e7d591'
configure_options = '--with-internal-glib --disable-host-tool '
override_libtool = False
runtime_dep = True
files_bins = ['pkg-config']
files_share = ['share/aclocal/pkg.m4']
files_bins_devel = ['bin/pkg-config%(bext)s']
files_devel = ['share/aclocal/pkg.m4']
def prepare(self):
# --define-prefix is too unreliable on Debian-like distros that have
# pkgconfig in /usr/lib/x86_64-linux-gnu etc. instead of in /usr/lib
if self.config.platform != Platform.LINUX:
if self.config.target_platform != Platform.LINUX:
self.configure_options += '--enable-define-prefix '
if self.config.platform == Platform.WINDOWS:
self.runtime_dep = True
self.append_env('CFLAGS', '-Wno-error=format-nonliteral')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment