summaryrefslogtreecommitdiff
path: root/harfbuzz
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-04-20 13:00:56 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-04-23 08:00:14 +0000
commit7e389f4def1964ee38bb93b575926a089e84bae6 (patch)
tree73d2e4a7e3c17552e2ed551559e3faa3b60f12e7 /harfbuzz
parent4f800d308edcad47833f1bed140d0ddcb96c420d (diff)
Add HarfBuzz support to the build system
To be used in the next commit. Change-Id: I6ee286d0c050a5ca650e7fb3692b0facccb5f0c0 Reviewed-on: https://gerrit.libreoffice.org/3517 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'harfbuzz')
-rw-r--r--harfbuzz/ExternalPackage_harfbuzz.mk34
-rw-r--r--harfbuzz/ExternalProject_harfbuzz.mk37
-rw-r--r--harfbuzz/Makefile7
-rw-r--r--harfbuzz/Module_harfbuzz.mk22
-rw-r--r--harfbuzz/README1
-rw-r--r--harfbuzz/UnpackedTarball_harfbuzz.mk18
-rw-r--r--harfbuzz/harfbuzz.configure.patch.193
7 files changed, 212 insertions, 0 deletions
diff --git a/harfbuzz/ExternalPackage_harfbuzz.mk b/harfbuzz/ExternalPackage_harfbuzz.mk
new file mode 100644
index 000000000000..0894b2e79a77
--- /dev/null
+++ b/harfbuzz/ExternalPackage_harfbuzz.mk
@@ -0,0 +1,34 @@
+# -*- 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:
diff --git a/harfbuzz/ExternalProject_harfbuzz.mk b/harfbuzz/ExternalProject_harfbuzz.mk
new file mode 100644
index 000000000000..ef1d823ce268
--- /dev/null
+++ b/harfbuzz/ExternalProject_harfbuzz.mk
@@ -0,0 +1,37 @@
+# -*- 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:
diff --git a/harfbuzz/Makefile b/harfbuzz/Makefile
new file mode 100644
index 000000000000..ccb1c85a04da
--- /dev/null
+++ b/harfbuzz/Makefile
@@ -0,0 +1,7 @@
+# -*- 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:
diff --git a/harfbuzz/Module_harfbuzz.mk b/harfbuzz/Module_harfbuzz.mk
new file mode 100644
index 000000000000..8eb9c170e274
--- /dev/null
+++ b/harfbuzz/Module_harfbuzz.mk
@@ -0,0 +1,22 @@
+# -*- 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:
diff --git a/harfbuzz/README b/harfbuzz/README
new file mode 100644
index 000000000000..d2af8b559ad1
--- /dev/null
+++ b/harfbuzz/README
@@ -0,0 +1 @@
+HarfBuzz is an OpenType text shaping engine. From [http://harfbuzz.org/].
diff --git a/harfbuzz/UnpackedTarball_harfbuzz.mk b/harfbuzz/UnpackedTarball_harfbuzz.mk
new file mode 100644
index 000000000000..4b98988c9f91
--- /dev/null
+++ b/harfbuzz/UnpackedTarball_harfbuzz.mk
@@ -0,0 +1,18 @@
+# -*- 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 --git a/harfbuzz/harfbuzz.configure.patch.1 b/harfbuzz/harfbuzz.configure.patch.1
new file mode 100644
index 000000000000..dc83c86f5447
--- /dev/null
+++ b/harfbuzz/harfbuzz.configure.patch.1
@@ -0,0 +1,93 @@
+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