diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 9cacf77039d5..ed7e47804b3d 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -3463,9 +3463,21 @@ $(call gb_LinkTarget_set_include,$(1),\ -I$(gb_UnpackedTarball_workdir)/libeot/inc \ $$(INCLUDE) \ ) + +ifeq ($(COM),MSC) + +$(call gb_LinkTarget_use_static_libraries,$(1),\ + libeot \ +) + +else + $(call gb_LinkTarget_add_libs,$(1),\ $(gb_UnpackedTarball_workdir)/libeot/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \ ) + +endif + $(call gb_LinkTarget_use_external_project,$(1),libeot) endef diff --git a/configure.ac b/configure.ac index 6cb9f6ba0ff0..d52460df2b7a 100644 --- a/configure.ac +++ b/configure.ac @@ -1910,7 +1910,7 @@ libo_FUZZ_ARG_ENABLE(gstreamer-1-0, ,test "${enable_gstreamer_1_0+set}" = set || enable_gstreamer_1_0=yes) # Enable by default on Linux and macOS only -if test $_os = Darwin -o $_os = Linux; then +if test $_os = Darwin -o $_os = Linux -o $_os = WINNT; then libo_FUZZ_ARG_ENABLE([eot], [AS_HELP_STRING([--disable-eot], [Disable support for Embedded OpenType fonts.])], diff --git a/external/libeot/0001-remove-unused-err.h.patch b/external/libeot/0001-remove-unused-err.h.patch new file mode 100644 index 000000000000..826bf12135c0 --- /dev/null +++ b/external/libeot/0001-remove-unused-err.h.patch @@ -0,0 +1,24 @@ +From cc2fbd324a2b3b014914ae253513d546e4076320 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Toma=C5=BE=20Vajngerl?= +Date: Fri, 9 May 2025 09:55:23 +0900 +Subject: [PATCH] remove unused err.h + +--- + src/libeot.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/libeot.c b/src/libeot.c +index 8bac0c0..dce12ba 100644 +--- a/src/libeot.c ++++ b/src/libeot.c +@@ -6,7 +6,6 @@ + #include + #include + #include +-#include + + #include + +-- +2.49.0 + diff --git a/external/libeot/ExternalProject_libeot.mk b/external/libeot/ExternalProject_libeot.mk index c8f1b3b8b122..95b5128a9d63 100644 --- a/external/libeot/ExternalProject_libeot.mk +++ b/external/libeot/ExternalProject_libeot.mk @@ -24,7 +24,7 @@ $(call gb_ExternalProject_get_state_target,libeot,build) : --disable-shared \ --disable-debug \ $(gb_CONFIGURE_PLATFORMS) \ - && $(MAKE) $(if $(verbose),V=1) \ + && $(MAKE) $(if $(verbose),V=1) libeot.la \ ) $(call gb_Trace_EndRange,libeot,EXTERNAL) diff --git a/external/libeot/Module_libeot.mk b/external/libeot/Module_libeot.mk index 128b255d1b90..6d39a68c2ce3 100644 --- a/external/libeot/Module_libeot.mk +++ b/external/libeot/Module_libeot.mk @@ -10,8 +10,15 @@ $(eval $(call gb_Module_Module,libeot)) $(eval $(call gb_Module_add_targets,libeot,\ - ExternalProject_libeot \ UnpackedTarball_libeot \ )) - +ifeq ($(COM),MSC) +$(eval $(call gb_Module_add_targets,libeot,\ + StaticLibrary_libeot \ +)) +else +$(eval $(call gb_Module_add_targets,libeot,\ + ExternalProject_libeot \ +)) +endif # vim: set noet sw=4 ts=4: diff --git a/external/libeot/StaticLibrary_libeot.mk b/external/libeot/StaticLibrary_libeot.mk new file mode 100644 index 000000000000..4e185e4edef0 --- /dev/null +++ b/external/libeot/StaticLibrary_libeot.mk @@ -0,0 +1,47 @@ +# -*- 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,libeot)) + +$(eval $(call gb_StaticLibrary_use_unpacked,libeot,libeot)) + +$(eval $(call gb_StaticLibrary_set_warnings_disabled,libeot)) + +$(eval $(call gb_StaticLibrary_set_include,libeot, \ + -I$(gb_UnpackedTarball_workdir)/libeot/inc \ + -I$(gb_UnpackedTarball_workdir)/libeot/src \ + -I$(gb_UnpackedTarball_workdir)/libeot/src/ctf \ + -I$(gb_UnpackedTarball_workdir)/libeot/src/lzcomp \ + -I$(gb_UnpackedTarball_workdir)/libeot/src/util \ + $$(INCLUDE) \ +)) + +$(eval $(call gb_StaticLibrary_add_defs,libeot, \ + -DDECOMPRESS_ON \ +)) + +$(eval $(call gb_StaticLibrary_add_generated_cobjects,libeot,\ + UnpackedTarball/libeot/src/libeot \ + UnpackedTarball/libeot/src/EOT \ + UnpackedTarball/libeot/src/writeFontFile \ + UnpackedTarball/libeot/src/triplet_encodings \ + UnpackedTarball/libeot/src/ctf/parseCTF \ + UnpackedTarball/libeot/src/ctf/parseTTF \ + UnpackedTarball/libeot/src/ctf/SFNTContainer \ + UnpackedTarball/libeot/src/util/stream \ + UnpackedTarball/libeot/src/lzcomp/ahuff \ + UnpackedTarball/libeot/src/lzcomp/bitio \ + UnpackedTarball/libeot/src/lzcomp/liblzcomp \ + UnpackedTarball/libeot/src/lzcomp/lzcomp \ + UnpackedTarball/libeot/src/lzcomp/mtxmem \ +)) + + + +# vim: set noet sw=4 ts=4: diff --git a/external/libeot/UnpackedTarball_libeot.mk b/external/libeot/UnpackedTarball_libeot.mk index cbd1a69aa8b5..669dc1ecd76a 100644 --- a/external/libeot/UnpackedTarball_libeot.mk +++ b/external/libeot/UnpackedTarball_libeot.mk @@ -7,8 +7,17 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # +libeot_patches := +libeot_patches += 0001-remove-unused-err.h.patch + $(eval $(call gb_UnpackedTarball_UnpackedTarball,libeot)) $(eval $(call gb_UnpackedTarball_set_tarball,libeot,$(LIBEOT_TARBALL))) +$(eval $(call gb_UnpackedTarball_set_patchlevel,libeot,1)) + +$(eval $(call gb_UnpackedTarball_add_patches,libeot,\ + $(foreach patch,$(libeot_patches),external/libeot/$(patch)) \ +)) + # vim: set noet sw=4 ts=4: