1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 $(eval
$(call gb_ExternalProject_ExternalProject
,fontconfig
))
12 $(eval
$(call gb_ExternalProject_use_externals
,fontconfig
,\
13 $(if
$(filter EMSCRIPTEN
,$(OS
)),libxml2
,expat
) \
17 $(eval
$(call gb_ExternalProject_register_targets
,fontconfig
,\
21 # Can't have this inside the $(call gb_ExternalProject_run as it contains commas
22 fontconfig_add_fonts
=/usr
/share
/X11
/fonts
/Type1
,/usr
/share
/X11
/fonts
/TTF
,/usr
/local
/share
/fonts
24 $(call gb_ExternalProject_get_state_target
,fontconfig
,build
) :
25 $(call gb_Trace_StartRange
,fontconfig
,EXTERNAL
)
26 $(call gb_ExternalProject_run
,build
,\
27 $(if
$(filter -fsanitize
=undefined
,$(CC
)),CC
='$(CC) -fno-sanitize=function') \
29 $(call gb_ExternalProject_get_build_flags,fontconfig) \
30 $(gb_VISIBILITY_FLAGS) \
31 $(if $(filter EMSCRIPTEN,$(OS)),-pthread)" \
32 $(if
$(filter ANDROID
,$(OS
)),LIBS
="-lm") \
33 $(if
$(filter EMSCRIPTEN
,$(OS
)),LIBXML2_CFLAGS
="$(LIBXML_CFLAGS)" LIBXML2_LIBS
="$(LIBXML_LIBS)") \
34 $(gb_RUN_CONFIGURE
) .
/configure \
35 --disable-silent-rules \
37 $(if
$(filter ANDROID
,$(OS
)),--with-arch
=arm
) \
38 --with-expat-includes
=$(gb_UnpackedTarball_workdir
)/expat
/lib \
39 --with-expat-lib
=$(gb_StaticLibrary_WORKDIR
) \
40 $(gb_CONFIGURE_PLATFORMS
) \
41 $(if
$(filter ANDROID
,$(OS
)), \
44 $(if
$(filter EMSCRIPTEN
,$(OS
)), \
46 --with-baseconfigdir
=/instdir
/share
/fontconfig \
47 --with-cache-dir
=/instdir
/share
/fontconfig
/cache \
48 --with-add-fonts
=/instdir
/share
/fonts \
50 ac_cv_func_fstatfs
=no ac_cv_func_fstatvfs
=no \
52 $(if
$(filter FUZZERS
,$(BUILD_TYPE
)), \
54 $(if
$(filter LINUX
,$(OS
)), \
57 --with-add-fonts
=$(fontconfig_add_fonts
) \
58 --with-cache-dir
=/usr
/lib
/fontconfig
/cache \
61 && $(MAKE
) -C src
&& $(MAKE
) fonts.conf \
63 $(call gb_Trace_EndRange
,fontconfig
,EXTERNAL
)
65 # vim: set noet sw=4 ts=4: