Kaydet (Commit) 7e389f4d authored tarafından Khaled Hosny's avatar Khaled Hosny Kaydeden (comit) Fridrich Strba

Add HarfBuzz support to the build system

To be used in the next commit.

Change-Id: I6ee286d0c050a5ca650e7fb3692b0facccb5f0c0
Reviewed-on: https://gerrit.libreoffice.org/3517Reviewed-by: 's avatarFridrich Strba <fridrich@documentfoundation.org>
Tested-by: 's avatarFridrich Strba <fridrich@documentfoundation.org>
üst 4f800d30
......@@ -112,6 +112,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)
$(call fetch_Optional,GLIBC,$(GLIBC_TARBALL)) \
$(call fetch_Optional,HSQLDB,$(HSQLDB_TARBALL)) \
$(call fetch_Optional,HUNSPELL,$(HUNSPELL_TARBALL)) \
$(call fetch_Optional,HARFBUZZ,$(HARFBUZZ_TARBALL)) \
$(call fetch_Optional,HYPHEN,$(HYPHEN_TARBALL)) \
$(call fetch_Optional,ICU,$(ICU_TARBALL)) \
$(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_FLOW_ENGINE_TARBALL)) \
......
......@@ -1186,6 +1186,39 @@ endef
endif # SYSTEM_ICU
ifeq ($(ENABLE_HARFBUZZ),YES)
ifeq ($(SYSTEM_HARFBUZZ),YES)
define gb_LinkTarget__use_harfbuzz
$(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
$(HARFBUZZ_CFLAGS) \
)
$(call gb_LinkTarget_add_libs,$(1),$(HARFBUZZ_LIBS))
endef
else # SYSTEM_HARFBUZZ != YES
$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
harfbuzz \
))
define gb_LinkTarget__use_harfbuzz
$(call gb_LinkTarget_use_package,$(1),\
harfbuzz \
)
$(call gb_LinkTarget_use_static_libraries,$(1),\
harfbuzz \
)
endef
endif # SYSTEM_HARFBUZZ
else # ENABLE_HARFBUZZ != YES
gb_LinkTarget__use_harfbuzz :=
endif # ENABLE_HARFBUZZ
ifeq ($(DISABLE_OPENSSL),YES)
......
......@@ -72,6 +72,7 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
framework \
$(call gb_Helper_optional,FREETYPE,freetype) \
$(call gb_Helper_optional,GRAPHITE,graphite) \
$(call gb_Helper_optional,HARFBUZZ,harfbuzz) \
$(call gb_Helper_optional,DESKTOP,helpcompiler) \
$(call gb_Helper_optional,HELP,helpcontent2) \
$(call gb_Helper_optional,HSQLDB,hsqldb) \
......
......@@ -122,6 +122,7 @@ export ENABLE_GCONF=@ENABLE_GCONF@
export ENABLE_GIO=@ENABLE_GIO@
export ENABLE_GNOMEVFS=@ENABLE_GNOMEVFS@
export ENABLE_GRAPHITE=@ENABLE_GRAPHITE@
export ENABLE_HARFBUZZ=@ENABLE_HARFBUZZ@
export ENABLE_GSTREAMER=@ENABLE_GSTREAMER@
export ENABLE_GSTREAMER_0_10=@ENABLE_GSTREAMER_0_10@
export ENABLE_GTK3=@ENABLE_GTK3@
......@@ -196,6 +197,8 @@ export GPERF=@GPERF@
export GPERF=@GPERF@
export GRAPHITE_CFLAGS=$(gb_SPACE)@GRAPHITE_CFLAGS@
export GRAPHITE_LIBS=$(gb_SPACE)@GRAPHITE_LIBS@
export HARFBUZZ_CFLAGS=$(gb_SPACE)@HARFBUZZ_CFLAGS@
export HARFBUZZ_LIBS=$(gb_SPACE)@HARFBUZZ_LIBS@
@x_Cygwin@ export GREP=@WIN_GREP@
export GSSAPI_LIBS=@GSSAPI_LIBS@
export GSTREAMER_0_10_CFLAGS=$(gb_SPACE)@GSTREAMER_0_10_CFLAGS@
......@@ -478,6 +481,7 @@ export SYSTEM_GENBRK=@SYSTEM_GENBRK@
export SYSTEM_GENCCODE=@SYSTEM_GENCCODE@
export SYSTEM_GENCMN=@SYSTEM_GENCMN@
export SYSTEM_GRAPHITE=@SYSTEM_GRAPHITE@
export SYSTEM_HARFBUZZ=@SYSTEM_HARFBUZZ@
export SYSTEM_HSQLDB=@SYSTEM_HSQLDB@
export SYSTEM_HUNSPELL=@SYSTEM_HUNSPELL@
export SYSTEM_HYPH=@SYSTEM_HYPH@
......
#ifndef CONFIG_HARFBUZZ_H
#define CONFIG_HARFBUZZ_H
#define ENABLE_HARFBUZZ 0
#endif
......@@ -720,6 +720,11 @@ AC_ARG_ENABLE(graphite,
[Enables the compilation of Graphite smart font rendering.])
)
AC_ARG_ENABLE(harfbuzz,
AS_HELP_STRING([--enable-harfbuzz],
[Determines whether to use HarfBuzz text layout engine.])
)
AC_ARG_ENABLE(fetch-external,
AS_HELP_STRING([--disable-fetch-external],
[Disables fetching external tarballs from web sources.])
......@@ -8377,6 +8382,20 @@ else
fi
AC_SUBST(ENABLE_GRAPHITE)
dnl ===================================================================
dnl HarfBuzz
dnl ===================================================================
AC_MSG_CHECKING([whether to enable HarfBuzz support])
if test "$_os" != "WINNT" -a "$_os" != "Darwin" && test "$enable_harfbuzz" = "" -o "$enable_harfbuzz" != "no"; then
AC_MSG_RESULT([yes])
ENABLE_HARFBUZZ="TRUE"
AC_DEFINE(ENABLE_HARFBUZZ)
libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz >= 0.9.10])
else
AC_MSG_RESULT([no])
fi
AC_SUBST(ENABLE_HARFBUZZ)
dnl ===================================================================
dnl Check for NPAPI interface to plug browser plugins into LibreOffice documents
dnl ===================================================================
......@@ -11880,6 +11899,7 @@ AC_CONFIG_HEADERS([config_host/config_clang.h])
AC_CONFIG_HEADERS([config_host/config_features.h])
AC_CONFIG_HEADERS([config_host/config_global.h])
AC_CONFIG_HEADERS([config_host/config_graphite.h])
AC_CONFIG_HEADERS([config_host/config_harfbuzz.h])
AC_CONFIG_HEADERS([config_host/config_kde4.h])
AC_CONFIG_HEADERS([config_host/config_mingw.h])
AC_CONFIG_HEADERS([config_host/config_oox.h])
......
......@@ -38,6 +38,7 @@ export GRAPHITE_TARBALL := f5ef3f7f10fa8c3542c6a085a233080b-graphite2-1.2.0.tgz
export GLIBC_TARBALL := 4a660ce8466c9df01f19036435425c3a-glibc-2.1.3-stub.tar.gz
export HSQLDB_TARBALL := 17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
export HUNSPELL_TARBALL := 3121aaf3e13e5d88dfff13fb4a5f1ab8-hunspell-1.3.2.tar.gz
export HARFBUZZ_TARBALL := 90855e670c790c1fec4592908be3c0b8-harfbuzz-0.9.16.tar.bz2
export HYPHEN_TARBALL := a2f6010987e1c601274ab5d63b72c944-hyphen-2.8.4.tar.gz
export ICU_TARBALL := 6eef33b229d0239d654983028c9c7053-icu4c-51_1-src.tgz
export JFREEREPORT_FLOW_ENGINE_TARBALL := ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
......
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_ExternalPackage_ExternalPackage,harfbuzz,harfbuzz))
$(eval $(call gb_ExternalPackage_add_unpacked_files,harfbuzz,inc/external/harfbuzz,\
src/hb.h \
src/hb-blob.h \
src/hb-buffer.h \
src/hb-common.h \
src/hb-font.h \
src/hb-icu.h \
src/hb-ot.h \
src/hb-ot-layout.h \
src/hb-ot-tag.h \
src/hb-set.h \
src/hb-shape.h \
src/hb-shape-plan.h \
src/hb-unicode.h \
src/hb-version.h \
))
$(eval $(call gb_ExternalPackage_use_external_project,harfbuzz,harfbuzz))
$(eval $(call gb_ExternalPackage_add_file,harfbuzz,lib/libharfbuzz.a,src/.libs/libharfbuzz.a))
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_ExternalProject_ExternalProject,harfbuzz))
$(eval $(call gb_ExternalProject_use_unpacked,harfbuzz,harfbuzz))
$(eval $(call gb_ExternalProject_use_autoconf,harfbuzz,build))
$(eval $(call gb_ExternalProject_register_targets,harfbuzz,\
build \
))
$(eval $(call gb_ExternalProject_use_externals,harfbuzz,\
icu \
))
$(call gb_ExternalProject_get_state_target,harfbuzz,build) :
$(call gb_ExternalProject_run,build,\
export ICU_LIBS=" " \
&& export ICU_CFLAGS="$(if $(filter NO,$(SYSTEM_ICU)),\
-I$(call gb_UnpackedTarball_get_dir,icu)/source/i18n \
-I$(call gb_UnpackedTarball_get_dir,icu)/source/common, )" \
&& ./configure \
--enable-static \
--disable-shared \
$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
&& (cd $(EXTERNAL_WORKDIR)/src && $(MAKE) libharfbuzz.la) \
)
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
include $(module_directory)/../solenv/gbuild/partial_build.mk
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_Module_Module,harfbuzz))
ifeq ($(SYSTEM_HARFBUZZ),NO)
$(eval $(call gb_Module_add_targets,harfbuzz,\
ExternalPackage_harfbuzz \
ExternalProject_harfbuzz \
UnpackedTarball_harfbuzz \
))
endif
# vim: set noet sw=4 ts=4:
HarfBuzz is an OpenType text shaping engine. From [http://harfbuzz.org/].
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_UnpackedTarball_UnpackedTarball,harfbuzz))
$(eval $(call gb_UnpackedTarball_set_tarball,harfbuzz,$(HARFBUZZ_TARBALL)))
$(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \
harfbuzz/harfbuzz.configure.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff -ur harfbuzz.org/configure harfbuzz/configure
--- harfbuzz.org/configure 2013-04-22 20:45:32.738213297 +0200
+++ harfbuzz/configure 2013-04-22 20:46:56.334209801 +0200
@@ -16813,7 +16885,7 @@
-have_hb_old=true
+have_hb_old=false
if $have_hb_old; then
$as_echo "#define HAVE_HB_OLD 1" >>confdefs.h
@@ -16829,7 +16901,7 @@
-have_ucdn=true
+have_ucdn=false
if $have_ucdn; then
$as_echo "#define HAVE_UCDN 1" >>confdefs.h
@@ -16914,7 +16986,7 @@
GLIB_LIBS=$pkg_cv_GLIB_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- have_glib=true
+ have_glib=false
fi
if $have_glib; then
@@ -16999,7 +17071,7 @@
GOBJECT_LIBS=$pkg_cv_GOBJECT_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- have_gobject=true
+ have_gobject=false
fi
if $have_gobject; then
@@ -17087,7 +17159,7 @@
CAIRO_LIBS=$pkg_cv_CAIRO_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- have_cairo=true
+ have_cairo=false
fi
if $have_cairo; then
@@ -17172,7 +17244,7 @@
CAIRO_FT_LIBS=$pkg_cv_CAIRO_FT_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- have_cairo_ft=true
+ have_cairo_ft=false
fi
if $have_cairo_ft; then
@@ -17457,7 +17529,7 @@
ICU_LE_LIBS=$pkg_cv_ICU_LE_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- have_icu_le=true
+ have_icu_le=false
fi
if test "$have_icu_le" != "true"; then
if test -n "$ac_tool_prefix"; then
@@ -17654,7 +17726,7 @@
GRAPHITE2_LIBS=$pkg_cv_GRAPHITE2_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- have_graphite=true
+ have_graphite=false
fi
if $have_graphite; then
@@ -17740,7 +17812,7 @@
FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- have_freetype=true
+ have_freetype=false
fi
if $have_freetype; then
@@ -17825,7 +17897,7 @@
ac_fn_c_check_type "$LINENO" "CTFontRef" "ac_cv_type_CTFontRef" "#include <ApplicationServices/ApplicationServices.h>
"
if test "x$ac_cv_type_CTFontRef" = xyes; then :
- have_coretext=true
+ have_coretext=false
else
have_coretext=false
fi
......@@ -347,6 +347,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
endif
$(eval $(call gb_Library_use_external,vcl,graphite))
$(eval $(call gb_Library_use_external,vcl,harfbuzz))
endif
......
......@@ -47,6 +47,7 @@ $(eval $(call gb_Library_use_externals,vclplug_gen,\
boost_headers \
cairo \
graphite \
harfbuzz \
icule \
icuuc \
valgrind \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment