2012-09-09 15:29:43 +02:00
|
|
|
# -*- 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/.
|
|
|
|
#
|
|
|
|
|
2013-05-06 23:46:30 +02:00
|
|
|
$(eval $(call gb_ExternalProject_ExternalProject,liborcus))
|
2012-09-09 15:29:43 +02:00
|
|
|
|
2013-03-16 09:52:43 -04:00
|
|
|
$(eval $(call gb_ExternalProject_use_autoconf,liborcus,build))
|
|
|
|
|
2013-03-22 10:02:30 +01:00
|
|
|
$(eval $(call gb_ExternalProject_use_externals,liborcus, \
|
|
|
|
boost_headers \
|
2014-01-08 13:17:28 +01:00
|
|
|
boost_iostreams \
|
|
|
|
boost_system \
|
|
|
|
mdds_headers \
|
2013-03-22 10:02:30 +01:00
|
|
|
zlib \
|
|
|
|
))
|
2012-11-10 08:56:12 -05:00
|
|
|
|
2012-09-09 15:29:43 +02:00
|
|
|
$(eval $(call gb_ExternalProject_register_targets,liborcus,\
|
|
|
|
build \
|
|
|
|
))
|
|
|
|
|
2013-03-01 11:15:56 +02:00
|
|
|
# Must be built with debug GNU C++ library if --enable-dbgutil has
|
|
|
|
# caused the LO code to be built thusly.
|
|
|
|
|
|
|
|
# The LIBS setting for Android is needed to get the orcus-xml-dump
|
|
|
|
# executable to build successfully. We obviously don't actually need
|
|
|
|
# that executable on Android, but we don't want to bother with
|
|
|
|
# patching out building it for Android.
|
|
|
|
|
2013-04-12 12:38:35 -04:00
|
|
|
#$(if $(filter MSC,$(COM)),CPPFLAGS+="-DBOOST_ALL_NO_LIB") CXXFLAGS+="$(BOOST_CXXFLAGS))
|
|
|
|
|
2013-04-13 16:22:16 +03:00
|
|
|
liborcus_LIBS=
|
2014-02-11 16:21:04 +01:00
|
|
|
ifneq ($(SYSTEM_ZLIB),)
|
2013-04-13 16:22:16 +03:00
|
|
|
liborcus_LIBS+=-lz
|
|
|
|
endif
|
2014-02-11 18:40:09 +01:00
|
|
|
ifneq ($(SYSTEM_BOOST),)
|
2014-01-08 13:17:28 +01:00
|
|
|
liborcus_LIBS+=$(BOOST_SYSTEM_LIB) $(BOOST_IOSTREAMS_LIB)
|
2013-05-22 19:50:22 +03:00
|
|
|
else
|
2014-01-08 13:17:28 +01:00
|
|
|
liborcus_LIBS+=-L$(gb_StaticLibrary_WORKDIR) -lboost_system -lboost_iostreams
|
2013-04-13 10:07:34 -04:00
|
|
|
endif
|
2013-04-13 16:22:16 +03:00
|
|
|
ifeq ($(OS),ANDROID)
|
|
|
|
liborcus_LIBS+=-lgnustl_shared -lm
|
|
|
|
endif
|
|
|
|
|
|
|
|
liborcus_CPPCLAGS=$(CPPFLAGS)
|
2014-02-11 16:21:04 +01:00
|
|
|
ifeq ($(SYSTEM_ZLIB),)
|
2013-05-08 15:47:24 +02:00
|
|
|
liborcus_CPPFLAGS+=$(ZLIB_CFLAGS)
|
2013-04-13 16:22:16 +03:00
|
|
|
endif
|
2013-04-15 22:52:36 +03:00
|
|
|
#
|
|
|
|
# OSes that use the GNU C++ library need to use -D_GLIBCXX_DEBUG in
|
|
|
|
# sync with the rest of LibreOffice, i.e. depending on
|
|
|
|
# --enable-dbgutil. Note that although Android doesn't use the GNU C
|
|
|
|
# library (glibc), the NDK does offer the GNU C++ library as one of
|
|
|
|
# the C++ libraries available, and we use it.
|
|
|
|
#
|
2014-08-06 11:53:25 +02:00
|
|
|
ifneq (,$(filter ANDROID DRAGONFLY FREEBSD IOS LINUX NETBSD OPENBSD,$(OS)))
|
2013-04-13 16:22:16 +03:00
|
|
|
ifneq (,$(gb_ENABLE_DBGUTIL))
|
2013-04-13 17:12:51 +03:00
|
|
|
liborcus_CPPFLAGS+=-D_GLIBCXX_DEBUG
|
2013-04-13 16:22:16 +03:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2015-06-05 00:44:12 +03:00
|
|
|
liborcus_CXXFLAGS=$(CXXFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_VISIBILITY_FLAGS_CXX) $(CXXFLAGS_CXX11)
|
2014-02-21 18:28:19 +01:00
|
|
|
liborcus_LDFLAGS=$(LDFLAGS) $(gb_LTOFLAGS)
|
2013-04-13 16:22:16 +03:00
|
|
|
ifeq ($(COM),MSC)
|
|
|
|
liborcus_CXXFLAGS+=$(BOOST_CXXFLAGS)
|
|
|
|
endif
|
2014-02-11 18:40:09 +01:00
|
|
|
ifeq ($(SYSTEM_BOOST),)
|
2013-04-13 16:22:16 +03:00
|
|
|
liborcus_CXXFLAGS+=-I$(WORKDIR)/UnpackedTarball/boost
|
2013-04-26 17:30:36 +01:00
|
|
|
else
|
|
|
|
liborcus_LDFLAGS+=$(BOOST_LDFLAGS)
|
|
|
|
endif
|
|
|
|
ifneq (,$(PTHREAD_LIBS))
|
|
|
|
liborcus_LDFLAGS+=$(PTHREAD_LIBS)
|
2013-04-13 16:22:16 +03:00
|
|
|
endif
|
|
|
|
|
external/liborcus: Fix Linux RPATH
This has become necessary after edb38d702dd5a058ae0702b73a43328318b94649 "update
to liborcus 0.9.1; Includes switching to dynamic libs."
For one, pass -Wl,-rpath,$ORIGIN in via LDFLAGS, as is done for various external
projects.
For another, libtool (as internally used by liborcus) unhelpfully adds further
-Wl,-rpath arguments of its own, to make the resulting lib in its presumed
location find its dependent libs in their presumed locations. But we override
all that to the single instdir/program/ directory and corresponding RPATH
$ORIGIN anyway, so the simplest fix to get a clean RPATH appears to outsmart
libtool's attempt add adding further -Wl,-rpath arguments by setting
hardcode_libdir_flag_spec_CXX to empty (see the internals of libtool for why
that works). Other external projects (like redland) suffer from this problem
too and currently have a "dirty" RPATH; fix pending. Until libreoffice-4-1 that
was generally not an issue, presumably because having all libs in solver
happened to cause libtool not to emit any additional -Wl,-rpath arguments.
Change-Id: I80dff5141a33c198f30aecb7c51b41bc06145f1c
2015-06-10 11:18:23 +02:00
|
|
|
ifeq ($(OS),LINUX)
|
|
|
|
liborcus_LDFLAGS+=-Wl,-z,origin -Wl,-rpath,\$$$$ORIGIN
|
|
|
|
endif
|
|
|
|
|
2012-09-09 15:29:43 +02:00
|
|
|
$(call gb_ExternalProject_get_state_target,liborcus,build) :
|
2013-02-21 08:15:39 -06:00
|
|
|
$(call gb_ExternalProject_run,build,\
|
2013-04-13 16:22:16 +03:00
|
|
|
$(if $(liborcus_LIBS),LIBS='$(liborcus_LIBS)') \
|
|
|
|
$(if $(liborcus_CXXFLAGS),CXXFLAGS='$(liborcus_CXXFLAGS)') \
|
|
|
|
$(if $(liborcus_CPPFLAGS),CPPFLAGS='$(liborcus_CPPFLAGS)') \
|
2013-04-26 17:30:36 +01:00
|
|
|
$(if $(liborcus_LDFLAGS),LDFLAGS='$(liborcus_LDFLAGS)') \
|
2014-01-08 13:17:28 +01:00
|
|
|
MDDS_CFLAGS='$(MDDS_CFLAGS)' \
|
|
|
|
MDDS_LIBS=' ' \
|
2014-11-13 16:50:36 +01:00
|
|
|
MAKE=$(MAKE) ./configure \
|
2013-02-21 08:15:39 -06:00
|
|
|
--with-pic \
|
2015-06-05 14:35:21 +02:00
|
|
|
$(if $(DISABLE_DYNLOADING), \
|
|
|
|
--enable-static --disable-shared \
|
|
|
|
, \
|
|
|
|
--enable-shared --disable-static \
|
|
|
|
) \
|
2014-08-29 17:14:53 +02:00
|
|
|
$(if $(ENABLE_DEBUG),--enable-debug,--disable-debug) \
|
2013-02-21 08:15:39 -06:00
|
|
|
--disable-spreadsheet-model \
|
2014-01-08 13:17:28 +01:00
|
|
|
--without-tools \
|
2013-02-21 08:15:39 -06:00
|
|
|
--disable-werror \
|
2015-06-09 21:27:54 +02:00
|
|
|
$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
|
2015-06-11 14:05:52 +02:00
|
|
|
$(if $(SYSTEM_BOOST),,\
|
|
|
|
--with-boost=$(WORKDIR)/UnpackedTarball/boost \
|
2015-06-20 19:09:53 +02:00
|
|
|
boost_cv_lib_iostreams=yes \
|
|
|
|
boost_cv_lib_system=yes \
|
2015-06-11 14:05:52 +02:00
|
|
|
) \
|
2014-02-27 16:19:43 +01:00
|
|
|
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
|
2013-10-10 13:43:06 +03:00
|
|
|
&& $(if $(VERBOSE)$(verbose),V=1) \
|
|
|
|
$(MAKE) \
|
2015-06-09 21:27:54 +02:00
|
|
|
$(if $(filter MACOSX,$(OS)),\
|
|
|
|
&& $(PERL) $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \
|
|
|
|
$(gb_Package_SOURCEDIR_liborcus)/src/liborcus/.libs/liborcus-0.10.0.dylib \
|
|
|
|
$(gb_Package_SOURCEDIR_liborcus)/src/parser/.libs/liborcus-parser-0.10.0.dylib \
|
|
|
|
) \
|
2013-02-21 08:15:39 -06:00
|
|
|
)
|
2012-09-09 15:29:43 +02:00
|
|
|
|
|
|
|
# vim: set noet sw=4 ts=4:
|