git: 7a6696ab2619 - main - net/libyang: Fixes mutiple CVEs and connect upstream's test suite

From: Olivier Cochard <olivier_at_FreeBSD.org>
Date: Wed, 13 Oct 2021 12:56:02 UTC
The branch main has been updated by olivier:

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

commit 7a6696ab2619c2661b8af49f1ee6eb4d1d9caf46
Author:     Olivier Cochard <olivier@FreeBSD.org>
AuthorDate: 2021-10-13 12:43:05 +0000
Commit:     Olivier Cochard <olivier@FreeBSD.org>
CommitDate: 2021-10-13 12:55:58 +0000

    net/libyang: Fixes mutiple CVEs and connect upstream's test suite
    
    CVEs: CVE-2021-28902, CVE-2021-28903, CVE-2021-28904, CVE-2021-28905,
    CVE-2021-28906
    
    PR:             259127
    Reported by:    diizzy
---
 net/libyang/Makefile  | 9 ++++++++-
 net/libyang/distinfo  | 6 +++---
 net/libyang/pkg-plist | 2 +-
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/net/libyang/Makefile b/net/libyang/Makefile
index 9f6bb8ec7e0e..e6ccf2cb9b20 100644
--- a/net/libyang/Makefile
+++ b/net/libyang/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	libyang
-PORTVERSION=	1.0.184
+PORTVERSION=	1.0.240
 DISTVERSIONPREFIX=	v
 CATEGORIES=	net
 
@@ -10,6 +10,7 @@ LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
 LIB_DEPENDS=	libpcre.so:devel/pcre
+TEST_DEPENDS=	cmocka>0:sysutils/cmocka
 
 USES=	cmake compiler:c++11-lang pkgconfig
 USE_LDCONFIG=	yes
@@ -19,4 +20,10 @@ GH_ACCOUNT=	CESNET
 
 CMAKE_ARGS+=	-DENABLE_LYD_PRIV=ON
 
+TEST_TARGET=	test
+
+OPTIONS_DEFINE=	TEST
+
+TEST_CMAKE_BOOL=	ENABLE_BUILD_TESTS
+
 .include <bsd.port.mk>
diff --git a/net/libyang/distinfo b/net/libyang/distinfo
index dceb6fc670ff..86cc163850de 100644
--- a/net/libyang/distinfo
+++ b/net/libyang/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1595492965
-SHA256 (CESNET-libyang-v1.0.184_GH0.tar.gz) = 1a5637451b73c4c5683837eb4c51371bb084795f653bc1a5fc20fed5541b58bc
-SIZE (CESNET-libyang-v1.0.184_GH0.tar.gz) = 1659420
+TIMESTAMP = 1634122288
+SHA256 (CESNET-libyang-v1.0.240_GH0.tar.gz) = 8576cad398b451b1c622b0652a2030fcf83ee1d9a39e6cd93d17b0a5a43118d6
+SIZE (CESNET-libyang-v1.0.240_GH0.tar.gz) = 1667619
diff --git a/net/libyang/pkg-plist b/net/libyang/pkg-plist
index d308491c32ae..7b1ecf2e4784 100644
--- a/net/libyang/pkg-plist
+++ b/net/libyang/pkg-plist
@@ -9,7 +9,7 @@ include/libyang/user_types.h
 include/libyang/xml.h
 lib/libyang.so
 lib/libyang.so.1
-lib/libyang.so.1.9.2
+lib/libyang.so.1.10.32
 lib/libyang1/extensions/metadata.so
 lib/libyang1/extensions/nacm.so
 lib/libyang1/extensions/yangdata.so