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
102 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"
104 .IF
"$(SYSTEM_NSS)" != "YES"
105 CONFIGURE_FLAGS
+=--enable-pkgconfig
=no
107 BUILD_ACTION
=$(GNUMAKE
) -j
$(EXTMAXPROCESS
)
108 BUILD_DIR
=$(CONFIGURE_DIR
)
111 CONFIGURE_ACTION
=cscript configure.js
112 .IF
"$(product)"!="full" && "$(CCNUMVER)" >= "001399999999"
113 CONFIGURE_FLAGS
=crypto
=$(CRYPTOLIB
) debug
=yes xslt
=no iconv
=no static
=no
include=$(BASEINC
) lib
=$(BASELIB
)
115 CONFIGURE_FLAGS
=crypto
=$(CRYPTOLIB
) xslt
=no iconv
=no static
=no
include=$(BASEINC
) lib
=$(BASELIB
)
118 BUILD_DIR
=$(CONFIGURE_DIR
)
123 .IF
"$(COM)"=="C52" && "$(CPU)"=="U"
128 xmlsec_CFLAGS
+=-I
$(SYSBASE
)$/usr
$/include
129 .IF
"$(COMNAME)"=="sunpro5"
130 xmlsec_CFLAGS
+=$(C_RESTRICTIONFLAGS
)
131 .ENDIF
# "$(COMNAME)"=="sunpro5"
132 .IF
"$(EXTRA_CFLAGS)"!=""
133 xmlsec_CFLAGS
+=$(EXTRA_CFLAGS
)
134 xmlsec_CPPFLAGS
+=$(EXTRA_CFLAGS
)
135 .ENDIF
# "$(EXTRA_CFLAGS)"!=""
136 xmlsec_LDFLAGS
+=-L
$(SYSBASE
)$/usr
$/lib
137 .ELIF
"$(OS)"=="MACOSX" # "$(SYSBASE)"!=""
138 xmlsec_CPPFLAGS
+=$(EXTRA_CDEFS
)
141 .IF
"$(OS)$(COM)"=="LINUXGCC" ||
"$(OS)$(COM)"=="FREEBSDGCC"
142 xmlsec_LDFLAGS
+=-Wl
,-rpath
,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
143 .ENDIF
# "$(OS)$(COM)"=="LINUXGCC"
144 .IF
"$(OS)$(COM)"=="SOLARISC52"
145 xmlsec_LDFLAGS
+=-Wl
,-R
'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
146 .ENDIF
# "$(OS)$(COM)"=="SOLARISC52"
148 LDFLAGS
:=$(xmlsec_LDFLAGS
)
153 CONFIGURE_ACTION
=.
$/configure ADDCFLAGS
="$(xmlsec_CFLAGS)" CPPFLAGS
="$(xmlsec_CPPFLAGS)"
154 CONFIGURE_FLAGS
=--with-pic
--disable-shared
--disable-crypto-dl
--with-libxslt
=no
--with-gnutls
=no LIBXML2LIB
="$(LIBXML2LIB)"
156 .IF
"$(CROSS_COMPILING)"=="YES"
157 CONFIGURE_FLAGS
+= --build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)
160 .IF
"$(OS)" == "ANDROID"
161 CONFIGURE_FLAGS
+=--with-openssl
=$(SOLARVER
)/$(INPATH
)
163 CONFIGURE_FLAGS
+=--with-openssl
=no
166 # system-mozilla needs pkgconfig to get the information about nss
167 # FIXME: This also will enable pkg-config usage for libxml2. It *seems*
168 # that the internal headers still are used when they are there but....
169 # (and that pkg-config is allowed to fail...)
170 # I have no real good idea how to get mozilla (nss) pkg-config'ed and libxml2
171 # not... We need mozilla-nss pkg-config'ed since we can *not* just use
172 # --with-nss or parse -pkg-config --libs / cflags mozilla-nss since
173 # the lib may a) be in /usr/lib (Debian) and be not in $with_nss/include
175 .IF
"$(SYSTEM_NSS)" != "YES"
176 CONFIGURE_FLAGS
+=--enable-pkgconfig
=no
178 BUILD_ACTION
=$(GNUMAKE
) -j
$(EXTMAXPROCESS
)
179 BUILD_DIR
=$(CONFIGURE_DIR
)
183 OUTDIR2INC
=include$/xmlsec
187 OUT2LIB
+=src
$/.libs
$/libxmlsec1.dll.a src
$/nss
$/.libs
$/libxmlsec1-nss.dll.a src
$/mscrypto
$/.libs
$/libxmlsec1-mscrypto.dll.a
188 OUT2BIN
+=src
$/.libs
$/libxmlsec1.dll src
$/nss
$/.libs
$/libxmlsec1-nss.dll src
$/mscrypto
$/.libs
$/libxmlsec1-mscrypto.dll
190 OUT2LIB
+=win32
$/binaries
$/*.lib
191 OUT2BIN
+=win32
$/binaries
$/*.dll
193 .ELIF
"$(OS)" == "ANDROID"
194 OUT2LIB
+=src
$/.libs
$/libxmlsec1.a src
$/openssl
/.libs
$/libxmlsec1-openssl.a
196 OUT2LIB
+=src
$/.libs
$/libxmlsec1.a src
$/nss
$/.libs
$/libxmlsec1-nss.a
199 # --- Targets ------------------------------------------------------
201 .INCLUDE
: set_ext.mk