From ee97202016e29947b624d6409cf6cb74b14ee8c5 Mon Sep 17 00:00:00 2001 From: Naveen M K Date: Sun, 21 Mar 2021 22:17:54 +0530 Subject: [PATCH] macos: fix build get a patch from https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/101.patch or else cairo can't be build on macOS --- .github/workflows/tests.yml | 7 ++++++- packing/build_pango_tests.sh | 11 ++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3371731a..80df2de1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,6 +10,8 @@ jobs: test: name: ${{ matrix.os }} - ${{ matrix.python-version }} runs-on: ${{ matrix.os }} + env: + MACOSX_DEPLOYMENT_TARGET: 10.9 strategy: fail-fast: false matrix: @@ -25,6 +27,9 @@ jobs: if: runner.os == 'macOS' run: | brew install cairo + brew uninstall --ignore-dependencies brotli + brew uninstall --ignore-dependencies pcre + brew uninstall --ignore-dependencies libpng echo "LD_LIBRARY_PATH=$HOME/pangoprefix/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV echo "PKG_CONFIG_PATH=$HOME/pangoprefix/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV - name: Set ENV @@ -38,7 +43,7 @@ jobs: with: path: | /home/runner/pangobuild - key: 1-${{ runner.os }}-${{ hashFiles('packing/build_pango_tests.sh') }} + key: ${{ runner.os }}-${{ hashFiles('packing/build_pango_tests.sh') }} - name: Install System Dependency if: steps.cache-pango.outputs.cache-hit != 'true' run: | diff --git a/packing/build_pango_tests.sh b/packing/build_pango_tests.sh index 19355d75..a3e481fe 100644 --- a/packing/build_pango_tests.sh +++ b/packing/build_pango_tests.sh @@ -11,6 +11,9 @@ HARFBUZZ_VERSION=2.7.4 FILE_PATH=$PWD PREFIX="$HOME/pangoprefix" +cd $TMP +cd $TEMPDIR + mkdir pango cd pango echo "::group::Downloading Files" @@ -47,13 +50,19 @@ meson install -C fribidi_builddir echo "::endgroup::" echo "::group::Building and Installing Cairo" +echo "Getting patch" +curl -L https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/101.diff -o 101.diff +cd cairo +patch -Nbp1 -i "$PWD/../101.diff" || true +# it is fine to fail because the CI config is missing. +cd .. meson setup --prefix=$PREFIX --default-library=shared --buildtype=release -Dfontconfig=enabled -Dfreetype=enabled -Dglib=enabled -Dzlib=enabled -Dtee=enabled cairo_builddir cairo meson compile -C cairo_builddir meson install --no-rebuild -C cairo_builddir echo "::endgroup::" echo "::group::Building and Installing Harfbuzz" -meson setup --prefix=$PREFIX --buildtype=release -Dtests=disabled -Ddocs=disabled harfbuzz_builddir harfbuzz +meson setup --prefix=$PREFIX -Dcoretext=enabled --buildtype=release -Dtests=disabled -Ddocs=disabled harfbuzz_builddir harfbuzz meson compile -C harfbuzz_builddir meson install -C harfbuzz_builddir echo "::endgroup::"