Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Dec 2021 12:09:05 GMT
From:      Matthias Fechner <mfechner@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 5c8d1c24f862 - main - devel/libgit2: Update to 1.3.0
Message-ID:  <202112041209.1B4C957Q077705@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mfechner:

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

commit 5c8d1c24f8622f77acc3b999bf5c58ed63ea9c61
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2021-10-01 13:34:48 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2021-12-04 12:07:23 +0000

    devel/libgit2: Update to 1.3.0
    
    Use DISTVERSION and USE_GIT to follow Porter's Handbook more closely
    Use PCRE2 by default instead of PCRE(1)
    Use http-parser library from ports rather than bundled version as per recommendation in Porter's Handbook
    Import patch to remove incompatible tests
    
    Reference:
    https://github.com/archlinux/svntogit-packages/blob/packages/libgit2/trunk/libgit2-1.2.0-remove_http-parse_incompatible_tests.patch (see commit history)
    
    PR:             258484
---
 devel/libgit2/Makefile                             |  16 +--
 devel/libgit2/distinfo                             |   6 +-
 .../libgit2/files/patch-tests_network_url_parse.c  | 116 +++++++++++++++++++++
 devel/libgit2/pkg-plist                            |   6 +-
 4 files changed, 134 insertions(+), 10 deletions(-)

diff --git a/devel/libgit2/Makefile b/devel/libgit2/Makefile
index 1867b158ba18..ce0c11f8bb9e 100644
--- a/devel/libgit2/Makefile
+++ b/devel/libgit2/Makefile
@@ -4,23 +4,27 @@
 # Tools/scripts/search_lib_depends_and_bump.sh devel/libgit2
 
 PORTNAME=	libgit2
-PORTVERSION=	1.1.1
+DISTVERSIONPREFIX=	v
+DISTVERSION=	1.3.0
 CATEGORIES=	devel
-MASTER_SITES=	https://github.com/libgit2/libgit2/archive/refs/tags/v${PORTVERSION}${EXTRACT_SUFX}/?dummy=/
 
 MAINTAINER=	mfechner@FreeBSD.org
 COMMENT=	Portable, pure C implementation of the Git core
 
 LICENSE=	GPLv2
 
-LIB_DEPENDS=	libpcre.so:devel/pcre
+LIB_DEPENDS=	libpcre2-8.so:devel/pcre2 \
+		libhttp_parser.so:www/http-parser
 
 USES=		cmake cpe pkgconfig ssl
+USE_GITHUB=	yes
 USE_LDCONFIG=	yes
+
+CMAKE_ARGS=	-DREGEX_BACKEND=pcre2 -DUSE_HTTP_PARSER=system
 CMAKE_OFF=	BUILD_CLAR
 
-PLIST_SUB=	PORTVERSION=${PORTVERSION} \
-		SHLIB_VER=${PORTVERSION:R}
+PLIST_SUB=	DISTVERSION=${DISTVERSION} \
+		SHLIB_VER=${DISTVERSION:R}
 
 OPTIONS_DEFINE=	SSH THREADS
 OPTIONS_DEFAULT=SSH THREADS
