summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2022-05-10 15:11:55 +0200
committerAlfredo Tupone <tupone@gentoo.org>2022-05-10 15:11:55 +0200
commit80b053ae3e84d3881aee67f40f34dc3d1a159d34 (patch)
tree00b7cf50a1b3c6672988c7213c7b7d3d4649a964 /dev-libs
parentlicenses/android: Bump to July 27, 2021 (diff)
downloadgentoo-80b053ae3e84d3881aee67f40f34dc3d1a159d34.tar.gz
gentoo-80b053ae3e84d3881aee67f40f34dc3d1a159d34.tar.bz2
gentoo-80b053ae3e84d3881aee67f40f34dc3d1a159d34.zip
dev-libs/pthreadpool: add to tree
Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/pthreadpool/Manifest1
-rw-r--r--dev-libs/pthreadpool/files/pthreadpool-2022.05.09-gentoo.patch27
-rw-r--r--dev-libs/pthreadpool/metadata.xml11
-rw-r--r--dev-libs/pthreadpool/pthreadpool-2022.05.09.ebuild35
4 files changed, 74 insertions, 0 deletions
diff --git a/dev-libs/pthreadpool/Manifest b/dev-libs/pthreadpool/Manifest
new file mode 100644
index 000000000000..4a13b9cccbfe
--- /dev/null
+++ b/dev-libs/pthreadpool/Manifest
@@ -0,0 +1 @@
+DIST pthreadpool-2022.05.09.tar.gz 55078 BLAKE2B c7ec88e9dd81c01444e511bd5ac845779f6839004130b9f306237ccb7a83fbe07851f4e780403bc97e448ba7e3f9eadb75904e4a6897503d953da8c9f1d5b0ab SHA512 e9ff2b502ee9faa78f9fe03e3e281e305ea6328bf5ebbcb0bf784786874ea3f3dd17b561a6ae98a677d56e813184d468fffab583fb45e06ec9be6ed7d7ea9f86
diff --git a/dev-libs/pthreadpool/files/pthreadpool-2022.05.09-gentoo.patch b/dev-libs/pthreadpool/files/pthreadpool-2022.05.09-gentoo.patch
new file mode 100644
index 000000000000..3c2edfa1ca8a
--- /dev/null
+++ b/dev-libs/pthreadpool/files/pthreadpool-2022.05.09-gentoo.patch
@@ -0,0 +1,27 @@
+--- a/CMakeLists.txt 2022-05-09 12:38:59.927116924 +0200
++++ b/CMakeLists.txt 2022-05-09 12:39:39.141532680 +0200
+@@ -37,12 +38,6 @@
+
+ # ---[ Download deps
+ IF(NOT DEFINED FXDIV_SOURCE_DIR)
+- MESSAGE(STATUS "Downloading FXdiv to ${CMAKE_BINARY_DIR}/FXdiv-source (define FXDIV_SOURCE_DIR to avoid it)")
+- CONFIGURE_FILE(cmake/DownloadFXdiv.cmake "${CMAKE_BINARY_DIR}/FXdiv-download/CMakeLists.txt")
+- EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" -G "${CMAKE_GENERATOR}" .
+- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/FXdiv-download")
+- EXECUTE_PROCESS(COMMAND "${CMAKE_COMMAND}" --build .
+- WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/FXdiv-download")
+ SET(FXDIV_SOURCE_DIR "${CMAKE_BINARY_DIR}/FXdiv-source" CACHE STRING "FXdiv source directory")
+ ENDIF()
+
+@@ -153,11 +143,7 @@
+ IF(NOT TARGET fxdiv)
+ SET(FXDIV_BUILD_TESTS OFF CACHE BOOL "")
+ SET(FXDIV_BUILD_BENCHMARKS OFF CACHE BOOL "")
+- ADD_SUBDIRECTORY(
+- "${FXDIV_SOURCE_DIR}"
+- "${CMAKE_BINARY_DIR}/FXdiv")
+ ENDIF()
+-TARGET_LINK_LIBRARIES(pthreadpool PRIVATE fxdiv)
+
+ INSTALL(TARGETS pthreadpool
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
diff --git a/dev-libs/pthreadpool/metadata.xml b/dev-libs/pthreadpool/metadata.xml
new file mode 100644
index 000000000000..15ba30ebfb01
--- /dev/null
+++ b/dev-libs/pthreadpool/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>tupone@gentoo.org</email>
+ <name>Tupone Alfredo</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">Maratyszcza/pthreadpool</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-libs/pthreadpool/pthreadpool-2022.05.09.ebuild b/dev-libs/pthreadpool/pthreadpool-2022.05.09.ebuild
new file mode 100644
index 000000000000..b2331e976f63
--- /dev/null
+++ b/dev-libs/pthreadpool/pthreadpool-2022.05.09.ebuild
@@ -0,0 +1,35 @@
+# Copyright 2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit cmake
+
+CommitId=1787867f6183f056420e532eec640cba25efafea
+DESCRIPTION="Portable and efficient thread pool implementation"
+HOMEPAGE="https://github.com/Maratyszcza/pthreadpool"
+SRC_URI="https://github.com/Maratyszcza/${PN}/archive/1787867.tar.gz
+ -> ${P}.tar.gz"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+
+DEPEND="dev-libs/FXdiv"
+RDEPEND="${DEPEND}"
+BDEPEND="test? ( dev-cpp/gtest )"
+RESTRICT="!test? ( test )"
+
+S="${WORKDIR}"/${PN}-${CommitId}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DPTHREADPOOL_BUILD_BENCHMARKS=OFF
+ -DPTHREADPOOL_BUILD_TESTS=$(usex test ON OFF)
+ )
+ cmake_src_configure
+}