Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jun 2023 03:46:31 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: df1bdb03e88f - main - devel/concurrentqueue: Add tests; Improve pkg-descr
Message-ID:  <202306280346.35S3kVp4063509@gitrepo.freebsd.org>

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

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

commit df1bdb03e88f464271a2642bf81793f5698aff3e
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-06-28 01:40:04 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-06-28 03:46:24 +0000

    devel/concurrentqueue: Add tests; Improve pkg-descr
---
 devel/concurrentqueue/Makefile                       | 15 ++++++++++++++-
 .../files/patch-tests_common_systemtime.cpp          | 20 ++++++++++++++++++++
 devel/concurrentqueue/pkg-descr                      |  3 ++-
 3 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/devel/concurrentqueue/Makefile b/devel/concurrentqueue/Makefile
index 45b057d40f7d..b822c5d1d59e 100644
--- a/devel/concurrentqueue/Makefile
+++ b/devel/concurrentqueue/Makefile
@@ -10,11 +10,24 @@ WWW=		https://github.com/cameron314/concurrentqueue
 LICENSE=	BSD2CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE.md
 
-USES=		cmake compiler:c++11-lang
+USES=		cmake compiler:c++11-lang dos2unix
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	cameron314
 
+DOS2UNIX_FILES=	tests/common/systemtime.cpp
+
 NO_ARCH=	yes
 
+BINARY_ALIAS=	g++=${CXX} # only for tests
+
+xdo-test:
+	@cd ${WRKSRC}/tests/unittests && \
+		${SETENV} ${TEST_ENV} ${GMAKE} && \
+		${WRKSRC}/build/bin/unittests
+
+do-test:
+	@${SETENV} ${TEST_ENV} ${GMAKE} -C ${WRKSRC}/tests/unittests
+	@${WRKSRC}/build/bin/unittests
+
 .include <bsd.port.mk>
diff --git a/devel/concurrentqueue/files/patch-tests_common_systemtime.cpp b/devel/concurrentqueue/files/patch-tests_common_systemtime.cpp
new file mode 100644
index 000000000000..b5860853ce10
--- /dev/null
+++ b/devel/concurrentqueue/files/patch-tests_common_systemtime.cpp
@@ -0,0 +1,20 @@
+--- tests/common/systemtime.cpp.orig	2023-06-28 01:31:14 UTC
++++ tests/common/systemtime.cpp
+@@ -118,7 +118,7 @@ SystemTime getSystemTime()
+ {
+ 	timespec t;
+ 	CompilerMemBar();
+-	if (clock_gettime(CLOCK_MONOTONIC_RAW, &t) != 0) {
++	if (clock_gettime(CLOCK_MONOTONIC, &t) != 0) {
+ 		t.tv_sec = (time_t)-1;
+ 		t.tv_nsec = -1;
+ 	}
+@@ -131,7 +131,7 @@ double getTimeDelta(SystemTime start)
+ {
+ 	timespec t;
+ 	CompilerMemBar();
+-	if ((start.tv_sec == (time_t)-1 && start.tv_nsec == -1) || clock_gettime(CLOCK_MONOTONIC_RAW, &t) != 0) {
++	if ((start.tv_sec == (time_t)-1 && start.tv_nsec == -1) || clock_gettime(CLOCK_MONOTONIC, &t) != 0) {
+ 		return -1;
+ 	}
+ 	CompilerMemBar();
diff --git a/devel/concurrentqueue/pkg-descr b/devel/concurrentqueue/pkg-descr
index 5efc763305aa..dbe8f86025ea 100644
--- a/devel/concurrentqueue/pkg-descr
+++ b/devel/concurrentqueue/pkg-descr
@@ -1 +1,2 @@
-concurrentqueue is an industrial-strength lock-free queue for C++.
+concurrentqueue is an industrial-strength lock-free fast multi-producer,
+multi-consumer concurrent queue for C++11 queue for C++.



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