From 6208a619460318dadf7d7a6adfe8b814b0f44d7c Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 22 Sep 2020 19:36:28 +0530 Subject: [PATCH] cerbero ci: Add hacks for build tools Instead of putting a hammer-like symlink to ../../gstreamer/cerbero, do recipe-specific relocation hacks. Fixes random errors like: ``` ++ ln -sf /builds/nirbheek/cerbero ../../gstreamer/cerbero ln: ../../gstreamer/cerbero/cerbero: cannot overwrite directory ``` Part-of: --- gitlab/cerbero_setup.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gitlab/cerbero_setup.sh b/gitlab/cerbero_setup.sh index 38f8aea982..0ce12769c4 100644 --- a/gitlab/cerbero_setup.sh +++ b/gitlab/cerbero_setup.sh @@ -59,6 +59,16 @@ pwd_native() { fi } +fix_build_tools() { + if [[ $(uname) == Darwin ]]; then + # Bison needs these env vars set for the build-tools prefix to be + # relocatable, and we only build it on macOS. On Linux we install it + # using the package manager, and on Windows we use the MSYS Bison. + export M4="$(pwd)/${CERBERO_HOME}/build-tools/bin/m4" + export BISON_PKGDATADIR="$(pwd)/${CERBERO_HOME}/build-tools/share/bison" + fi +} + # Produces runtime and devel tarball packages for linux/android or .pkg for macos cerbero_package_and_check() { $CERBERO $CERBERO_ARGS package --offline ${CERBERO_PACKAGE_ARGS} -o "$(pwd_native)" gstreamer-1.0 @@ -117,6 +127,8 @@ cerbero_script() { fi $CERBERO $CERBERO_ARGS bootstrap --offline --system=no + fix_build_tools + cerbero_package_and_check }