Skip to content

Commit

Permalink
security/xmlsec1: Update to 1.2.38
Browse files Browse the repository at this point in the history
* Use GitHub as primary site as it's much faster and fall back to
  author's website if GitHub is unavailable
* Default to OpenSSL and NSS backend, GnuTLS is optional and
  can co-exist
* Rework Makefile to more closely follow Porters Handbook

Changelog: https://github.com/lsh123/xmlsec/releases/tag/xmlsec-1_2_38

PR:		273108
Approved by:	portmgr (blanket, maintainer timeout 2+ weeks)
Sponsored by:	Blinkinblox
  • Loading branch information
Daniel Engberg authored and Daniel Engberg committed Aug 30, 2023
1 parent 54b3112 commit c769f66
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 71 deletions.
82 changes: 40 additions & 42 deletions security/xmlsec1/Makefile
@@ -1,8 +1,8 @@
PORTNAME= xmlsec1
PORTVERSION= 1.2.37
DISTVERSION= 1.2.38
CATEGORIES= security
MASTER_SITES= https://www.aleksey.com/xmlsec/download/ \
https://github.com/lsh123/xmlsec/releases/download/xmlsec-${PORTVERSION:S,.,_,g}/
MASTER_SITES= https://github.com/lsh123/xmlsec/releases/download/xmlsec_${DISTVERSION:S,.,_,g}/ \
https://www.aleksey.com/xmlsec/download/

MAINTAINER= hrs@FreeBSD.org
COMMENT= XML Security Library
Expand All @@ -11,61 +11,59 @@ WWW= https://www.aleksey.com/xmlsec/
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/Copyright

LIB_DEPENDS= libgcrypt.so:security/libgcrypt \
libgpg-error.so:security/libgpg-error \
libltdl.so:devel/libltdl
LIB_DEPENDS= libltdl.so:devel/libltdl

USES= gmake gnome libtool localbase pathfix pkgconfig ssl
USES= gmake gnome libtool localbase pathfix pkgconfig
USE_GNOME= libxml2 libxslt
USE_LDCONFIG= yes

GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-openssl="${OPENSSLBASE}" \
--with-gcrypt="${LOCALBASE}" \
--enable-werror \
--enable-soap \
--disable-docs-build
MAKE_ENV= ABS_BUILDDIR=${WRKSRC} TMPFOLDER=${WRKSRC}

INSTALL_TARGET= install-strip
PORTDOCS= *
PLIST_SUB= PORTVERSION=${PORTVERSION}

OPTIONS_DEFINE= DOCS GNUTLS NSS
OPTIONS_DEFAULT= NSS
OPTIONS_SUB= yes

GNUTLS_DESC= Enable GNUTLS support
GNUTLS_CONFIGURE_ON= --with-gnutls="${LOCALBASE}"
GNUTLS_CONFIGURE_OFF= --without-gnutls
GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls
NSS_DESC= Enable Mozilla's NSS support
NSS_CONFIGURE_ON= --with-nss="${LOCALBASE}" \
--with-nspr="${LOCALBASE}"
NSS_CONFIGURE_OFF= --without-nss \
--without-nspr
NSS_LIB_DEPENDS= libnss3.so:security/nss \
libnspr4.so:devel/nspr \
libplds4.so:devel/nspr \
libplc4.so:devel/nspr
PLIST_SUB= DISTVERSION=${DISTVERSION}

CONFIGURE_ARGS= --disable-static

OPTIONS_DEFINE= DOCS
OPTIONS_MULTI= SSL
OPTIONS_MULTI_SSL= GNUTLS NSS OPENSSL GNUTLS
OPTIONS_DEFAULT= OPENSSL NSS
OPTIONS_SUB= yes

GNUTLS_LIB_DEPENDS= libgcrypt.so:security/libgcrypt \
libgnutls.so:security/gnutls
GNUTLS_CONFIGURE_WITH= gcrypt gnutls

NSS_LIB_DEPENDS= libnspr4.so:devel/nspr \
libnss3.so:security/nss
NSS_CONFIGURE_WITH= nspr nss

OPENSSL_USES= ssl
OPENSSL_CONFIGURE_OFF= --without-openssl
OPENSSL_CONFIGURE_ON= --with-openssl="${OPENSSLBASE}"

