diff --git a/devel/concurrentqueue/Makefile b/devel/concurrentqueue/Makefile index 45b057d40f7d..b822c5d1d59e 100644 --- a/devel/concurrentqueue/Makefile +++ b/devel/concurrentqueue/Makefile @@ -1,20 +1,33 @@ PORTNAME= concurrentqueue DISTVERSIONPREFIX= v DISTVERSION= 1.0.4 CATEGORIES= devel MAINTAINER= yuri@FreeBSD.org COMMENT= Fast C++11 multi-producer multi-consumer lock-free concurrent queue 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 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++.