diff options
author | Akash Jain <akash96j@gmail.com> | 2016-07-23 21:21:46 +0530 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2016-10-18 20:41:30 +0200 |
commit | 69c40bbebd063c04affa21d3112e7ccf2943cc69 (patch) | |
tree | 489b2899b0fb88f7fbb5cdf4db5845453f918602 | |
parent | f099f3d3bd1203045ef5f3d0b448f72c00f2fe1e (diff) |
GSoC: Enable building Harfbuzz with Graphite
Harfbuzz will now need to be built with Graphite support. This allows
Harfbuzz to handle Graphite fonts. In case we all building with
system Harfbuzz, then it should be built with Graphite support else
we error out.
Change-Id: I156ec08b9e5ad7ce87cc15e4b5852d9c57c98f7f
-rw-r--r-- | configure.ac | 16 | ||||
-rw-r--r-- | external/harfbuzz/ExternalProject_harfbuzz.mk | 3 |
2 files changed, 18 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index b650f2fea0a0..335b2d433db8 100644 --- a/configure.ac +++ b/configure.ac @@ -9252,10 +9252,14 @@ if test $_os != Darwin -a $_os != Android -a $_os != iOS -a \( -z "$enable_graph AC_MSG_RESULT([yes]) ENABLE_GRAPHITE="TRUE" AC_DEFINE(ENABLE_GRAPHITE) - libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 0.9.3]) + libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 0.9.3],["-I${WORKDIR}/UnpackedTarball/graphite/include"],["-L${WORKDIR}/LinkTarget/StaticLibrary -lgraphite"]) if test "$with_system_graphite" = "yes"; then libo_MINGW_CHECK_DLL([libgraphite2]) fi + if test "$COM" = "MSC"; then # override the above + GRAPHITE_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/graphite.lib" + fi + else AC_MSG_RESULT([no]) fi @@ -9348,6 +9352,16 @@ if test "$with_harfbuzz" = "yes" -o \( $_os != WINNT -a $_os != Darwin -a $_os ! if test "$COM" = "MSC"; then # override the above HARFBUZZ_LIBS="${WORKDIR}/UnpackedTarball/harfbuzz/src/.libs/libharfbuzz.lib" fi + if test "$with_system_harfbuzz" = "yes"; then + AC_MSG_CHECKING([whether system Harfbuzz is built with Graphite support]) + _save_libs="$LIBS" + _save_cflags="$CFLAGS" + LIBS="$LIBS $HARFBUZZ_LIBS" + CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS" + AC_CHECK_FUNC(hb_graphite2_face_get_gr_face,,[AC_MSG_ERROR([Harfbuzz needs to be built with Graphite support.])]) + LIBS="$_save_libs" + CFLAGS="$_save_cflags" + fi else AC_MSG_RESULT([no]) fi diff --git a/external/harfbuzz/ExternalProject_harfbuzz.mk b/external/harfbuzz/ExternalProject_harfbuzz.mk index 1bee5bb43dbc..4412815209dd 100644 --- a/external/harfbuzz/ExternalProject_harfbuzz.mk +++ b/external/harfbuzz/ExternalProject_harfbuzz.mk @@ -23,6 +23,8 @@ $(call gb_ExternalProject_get_state_target,harfbuzz,build) : $(call gb_ExternalProject_run,build,\ $(if $(CROSS_COMPILING),ICU_CONFIG=$(SRCDIR)/external/icu/cross-bin/icu-config) \ $(if $(SYSTEM_ICU),,ICU_CONFIG=$(SRCDIR)/external/icu/cross-bin/icu-config) \ + GRAPHITE2_CFLAGS="$(GRAPHITE_CFLAGS)" \ + GRAPHITE2_LIBS="$(GRAPHITE_LIBS)" \ ./configure \ --enable-static \ --disable-shared \ @@ -33,6 +35,7 @@ $(call gb_ExternalProject_get_state_target,harfbuzz,build) : --with-fontconfig=no \ --with-cairo=no \ --with-glib=no \ + --with-graphite2=yes \ $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \ $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ $(if $(filter LINUX,$(OS)),CXXFLAGS="$(CXXFLAGS) -fvisibility=hidden") \ |