1#************************************************************************* 2# 3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4# 5# Copyright 2000, 2010 Oracle and/or its affiliates. 6# 7# OpenOffice.org - a multi-platform office productivity suite 8# 9# This file is part of OpenOffice.org. 10# 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. 14# 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). 20# 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. 25# 26#************************************************************************* 27 28PRJ=. 29 30PRJNAME=xmlsec1 31TARGET=so_xmlsec1 32EXTERNAL_WARNINGS_NOT_ERRORS := TRUE 33 34# --- Settings ----------------------------------------------------- 35 36.INCLUDE : settings.mk 37 38.IF "$(WITH_MOZILLA)" == "NO" 39@all: 40 @echo "Mozilla disabled -> no nss -> no libxmlsec...." 41.ENDIF 42 43# --- Files -------------------------------------------------------- 44 45XMLSEC1VERSION=1.2.14 46 47TARFILE_NAME=$(PRJNAME)-$(XMLSEC1VERSION) 48TARFILE_MD5=1f24ab1d39f4a51faf22244c94a6203f 49 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 59PATCH_FILES=\ 60 xmlsec1-configure.patch \ 61 xmlsec1-configure-libxml-libxslt.patch \ 62 xmlsec1-olderlibxml2.patch \ 63 xmlsec1-nssdisablecallbacks.patch \ 64 xmlsec1-customkeymanage.patch \ 65 xmlsec1-nssmangleciphers.patch \ 66 xmlsec1-noverify.patch \ 67 xmlsec1-mingw32.patch \ 68 xmlsec1-mingw-keymgr-mscrypto.patch 69 70 71ADDITIONAL_FILES= \ 72 include$/xmlsec$/mscrypto$/akmngr.h \ 73 src$/mscrypto$/akmngr.c \ 74 include$/xmlsec$/nss$/akmngr.h \ 75 include$/xmlsec$/nss$/ciphers.h \ 76 include$/xmlsec$/nss$/tokens.h \ 77 src$/nss$/akmngr.c \ 78 src$/nss$/keywrapers.c \ 79 src$/nss$/tokens.c 80 81.IF "$(GUI)"=="WNT" 82CRYPTOLIB=mscrypto 83#CRYPTOLIB=nss 84#BASEINC=$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla;$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla$/nspr;$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/mozilla$/nss;$(SOLARVERSION)$/$(INPATH)$/inc$(UPDMINOREXT)$/external 85#BASELIB=$(SOLARVERSION)$/$(INPATH)$/lib$(UPDMINOREXT) 86.ELSE 87CRYPTOLIB=nss 88.ENDIF 89 90.IF "$(OS)"=="WNT" 91.IF "$(COM)"=="GCC" 92xmlsec_CC=$(CC) -mthreads 93.IF "$(MINGW_SHARED_GCCLIB)"=="YES" 94xmlsec_CC+=-shared-libgcc 95.ENDIF 96xmlsec_LIBS= 97.IF "$(MINGW_SHARED_GXXLIB)"=="YES" 98xmlsec_LIBS+=$(MINGW_SHARED_LIBSTDCPP) 99.ENDIF 100CONFIGURE_DIR= 101CONFIGURE_ACTION=.$/configure 102CONFIGURE_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 104.IF "$(SYSTEM_MOZILLA)" != "YES" 105CONFIGURE_FLAGS+=--enable-pkgconfig=no 106.ENDIF 107BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS) 108BUILD_DIR=$(CONFIGURE_DIR) 109.ELSE 110CONFIGURE_DIR=win32 111CONFIGURE_ACTION=cscript configure.js 112.IF "$(product)"!="full" && "$(CCNUMVER)" >= "001399999999" 113CONFIGURE_FLAGS=crypto=$(CRYPTOLIB) debug=yes xslt=no iconv=no static=no include=$(BASEINC) lib=$(BASELIB) 114.ELSE 115CONFIGURE_FLAGS=crypto=$(CRYPTOLIB) xslt=no iconv=no static=no include=$(BASEINC) lib=$(BASELIB) 116.ENDIF 117BUILD_ACTION=nmake 118BUILD_DIR=$(CONFIGURE_DIR) 119.ENDIF 120.ELSE 121.IF "$(GUI)"=="UNX" 122 123.IF "$(COM)"=="C52" && "$(CPU)"=="U" 124xmlsec_CFLAGS+=-m64 125.ENDIF 126 127.IF "$(SYSBASE)"!="" 128xmlsec_CFLAGS+=-I$(SYSBASE)$/usr$/include 129.IF "$(COMNAME)"=="sunpro5" 130xmlsec_CFLAGS+=$(C_RESTRICTIONFLAGS) 131.ENDIF # "$(COMNAME)"=="sunpro5" 132.IF "$(EXTRA_CFLAGS)"!="" 133xmlsec_CFLAGS+=$(EXTRA_CFLAGS) 134xmlsec_CPPFLAGS+=$(EXTRA_CFLAGS) 135.ENDIF # "$(EXTRA_CFLAGS)"!="" 136xmlsec_LDFLAGS+=-L$(SYSBASE)$/usr$/lib 137.ELIF "$(OS)"=="MACOSX" # "$(SYSBASE)"!="" 138xmlsec_CPPFLAGS+=$(EXTRA_CDEFS) 139.ENDIF 140 141.IF "$(OS)$(COM)"=="LINUXGCC" || "$(OS)$(COM)"=="FREEBSDGCC" 142xmlsec_LDFLAGS+=-Wl,-rpath,'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' 143.ENDIF # "$(OS)$(COM)"=="LINUXGCC" 144.IF "$(OS)$(COM)"=="SOLARISC52" 145xmlsec_LDFLAGS+=-Wl,-R'$$$$ORIGIN:$$$$ORIGIN/../ure-link/lib' 146.ENDIF # "$(OS)$(COM)"=="SOLARISC52" 147 148LDFLAGS:=$(xmlsec_LDFLAGS) 149.EXPORT: LDFLAGS 150 151.ENDIF 152CONFIGURE_DIR= 153CONFIGURE_ACTION=.$/configure ADDCFLAGS="$(xmlsec_CFLAGS)" CPPFLAGS="$(xmlsec_CPPFLAGS)" 154CONFIGURE_FLAGS=--with-pic --disable-shared --disable-crypto-dl --with-libxslt=no --with-openssl=no --with-gnutls=no LIBXML2LIB="$(LIBXML2LIB)" 155# system-mozilla needs pkgconfig to get the information about nss 156# FIXME: This also will enable pkg-config usage for libxml2. It *seems* 157# that the internal headers still are used when they are there but.... 158# (and that pkg-config is allowed to fail...) 159# I have no real good idea how to get mozilla (nss) pkg-config'ed and libxml2 160# not... We need mozilla-nss pkg-config'ed since we can *not* just use 161# --with-nss or parse -pkg-config --libs / cflags mozilla-nss since 162# the lib may a) be in /usr/lib (Debian) and be not in $with_nss/include 163# $with_nss/lib. 164.IF "$(SYSTEM_MOZILLA)" != "YES" 165CONFIGURE_FLAGS+=--enable-pkgconfig=no 166.ENDIF 167BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS) 168BUILD_DIR=$(CONFIGURE_DIR) 169.ENDIF 170 171 172OUTDIR2INC=include$/xmlsec 173 174.IF "$(OS)"=="WNT" 175.IF "$(COM)"=="GCC" 176OUT2LIB+=src$/.libs$/libxmlsec1.dll.a src$/nss$/.libs$/libxmlsec1-nss.dll.a src$/mscrypto$/.libs$/libxmlsec1-mscrypto.dll.a 177OUT2BIN+=src$/.libs$/libxmlsec1.dll src$/nss$/.libs$/libxmlsec1-nss.dll src$/mscrypto$/.libs$/libxmlsec1-mscrypto.dll 178.ELSE 179OUT2LIB+=win32$/binaries$/*.lib 180OUT2BIN+=win32$/binaries$/*.dll 181.ENDIF 182.ELSE 183OUT2LIB+=src$/.libs$/libxmlsec1.a src$/nss$/.libs$/libxmlsec1-nss.a 184.ENDIF 185 186# --- Targets ------------------------------------------------------ 187 188.INCLUDE : set_ext.mk 189.INCLUDE : target.mk 190.INCLUDE : tg_ext.mk 191 192 193