git: cf9d528182ed - main - textproc/tinyxml2: Convert to meson

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sat, 09 Mar 2024 17:13:44 UTC
The branch main has been updated by sunpoet:

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

commit cf9d528182ed61468d4aed9dff5d9da5c2e7ca76
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-03-09 17:10:52 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-03-09 17:13:00 +0000

    textproc/tinyxml2: Convert to meson
    
    - Reapply part of 450aafcba559f95c94c5f195d83b5fe4fdc3748a
    - Bump PORTREVISION for package change
---
 textproc/tinyxml2/Makefile  | 27 ++++++++++++++++-----------
 textproc/tinyxml2/pkg-plist |  7 ++-----
 2 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/textproc/tinyxml2/Makefile b/textproc/tinyxml2/Makefile
index 5012b48a08a9..efa8b82fd26d 100644
--- a/textproc/tinyxml2/Makefile
+++ b/textproc/tinyxml2/Makefile
@@ -1,28 +1,30 @@
 PORTNAME=	tinyxml2
-DISTVERSION=	10.0.0
-PORTREVISION=	2
+PORTVERSION=	10.0.0
+PORTREVISION=	3
 PORTEPOCH=	1
 CATEGORIES=	textproc
 
 MAINTAINER=	sunpoet@FreeBSD.org
 COMMENT=	Small C++ XML Parser
-WWW=		https://github.com/leethomason/tinyxml2
+WWW=		https://leethomason.github.io/tinyxml2/ \
+		https://github.com/leethomason/tinyxml2
 
 LICENSE=	ZLIB
 LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 
-USES=		cmake:testing compiler:c++11-lang cpe dos2unix pathfix
-CPE_VENDOR=	tinyxml2_project
+USES=		compiler:c++11-lang cpe dos2unix meson pathfix
+
+MESON_ARGS=	--default-library=both \
+		-Ddebug=false \
+		-Dtests=true
 USE_LDCONFIG=	yes
 
-USE_GITHUB=     yes
-GH_ACCOUNT=     leethomason
+PLIST_SUB=	PORTVERSION=${PORTVERSION}
 
-CMAKE_TESTING_ON=	tinyxml2_BUILD_TESTING
-PLIST_SUB=	DISTVERSION=${DISTVERSION}
+GH_ACCOUNT=	leethomason
+USE_GITHUB=	yes
 
-CMAKE_OFF=	tinyxml2_BUILD_TESTING
-CMAKE_ON=	BUILD_SHARED_LIBS
+CPE_VENDOR=	tinyxml2_project
 
 OPTIONS_DEFINE=	EXAMPLES
 
@@ -30,4 +32,7 @@ post-install-EXAMPLES-on:
 	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/
 	cd ${WRKSRC}/ && ${COPYTREE_SHARE} resources ${STAGEDIR}${EXAMPLESDIR}/
 
+do-test:
+	cd ${WRKSRC}/ && _build/xmltest
+
 .include <bsd.port.mk>
diff --git a/textproc/tinyxml2/pkg-plist b/textproc/tinyxml2/pkg-plist
index c12561808480..d18bc5bb434e 100644
--- a/textproc/tinyxml2/pkg-plist
+++ b/textproc/tinyxml2/pkg-plist
@@ -1,11 +1,8 @@
 include/tinyxml2.h
-lib/cmake/tinyxml2/tinyxml2-config-version.cmake
-lib/cmake/tinyxml2/tinyxml2-config.cmake
-lib/cmake/tinyxml2/tinyxml2-shared-targets-%%CMAKE_BUILD_TYPE%%.cmake
-lib/cmake/tinyxml2/tinyxml2-shared-targets.cmake
+lib/libtinyxml2.a
 lib/libtinyxml2.so
 lib/libtinyxml2.so.10
-lib/libtinyxml2.so.%%DISTVERSION%%
+lib/libtinyxml2.so.%%PORTVERSION%%
 libdata/pkgconfig/tinyxml2.pc
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/resources/dream.xml
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/resources/empty.xml