git: a3557f38990d - main - net-im/libstrophe: Use upstream release archive and improve port

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Sun, 25 Sep 2022 22:49:45 UTC
The branch main has been updated by diizzy:

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

commit a3557f38990dfe8b41ed37638bc89075360816f5
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2022-09-25 17:54:09 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2022-09-25 22:46:47 +0000

    net-im/libstrophe: Use upstream release archive and improve port
    
    - Use upstream release archive as recommended in USE_GITHUB section
      in Porters Handbook
    - Add option to use libxml2
    - Rearrange Makefile to follow Porters Handbook more closely
    
    PR:             266429
    Reviewed by:    ashish (maintainer)
---
 net-im/libstrophe/Makefile | 25 +++++++++++++++++--------
 net-im/libstrophe/distinfo |  6 +++---
 2 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/net-im/libstrophe/Makefile b/net-im/libstrophe/Makefile
index fe5159aa5e29..33c2508de289 100644
--- a/net-im/libstrophe/Makefile
+++ b/net-im/libstrophe/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	libstrophe
-PORTVERSION=	0.12.2
+DISTVERSION=	0.12.2
 CATEGORIES=	net-im
+MASTER_SITES=	https://github.com/strophe/${PORTNAME}/releases/download/${DISTVERSION}/
 
 MAINTAINER=	ashish@FreeBSD.org
 COMMENT=	Lightweight XMPP library
@@ -9,14 +10,22 @@ WWW=		https://strophe.im/libstrophe/
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/MIT-LICENSE.txt
 
-LIB_DEPENDS=	libexpat.so:textproc/expat2
-
-USES=		gmake libtool pkgconfig autoreconf ssl
-USE_GITHUB=	yes
-GH_ACCOUNT=	strophe
+USES=		gmake libtool pkgconfig ssl tar:xz
 GNU_CONFIGURE=	yes
-CONFIGURE_ARGS+=	--with-pkgconfigdir=${PREFIX}/libdata/pkgconfig
 USE_LDCONFIG=	yes
-INSTALL_TARGET=install-strip
+
+INSTALL_TARGET=	install-strip
+
+CONFIGURE_ARGS=	--with-pkgconfigdir=${PREFIX}/libdata/pkgconfig
+
+OPTIONS_DEFAULT=	EXPAT
+OPTIONS_SINGLE=	XML
+OPTIONS_SINGLE_XML=	EXPAT LIBXML2
+
+EXPAT_LIB_DEPENDS=	libexpat.so:textproc/expat2
+
+LIBXML2_USE=		GNOME=libxml2
+LIBXML2_USES=		gnome
+LIBXML2_CONFIGURE_WITH=	libxml2
 
 .include <bsd.port.mk>
diff --git a/net-im/libstrophe/distinfo b/net-im/libstrophe/distinfo
index 02e79a7e3268..beb5641d879a 100644
--- a/net-im/libstrophe/distinfo
+++ b/net-im/libstrophe/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1663179147
-SHA256 (strophe-libstrophe-0.12.2_GH0.tar.gz) = 049232e3968ad65c65e08601cb3de171d3a25d154b6f14332c35a7bf961e2c9d
-SIZE (strophe-libstrophe-0.12.2_GH0.tar.gz) = 218820
+TIMESTAMP = 1663271388
+SHA256 (libstrophe-0.12.2.tar.xz) = b3c79b6deeafafc0f622ba3ee3ca67e9a8e7d75edb102588c6b6f52b38c9fa4b
+SIZE (libstrophe-0.12.2.tar.xz) = 400092