git: cc64095a5bed - main - security/xml-security: upgrade to 3.0.5

From: Thierry Thomas <thierry_at_FreeBSD.org>
Date: Thu, 03 Apr 2025 19:46:38 UTC
The branch main has been updated by thierry:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cc64095a5bedc299a36e46d2c6f71c780252a33d

commit cc64095a5bedc299a36e46d2c6f71c780252a33d
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2025-04-02 17:32:13 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2025-04-03 19:46:30 +0000

    security/xml-security: upgrade to 3.0.5
    
    Don’t build the jars but use pre-built ones from Maven repository.
    
    PR:             285854
    Approved by:    ale (maintainer)
---
 security/xml-security/Makefile              | 44 +++++++++++------------------
 security/xml-security/distinfo              |  7 +++--
 security/xml-security/files/patch-build.xml | 39 -------------------------
 security/xml-security/pkg-descr             |  2 ++
 4 files changed, 23 insertions(+), 69 deletions(-)

diff --git a/security/xml-security/Makefile b/security/xml-security/Makefile
index ff3bebfec278..e46188774d90 100644
--- a/security/xml-security/Makefile
+++ b/security/xml-security/Makefile
@@ -1,55 +1,43 @@
-PORTNAME=	xml-security
-DISTVERSION=	1_5_5
-PORTREVISION=	2
+PORTNAME=	xmlsec
+DISTVERSION=	3.0.5
 CATEGORIES=	security java
-MASTER_SITES=	https://archive.apache.org/dist/santuario/java-library/${DISTVERSION}/
-DISTNAME=	${PORTNAME}-src-${DISTVERSION}
+MASTER_SITES=	https://repo1.maven.org/maven2/org/apache/santuario/xmlsec/${DISTVERSION}/
+DISTFILES=	${PORTNAME}-${PORTVERSION}.jar
 
 MAINTAINER=	ale@FreeBSD.org
 COMMENT=	Java library for XML Signature and Encryption
 WWW=		https://santuario.apache.org/javaindex.html
 
-BUILD_DEPENDS=	${JAVALIBDIR}/commons-logging.jar:java/apache-commons-logging \
-		${JAVALIBDIR}/xalan.jar:textproc/xalan-j
-RUN_DEPENDS=	${JAVALIBDIR}/commons-logging.jar:java/apache-commons-logging
-
 LICENSE=	APACHE20
 
-USES=		cpe java:ant,run zip
+RUN_DEPENDS=	${JAVALIBDIR}/commons-logging.jar:java/apache-commons-logging
+
+USES=		cpe java:run
 CPE_PRODUCT=	xml_security_for_java
 CPE_VENDOR=	apache
 
-WRKSRC=		${WRKDIR}/${PORTNAME}-${DISTVERSION}
-MAKE_ENV=	ANT_INCLUDE_SHARED_JARS=YES
-ALL_TARGET=	jar
+NO_BUILD=	yes
+NO_ARCH=	yes
+EXTRACT_ONLY=
 
 PORTDOCS=	*
-PORTEXAMPLES=	*
 
 PLIST_FILES=	%%JAVAJARDIR%%/xmlsec.jar
 
-OPTIONS_DEFINE=	DOCS EXAMPLES
-
-DOCS_ALL_TARGET=	javadoc
+OPTIONS_DEFINE=	DOCS
+DOCS_DISTFILES=	${PORTNAME}-${PORTVERSION}-javadoc.jar
 
 do-install:
 	@${ECHO} -n ">> Installing JAR as ${JAVAJARDIR}/xmlsec.jar..."
-	@${INSTALL_DATA} ${WRKSRC}/build/xmlsec-${PORTVERSION}.jar \
+	${INSTALL_DATA} ${DISTDIR}/xmlsec-${PORTVERSION}.jar \
 		${STAGEDIR}/${JAVAJARDIR}/xmlsec.jar
 	@${ECHO} " [ DONE ]"
 
 do-install-DOCS-on:
 	@${ECHO} -n ">> Installing documentation in ${DOCSDIR}..."
