svn commit: r509163 - in head/devel: . pthreadpool pthreadpool/files

Yuri Victorovich yuri at FreeBSD.org
Sat Aug 17 19:24:49 UTC 2019


Author: yuri
Date: Sat Aug 17 19:24:47 2019
New Revision: 509163
URL: https://svnweb.freebsd.org/changeset/ports/509163

Log:
  New port: devel/pthreadpool: Pthread-based thread pool for C/C++ for arrays parallelization

Added:
  head/devel/pthreadpool/
  head/devel/pthreadpool/Makefile   (contents, props changed)
  head/devel/pthreadpool/distinfo   (contents, props changed)
  head/devel/pthreadpool/files/
  head/devel/pthreadpool/files/patch-CMakeLists.txt   (contents, props changed)
  head/devel/pthreadpool/pkg-descr   (contents, props changed)
Modified:
  head/devel/Makefile

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Sat Aug 17 19:13:04 2019	(r509162)
+++ head/devel/Makefile	Sat Aug 17 19:24:47 2019	(r509163)
@@ -3980,6 +3980,7 @@
     SUBDIR += psvn
     SUBDIR += pth
     SUBDIR += pth-hard
+    SUBDIR += pthreadpool
     SUBDIR += pthsem
     SUBDIR += ptlib
     SUBDIR += ptmalloc

Added: head/devel/pthreadpool/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/pthreadpool/Makefile	Sat Aug 17 19:24:47 2019	(r509163)
@@ -0,0 +1,33 @@
+# $FreeBSD$
+
+PORTNAME=	pthreadpool
+PORTVERSION=	g20181121
+CATEGORIES=	devel
+
+MAINTAINER=	yuri at FreeBSD.org
+COMMENT=	Pthread-based thread pool for C/C++ for arrays parallelization
+
+LICENSE=	BSD2CLAUSE
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${LOCALBASE}/include/fxdiv.h:devel/fxdiv
+
+USES=		cmake localbase
+USE_GITHUB=	yes
+GH_ACCOUNT=	Maratyszcza
+GH_TAGNAME=	6673a4c
+USE_LDCONFIG=	yes
+
+CMAKE_OFF=	PTHREADPOOL_BUILD_TESTS PTHREADPOOL_BUILD_BENCHMARKS
+CMAKE_ON=	BUILD_SHARED_LIBS
+
+PLIST_FILES=	include/pthreadpool.h \
+		lib/libpthreadpool.so
+
+do-test:
+	@cd ${BUILD_WRKSRC} && \
+		${SETENV} ${CONFIGURE_ENV} ${CMAKE_BIN} ${CMAKE_ARGS} -DPTHREADPOOL_BUILD_TESTS:BOOL=ON ${CMAKE_SOURCE_PATH} && \
+		${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} ${ALL_TARGET} && \
+		${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} test
+
+.include <bsd.port.mk>

Added: head/devel/pthreadpool/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/pthreadpool/distinfo	Sat Aug 17 19:24:47 2019	(r509163)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1566067037
+SHA256 (Maratyszcza-pthreadpool-g20181121-6673a4c_GH0.tar.gz) = aa8a46618356c910ec9e3dabb310253ea76b314f9875611edd7fa374c0bf6f80
+SIZE (Maratyszcza-pthreadpool-g20181121-6673a4c_GH0.tar.gz) = 12742

Added: head/devel/pthreadpool/files/patch-CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/pthreadpool/files/patch-CMakeLists.txt	Sat Aug 17 19:24:47 2019	(r509163)
@@ -0,0 +1,28 @@
+--- CMakeLists.txt.orig	2018-11-21 22:52:31 UTC
++++ CMakeLists.txt
+@@ -34,7 +34,7 @@ SET(CONFU_DEPENDENCIES_SOURCE_DIR ${CMAKE_SOURCE_DIR}/
+ SET(CONFU_DEPENDENCIES_BINARY_DIR ${CMAKE_BINARY_DIR}/deps
+   CACHE PATH "Confu-style dependencies binary directory")
+ 
+-IF(NOT DEFINED FXDIV_SOURCE_DIR)
++IF(FALSE AND NOT DEFINED FXDIV_SOURCE_DIR)
+   MESSAGE(STATUS "Downloading FXdiv to ${CONFU_DEPENDENCIES_SOURCE_DIR}/fxdiv (define FXDIV_SOURCE_DIR to avoid it)")
+   CONFIGURE_FILE(cmake/DownloadFXdiv.cmake "${CONFU_DEPENDENCIES_BINARY_DIR}/fxdiv-download/CMakeLists.txt")
+   EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+@@ -109,14 +109,14 @@ IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ ENDIF()
+ 
+ # ---[ Configure FXdiv
+-IF(NOT TARGET fxdiv)
++IF(FALSE AND NOT TARGET fxdiv)
+   SET(FXDIV_BUILD_TESTS OFF CACHE BOOL "")
+   SET(FXDIV_BUILD_BENCHMARKS OFF CACHE BOOL "")
+   ADD_SUBDIRECTORY(
+     "${FXDIV_SOURCE_DIR}"
+     "${CONFU_DEPENDENCIES_BINARY_DIR}/fxdiv")
+ ENDIF()
+-TARGET_LINK_LIBRARIES(pthreadpool PRIVATE fxdiv)
++#TARGET_LINK_LIBRARIES(pthreadpool PRIVATE fxdiv)
+ 
+ INSTALL(TARGETS pthreadpool
+   LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}

Added: head/devel/pthreadpool/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/pthreadpool/pkg-descr	Sat Aug 17 19:24:47 2019	(r509163)
@@ -0,0 +1,12 @@
+pthreadpool is a pthread-based thread pool implementation. It is intended to
+provide functionality of #pragma omp parallel for for POSIX systems where OpenMP
+is not available.
+
+Features:
+* C interface (C++-compatible)
+* Run on user-specified or auto-detected number of threads
+* Work-stealing scheduling for efficient work balancing
+* Compatible with Linux, macOS, and Native Client environments
+* Covered with unit tests and microbenchmarks
+
+WWW: https://github.com/Maratyszcza/pthreadpool


More information about the svn-ports-all mailing list