summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2013-11-12 16:44:40 +0100
committerDavid Tardon <dtardon@redhat.com>2013-11-12 17:28:12 +0100
commit49a4d366ee7c298e547955344001f3d95622106a (patch)
tree650525471ff76e2f6fb3b86b4a5fb1f4135b2034
parent1db1d9ecadf10788f5b310942e0128344ad2c8aa (diff)
integrate libeot
Change-Id: I0f28ff1680026d883909cc12efabb54f705cecb4
-rw-r--r--Makefile.fetch1
-rw-r--r--RepositoryExternal.mk43
-rw-r--r--config_host.mk.in4
-rw-r--r--configure.ac39
-rw-r--r--external/Module_external.mk1
-rw-r--r--external/libeot/ExternalProject_libeot.mk28
-rw-r--r--external/libeot/Makefile7
-rw-r--r--external/libeot/Module_libeot.mk17
-rw-r--r--external/libeot/README2
-rw-r--r--external/libeot/UnpackedTarball_libeot.mk18
-rw-r--r--external/libeot/libeot-avoid-autotools-run.patch.044
11 files changed, 204 insertions, 0 deletions
diff --git a/Makefile.fetch b/Makefile.fetch
index 752a93404da4..ae76cf73701c 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -81,6 +81,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)
$(call fetch_Optional,ETONYEK,ETONYEK_TARBALL) \
$(call fetch_Optional,FIREBIRD,FIREBIRD_TARBALL) \
$(call fetch_Optional,HARFBUZZ,HARFBUZZ_TARBALL) \
+ $(call fetch_Optional,LIBEOT,LIBEOT_TARBALL) \
$(call fetch_Optional,MSPUB,MSPUB_TARBALL) \
$(call fetch_Optional,MWAW,MWAW_TARBALL) \
$(call fetch_Optional,ODFGEN,ODFGEN_TARBALL) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 1fd0850b8bb0..4ec63ae02c6e 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -2639,6 +2639,49 @@ gb_LinkTarget__use_orcus-parser :=
endif
+ifeq ($(ENABLE_EOT),TRUE)
+
+ifeq ($(SYSTEM_LIBEOT),TRUE)
+
+define gb_LinkTarget__use_libeot
+$(call gb_LinkTarget_set_include,$(1),\
+ $$(INCLUDE) \
+ $(LIBEOT_CFLAGS) \
+)
+$(call gb_LinkTarget_add_libs,$(1),$(LIBEOT_LIBS))
+
+endef
+
+gb_ExternalProject__use_libeot :=
+
+else # !SYSTEM_LIBEOT
+
+define gb_LinkTarget__use_libeot
+$(call gb_LinkTarget_set_include,$(1),\
+ -I$(call gb_UnpackedTarball_get_dir,libeot)/inc \
+ $$(INCLUDE) \
+)
+$(call gb_LinkTarget_add_libs,$(1),\
+ $(call gb_UnpackedTarball_get_dir,libeot)/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
+)
+$(call gb_LinkTarget_use_external_project,$(1),libeot)
+
+endef
+
+define gb_ExternalProject__use_libeot
+$(call gb_ExternalProject_use_external_project,$(1),libeot)
+
+endef
+
+endif # SYSTEM_LIBEOT
+
+else # !ENABLE_EOT
+
+gb_LinkTarget__use_libeot :=
+gb_ExternalProject__use_libeot :=
+
+endif # ENABLE_EOT
+
### X11 stuff ###
ifeq ($(GUIBASE),unx)
diff --git a/config_host.mk.in b/config_host.mk.in
index 30df49c7e83c..0da03bee4422 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -114,6 +114,7 @@ export ENABLE_DBUS=@ENABLE_DBUS@
export ENABLE_DEBUG=@ENABLE_DEBUG@
export ENABLE_DEBUGINFO_FOR=@ENABLE_DEBUGINFO_FOR@
export ENABLE_DIRECTX=@ENABLE_DIRECTX@
+export ENABLE_EOT=@ENABLE_EOT@
export ENABLE_EVOAB2=@ENABLE_EVOAB2@
export ENABLE_FIREBIRD_SDBC=@ENABLE_FIREBIRD_SDBC@
export ENABLE_GCONF=@ENABLE_GCONF@
@@ -299,6 +300,8 @@ export LCMS2_LIBS=$(gb_SPACE)@LCMS2_LIBS@
export LFS_CFLAGS=@LFS_CFLAGS@
export LIBBASE_JAR=@LIBBASE_JAR@
export LIBDIR=@LIBDIR@
+export LIBEOT_CFLAGS=$(gb_SPACE)@LIBEOT_CFLAGS@
+export LIBEOT_LIBS=$(gb_SPACE)@LIBEOT_LIBS@
export LIBEXSLT_CFLAGS=$(gb_SPACE)@LIBEXSLT_CFLAGS@
export LIBEXSLT_LIBS=$(gb_SPACE)@LIBEXSLT_LIBS@
export LIBEXTTEXTCAT_CFLAGS=$(gb_SPACE)@LIBEXTTEXTCAT_CFLAGS@
@@ -510,6 +513,7 @@ export SYSTEM_EBOOK=@SYSTEM_EBOOK@
export SYSTEM_ETONYEK=@SYSTEM_ETONYEK@
export SYSTEM_FREEHAND=@SYSTEM_FREEHAND@
export SYSTEM_LIBATOMIC_OPS=@SYSTEM_LIBATOMIC_OPS@
+export SYSTEM_LIBEOT=@SYSTEM_LIBEOT@
export SYSTEM_LIBEXTTEXTCAT=@SYSTEM_LIBEXTTEXTCAT@
export SYSTEM_LIBEXTTEXTCAT_DATA=@SYSTEM_LIBEXTTEXTCAT_DATA@
export SYSTEM_LIBLANGTAG=@SYSTEM_LIBLANGTAG@
diff --git a/configure.ac b/configure.ac
index 817e4dae3052..e2a79bbaffd2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1100,6 +1100,11 @@ AC_ARG_ENABLE(neon,
[Disable neon and the compilation of webdav binding.]),
,)
+AC_ARG_ENABLE([eot],
+ [AS_HELP_STRING([--enable-eot],
+ [Enable support for Embedded OpenType fonts.])],
+, [enable_eot=no])
+
AC_ARG_ENABLE(cve-tests,
AS_HELP_STRING([--disable-cve-tests],
[Prevent CVE tests to be executed]),
@@ -1479,6 +1484,11 @@ AC_ARG_WITH(system-expat,
[Use expat already on system.]),,
[with_system_expat="$with_system_libs"])
+AC_ARG_WITH(system-libeot,
+ AS_HELP_STRING([--with-system-libeot],
+ [Use libeot already on system.]),,
+ [with_system_libeot="$with_system_libs"])
+
AC_ARG_WITH(system-libxml,
AS_HELP_STRING([--with-system-libxml],
[Use libxml/libxslt already on system.]),,
@@ -7654,6 +7664,35 @@ else
fi
AC_SUBST(SYSTEM_EXPAT)
+AC_MSG_CHECKING([whether to enable Embedded OpenType support])
+if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_eot" = "yes"; then
+ ENABLE_EOT="TRUE"
+ AC_DEFINE([ENABLE_EOT])
+ AC_MSG_RESULT([yes])
+
+ AC_MSG_CHECKING([which libeot to use])
+ if test "$with_system_libeot" = "yes"; then
+ AC_MSG_RESULT([external])
+ SYSTEM_LIBEOT=YES
+ AC_CHECK_HEADER([libeot.h], [],
+ [AC_MSG_ERROR([libeot.h not found. install libeot])], [])
+ AC_CHECK_LIB([libeot], [eot2ttf_file], [:],
+ [AC_MSG_RESULT([libeot library not found or functional.])], [])
+ libo_MINGW_CHECK_DLL([libeot])
+ else
+ AC_MSG_RESULT([internal])
+ SYSTEM_LIBEOT=NO
+ BUILD_TYPE="$BUILD_TYPE LIBEOT"
+ fi
+else
+ ENABLE_EOT=
+ AC_MSG_RESULT([no])
+fi
+AC_SUBST([ENABLE_EOT])
+AC_SUBST([SYSTEM_LIBEOT])
+AC_SUBST([LIBEOT_CFLAGS])
+AC_SUBST([LIBEOT_LIBS])
+
dnl ===================================================================
dnl Check for system libebook
dnl ===================================================================
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 8ea0f112effc..dcd5b0822271 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -51,6 +51,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,LANGUAGETOOL,languagetool) \
$(call gb_Helper_optional,LCMS2,lcms2) \
$(call gb_Helper_optional,LIBATOMIC_OPS,libatomic_ops) \
+ $(call gb_Helper_optional,LIBEOT,libeot) \
$(call gb_Helper_optional,LIBEXTTEXTCAT,libexttextcat) \
$(call gb_Helper_optional,LIBLANGTAG,liblangtag) \
$(call gb_Helper_optional,LIBPNG,libpng) \
diff --git a/external/libeot/ExternalProject_libeot.mk b/external/libeot/ExternalProject_libeot.mk
new file mode 100644
index 000000000000..97e28005de36
--- /dev/null
+++ b/external/libeot/ExternalProject_libeot.mk
@@ -0,0 +1,28 @@
+# -*- 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,libeot))
+
+$(eval $(call gb_ExternalProject_register_targets,libeot,\
+ build \
+))
+
+$(call gb_ExternalProject_get_state_target,libeot,build) :
+ $(call gb_ExternalProject_run,build,\
+ touch Makefile.in \
+ && export PKG_CONFIG="" \
+ && ./configure \
+ --with-pic \
+ --enable-static \
+ --disable-shared \
+ --disable-debug \
+ && $(MAKE) $(if $(VERBOSE)$(verbose),V=1) \
+ )
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libeot/Makefile b/external/libeot/Makefile
new file mode 100644
index 000000000000..e4968cf85fb6
--- /dev/null
+++ b/external/libeot/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/libeot/Module_libeot.mk b/external/libeot/Module_libeot.mk
new file mode 100644
index 000000000000..128b255d1b90
--- /dev/null
+++ b/external/libeot/Module_libeot.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,libeot))
+
+$(eval $(call gb_Module_add_targets,libeot,\
+ ExternalProject_libeot \
+ UnpackedTarball_libeot \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libeot/README b/external/libeot/README
new file mode 100644
index 000000000000..fc317f43da69
--- /dev/null
+++ b/external/libeot/README
@@ -0,0 +1,2 @@
+Library for parsing Embedded OpenType files (Microsoft embedded font
+"standard"), and converting them to other formats.
diff --git a/external/libeot/UnpackedTarball_libeot.mk b/external/libeot/UnpackedTarball_libeot.mk
new file mode 100644
index 000000000000..9b95fd2efef8
--- /dev/null
+++ b/external/libeot/UnpackedTarball_libeot.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,libeot))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,libeot,$(LIBEOT_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_add_patches,libeot,\
+ external/libeot/libeot-avoid-autotools-run.patch.0 \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libeot/libeot-avoid-autotools-run.patch.0 b/external/libeot/libeot-avoid-autotools-run.patch.0
new file mode 100644
index 000000000000..875bda5429ed
--- /dev/null
+++ b/external/libeot/libeot-avoid-autotools-run.patch.0
@@ -0,0 +1,44 @@
+--- Makefile.in.dt 2013-11-12 17:02:57.555418341 +0100
++++ Makefile.in 2013-11-12 17:04:03.100619894 +0100
+@@ -87,7 +87,7 @@ DIST_COMMON = $(srcdir)/Makefile.in $(sr
+ $(srcdir)/config.h.in depcomp $(libeot_include_HEADERS) ar-lib \
+ compile config.guess config.sub install-sh missing ltmain.sh
+ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
++am__aclocal_m4_deps =
+ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+@@ -367,19 +367,6 @@ all: config.h
+ .SUFFIXES: .c .lo .o .obj
+ am--refresh: Makefile
+ @:
+-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+- @for dep in $?; do \
+- case '$(am__configure_deps)' in \
+- *$$dep*) \
+- echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+- $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+- && exit 0; \
+- exit 1;; \
+- esac; \
+- done; \
+- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+- $(am__cd) $(top_srcdir) && \
+- $(AUTOMAKE) --foreign Makefile
+ .PRECIOUS: Makefile
+ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+@@ -394,12 +381,6 @@ Makefile: $(srcdir)/Makefile.in $(top_bu
+ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+-$(top_srcdir)/configure: $(am__configure_deps)
+- $(am__cd) $(srcdir) && $(AUTOCONF)
+-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+- $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+-$(am__aclocal_m4_deps):
+-
+ config.h: stamp-h1
+ @test -f $@ || rm -f stamp-h1
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1