-	@${MKDIR} ${STAGEDIR}/${DOCSDIR}
-	@(cd ${WRKSRC}/build/docs/html && ${COPYTREE_SHARE} javadoc \
-		${STAGEDIR}/${DOCSDIR})
-	@${ECHO} " [ DONE ]"
-
-do-install-EXAMPLES-on:
-	@${ECHO} -n ">> Installing examples in ${EXAMPLESDIR}..."
-	@${MKDIR} ${STAGEDIR}/${EXAMPLESDIR}
-	@(cd ${WRKSRC}/samples && ${COPYTREE_SHARE} "javax org" \
-		${STAGEDIR}/${EXAMPLESDIR})
+	${MKDIR} ${STAGEDIR}/${DOCSDIR}
+	${INSTALL_DATA} ${DISTDIR}/xmlsec-${PORTVERSION}-javadoc.jar \
+		${STAGEDIR}/${DOCSDIR}/xmlsec-javadoc.jar
 	@${ECHO} " [ DONE ]"
 
 .include <bsd.port.mk>
diff --git a/security/xml-security/distinfo b/security/xml-security/distinfo
index ad45101fac37..ce3a96e04bd5 100644
--- a/security/xml-security/distinfo
+++ b/security/xml-security/distinfo
@@ -1,2 +1,5 @@
-SHA256 (xml-security-src-1_5_5.zip) = 68d0e567134913a1ba9571b587980306522f34d66ff495d065f734c08cc793c0
-SIZE (xml-security-src-1_5_5.zip) = 2437645
+TIMESTAMP = 1743614273
+SHA256 (xmlsec-3.0.5.jar) = ad39c8422c0a90d54377d53e1200d596879e7440ab88db0b1e15fb0410940f11
+SIZE (xmlsec-3.0.5.jar) = 1203552
+SHA256 (xmlsec-3.0.5-javadoc.jar) = b015b9fb50960c1133d197a691634e867df1724e29eefaa73ef7ceb6418424de
+SIZE (xmlsec-3.0.5-javadoc.jar) = 3220835
diff --git a/security/xml-security/files/patch-build.xml b/security/xml-security/files/patch-build.xml
deleted file mode 100644
index 95fc7b681cbc..000000000000
--- a/security/xml-security/files/patch-build.xml
+++ /dev/null
@@ -1,39 +0,0 @@
---- build.xml.orig	2012-02-22 13:02:34.000000000 +0100
-+++ build.xml	2012-02-22 13:05:16.000000000 +0100
-@@ -221,7 +221,7 @@
-         <javac target="1.5" source="1.5" srcdir="${dir.src}"
-                destdir="${dir.build.bin}"
-                debug="${build.compile.debug}"
--               includeAntRuntime="false">
-+               includeAntRuntime="yes">
-             <compilerarg value="-XDignore.symbol.file" />
-             <classpath refid="id.classpath" />
-             <include name="**/org/apache/xml/security/**/*.java" />
-@@ -667,6 +667,19 @@
-         </manifest>
-     </target>
- 
-+    <target name="jar"
-+	    depends="manifest,build.src">
-+
-+	<!-- Main Library -->
-+	<jar basedir="${dir.build.bin}"
-+	     excludes="org/apache/xml/security/temp/**"
-+	     includes="org/apache/**, javax/xml/crypto/**"
-+	     destfile="${jar.library}" 
-+	     manifest="${jar.manifest}">
-+	  <metainf file="${dir.manifest}/*.txt"/>
-+	</jar>
-+    </target>
-+
-     <target name="build.jar"
- 	    depends="manifest,build.src,build.test,build.samples">
- 
-@@ -719,7 +732,6 @@
-     <target name="compile"          depends="build.src" />
-     <target name="docs"             depends="build.docs" />
-     <target name="javadoc"          depends="build.docs" />
--    <target name="jar"              depends="build.jar" />
-     <target name="dist"             depends="build.dist" />
-     <target name="clean"            depends="env.rm.dirs,env.rm.files"/>
-     <target name="gump"		    depends="clean, docs, jar, test"/>
diff --git a/security/xml-security/pkg-descr b/security/xml-security/pkg-descr
index 270781660a8b..60566ed08fc5 100644
--- a/security/xml-security/pkg-descr
+++ b/security/xml-security/pkg-descr
@@ -6,3 +6,5 @@ The Java library supports the standard Java API JSR-105: XML Digital
 Signature APIs for creating and validating XML Signatures. A standard
 Java API for XML Encryption JSR-106: XML Digital Encryption APIs is
 in progress and is not final, so this API is not yet supported.
+
+See also https://github.com/apache/santuario-xml-security-java