[meson] Add amalgam build option

This commit is contained in:
Ebrahim Byagowi 2020-03-11 20:51:40 +03:30
parent 365d2d3cc3
commit f8c8be0564
3 changed files with 13 additions and 2 deletions

View File

@ -37,10 +37,11 @@ jobs:
xcode: "11.2.1" xcode: "11.2.1"
steps: steps:
- checkout - checkout
- run: HOMEBREW_NO_AUTO_UPDATE=1 brew install wget autoconf automake libtool pkg-config ragel freetype glib cairo icu4c graphite2 - run: HOMEBREW_NO_AUTO_UPDATE=1 brew install wget autoconf automake libtool pkg-config ragel freetype glib cairo icu4c graphite2 meson
- run: export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig" && ./autogen.sh --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-coretext --with-graphite2 - run: export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig" && ./autogen.sh --with-freetype --with-glib --with-gobject --with-cairo --with-icu --with-coretext --with-graphite2
- run: make -j4 - run: make -j4
- run: make check || .ci/fail.sh - run: make check || .ci/fail.sh
- run: make clean && meson build -Damalgam=true && ninja -Cbuild test
distcheck: distcheck:
docker: docker:
@ -225,7 +226,9 @@ jobs:
- checkout - checkout
- run: apt update && apt install -y ninja-build binutils meson gcc g++ pkg-config ragel gtk-doc-tools libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip - run: apt update && apt install -y ninja-build binutils meson gcc g++ pkg-config ragel gtk-doc-tools libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip
- run: pip install fonttools - run: pip install fonttools
- run: meson build && ninja -Cbuild test - run: meson build && ninja -Cbuild test && rm -rf build
# test amalgam build
- run: meson build -Damalgam=true && ninja -Cbuild && rm -rf build
crosscompile-notest-djgpp: crosscompile-notest-djgpp:
docker: docker:

View File

@ -25,3 +25,6 @@ option('tests', type : 'feature', value : 'auto', yield : true,
description: 'Enable or disable unit tests') description: 'Enable or disable unit tests')
option('introspection', type : 'feature', value : 'disabled', yield : true, option('introspection', type : 'feature', value : 'disabled', yield : true,
description : 'Generate gobject-introspection bindings (.gir/.typelib files)') description : 'Generate gobject-introspection bindings (.gir/.typelib files)')
option('amalgam', type : 'boolean', value : false,
description : 'Enable amalgam builds')

View File

@ -200,6 +200,11 @@ if conf.get('HAVE_CORETEXT', 0) == 1
hb_headers += ['hb-coretext.h'] hb_headers += ['hb-coretext.h']
endif endif
if get_option('amalgam')
# replace the array if is amalgam build
hb_sources = ['harfbuzz.cc']
endif
# harfbuzz # harfbuzz
gen_def = find_program('gen-def.py') gen_def = find_program('gen-def.py')
harfbuzz_def = custom_target('harfbuzz.def', harfbuzz_def = custom_target('harfbuzz.def',