Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / external / fontconfig / ExternalProject_fontconfig.mk
blobefa812250db8768ed6fcb5ebb1ab42787f4db8c0
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) \
14 freetype \
17 $(eval $(call gb_ExternalProject_register_targets,fontconfig,\
18 build \
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 CFLAGS="$(CFLAGS) \
28 $(call gb_ExternalProject_get_build_flags,fontconfig) \
29 $(gb_VISIBILITY_FLAGS) \
30 $(if $(filter EMSCRIPTEN,$(OS)),-pthread)" \
31 $(if $(filter ANDROID,$(OS)),LIBS="-lm") \
32 $(if $(filter EMSCRIPTEN,$(OS)),LIBXML2_CFLAGS="$(LIBXML_CFLAGS)" LIBXML2_LIBS="$(LIBXML_LIBS)") \
33 $(gb_RUN_CONFIGURE) ./configure \
34 --disable-silent-rules \
35 --with-pic \
36 $(if $(filter ANDROID,$(OS)),--with-arch=arm) \
37 --with-expat-includes=$(call gb_UnpackedTarball_get_dir,expat)/lib \
38 --with-expat-lib=$(gb_StaticLibrary_WORKDIR) \
39 $(gb_CONFIGURE_PLATFORMS) \
40 $(if $(filter ANDROID,$(OS)), \
41 --disable-shared \
42 ) \
43 $(if $(filter EMSCRIPTEN,$(OS)), \
44 --disable-shared \
45 --with-baseconfigdir=/instdir/share/fontconfig \
46 --with-cache-dir=/instdir/share/fontconfig/cache \
47 --with-add-fonts=/instdir/share/fonts \
48 --enable-libxml2 \
49 ac_cv_func_fstatfs=no ac_cv_func_fstatvfs=no \
50 ) \
51 $(if $(filter FUZZERS,$(BUILD_TYPE)), \
52 --disable-shared, \
53 $(if $(filter LINUX,$(OS)), \
54 --disable-static \
55 --prefix=/ \
56 --with-add-fonts=$(fontconfig_add_fonts) \
57 --with-cache-dir=/usr/lib/fontconfig/cache \
58 ) \
59 ) \
60 && $(MAKE) -C src && $(MAKE) fonts.conf \
62 $(call gb_Trace_EndRange,fontconfig,EXTERNAL)
64 # vim: set noet sw=4 ts=4: