mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-04-07 03:10:15 -04:00
dev-cpp/workflow: initial import
c++ parallel compute and async network engine Signed-off-by: Aisha Tammy <gentoo@aisha.cc>
This commit is contained in:
1
dev-cpp/workflow/Manifest
Normal file
1
dev-cpp/workflow/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST workflow-0.10.2.tar.gz 389218 BLAKE2B d02d9df7cb9fbcaa9280cc4ec5dfa16a2226fab15515ffa4beb45572e44024f405c5d3fa02aba994aecb8659c9e623bcf45c5cd6a44d9b38f9234ab65fc8764c SHA512 19e35a7179f4323e401bed21a203e465b35cb45dee9b78e4ecaa1ece2569758e06e2d2550fdba99ca268943254f2aeed6c3d86d32a02a32975b6dc04fc55c57a
|
||||
82
dev-cpp/workflow/files/workflow-0.10.2-enable-tests.patch
Normal file
82
dev-cpp/workflow/files/workflow-0.10.2-enable-tests.patch
Normal file
@@ -0,0 +1,82 @@
|
||||
--- a/test/CMakeLists.txt
|
||||
+++ b/test/CMakeLists.txt
|
||||
@@ -1,25 +1,10 @@
|
||||
-cmake_minimum_required(VERSION 3.6)
|
||||
+include(CTest)
|
||||
|
||||
-set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "build type")
|
||||
-
|
||||
-project(workflow_test
|
||||
- LANGUAGES C CXX
|
||||
-)
|
||||
-
|
||||
-find_library(LIBRT rt)
|
||||
+find_package(GTest REQUIRED)
|
||||
find_package(OpenSSL REQUIRED)
|
||||
-find_package(workflow REQUIRED CONFIG HINTS ..)
|
||||
-include_directories(${OPENSSL_INCLUDE_DIR} ${WORKFLOW_INCLUDE_DIR})
|
||||
-link_directories(${WORKFLOW_LIB_DIR})
|
||||
+include_directories(${GTEST_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR} ${INC_DIR})
|
||||
+link_directories(${GTEST_LIB_DIR} ${OPENSSL_LIB_DIR} ${LIB_DIR})
|
||||
|
||||
-find_program(CMAKE_MEMORYCHECK_COMMAND valgrind)
|
||||
-set(memcheck_command ${CMAKE_MEMORYCHECK_COMMAND} ${CMAKE_MEMORYCHECK_COMMAND_OPTIONS} --error-exitcode=1 --leak-check=full)
|
||||
-
|
||||
-add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
|
||||
-
|
||||
-enable_testing()
|
||||
-find_package(GTest REQUIRED)
|
||||
-
|
||||
if (WIN32)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP /wd4200")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /wd4200 /std:c++14")
|
||||
@@ -32,8 +17,6 @@ set(TEST_LIST
|
||||
task_unittest
|
||||
algo_unittest
|
||||
http_unittest
|
||||
- redis_unittest
|
||||
- mysql_unittest
|
||||
facilities_unittest
|
||||
graph_unittest
|
||||
memory_unittest
|
||||
@@ -46,17 +29,11 @@ set(TEST_LIST
|
||||
if (APPLE)
|
||||
set(WORKFLOW_LIB workflow pthread OpenSSL::SSL OpenSSL::Crypto)
|
||||
else ()
|
||||
- set(WORKFLOW_LIB workflow pthread OpenSSL::SSL OpenSSL::Crypto ${LIBRT})
|
||||
+ set(WORKFLOW_LIB ${PROJECT_NAME}-shared pthread OpenSSL::SSL OpenSSL::Crypto)
|
||||
endif ()
|
||||
|
||||
foreach(src ${TEST_LIST})
|
||||
- add_executable(${src} EXCLUDE_FROM_ALL ${src}.cc)
|
||||
+ add_executable(${src} ${src}.cc)
|
||||
target_link_libraries(${src} ${WORKFLOW_LIB} GTest::GTest GTest::Main)
|
||||
- add_test(${src} ${src})
|
||||
- add_dependencies(check ${src})
|
||||
+ add_test(NAME ${src} COMMAND ${src})
|
||||
endforeach()
|
||||
-
|
||||
-foreach(src ${TEST_LIST})
|
||||
- add_test(${src}-memory-check ${memcheck_command} ./${src})
|
||||
-endforeach()
|
||||
-
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -73,6 +73,9 @@ endif ()
|
||||
|
||||
add_subdirectory(src)
|
||||
|
||||
+enable_testing()
|
||||
+add_subdirectory(test)
|
||||
+
|
||||
####CONFIG
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
@@ -121,6 +124,6 @@ install(
|
||||
|
||||
install(
|
||||
FILES README.md
|
||||
- DESTINATION "${CMAKE_INSTALL_DOCDIR}-${PROJECT_VERSION}"
|
||||
+ DESTINATION "${CMAKE_INSTALL_DOCDIR}"
|
||||
COMPONENT devel
|
||||
)
|
||||
8
dev-cpp/workflow/metadata.xml
Normal file
8
dev-cpp/workflow/metadata.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>gentoo@aisha.cc</email>
|
||||
<name>Aisha Tammy</name>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
||||
42
dev-cpp/workflow/workflow-0.10.2.ebuild
Normal file
42
dev-cpp/workflow/workflow-0.10.2.ebuild
Normal file
@@ -0,0 +1,42 @@
|
||||
# Copyright 2021-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake
|
||||
|
||||
DESCRIPTION="C++ Parallel Computing and Asynchronous Networking Engine"
|
||||
HOMEPAGE="https://github.com/sogou/workflow"
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/sogou/workflow"
|
||||
else
|
||||
SRC_URI="https://github.com/sogou/workflow/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~amd64"
|
||||
fi
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
|
||||
RDEPENDS="
|
||||
dev-libs/openssl:0=
|
||||
"
|
||||
DEPENDS="${DEPENDS}
|
||||
dev-cpp/gtest
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/workflow-0.10.2-enable-tests.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
cmake_src_prepare
|
||||
mkdir docs/cn || die
|
||||
mv docs/*.md docs/cn || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
dodoc -r docs/.
|
||||
}
|
||||
42
dev-cpp/workflow/workflow-9999.ebuild
Normal file
42
dev-cpp/workflow/workflow-9999.ebuild
Normal file
@@ -0,0 +1,42 @@
|
||||
# Copyright 2021-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit cmake
|
||||
|
||||
DESCRIPTION="C++ Parallel Computing and Asynchronous Networking Engine"
|
||||
HOMEPAGE="https://github.com/sogou/workflow"
|
||||
|
||||
if [[ ${PV} == 9999 ]]; then
|
||||
inherit git-r3
|
||||
EGIT_REPO_URI="https://github.com/sogou/workflow"
|
||||
else
|
||||
SRC_URI="https://github.com/sogou/workflow/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
KEYWORDS="~amd64"
|
||||
fi
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
|
||||
RDEPENDS="
|
||||
dev-libs/openssl:0=
|
||||
"
|
||||
DEPENDS="${DEPENDS}
|
||||
dev-cpp/gtest
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/workflow-0.10.2-enable-tests.patch"
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
cmake_src_prepare
|
||||
mkdir docs/cn || die
|
||||
mv docs/*.md docs/cn || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
dodoc -r docs/.
|
||||
}
|
||||
Reference in New Issue
Block a user