summaryrefslogtreecommitdiff
path: root/external/libxmlsec/xmlsec1-configure.patch
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-11-04 18:57:38 +0200
committerDavid Tardon <dtardon@redhat.com>2013-11-04 23:58:10 -0600
commit27c65f8abde3c971d238c990661ffb909d1c7bba (patch)
treeae2eee7d1a863fe7e46c9019c7b41c100703cf36 /external/libxmlsec/xmlsec1-configure.patch
parentc69941fc45717398a870a9c479dd62e06f4733ef (diff)
fdo#70393: move libxmlsec to a subdir of external
Change-Id: I1bcdd01aad7fc2ee2d2f635b0ae4c4183c9ab092 Reviewed-on: https://gerrit.libreoffice.org/6571 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'external/libxmlsec/xmlsec1-configure.patch')
-rw-r--r--external/libxmlsec/xmlsec1-configure.patch171
1 files changed, 171 insertions, 0 deletions
diff --git a/external/libxmlsec/xmlsec1-configure.patch b/external/libxmlsec/xmlsec1-configure.patch
new file mode 100644
index 000000000000..622c0632154c
--- /dev/null
+++ b/external/libxmlsec/xmlsec1-configure.patch
@@ -0,0 +1,171 @@
+--- misc/xmlsec1-1.2.14/Makefile.am
++++ misc/build/xmlsec1-1.2.14/Makefile.am
+@@ -1,8 +1,9 @@
+ NULL =
+
+ SAFE_VERSION = @XMLSEC_VERSION_SAFE@
+-SUBDIRS = include src apps man docs
+-TEST_APP = apps/xmlsec1$(EXEEXT)
++#Do not build xmlsec1 app. It is not needed. Also the libtool includes
++#a -L/path_to_lib_dir which may contain an incompatible lixbml2.
++SUBDIRS = include src man docs
+ DEFAULT_CRYPTO = @XMLSEC_CRYPTO@
+
+ bin_SCRIPTS = xmlsec1-config
+--- misc/xmlsec1-1.2.14/Makefile.in 2009-06-25 22:53:34.000000000 +0200
++++ misc/build/xmlsec1-1.2.14/Makefile.in 2009-10-01 10:32:48.708515261 +0200
+@@ -341,8 +341,9 @@
+ top_srcdir = @top_srcdir@
+ NULL =
+ SAFE_VERSION = @XMLSEC_VERSION_SAFE@
+-SUBDIRS = include src apps man docs
+-TEST_APP = apps/xmlsec1$(EXEEXT)
++#Do not build xmlsec1 app. It is not needed. Also the libtool includes
++#a -L/path_to_lib_dir which may contain an incompatible lixbml2.
++SUBDIRS = include src man docs
+ DEFAULT_CRYPTO = @XMLSEC_CRYPTO@
+ bin_SCRIPTS = xmlsec1-config
+ pkgconfig_DATA = xmlsec1.pc @XMLSEC_CRYPTO_PC_FILES_LIST@
+--- misc/xmlsec1-1.2.14/configure.in 2009-06-25 22:53:18.000000000 +0200
++++ misc/build/xmlsec1-1.2.14/configure.in 2009-10-01 10:28:50.990755126 +0200
+@@ -192,8 +192,8 @@
+ dnl ==========================================================================
+ LIBXML_MIN_VERSION="2.7.4"
+ LIBXML_CONFIG="xml2-config"
+-LIBXML_CFLAGS=""
+-LIBXML_LIBS=""
++LIBXML_CFLAGS="$LIBXML_CFLAGS"
++LIBXML_LIBS="$LIBXML_LIBS"
+ LIBXML_FOUND="no"
+ AC_ARG_WITH(libxml,
+ [ --with-libxml=[PFX] libxml2 location]
+@@ -202,6 +202,8 @@
+ [ --with-libxml-src=[PFX] not installed yet libxml2 location]
+ )
+
++if test "z$LIBXML_CFLAGS" = "z" -o "z$LIBXML_LIBS" = "z"; then
++
+ if test "z$with_libxml" = "zno" -o "z$with_libxml_src" = "zno"; then
+ AC_MSG_CHECKING(for libxml2 libraries >= $LIBXML_MIN_VERSION)
+ AC_MSG_ERROR(libxml2 >= $LIBXML_MIN_VERSION is required for $XMLSEC_PACKAGE)
+@@ -245,6 +247,8 @@
+ fi
+ fi
+
++fi
++
+ AC_SUBST(LIBXML_CFLAGS)
+ AC_SUBST(LIBXML_LIBS)
+ AC_SUBST(LIBXML_CONFIG)
+@@ -555,12 +559,26 @@
+
+ XMLSEC_NO_NSS="1"
+ MOZILLA_MIN_VERSION="1.4"
++if test "z$MOZ_FLAVOUR" = "zfirefox" ; then
++ MOZILLA_MIN_VERSION="1.0"
++fi
+ NSS_MIN_VERSION="3.2"
+ NSPR_MIN_VERSION="4.0"
+ NSS_CFLAGS=""
+ NSS_LIBS=""
+-NSS_LIBS_LIST="-lnss3 -lsmime3"
+-NSPR_LIBS_LIST="-lnspr4 -lplds4 -lplc4"
++
++case $host_os in
++cygwin* | mingw* | pw32*)
++ NSS_LIBS_LIST="-lnss3 -lsmime3"
++ NSPR_LIBS_LIST="-lnspr4"
++ ;;
++
++*)
++ NSS_LIBS_LIST="-lnss3 -lsmime3"
++ NSPR_LIBS_LIST="-lnspr4 -lplds4 -lplc4"
++ ;;
++esac
++
+ NSS_CRYPTO_LIB="$XMLSEC_PACKAGE-nss"
+ NSS_FOUND="no"
+ NSPR_PACKAGE=mozilla-nspr
+@@ -586,6 +604,16 @@
+ dnl We are going to try all options
+ dnl
+ if test "z$NSS_FOUND" = "zno" ; then
++ PKG_CHECK_MODULES(NSS, $MOZ_FLAVOUR-nspr >= $MOZILLA_MIN_VERSION $MOZ_FLAVOUR >= $MOZILLA_MIN_VERSION,
++ [NSS_FOUND=yes NSPR_PACKAGE=$MOZ_FLAVOUR-nspr NSS_PACKAGE=$MOZ_FLAVOUR-nss],
++ [NSS_FOUND=no])
++ fi
++ if test "z$NSS_FOUND" = "zno" ; then
++ PKG_CHECK_MODULES(NSS, nss >= 3.9.3 nspr >= 4.8,
++ [NSS_FOUND=yes NSPR_PACKAGE=nspr NSS_PACKAGE=nss],
++ [NSS_FOUND=no])
++ fi
++ if test "z$NSS_FOUND" = "zno" ; then
+ PKG_CHECK_MODULES(NSS, mozilla-nspr >= $MOZILLA_MIN_VERSION mozilla-nss >= $MOZILLA_MIN_VERSION,
+ [NSS_FOUND=yes NSPR_PACKAGE=mozilla-nspr NSS_PACKAGE=mozilla-nss],
+ [NSS_FOUND=no])
+@@ -612,8 +640,8 @@
+ ac_mozilla_name=mozilla-$MOZILLA_MIN_VERSION
+ fi
+
+- ac_nss_lib_dir="/usr/lib /usr/lib64 /usr/local/lib /usr/lib/$ac_mozilla_name /usr/local/lib/$ac_mozilla_name"
+- ac_nss_inc_dir="/usr/include /usr/include/mozilla /usr/local/include /usr/local/include/mozilla /usr/include/$ac_mozilla_name /usr/local/include/$ac_mozilla_name"
++ ac_nss_lib_dir="${WORKDIR}/UnpackedTarball/nss/mozilla/dist/out/lib"
++ ac_nss_inc_dir="${WORKDIR}/UnpackedTarball/nss/mozilla/dist/out/include ${WORKDIR}/UnpackedTarball/nss/mozilla/dist/public"
+
+ AC_MSG_CHECKING(for nspr libraries >= $NSPR_MIN_VERSION)
+ NSPR_INCLUDES_FOUND="no"
+@@ -634,21 +662,21 @@
+ NSPR_PRINIT_H="$with_nspr/include/prinit.h"
+ else
+ for dir in $ac_nss_inc_dir ; do
+- if test -f $dir/nspr/prinit.h ; then
++ if test -f $dir/prinit.h ; then
+ dnl do not add -I/usr/include because compiler does it anyway
+ if test "z$dir" = "z/usr/include" ; then
+ NSPR_CFLAGS=""
+ else
+- NSPR_CFLAGS="-I$dir/nspr"
++ NSPR_CFLAGS="-I$dir"
+ fi
+ NSPR_INCLUDES_FOUND="yes"
+- NSPR_PRINIT_H="$dir/nspr/prinit.h"
++ NSPR_PRINIT_H="$dir/prinit.h"
+ break
+ fi
+ done
+
+ for dir in $ac_nss_lib_dir ; do
+- if test -f $dir/libnspr4$shrext ; then
++ if test -f $dir/libnspr4.so -o -f $dir/libnspr4.dylib ; then
+ dnl do not add -L/usr/lib because compiler does it anyway
+ if test "z$dir" = "z/usr/lib" ; then
+ NSPR_LIBS="$NSPR_LIBS_LIST"
+@@ -719,7 +747,7 @@
+ done
+
+ for dir in $ac_nss_lib_dir ; do
+- if test -f $dir/libnss3$shrext ; then
++ if test -f $dir/libnss3.so -o -f $dir/libnss3.dylib ; then
+ dnl do not add -L/usr/lib because compiler does it anyway
+ if test "z$dir" = "z/usr/lib" ; then
+ NSS_LIBS="$NSS_LIBS_LIST"
+@@ -738,7 +766,7 @@
+
+ if test "z$NSS_INCLUDES_FOUND" = "zyes" -a "z$NSS_LIBS_FOUND" = "zyes" ; then
+ OLD_CPPFLAGS=$CPPFLAGS
+- CPPFLAGS="$NSS_CFLAGS"
++ CPPFLAGS="$NSS_CFLAGS $NSPR_CFLAGS"
+ AC_EGREP_CPP(yes,[
+ #include <nss.h>
+ #if NSS_VMAJOR >= 3 && NSS_VMINOR >= 2
+--- misc/xmlsec1-1.2.14/win32/Makefile.msvc 2009-06-25 22:53:18.000000000 +0200
++++ misc/build/xmlsec1-1.2.14/win32/Makefile.msvc 2009-10-01 10:28:50.997747312 +0200
+@@ -376,7 +376,7 @@
+ XMLSEC_OPENSSL_SOLIBS = libeay32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib
+ XMLSEC_OPENSSL_ALIBS = libeay32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib
+
+-XMLSEC_NSS_SOLIBS = smime3.lib ssl3.lib nss3.lib libnspr4.lib libplds4.lib libplc4.lib kernel32.lib user32.lib gdi32.lib
++XMLSEC_NSS_SOLIBS = smime3.lib nss3.lib nspr4.lib kernel32.lib user32.lib gdi32.lib
+ XMLSEC_NSS_ALIBS = smime3.lib ssl3.lib nss3.lib libnspr4_s.lib libplds4_s.lib libplc4_s.lib kernel32.lib user32.lib gdi32.lib
+
+ XMLSEC_MSCRYPTO_SOLIBS = kernel32.lib user32.lib gdi32.lib Crypt32.lib Advapi32.lib