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
"$(WITH_MOZILLA)" == "NO"
40 @echo
"Mozilla disabled -> no nss -> no libxmlsec...."
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
74 include$/xmlsec
$/mscrypto
$/akmngr.h \
75 src
$/mscrypto
$/akmngr.c \
76 include$/xmlsec
$/nss
$/akmngr.h \
77 include$/xmlsec
$/nss
$/ciphers.h \
78 include$/xmlsec
$/nss
$/tokens.h \
80 src
$/nss
$/keywrapers.c \
91 xmlsec_CC
=$(CC
) -mthreads
92 .IF
"$(MINGW_SHARED_GCCLIB)"=="YES"
93 xmlsec_CC
+=-shared-libgcc
96 .IF
"$(MINGW_SHARED_GXXLIB)"=="YES"
97 xmlsec_LIBS
+=$(MINGW_SHARED_LIBSTDCPP
)
100 CONFIGURE_ACTION
=.
$/configure
101 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"
103 .IF
"$(SYSTEM_MOZILLA)" != "YES"
104 CONFIGURE_FLAGS
+=--enable-pkgconfig
=no
106 BUILD_ACTION
=$(GNUMAKE
) -j
$(EXTMAXPROCESS
)
107 BUILD_DIR
=$(CONFIGURE_DIR
)
110 CONFIGURE_ACTION
=cscript configure.js
111 .IF
"$(product)"!="full" && "$(CCNUMVER)" >= "001399999999"
112 CONFIGURE_FLAGS
=crypto
=$(CRYPTOLIB
) debug
=yes xslt
=no iconv
=no static
=no
include=$(BASEINC
) lib
=$(BASELIB
)
114 CONFIGURE_FLAGS
=crypto
=$(CRYPTOLIB
) xslt
=no iconv
=no static
=no
include=$(BASEINC
) lib
=$(BASELIB
)
117 BUILD_DIR
=$(CONFIGURE_DIR
)
122 .IF
"$(COM)"=="C52" && "$(CPU)"=="U"
127 xmlsec_CFLAGS
+=-I
$(SYSBASE
)$/usr
$/include
128 .IF
"$(COMNAME)"=="sunpro5"
129 xmlsec_CFLAGS
+=$(C_RESTRICTIONFLAGS
)
130 .ENDIF
# "$(COMNAME)"=="sunpro5"
131 .IF
"$(EXTRA_CFLAGS)"!=""
132 xmlsec_CFLAGS
+=$(EXTRA_CFLAGS
)
133 xmlsec_CPPFLAGS
+=$(EXTRA_CFLAGS
)
134 .ENDIF
# "$(EXTRA_CFLAGS)"!=""
135 xmlsec_LDFLAGS
+=-L
$(SYSBASE
)$/usr
$/lib
136 .ELIF
"$(OS)"=="MACOSX" # "$(SYSBASE)"!=""
137 xmlsec_CPPFLAGS
+=$(EXTRA_CDEFS
)
140 .IF
"$(OS)$(COM)"=="LINUXGCC" ||
"$(OS)$(COM)"=="FREEBSDGCC"
141 xmlsec_LDFLAGS
+=-Wl
,-rpath
,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
142 .ENDIF
# "$(OS)$(COM)"=="LINUXGCC"
143 .IF
"$(OS)$(COM)"=="SOLARISC52"
144 xmlsec_LDFLAGS
+=-Wl
,-R
'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib'
145 .ENDIF
# "$(OS)$(COM)"=="SOLARISC52"
147 LDFLAGS
:=$(xmlsec_LDFLAGS
)
152 CONFIGURE_ACTION
=.
$/configure ADDCFLAGS
="$(xmlsec_CFLAGS)" CPPFLAGS
="$(xmlsec_CPPFLAGS)"
153 CONFIGURE_FLAGS
=--with-pic
--disable-shared
--disable-crypto-dl
--with-libxslt
=no
--with-openssl
=no
--with-gnutls
=no LIBXML2LIB
="$(LIBXML2LIB)"
154 # system-mozilla needs pkgconfig to get the information about nss
155 # FIXME: This also will enable pkg-config usage for libxml2. It *seems*
156 # that the internal headers still are used when they are there but....
157 # (and that pkg-config is allowed to fail...)
158 # I have no real good idea how to get mozilla (nss) pkg-config'ed and libxml2
159 # not... We need mozilla-nss pkg-config'ed since we can *not* just use
160 # --with-nss or parse -pkg-config --libs / cflags mozilla-nss since
161 # the lib may a) be in /usr/lib (Debian) and be not in $with_nss/include
163 .IF
"$(SYSTEM_MOZILLA)" != "YES"
164 CONFIGURE_FLAGS
+=--enable-pkgconfig
=no
166 BUILD_ACTION
=$(GNUMAKE
) -j
$(EXTMAXPROCESS
)
167 BUILD_DIR
=$(CONFIGURE_DIR
)
171 OUTDIR2INC
=include$/xmlsec
175 OUT2LIB
+=src
$/.libs
$/libxmlsec1.dll.a src
$/nss
$/.libs
$/libxmlsec1-nss.dll.a src
$/mscrypto
$/.libs
$/libxmlsec1-mscrypto.dll.a
176 OUT2BIN
+=src
$/.libs
$/libxmlsec1.dll src
$/nss
$/.libs
$/libxmlsec1-nss.dll src
$/mscrypto
$/.libs
$/libxmlsec1-mscrypto.dll
178 OUT2LIB
+=win32
$/binaries
$/*.lib
179 OUT2BIN
+=win32
$/binaries
$/*.dll
182 OUT2LIB
+=src
$/.libs
$/libxmlsec1.a src
$/nss
$/.libs
$/libxmlsec1-nss.a
185 # --- Targets ------------------------------------------------------
187 .INCLUDE
: set_ext.mk