diff options
author | Tony Theodore <tonyt@logyst.com> | 2018-04-07 05:00:02 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2018-04-07 05:00:17 (GMT) |
commit | 85e059caa995c2257ebc5eb0ef34aff89ee940f4 (patch) | |
tree | d91ee2fba5a9920c858ba871bc91a0072e91adfd | |
parent | cf98a16a87de2c202e130ccf4fcf8553260f5496 (diff) | |
download | mxe-85e059caa995c2257ebc5eb0ef34aff89ee940f4.zip mxe-85e059caa995c2257ebc5eb0ef34aff89ee940f4.tar.gz mxe-85e059caa995c2257ebc5eb0ef34aff89ee940f4.tar.bz2 |
xmlsec: add test and fix static *.pc files
-rw-r--r-- | src/xmlsec-1-fixes.patch | 52 | ||||
-rw-r--r-- | src/xmlsec.mk | 10 |
2 files changed, 59 insertions, 3 deletions
diff --git a/src/xmlsec-1-fixes.patch b/src/xmlsec-1-fixes.patch new file mode 100644 index 0000000..1dd480d --- /dev/null +++ b/src/xmlsec-1-fixes.patch @@ -0,0 +1,52 @@ +This file is part of MXE. See LICENSE.md for licensing information. + +Contains ad hoc patches for cross building. + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Tony Theodore <tonyt@logyst.com> +Date: Sat, 7 Apr 2018 14:43:45 +1000 +Subject: [PATCH 1/1] fix static mingw builds with pkgconf + +see: +https://github.com/lsh123/xmlsec/pull/162 + +diff --git a/xmlsec-gcrypt.pc.in b/xmlsec-gcrypt.pc.in +index 1111111..2222222 100644 +--- a/xmlsec-gcrypt.pc.in ++++ b/xmlsec-gcrypt.pc.in +@@ -8,4 +8,5 @@ Version: @VERSION@ + Description: XML Security Library implements XML Signature and XML Encryption standards + Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_PC_FILE_COND@ + Cflags: @XMLSEC_GCRYPT_CFLAGS@ ++Cflags.private: -DXMLSEC_STATIC + Libs: @XMLSEC_GCRYPT_LIBS@ +diff --git a/xmlsec-gnutls.pc.in b/xmlsec-gnutls.pc.in +index 1111111..2222222 100644 +--- a/xmlsec-gnutls.pc.in ++++ b/xmlsec-gnutls.pc.in +@@ -8,4 +8,5 @@ Version: @VERSION@ + Description: XML Security Library implements XML Signature and XML Encryption standards + Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_PC_FILE_COND@ + Cflags: @XMLSEC_GNUTLS_CFLAGS@ ++Cflags.private: -DXMLSEC_STATIC + Libs: @XMLSEC_GNUTLS_LIBS@ +diff --git a/xmlsec-nss.pc.in b/xmlsec-nss.pc.in +index 1111111..2222222 100644 +--- a/xmlsec-nss.pc.in ++++ b/xmlsec-nss.pc.in +@@ -8,4 +8,5 @@ Version: @VERSION@ + Description: XML Security Library implements XML Signature and XML Encryption standards + Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_PC_FILE_COND@ @NSPR_PACKAGE@ >= @MOZILLA_MIN_VERSION@ @NSS_PACKAGE@ >= @MOZILLA_MIN_VERSION@ + Cflags: -DXMLSEC_CRYPTO_NSS=1 @XMLSEC_CORE_CFLAGS@ ++Cflags.private: -DXMLSEC_STATIC + Libs: -L${libdir} -lxmlsec1-nss @XMLSEC_CORE_LIBS@ +diff --git a/xmlsec-openssl.pc.in b/xmlsec-openssl.pc.in +index 1111111..2222222 100644 +--- a/xmlsec-openssl.pc.in ++++ b/xmlsec-openssl.pc.in +@@ -8,4 +8,5 @@ Version: @VERSION@ + Description: XML Security Library implements XML Signature and XML Encryption standards + Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_PC_FILE_COND@ + Cflags: @XMLSEC_OPENSSL_CFLAGS@ ++Cflags.private: -DXMLSEC_STATIC + Libs: @XMLSEC_OPENSSL_LIBS@ diff --git a/src/xmlsec.mk b/src/xmlsec.mk index 5b38656..972a84b 100644 --- a/src/xmlsec.mk +++ b/src/xmlsec.mk @@ -13,10 +13,14 @@ define $(PKG)_BUILD cd '$(BUILD_DIR)' && $(SOURCE_DIR)/configure \ $(MXE_CONFIGURE_OPTS) \ --enable-docs=no \ - --enable-apps=no \ - --enable-shared=$(if $(BUILD_STATIC),no,yes) \ - --enable-static=$(if $(BUILD_STATIC),yes,no) + --enable-apps=no $(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)' VERBOSE=1 $(MXE_DISABLE_CRUFT) $(MAKE) -C '$(BUILD_DIR)' -j 1 install VERBOSE=1 $(MXE_DISABLE_CRUFT) + + # compile test + '$(TARGET)-gcc' \ + -W -Wall -ansi -pedantic \ + '$(SOURCE_DIR)/examples/decrypt1.c' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \ + `'$(TARGET)-pkg-config' xmlsec1-openssl --cflags --libs` endef |