summaryrefslogtreecommitdiff
path: root/external/graphite
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-10-17 19:54:11 +0200
committerDavid Tardon <dtardon@redhat.com>2013-10-18 06:56:32 +0000
commitd985257069d22d1a2d4b1491685094082c174e60 (patch)
tree65745eaea029b198882668f551d40b75c9956cf6 /external/graphite
parent27d330950f975322bd68edf836d7e3b91f76e57f (diff)
fdo#70393: move graphite to a subdir of external
Change-Id: If0f3c19fd539d2b1323016df032b9f959a0adf66 Reviewed-on: https://gerrit.libreoffice.org/6305 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'external/graphite')
-rw-r--r--external/graphite/Makefile7
-rw-r--r--external/graphite/Module_graphite.mk17
-rw-r--r--external/graphite/README4
-rw-r--r--external/graphite/StaticLibrary_graphite.mk70
-rw-r--r--external/graphite/UnpackedTarball_graphite.mk21
-rw-r--r--external/graphite/graphite2.issue1115.patch.122
-rw-r--r--external/graphite/graphite2.patch29
7 files changed, 170 insertions, 0 deletions
diff --git a/external/graphite/Makefile b/external/graphite/Makefile
new file mode 100644
index 000000000000..ccb1c85a04da
--- /dev/null
+++ b/external/graphite/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/external/graphite/Module_graphite.mk b/external/graphite/Module_graphite.mk
new file mode 100644
index 000000000000..ff981612b566
--- /dev/null
+++ b/external/graphite/Module_graphite.mk
@@ -0,0 +1,17 @@
+# -*- 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,graphite))
+
+$(eval $(call gb_Module_add_targets,graphite,\
+ StaticLibrary_graphite \
+ UnpackedTarball_graphite \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/graphite/README b/external/graphite/README
new file mode 100644
index 000000000000..aac0d0df366c
--- /dev/null
+++ b/external/graphite/README
@@ -0,0 +1,4 @@
+Library for providing rendering capabilities for complex non-Roman writing systems.
+
+From:
+[http://graphite.sil.org/]
diff --git a/external/graphite/StaticLibrary_graphite.mk b/external/graphite/StaticLibrary_graphite.mk
new file mode 100644
index 000000000000..de3950f10b86
--- /dev/null
+++ b/external/graphite/StaticLibrary_graphite.mk
@@ -0,0 +1,70 @@
+# -*- 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_StaticLibrary_StaticLibrary,graphite))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,graphite,graphite))
+
+$(eval $(call gb_StaticLibrary_set_warnings_not_errors,graphite))
+
+$(eval $(call gb_StaticLibrary_set_include,graphite,\
+ -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_StaticLibrary_add_defs,graphite,\
+ -DDISABLE_TRACING \
+ -DGR2_STATIC \
+))
+
+ifeq ($(COM),GCC)
+ifneq ($(COM_GCC_IS_CLANG),TRUE)
+$(eval $(call gb_StaticLibrary_add_cxxflags,graphite,\
+ -fpermissive \
+))
+endif
+endif
+
+$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,graphite,cpp))
+
+$(eval $(call gb_StaticLibrary_add_generated_cxxobjects,graphite,\
+ UnpackedTarball/graphite/src/$(if $(filter GCC,$(COM)),direct,call)_machine \
+ UnpackedTarball/graphite/src/gr_char_info \
+ UnpackedTarball/graphite/src/gr_face \
+ UnpackedTarball/graphite/src/gr_features \
+ UnpackedTarball/graphite/src/gr_font \
+ UnpackedTarball/graphite/src/gr_logging \
+ UnpackedTarball/graphite/src/gr_segment \
+ UnpackedTarball/graphite/src/gr_slot \
+ UnpackedTarball/graphite/src/json \
+ UnpackedTarball/graphite/src/Bidi \
+ UnpackedTarball/graphite/src/CachedFace \
+ UnpackedTarball/graphite/src/CmapCache \
+ UnpackedTarball/graphite/src/Code \
+ UnpackedTarball/graphite/src/Face \
+ UnpackedTarball/graphite/src/FeatureMap \
+ UnpackedTarball/graphite/src/FileFace \
+ UnpackedTarball/graphite/src/Font \
+ UnpackedTarball/graphite/src/GlyphCache \
+ UnpackedTarball/graphite/src/GlyphFace \
+ UnpackedTarball/graphite/src/Justifier \
+ UnpackedTarball/graphite/src/NameTable \
+ UnpackedTarball/graphite/src/Pass \
+ UnpackedTarball/graphite/src/SegCache \
+ UnpackedTarball/graphite/src/SegCacheEntry \
+ UnpackedTarball/graphite/src/SegCacheStore \
+ UnpackedTarball/graphite/src/Segment \
+ UnpackedTarball/graphite/src/Silf \
+ UnpackedTarball/graphite/src/Slot \
+ UnpackedTarball/graphite/src/Sparse \
+ UnpackedTarball/graphite/src/TtfUtil \
+ UnpackedTarball/graphite/src/UtfCodec \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/graphite/UnpackedTarball_graphite.mk b/external/graphite/UnpackedTarball_graphite.mk
new file mode 100644
index 000000000000..35ca233268c3
--- /dev/null
+++ b/external/graphite/UnpackedTarball_graphite.mk
@@ -0,0 +1,21 @@
+# -*- 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,graphite))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,graphite,$(GRAPHITE_TARBALL)))
+
+# http://projects.palaso.org/issues/1030
+# http://projects.palaso.org/issues/1115
+$(eval $(call gb_UnpackedTarball_add_patches,graphite,\
+ external/graphite/graphite2.patch \
+ external/graphite/graphite2.issue1115.patch.1 \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/graphite/graphite2.issue1115.patch.1 b/external/graphite/graphite2.issue1115.patch.1
new file mode 100644
index 000000000000..f19c8a3749f4
--- /dev/null
+++ b/external/graphite/graphite2.issue1115.patch.1
@@ -0,0 +1,22 @@
+--- graphite/src/Code.cpp
++++ graphite/src/Code.cpp
+@@ -169,8 +169,8 @@ Machine::Code::Code(bool is_constraint,
+ bytecode_end,
+ pre_context,
+ rule_length,
+- silf.numClasses(),
+- face.glyphs().numAttrs(),
++ static_cast<uint16>(silf.numClasses()),
++ static_cast<uint16>(face.glyphs().numAttrs()),
+ face.numFeatures(),
+ {1,1,1,1,1,1,1,1,
+ 1,1,1,1,1,1,1,255,
+@@ -178,7 +178,7 @@ Machine::Code::Code(bool is_constraint,
+ 1,1,1,1,1,1,0,0,
+ 0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,
+- 0,0,0,0,0,0,0, silf.numUser()}
++ 0,0,0,0,0,0,0, static_cast<byte>(silf.numUser())}
+ };
+
+ decoder dec(lims, *this);
diff --git a/external/graphite/graphite2.patch b/external/graphite/graphite2.patch
new file mode 100644
index 000000000000..c7739ad441cb
--- /dev/null
+++ b/external/graphite/graphite2.patch
@@ -0,0 +1,29 @@
+--- misc/graphite2-1.2.0/include/graphite2/Types.h 2011-02-12 16:54:16.000000000 +0100
++++ misc/build/graphite2-1.2.0/include/graphite2/Types.h 2011-03-15 21:38:06.264788098 +0100
+@@ -41,7 +41,8 @@
+ };
+
+ // Definitions for library publicly exported symbols
+-#if defined _WIN32 || defined __CYGWIN__
++#define GR2_STATIC 1
++#if ( defined _WIN32 || defined __CYGWIN__ ) && !defined GR2_STATIC
+ #if defined GRAPHITE2_STATIC
+ #define GR2_API
+ #elif defined GRAPHITE2_EXPORTING
+--- misc/graphite2-1.2.0/src/inc/json.h
++++ misc/build/graphite2-1.2.0/src/inc/json.h
+@@ -146,6 +146,14 @@
+ inline
+ json & operator << (json & j, unsigned int d) throw() { return j << json::integer(d); }
+
++#if defined(_WIN64)
++inline
++json & operator << (json & j, __int64 d) throw() { return j << json::integer((unsigned int)d); }
++
++inline
++json & operator << (json & j, size_t d) throw() { return j << json::integer((unsigned int)d); }
++
++#endif
+ inline
+ json & operator << (json & j, char c) throw ()
+ {