Commit 84451665 authored by Matthew Waters's avatar Matthew Waters 🐨
Browse files

macos/universal: fix pkg-config packaging

When building for universal, the build-tools pkg-config is not
sufficient as it is not built for the universal archs.  We need to build
our own version to distribute.

Part-of: <!701>
parent 5ad371ab
...@@ -133,5 +133,10 @@ if use_ccache: ...@@ -133,5 +133,10 @@ if use_ccache:
# Workaround for https://openradar.appspot.com/22671534 on 10.11. # Workaround for https://openradar.appspot.com/22671534 on 10.11.
env['gl_cv_func_getcwd_abort_bug'] = 'no' env['gl_cv_func_getcwd_abort_bug'] = 'no'
# for glib inside pkg-config
env['glib_cv_stack_grows'] = 'yes'
env['glib_cv_uscore'] = 'no'
env['ac_cv_func_posix_getpwuid_r'] = 'yes'
env['ac_cv_func_posix_getgrgid_r'] = 'yes'
moltenvk_prefix = os.path.join(home_dir, 'moltenvk') moltenvk_prefix = os.path.join(home_dir, 'moltenvk')
...@@ -18,7 +18,7 @@ class Package(custom.GStreamer, package.Package): ...@@ -18,7 +18,7 @@ class Package(custom.GStreamer, package.Package):
files_devel = ['gstreamer-1.0', 'gst-plugins-base-1.0:plugins_core_devel', 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'] 'gst-plugins-good-1.0:plugins_core_devel', 'gst-plugins-bad-1.0:plugins_core_devel']
platform_files = { platform_files = {
Platform.DARWIN: ['gstreamer-1.0-osx-framework'], Platform.DARWIN: ['gstreamer-1.0-osx-framework', 'pkg-config'],
Platform.IOS: ['gstreamer-ios-templates'], Platform.IOS: ['gstreamer-ios-templates'],
Platform.ANDROID: ['gst-android-1.0'], Platform.ANDROID: ['gst-android-1.0'],
Platform.LINUX: ['bash-completion'], Platform.LINUX: ['bash-completion'],
......
...@@ -9,9 +9,8 @@ class Recipe(recipe.Recipe): ...@@ -9,9 +9,8 @@ class Recipe(recipe.Recipe):
version = '0.1' version = '0.1'
stype = SourceType.CUSTOM stype = SourceType.CUSTOM
btype = BuildType.CUSTOM btype = BuildType.CUSTOM
deps = ['gstreamer-1.0', 'gst-plugins-base-1.0', 'gst-plugins-bad-1.0'] deps = ['pkg-config', 'gstreamer-1.0', 'gst-plugins-base-1.0', 'gst-plugins-bad-1.0']
files_bins = ['pkg-config']
files_library = ['lib/GStreamer'] files_library = ['lib/GStreamer']
async def _get_installed_gst_libs(self): async def _get_installed_gst_libs(self):
...@@ -42,9 +41,3 @@ class Recipe(recipe.Recipe): ...@@ -42,9 +41,3 @@ class Recipe(recipe.Recipe):
raise FatalError('No gstreamer libraries were found in the prefix!') raise FatalError('No gstreamer libraries were found in the prefix!')
fwlib = DynamicFrameworkLibrary(self.config.min_osx_sdk_version, self.config.target_distro, install_name, install_name, libs, self.config.target_arch, env=self.env) fwlib = DynamicFrameworkLibrary(self.config.min_osx_sdk_version, self.config.target_distro, install_name, install_name, libs, self.config.target_arch, env=self.env)
fwlib.create() fwlib.create()
# Copy pkg-config binary for projects that can't use the framework,
# f.ex., the gstreamer rust bindings. This binary is standalone, so we
# do not need to mangle the install_name entries.
pkgconfig = os.path.join(self.config.build_tools_prefix, 'bin', 'pkg-config')
bindir = os.path.join(self.config.prefix, 'bin')
shutil.copy(pkgconfig, bindir)
# -*- 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')
Markdown is supported
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