@@ -43,6 +47,6 @@ do-test:
 		${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} \
 		-DBUILD_CLAR=ON ${CMAKE_SOURCE_PATH} && \
 		${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \
-		${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} test
+		${SETENV} ${MAKE_ENV} CTEST_OUTPUT_ON_FAILURE=1 ${MAKE_CMD} ${MAKE_ARGS} test
 
 .include <bsd.port.post.mk>
diff --git a/devel/libgit2/distinfo b/devel/libgit2/distinfo
index 5ea4143cd8ef..9945f2cbf032 100644
--- a/devel/libgit2/distinfo
+++ b/devel/libgit2/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1629884756
-SHA256 (libgit2-1.1.1.tar.gz) = 13a525373f64c711a00a058514d890d1512080265f98e0935ab279393f21a620
-SIZE (libgit2-1.1.1.tar.gz) = 5451203
+TIMESTAMP = 1633050062
+SHA256 (libgit2-libgit2-v1.3.0_GH0.tar.gz) = 192eeff84596ff09efb6b01835a066f2df7cd7985e0991c79595688e6b36444e
+SIZE (libgit2-libgit2-v1.3.0_GH0.tar.gz) = 5599575
diff --git a/devel/libgit2/files/patch-tests_network_url_parse.c b/devel/libgit2/files/patch-tests_network_url_parse.c
new file mode 100644
index 000000000000..d466cb1ce18f
--- /dev/null
+++ b/devel/libgit2/files/patch-tests_network_url_parse.c
@@ -0,0 +1,116 @@
+--- tests/network/url/parse.c.orig	2021-09-27 20:09:50 UTC
++++ tests/network/url/parse.c
+@@ -63,18 +63,6 @@ void test_network_url_parse__hostname_implied_root_cus
+ 	cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
+ }
+ 
+-void test_network_url_parse__hostname_implied_root_empty_port(void)
+-{
+-	cl_git_pass(git_net_url_parse(&conndata, "http://example.com:"));
+-	cl_assert_equal_s(conndata.scheme, "http");
+-	cl_assert_equal_s(conndata.host, "example.com");
+-	cl_assert_equal_s(conndata.port, "80");
+-	cl_assert_equal_s(conndata.path, "/");
+-	cl_assert_equal_p(conndata.username, NULL);
+-	cl_assert_equal_p(conndata.password, NULL);
+-	cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
+-}
+-
+ void test_network_url_parse__hostname_encoded_password(void)
+ {
+ 	cl_git_pass(git_net_url_parse(&conndata,
+@@ -129,18 +117,6 @@ void test_network_url_parse__hostname_port(void)
+ 	cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
+ }
+ 
+-void test_network_url_parse__hostname_empty_port(void)
+-{
+-	cl_git_pass(git_net_url_parse(&conndata, "http://example.com:/resource"));
+-	cl_assert_equal_s(conndata.scheme, "http");
+-	cl_assert_equal_s(conndata.host, "example.com");
+-	cl_assert_equal_s(conndata.port, "80");
+-	cl_assert_equal_s(conndata.path, "/resource");
+-	cl_assert_equal_p(conndata.username, NULL);
+-	cl_assert_equal_p(conndata.password, NULL);
+-	cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
+-}
+-
+ void test_network_url_parse__hostname_user_port(void)
+ {
+ 	/* user@hostname.tld:port/resource */
+@@ -219,18 +195,6 @@ void test_network_url_parse__ipv4_implied_root_custom_
+ 	cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
+ }
+ 
+-void test_network_url_parse__ipv4_implied_root_empty_port(void)
+-{
+-	cl_git_pass(git_net_url_parse(&conndata, "http://192.168.1.1:"));
+-	cl_assert_equal_s(conndata.scheme, "http");
+-	cl_assert_equal_s(conndata.host, "192.168.1.1");
+-	cl_assert_equal_s(conndata.port, "80");
+-	cl_assert_equal_s(conndata.path, "/");
+-	cl_assert_equal_p(conndata.username, NULL);
+-	cl_assert_equal_p(conndata.password, NULL);
+-	cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
+-}
+-
+ void test_network_url_parse__ipv4_encoded_password(void)
+ {
+ 	cl_git_pass(git_net_url_parse(&conndata,
+@@ -283,18 +247,6 @@ void test_network_url_parse__ipv4_port(void)
+ 	cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
+ }
+ 
+-void test_network_url_parse__ipv4_empty_port(void)
+-{
+-	cl_git_pass(git_net_url_parse(&conndata, "http://192.168.1.1:/resource"));
+-	cl_assert_equal_s(conndata.scheme, "http");
+-	cl_assert_equal_s(conndata.host, "192.168.1.1");
+-	cl_assert_equal_s(conndata.port, "80");
+-	cl_assert_equal_s(conndata.path, "/resource");
+-	cl_assert_equal_p(conndata.username, NULL);
+-	cl_assert_equal_p(conndata.password, NULL);
+-	cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
+-}
+-
+ void test_network_url_parse__ipv4_user_port(void)
+ {
+ 	cl_git_pass(git_net_url_parse(&conndata,
+@@ -371,18 +323,6 @@ void test_network_url_parse__ipv6_implied_root_custom_
+ 	cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
+ }
+ 
+-void test_network_url_parse__ipv6_implied_root_empty_port(void)
+-{
+-	cl_git_pass(git_net_url_parse(&conndata, "http://[fe80::dcad:beff:fe00:0001]:"));
+-	cl_assert_equal_s(conndata.scheme, "http");
+-	cl_assert_equal_s(conndata.host, "fe80::dcad:beff:fe00:0001");
+-	cl_assert_equal_s(conndata.port, "80");
+-	cl_assert_equal_s(conndata.path, "/");
+-	cl_assert_equal_p(conndata.username, NULL);
+-	cl_assert_equal_p(conndata.password, NULL);
+-	cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
+-}
+-
+ void test_network_url_parse__ipv6_encoded_password(void)
+ {
+ 	cl_git_pass(git_net_url_parse(&conndata,
+@@ -433,18 +373,6 @@ void test_network_url_parse__ipv6_port(void)
+ 	cl_assert_equal_p(conndata.username, NULL);
+ 	cl_assert_equal_p(conndata.password, NULL);
+ 	cl_assert_equal_i(git_net_url_is_default_port(&conndata), 0);
+-}
+-
+-void test_network_url_parse__ipv6_empty_port(void)
+-{
+-	cl_git_pass(git_net_url_parse(&conndata, "http://[fe80::dcad:beff:fe00:0001]:/resource"));
+-	cl_assert_equal_s(conndata.scheme, "http");
+-	cl_assert_equal_s(conndata.host, "fe80::dcad:beff:fe00:0001");
+-	cl_assert_equal_s(conndata.port, "80");
+-	cl_assert_equal_s(conndata.path, "/resource");
+-	cl_assert_equal_p(conndata.username, NULL);
+-	cl_assert_equal_p(conndata.password, NULL);
+-	cl_assert_equal_i(git_net_url_is_default_port(&conndata), 1);
+ }
+ 
+ void test_network_url_parse__ipv6_user_port(void)
diff --git a/devel/libgit2/pkg-plist b/devel/libgit2/pkg-plist
index 410b648a62b9..a1b85dce32c1 100644
--- a/devel/libgit2/pkg-plist
+++ b/devel/libgit2/pkg-plist
@@ -19,6 +19,7 @@ include/git2/credential_helpers.h
 include/git2/deprecated.h
 include/git2/describe.h
 include/git2/diff.h
+include/git2/email.h
 include/git2/errors.h
 include/git2/filter.h
 include/git2/global.h
@@ -59,15 +60,18 @@ include/git2/strarray.h
 include/git2/submodule.h
 include/git2/sys/alloc.h
 include/git2/sys/commit.h
+include/git2/sys/commit_graph.h
 include/git2/sys/config.h
 include/git2/sys/cred.h
 include/git2/sys/credential.h
 include/git2/sys/diff.h
+include/git2/sys/email.h
 include/git2/sys/filter.h
 include/git2/sys/hashsig.h
 include/git2/sys/index.h
 include/git2/sys/mempack.h
 include/git2/sys/merge.h
+include/git2/sys/midx.h
 include/git2/sys/odb_backend.h
 include/git2/sys/openssl.h
 include/git2/sys/path.h
@@ -86,6 +90,6 @@ include/git2/types.h
 include/git2/version.h
 include/git2/worktree.h
 lib/libgit2.so
-lib/libgit2.so.%%PORTVERSION%%
+lib/libgit2.so.%%DISTVERSION%%
 lib/libgit2.so.%%SHLIB_VER%%
 libdata/pkgconfig/libgit2.pc



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202112041209.1B4C957Q077705>