post-patch:
@${REINPLACE_CMD} -e 's/mozilla-nss/nss/' \
-e 's/mozilla-nspr/nspr/' ${WRKSRC}/configure
@${REINPLACE_CMD} -e 's/(CP) -ru/(CP) -r/' \
-e 's/(CP) -u/(CP)/' \
${WRKSRC}/docs/Makefile.am ${WRKSRC}/docs/Makefile.in \
${WRKSRC}/docs/api/Makefile.am ${WRKSRC}/docs/api/Makefile.in \
${WRKSRC}/man/Makefile.am ${WRKSRC}/man/Makefile.in
${PATCH_WRKSRC}/docs/Makefile.am \
${PATCH_WRKSRC}/docs/Makefile.in \
${PATCH_WRKSRC}/docs/api/Makefile.am \
${PATCH_WRKSRC}/docs/api/Makefile.in \
${PATCH_WRKSRC}/man/Makefile.am \
${PATCH_WRKSRC}/man/Makefile.in

post-patch-GNUTLS-on:
# Don't rely on broken autodetection
@${REINPLACE_CMD} -e '/^GNUTLS_FOUND/s/no/yes/' \
-e '/^GNUTLS_LIBS=/s,"","-L${LOCALBASE}/lib -lgnutls",' \
${WRKSRC}/${CONFIGURE_SCRIPT}
-e '/^GNUTLS_LIBS=/s,"","-L${LOCALBASE}/lib -lgnutls",' \
${PATCH_WRKSRC}/${CONFIGURE_SCRIPT}

post-patch-NSS-on:
# Makeing the xmlsec1 executable multi-threaded to let load -lnss,
# when needed.
@${REINPLACE_CMD} -e 's/mozilla-nss/nss/' \
-e 's/mozilla-nspr/nspr/' ${PATCH_WRKSRC}/${CONFIGURE_SCRIPT}
@${REINPLACE_CMD} -e 's,^\(xmlsec1_LDADD = \)\\$$,\1 -L${LOCALBASE}/lib -lpthread\\,' \
${WRKSRC}/apps/Makefile.in
${PATCH_WRKSRC}/apps/Makefile.in


