summaryrefslogtreecommitdiffstats
path: root/external/graphite
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
commited5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch)
tree7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /external/graphite
parentInitial commit. (diff)
downloadlibreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz
libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'external/graphite')
-rw-r--r--external/graphite/Makefile7
-rw-r--r--external/graphite/Module_graphite.mk17
-rw-r--r--external/graphite/README7
-rw-r--r--external/graphite/StaticLibrary_graphite.mk79
-rw-r--r--external/graphite/UnpackedTarball_graphite.mk20
-rw-r--r--external/graphite/ubsan.patch11
6 files changed, 141 insertions, 0 deletions
diff --git a/external/graphite/Makefile b/external/graphite/Makefile
new file mode 100644
index 000000000..e4968cf85
--- /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 000000000..ff981612b
--- /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 000000000..3174b7233
--- /dev/null
+++ b/external/graphite/README
@@ -0,0 +1,7 @@
+Library for providing rendering capabilities for complex non-Roman writing systems.
+
+From:
+[http://graphite.sil.org/]
+
+Development:
+[http://projects.palaso.org/projects/graphitedev]
diff --git a/external/graphite/StaticLibrary_graphite.mk b/external/graphite/StaticLibrary_graphite.mk
new file mode 100644
index 000000000..ee233a10b
--- /dev/null
+++ b/external/graphite/StaticLibrary_graphite.mk
@@ -0,0 +1,79 @@
+# -*- 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_disabled,graphite))
+
+$(eval $(call gb_StaticLibrary_set_include,graphite,\
+ -I$(call gb_UnpackedTarball_get_dir,graphite/include) \
+ -I$(call gb_UnpackedTarball_get_dir,graphite/src) \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_StaticLibrary_add_defs,graphite,\
+ -DGRAPHITE2_NTRACING \
+ -DGRAPHITE2_STATIC \
+))
+
+ifeq ($(COM),GCC)
+ifneq ($(COM_IS_CLANG),TRUE)
+$(eval $(call gb_StaticLibrary_add_cxxflags,graphite,\
+ -fpermissive \
+))
+endif
+endif
+
+ifeq ($(OS),ANDROID)
+# Force optimizations on Android, because otherwise Pass.cpp triggers an
+# infinite loop in clang, at least in this version:
+# Android (5058415 based on r339409) clang version 8.0.2 (https://android.googlesource.com/toolchain/clang 40173bab62ec746213857d083c0e8b0abb568790) (https://android.googlesource.com/toolchain/llvm 7a6618d69e7e8111e1d49dc9e7813767c5ca756a) (based on LLVM 8.0.2svn)
+$(eval $(call gb_StaticLibrary_add_cxxflags,graphite,\
+ -Os \
+))
+endif
+
+$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,graphite,cpp))
+
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,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/CmapCache \
+ UnpackedTarball/graphite/src/Code \
+ UnpackedTarball/graphite/src/Collider \
+ UnpackedTarball/graphite/src/Decompressor \
+ 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/Intervals \
+ UnpackedTarball/graphite/src/Justifier \
+ UnpackedTarball/graphite/src/NameTable \
+ UnpackedTarball/graphite/src/Pass \
+ UnpackedTarball/graphite/src/Position \
+ 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 000000000..464fcc256
--- /dev/null
+++ b/external/graphite/UnpackedTarball_graphite.mk
@@ -0,0 +1,20 @@
+# -*- 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)))
+
+$(eval $(call gb_UnpackedTarball_set_patchlevel,graphite,0))
+
+$(eval $(call gb_UnpackedTarball_add_patches,graphite, \
+ external/graphite/ubsan.patch \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/graphite/ubsan.patch b/external/graphite/ubsan.patch
new file mode 100644
index 000000000..fd7a08f82
--- /dev/null
+++ b/external/graphite/ubsan.patch
@@ -0,0 +1,11 @@
+--- src/gr_face.cpp
++++ src/gr_face.cpp
+@@ -95,7 +95,7 @@
+
+ Face *res = new Face(appFaceHandle, *ops);
+ if (res && load_face(*res, faceOptions))
+- return static_cast<gr_face *>(res);
++ return reinterpret_cast<gr_face *>(res);
+
+ delete res;
+ return 0;