1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
11 # OpenOffice.org is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU Lesser General Public License version 3
13 # only, as published by the Free Software Foundation.
15 # OpenOffice.org is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU Lesser General Public License version 3 for more details
19 # (a copy is included in the LICENSE file that accompanied this code).
21 # You should have received a copy of the GNU Lesser General Public License
22 # version 3 along with OpenOffice.org. If not, see
23 # <http://www.openoffice.org/license.html>
24 # for a copy of the LGPLv3 License.
26 #*************************************************************************
32 EXTERNAL_WARNINGS_NOT_ERRORS
:= TRUE
34 # --- Settings -----------------------------------------------------
36 .INCLUDE
: settings.mk
38 .IF
"$(ENABLE_XMLSEC)" != "YES"
40 @echo
"XMLSec module disabled"
43 # --- Files --------------------------------------------------------
47 TARFILE_NAME
=$(PRJNAME
)-$(XMLSEC1VERSION
)
48 TARFILE_MD5
=1f24ab1d39f4a51faf22244c94a6203f
50 #xmlsec1-configure.patch: Set up the build. Straightforward configuration
51 #xmlsec1-configure-libxml-libxslt.patch: empty "$with_libxml" prepends /bin :-(
52 #xmlsec1-olderlibxml2.patch: Allow build against older libxml2, for macosx
53 #xmlsec1-nssdisablecallbacks.patch: Disable use of smime3 so don't need to package it
54 #xmlsec1-customkeymanage.patch: Could we do this alternatively outside xmlsec
55 #xmlsec1-nssmangleciphers.patch: Dubious, do we still need this ?
56 #xmlsec1-noverify.patch: As per readme.txt.
57 #xmlsec1-mingw32.patch: Mingw32 support.
58 #xmlsec1-mingw-customkeymanage-addmscrypto.patch: builds the custom keymanager on mingw
59 #xmlsec1-vc.path: support for Visual C++ 10
61 xmlsec1-configure.patch \
62 xmlsec1-configure-libxml-libxslt.patch \
63 xmlsec1-olderlibxml2.patch \
64 xmlsec1-nssdisablecallbacks.patch \
65 xmlsec1-customkeymanage.patch \
66 xmlsec1-nssmangleciphers.patch \
67 xmlsec1-noverify.patch \
68 xmlsec1-mingw32.patch \
69 xmlsec1-mingw-keymgr-mscrypto.patch \
71 xmlsec1-1.2
.14_fix_extern_c.patch \
75 include$/xmlsec
$/mscrypto
$/akmngr.h \
76 src
$/mscrypto
$/akmngr.c \
77 include$/xmlsec
$/nss
$/akmngr.h \
78 include$/xmlsec
$/nss
$/ciphers.h \
79 include$/xmlsec
$/nss
$/tokens.h \
81 src
$/nss
$/keywrapers.c \
92 xmlsec_CC
=$(CC
) -mthreads
93 .IF
"$(MINGW_SHARED_GCCLIB)"=="YES"
94 xmlsec_CC
+=-shared-libgcc
97 .IF
"$(MINGW_SHARED_GXXLIB)"=="YES"
98 xmlsec_LIBS
+=$(MINGW_SHARED_LIBSTDCPP
)
101 CONFIGURE_ACTION
=.
$/configure
103 # Note that this is obsolete crack for building *locally* on Windows with MinGW,
104 # something we don't see the point in here in LibreOffice
106 CONFIGURE_FLAGS
=--with-libxslt
=no
--with-openssl
=no
--with-gnutls
=no
--with-mozilla_ver
=1.7.5 --enable-mscrypto
--disable-crypto-dl
--build
=i586-pc-mingw32
--host
=i586-pc-mingw32 CC
="$(xmlsec_CC)" LDFLAGS
="-no-undefined -L$(ILIB:s/;/ -L/)" LIBS
="$(xmlsec_LIBS)" LIBXML2LIB
=$(LIBXML2LIB
) ZLIB3RDLIB
=$(ZLIB3RDLIB
) OBJDUMP
="$(WRAPCMD) objdump"
108 .IF
"$(SYSTEM_NSS)" != "YES"
109 CONFIGURE_FLAGS
+=--enable-pkgconfig
=no
111 BUILD_ACTION
=$(GNUMAKE
) -j
$(EXTMAXPROCESS
)
112 BUILD_DIR
=$(CONFIGURE_DIR
)
115 CONFIGURE_ACTION
=cscript configure.js
116 .IF
"$(product)"!="full" && "$(CCNUMVER)" >= "001399999999"
117 CONFIGURE_FLAGS
=crypto
=$(CRYPTOLIB
) debug
=yes xslt
=no iconv
=no static
=no
include=$(BASEINC
) lib
=$(BASELIB
)
119 CONFIGURE_FLAGS
=crypto
=$(CRYPTOLIB
) xslt
=no iconv
=no static
=no
include=$(BASEINC
) lib
=$(BASELIB
)
122 BUILD_DIR
=$(CONFIGURE_DIR
)
127 .IF
"$(COM)"=="C52" && "$(CPU)"=="U"
132 xmlsec_CFLAGS
+=-I
$(SYSBASE
)$/usr
$/include
133 .IF
"$(COMNAME)"=="sunpro5"
134 xmlsec_CFLAGS
+=$(C_RESTRICTIONFLAGS
)
135 .ENDIF
# "$(COMNAME)"=="sunpro5"
136 .IF
"$(EXTRA_CFLAGS)"!=""
137 xmlsec_CFLAGS
+=$(EXTRA_CFLAGS
)
138 xmlsec_CPPFLAGS
+=$(EXTRA_CFLAGS
)
139 .ENDIF
# "$(EXTRA_CFLAGS)"!=""
140 xmlsec_LDFLAGS
+=-L
$(SYSBASE
)$/usr
$/lib
141 .ELIF
"$(OS)"=="MACOSX" # "$(SYSBASE)"!=""
142 xmlsec_CPPFLAGS
+=$(EXTRA_CDEFS
)
145 .IF
"$(OS)$(COM)"=="LINUXGCC" ||
"$(OS)$(COM)"=="FREEBSDGCC"
146 xmlsec_LDFLAGS
+=-Wl
,-rpath
,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
147 .ENDIF
# "$(OS)$(COM)"=="LINUXGCC"
148 .IF
"$(OS)$(COM)"=="SOLARISC52"
149 xmlsec_LDFLAGS
+=-Wl
,-R
'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
150 .ENDIF
# "$(OS)$(COM)"=="SOLARISC52"
152 LDFLAGS
:=$(xmlsec_LDFLAGS
)
157 CONFIGURE_ACTION
=.
$/configure ADDCFLAGS
="$(xmlsec_CFLAGS)" CPPFLAGS
="$(xmlsec_CPPFLAGS)"
158 CONFIGURE_FLAGS
=--with-pic
--disable-shared
--disable-crypto-dl
--with-libxslt
=no
--with-gnutls
=no LIBXML2LIB
="$(LIBXML2LIB)"
160 .IF
"$(CROSS_COMPILING)"=="YES"
161 CONFIGURE_FLAGS
+= --build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)
164 .IF
"$(OS)" == "ANDROID"
165 CONFIGURE_FLAGS
+=--with-openssl
=$(SOLARVER
)/$(INPATH
)
167 CONFIGURE_FLAGS
+=--with-openssl
=no
170 .IF
"$(OS)" == "MACOSX"
172 --prefix=/@.__________________________________________________
$(EXTRPATH
)
175 # system-mozilla needs pkgconfig to get the information about nss
176 # FIXME: This also will enable pkg-config usage for libxml2. It *seems*
177 # that the internal headers still are used when they are there but....
178 # (and that pkg-config is allowed to fail...)
179 # I have no real good idea how to get mozilla (nss) pkg-config'ed and libxml2
180 # not... We need mozilla-nss pkg-config'ed since we can *not* just use
181 # --with-nss or parse -pkg-config --libs / cflags mozilla-nss since
182 # the lib may a) be in /usr/lib (Debian) and be not in $with_nss/include
184 .IF
"$(SYSTEM_NSS)" != "YES"
185 CONFIGURE_FLAGS
+=--enable-pkgconfig
=no
187 BUILD_ACTION
=$(GNUMAKE
) -j
$(EXTMAXPROCESS
)
188 BUILD_DIR
=$(CONFIGURE_DIR
)
192 OUTDIR2INC
=include$/xmlsec
196 OUT2LIB
+=src
$/.libs
$/libxmlsec1.dll.a src
$/nss
$/.libs
$/libxmlsec1-nss.dll.a src
$/mscrypto
$/.libs
$/libxmlsec1-mscrypto.dll.a
197 OUT2BIN
+=src
$/.libs
$/libxmlsec1.dll src
$/nss
$/.libs
$/libxmlsec1-nss.dll src
$/mscrypto
$/.libs
$/libxmlsec1-mscrypto.dll
199 OUT2LIB
+=win32
$/binaries
$/*.lib
200 OUT2BIN
+=win32
$/binaries
$/*.dll
202 .ELIF
"$(OS)" == "ANDROID"
203 OUT2LIB
+=src
$/.libs
$/libxmlsec1.a src
$/openssl
/.libs
$/libxmlsec1-openssl.a
205 OUT2LIB
+=src
$/.libs
$/libxmlsec1.a src
$/nss
$/.libs
$/libxmlsec1-nss.a
208 # --- Targets ------------------------------------------------------
210 .INCLUDE
: set_ext.mk