summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-10-01 23:05:34 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2020-10-01 23:11:24 +0530
commitdebe544d3f5a80954c949af9580ba1df94f91e49 (patch)
tree7e741a08125b91b3fef6c694b438136fe95a44dc
parentfa9627eb75c3904c53b81e06f6e0d2034a4a2d98 (diff)
windows: Detect Strawberry Perl and error out early
This is going to fail during the compile phase because Strawberry Perl ships with its own pkg-config and pkgconfig files for zlib/libffi with unusable values. Fixes https://gitlab.freedesktop.org/gstreamer/gst-build/-/issues/41 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/197>
-rw-r--r--meson.build15
1 files changed, 15 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index d4cf73a..aec7d52 100644
--- a/meson.build
+++ b/meson.build
@@ -24,6 +24,21 @@ if cmdres.returncode() != 0
error('Do not run `ninja` or `meson` for gst-build inside the uninstalled environment, you will run into problems')
endif
+# Ensure that the user does not have Strawberry Perl in PATH, since it ships
+# with a pkg-config.bat and broken pkgconfig files for libffi and zlib. Will
+# cause a build error, such as in
+# https://gitlab.freedesktop.org/gstreamer/gst-build/-/issues/41
+ensure_no_strawberry_perl = '''
+import os
+assert(r'Strawberry\perl\bin' not in os.environ['PATH'])
+'''
+if build_system == 'windows'
+ cmdres = run_command(python3, '-c', ensure_no_strawberry_perl)
+ if cmdres.returncode() != 0
+ error('You have Strawberry Perl in PATH which is known to cause build issues with gst-build. Please remove it from PATH or uninstall it.')
+ endif
+endif
+
documented_projects = ''
# Make it possible to use msys2 built zlib which fails
# when not using the mingw toolchain as it uses unistd.h