.include <bsd.port.mk>
6 changes: 3 additions & 3 deletions security/xmlsec1/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1670335424
SHA256 (xmlsec1-1.2.37.tar.gz) = 5f8dfbcb6d1e56bddd0b5ec2e00a3d0ca5342a9f57c24dffde5c796b2be2871c
SIZE (xmlsec1-1.2.37.tar.gz) = 2009175
TIMESTAMP = 1691949373
SHA256 (xmlsec1-1.2.38.tar.gz) = 9de8cf8d7d2e288a9cef205cc6cb93c926a67dadfaf44aaff76ed63c28ce9902
SIZE (xmlsec1-1.2.38.tar.gz) = 2036578
46 changes: 20 additions & 26 deletions security/xmlsec1/pkg-plist
Expand Up @@ -9,9 +9,9 @@ include/xmlsec1/xmlsec/crypto.h
include/xmlsec1/xmlsec/dl.h
include/xmlsec1/xmlsec/errors.h
include/xmlsec1/xmlsec/exports.h
include/xmlsec1/xmlsec/gcrypt/app.h
include/xmlsec1/xmlsec/gcrypt/crypto.h
include/xmlsec1/xmlsec/gcrypt/symbols.h
%%GNUTLS%%include/xmlsec1/xmlsec/gcrypt/app.h
%%GNUTLS%%include/xmlsec1/xmlsec/gcrypt/crypto.h
%%GNUTLS%%include/xmlsec1/xmlsec/gcrypt/symbols.h
%%GNUTLS%%include/xmlsec1/xmlsec/gnutls/app.h
%%GNUTLS%%include/xmlsec1/xmlsec/gnutls/crypto.h
%%GNUTLS%%include/xmlsec1/xmlsec/gnutls/symbols.h
Expand All @@ -31,15 +31,14 @@ include/xmlsec1/xmlsec/nodeset.h
%%NSS%%include/xmlsec1/xmlsec/nss/pkikeys.h
%%NSS%%include/xmlsec1/xmlsec/nss/symbols.h
%%NSS%%include/xmlsec1/xmlsec/nss/x509.h
include/xmlsec1/xmlsec/openssl/app.h
include/xmlsec1/xmlsec/openssl/bn.h
include/xmlsec1/xmlsec/openssl/crypto.h
include/xmlsec1/xmlsec/openssl/evp.h
include/xmlsec1/xmlsec/openssl/symbols.h
include/xmlsec1/xmlsec/openssl/x509.h
%%OPENSSL%%include/xmlsec1/xmlsec/openssl/app.h
%%OPENSSL%%include/xmlsec1/xmlsec/openssl/bn.h
%%OPENSSL%%include/xmlsec1/xmlsec/openssl/crypto.h
%%OPENSSL%%include/xmlsec1/xmlsec/openssl/evp.h
%%OPENSSL%%include/xmlsec1/xmlsec/openssl/symbols.h
%%OPENSSL%%include/xmlsec1/xmlsec/openssl/x509.h
include/xmlsec1/xmlsec/parser.h
include/xmlsec1/xmlsec/private.h
include/xmlsec1/xmlsec/soap.h
include/xmlsec1/xmlsec/strings.h
include/xmlsec1/xmlsec/templates.h
include/xmlsec1/xmlsec/transforms.h
Expand All @@ -49,30 +48,25 @@ include/xmlsec1/xmlsec/xmldsig.h
include/xmlsec1/xmlsec/xmlenc.h
include/xmlsec1/xmlsec/xmlsec.h
include/xmlsec1/xmlsec/xmltree.h
lib/libxmlsec1-gcrypt.a
lib/libxmlsec1-gcrypt.so
lib/libxmlsec1-gcrypt.so.1
%%GNUTLS%%lib/libxmlsec1-gnutls.a
%%GNUTLS%%lib/libxmlsec1-gcrypt.so
%%GNUTLS%%lib/libxmlsec1-gcrypt.so.1
%%GNUTLS%%lib/libxmlsec1-gcrypt.so.%%DISTVERSION%%
%%GNUTLS%%lib/libxmlsec1-gnutls.so
%%GNUTLS%%lib/libxmlsec1-gnutls.so.1
%%GNUTLS%%lib/libxmlsec1-gnutls.so.%%PORTVERSION%%
%%NSS%%lib/libxmlsec1-nss.a
%%GNUTLS%%lib/libxmlsec1-gnutls.so.%%DISTVERSION%%
%%NSS%%lib/libxmlsec1-nss.so
%%NSS%%lib/libxmlsec1-nss.so.1
%%NSS%%lib/libxmlsec1-nss.so.%%PORTVERSION%%
lib/libxmlsec1-gcrypt.so.%%PORTVERSION%%
lib/libxmlsec1-openssl.a
lib/libxmlsec1-openssl.so
lib/libxmlsec1-openssl.so.1
lib/libxmlsec1-openssl.so.%%PORTVERSION%%
lib/libxmlsec1.a
%%NSS%%lib/libxmlsec1-nss.so.%%DISTVERSION%%
%%OPENSSL%%lib/libxmlsec1-openssl.so
%%OPENSSL%%lib/libxmlsec1-openssl.so.1
%%OPENSSL%%lib/libxmlsec1-openssl.so.%%DISTVERSION%%
lib/libxmlsec1.so
lib/libxmlsec1.so.1
lib/libxmlsec1.so.%%PORTVERSION%%
libdata/pkgconfig/xmlsec1-gcrypt.pc
lib/libxmlsec1.so.%%DISTVERSION%%
%%GNUTLS%%libdata/pkgconfig/xmlsec1-gcrypt.pc
%%GNUTLS%%libdata/pkgconfig/xmlsec1-gnutls.pc
%%NSS%%libdata/pkgconfig/xmlsec1-nss.pc
libdata/pkgconfig/xmlsec1-openssl.pc
%%OPENSSL%%libdata/pkgconfig/xmlsec1-openssl.pc
libdata/pkgconfig/xmlsec1.pc
man/man1/xmlsec1-config.1.gz
man/man1/xmlsec1.1.gz
Expand Down

0 comments on commit c769f66

Please sign in to comment.