fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / external / liborcus / ExternalProject_liborcus.mk
blob47fbdfbe56365f8c9178f6d6ba37eae8653b27d8
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,liborcus))
12 $(eval $(call gb_ExternalProject_use_autoconf,liborcus,build))
14 $(eval $(call gb_ExternalProject_use_externals,liborcus, \
15 boost_headers \
16 boost_iostreams \
17 boost_system \
18 mdds_headers \
19 zlib \
22 $(eval $(call gb_ExternalProject_register_targets,liborcus,\
23 build \
26 # Must be built with debug GNU C++ library if --enable-dbgutil has
27 # caused the LO code to be built thusly.
29 # The LIBS setting for Android is needed to get the orcus-xml-dump
30 # executable to build successfully. We obviously don't actually need
31 # that executable on Android, but we don't want to bother with
32 # patching out building it for Android.
34 #$(if $(filter MSC,$(COM)),CPPFLAGS+="-DBOOST_ALL_NO_LIB") CXXFLAGS+="$(BOOST_CXXFLAGS))
36 liborcus_LIBS=
37 ifneq ($(SYSTEM_ZLIB),)
38 liborcus_LIBS+=-lz
39 endif
40 ifneq ($(SYSTEM_BOOST),)
41 liborcus_LIBS+=$(BOOST_SYSTEM_LIB) $(BOOST_IOSTREAMS_LIB)
42 else
43 liborcus_LIBS+=-L$(gb_StaticLibrary_WORKDIR) -lboost_system -lboost_iostreams
44 endif
45 ifeq ($(OS),ANDROID)
46 liborcus_LIBS+=-lgnustl_shared -lm
47 endif
49 liborcus_CPPCLAGS=$(CPPFLAGS)
50 ifeq ($(SYSTEM_ZLIB),)
51 liborcus_CPPFLAGS+=$(ZLIB_CFLAGS)
52 endif
54 # OSes that use the GNU C++ library need to use -D_GLIBCXX_DEBUG in
55 # sync with the rest of LibreOffice, i.e. depending on
56 # --enable-dbgutil. Note that although Android doesn't use the GNU C
57 # library (glibc), the NDK does offer the GNU C++ library as one of
58 # the C++ libraries available, and we use it.
60 ifneq (,$(filter ANDROID DRAGONFLY FREEBSD IOS LINUX NETBSD OPENBSD,$(OS)))
61 ifneq (,$(gb_ENABLE_DBGUTIL))
62 liborcus_CPPFLAGS+=-D_GLIBCXX_DEBUG
63 endif
64 endif
66 liborcus_CXXFLAGS=$(CXXFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_VISIBILITY_FLAGS_CXX) $(CXXFLAGS_CXX11) -DBOOST_SYSTEM_NO_DEPRECATED $(if $(filter-out WNT,$(OS)),-DBOOST_ERROR_CODE_HEADER_ONLY)
67 liborcus_LDFLAGS=$(LDFLAGS) $(gb_LTOFLAGS)
68 ifeq ($(COM),MSC)
69 liborcus_CXXFLAGS+=$(BOOST_CXXFLAGS)
70 endif
71 ifeq ($(SYSTEM_BOOST),)
72 liborcus_CXXFLAGS+=-I$(WORKDIR)/UnpackedTarball/boost
73 else
74 liborcus_LDFLAGS+=$(BOOST_LDFLAGS)
75 endif
76 ifneq (,$(PTHREAD_LIBS))
77 liborcus_LDFLAGS+=$(PTHREAD_LIBS)
78 endif
80 $(call gb_ExternalProject_get_state_target,liborcus,build) :
81 $(call gb_ExternalProject_run,build,\
82 $(if $(liborcus_LIBS),LIBS='$(liborcus_LIBS)') \
83 $(if $(liborcus_CXXFLAGS),CXXFLAGS='$(liborcus_CXXFLAGS)') \
84 $(if $(liborcus_CPPFLAGS),CPPFLAGS='$(liborcus_CPPFLAGS)') \
85 $(if $(liborcus_LDFLAGS),LDFLAGS='$(liborcus_LDFLAGS)') \
86 MDDS_CFLAGS='$(MDDS_CFLAGS)' \
87 MDDS_LIBS=' ' \
88 MAKE=$(MAKE) ./configure \
89 --with-pic \
90 --enable-static \
91 --disable-shared \
92 $(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \
93 --disable-spreadsheet-model \
94 --without-tools \
95 --disable-werror \
96 $(if $(SYSTEM_BOOST),,--with-boost=$(WORKDIR)/UnpackedTarball/boost) \
97 $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
98 && $(if $(VERBOSE)$(verbose),V=1) \
99 $(MAKE) \
102 # vim: set noet sw=4 ts=4: