make libeot compile on Windows
Compile for Windows with LO infrastructure (not the only external lib where we do this). Remove unneeded include of <err.h> in libeot.c that isn't used, but Windows doesn't have <err.h> - it's a BSD / Linux thing. Only compile libeot.la and not the eot2ttf binary (which uses err.h so it doesn't compile on Windows). Change-Id: I26afb2b7bcf0bdf0d2ce0bdbcfceb10599d599e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185057 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This commit is contained in:
parent
5683376d06
commit
80e08f59ea
@ -3463,9 +3463,21 @@ $(call gb_LinkTarget_set_include,$(1),\
|
|||||||
-I$(gb_UnpackedTarball_workdir)/libeot/inc \
|
-I$(gb_UnpackedTarball_workdir)/libeot/inc \
|
||||||
$$(INCLUDE) \
|
$$(INCLUDE) \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ifeq ($(COM),MSC)
|
||||||
|
|
||||||
|
$(call gb_LinkTarget_use_static_libraries,$(1),\
|
||||||
|
libeot \
|
||||||
|
)
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
$(call gb_LinkTarget_add_libs,$(1),\
|
$(call gb_LinkTarget_add_libs,$(1),\
|
||||||
$(gb_UnpackedTarball_workdir)/libeot/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
|
$(gb_UnpackedTarball_workdir)/libeot/.libs/libeot$(gb_StaticLibrary_PLAINEXT) \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
$(call gb_LinkTarget_use_external_project,$(1),libeot)
|
$(call gb_LinkTarget_use_external_project,$(1),libeot)
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
@ -1910,7 +1910,7 @@ libo_FUZZ_ARG_ENABLE(gstreamer-1-0,
|
|||||||
,test "${enable_gstreamer_1_0+set}" = set || enable_gstreamer_1_0=yes)
|
,test "${enable_gstreamer_1_0+set}" = set || enable_gstreamer_1_0=yes)
|
||||||
|
|
||||||
# Enable by default on Linux and macOS only
|
# 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],
|
libo_FUZZ_ARG_ENABLE([eot],
|
||||||
[AS_HELP_STRING([--disable-eot],
|
[AS_HELP_STRING([--disable-eot],
|
||||||
[Disable support for Embedded OpenType fonts.])],
|
[Disable support for Embedded OpenType fonts.])],
|
||||||
|
24
external/libeot/0001-remove-unused-err.h.patch
vendored
Normal file
24
external/libeot/0001-remove-unused-err.h.patch
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
From cc2fbd324a2b3b014914ae253513d546e4076320 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Toma=C5=BE=20Vajngerl?= <tomaz.vajngerl@collabora.co.uk>
|
||||||
|
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 <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
-#include <err.h>
|
||||||
|
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
--
|
||||||
|
2.49.0
|
||||||
|
|
2
external/libeot/ExternalProject_libeot.mk
vendored
2
external/libeot/ExternalProject_libeot.mk
vendored
@ -24,7 +24,7 @@ $(call gb_ExternalProject_get_state_target,libeot,build) :
|
|||||||
--disable-shared \
|
--disable-shared \
|
||||||
--disable-debug \
|
--disable-debug \
|
||||||
$(gb_CONFIGURE_PLATFORMS) \
|
$(gb_CONFIGURE_PLATFORMS) \
|
||||||
&& $(MAKE) $(if $(verbose),V=1) \
|
&& $(MAKE) $(if $(verbose),V=1) libeot.la \
|
||||||
)
|
)
|
||||||
$(call gb_Trace_EndRange,libeot,EXTERNAL)
|
$(call gb_Trace_EndRange,libeot,EXTERNAL)
|
||||||
|
|
||||||
|
11
external/libeot/Module_libeot.mk
vendored
11
external/libeot/Module_libeot.mk
vendored
@ -10,8 +10,15 @@
|
|||||||
$(eval $(call gb_Module_Module,libeot))
|
$(eval $(call gb_Module_Module,libeot))
|
||||||
|
|
||||||
$(eval $(call gb_Module_add_targets,libeot,\
|
$(eval $(call gb_Module_add_targets,libeot,\
|
||||||
ExternalProject_libeot \
|
|
||||||
UnpackedTarball_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:
|
# vim: set noet sw=4 ts=4:
|
||||||
|
47
external/libeot/StaticLibrary_libeot.mk
vendored
Normal file
47
external/libeot/StaticLibrary_libeot.mk
vendored
Normal file
@ -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:
|
9
external/libeot/UnpackedTarball_libeot.mk
vendored
9
external/libeot/UnpackedTarball_libeot.mk
vendored
@ -7,8 +7,17 @@
|
|||||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
# 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_UnpackedTarball,libeot))
|
||||||
|
|
||||||
$(eval $(call gb_UnpackedTarball_set_tarball,libeot,$(LIBEOT_TARBALL)))
|
$(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:
|
# vim: set noet sw=4 ts=4:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user