Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / external / xmlsec / ExternalProject_xmlsec.mk
blob9db86f9dae2616f4fd472ed20711a25d1f6e55fd
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,xmlsec))
12 $(eval $(call gb_ExternalProject_use_externals,xmlsec,\
13 libxml2 \
14 $(if $(ENABLE_NSS),nss3,$(if $(ENABLE_OPENSSL),openssl)) \
17 $(eval $(call gb_ExternalProject_register_targets,xmlsec,\
18 build \
21 # note: it's possible to use XSLT in XML signatures - that appears to be a
22 # really bad idea from a security point of view though, because it will run
23 # an XSLT script supplied as untrusted input, and XSLT implementations
24 # tend to have extension functions, and some of these trivially allow
25 # running arbitrary code... so investigate the situation with libxslt
26 # before enabling it here; hopefully nobody uses XSLT in practice anyway.
28 ifeq ($(OS),WNT)
30 $(eval $(call gb_ExternalProject_use_nmake,xmlsec,build))
32 $(call gb_ExternalProject_get_state_target,xmlsec,build) :
33 $(call gb_Trace_StartRange,xmlsec,EXTERNAL)
34 $(call gb_ExternalProject_run,build,\
35 cscript /e:javascript configure.js crypto=mscng xslt=no iconv=no static=no \
36 lib=$(call gb_UnpackedTarball_get_dir,libxml2)/win32/bin.msvc \
37 $(if $(filter TRUE,$(ENABLE_DBGUTIL)),debug=yes cruntime=/MDd) \
38 cflags="$(SOLARINC) -I$(WORKDIR)/UnpackedTarball/libxml2/include -I$(WORKDIR)/UnpackedTarball/icu/source/i18n -I$(WORKDIR)/UnpackedTarball/icu/source/common" \
39 && nmake \
40 ,win32)
41 $(call gb_Trace_EndRange,xmlsec,EXTERNAL)
43 else
45 $(call gb_ExternalProject_get_state_target,xmlsec,build) :
46 $(call gb_Trace_StartRange,xmlsec,EXTERNAL)
47 $(call gb_ExternalProject_run,build,\
48 $(if $(filter iOS MACOSX,$(OS_FOR_BUILD)),ACLOCAL="aclocal -I $(SRCDIR)/m4/mac") \
49 autoreconf \
50 && $(gb_RUN_CONFIGURE) ./configure \
51 --with-pic --disable-shared --disable-crypto-dl --without-libxslt --without-gnutls --without-gcrypt --disable-apps --disable-docs --disable-pedantic \
52 $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
53 CFLAGS="$(CFLAGS) $(call gb_ExternalProject_get_build_flags,xmlsec) $(gb_VISIBILITY_FLAGS)" \
54 $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
55 $(if $(ENABLE_NSS), \
56 --without-openssl \
57 $(if $(SYSTEM_NSS),, \
58 $(if $(filter MACOSX,$(OS_FOR_BUILD)),--disable-pkgconfig) \
59 NSPR_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include" NSPR_LIBS="-L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lnspr4" \
60 NSS_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss" NSS_LIBS="-L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib -lsmime3 -lnss3 -lnssutil3" \
61 ), \
62 $(if $(ENABLE_OPENSSL), \
63 $(if $(SYSTEM_OPENSSL),, \
64 OPENSSL_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,openssl)/include" \
65 OPENSSL_LIBS="-L$(call gb_UnpackedTarball_get_dir,openssl) -lcrypto -lssl" \
66 ), \
67 --without-openssl) \
68 ) \
69 $(gb_CONFIGURE_PLATFORMS) \
70 $(if $(SYSBASE),CFLAGS="-I$(SYSBASE)/usr/include" \
71 LDFLAGS="$(call gb_ExternalProject_get_link_flags,xmlsec) -L$(SYSBASE)/usr/lib $(if $(filter-out LINUX FREEBSD,$(OS)),",-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath$(COMMA)\\"\$$\$$ORIGIN)) \
72 && $(MAKE) \
74 $(call gb_Trace_EndRange,xmlsec,EXTERNAL)
76 endif
78 # vim: set noet sw=4 ts=4: