From d8c4c8e754d02129e8a850690fd95f0ee41d4e5b Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sat, 23 May 2020 02:33:24 -0500 Subject: dev-cpp/cpp-taskflow: also install cmake project configuration Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Matthias Maier --- dev-cpp/cpp-taskflow/cpp-taskflow-2.4.0-r1.ebuild | 33 +++++++++ dev-cpp/cpp-taskflow/cpp-taskflow-2.4.0.ebuild | 27 ------- ...pp-taskflow-2.4.0-do_not_compile_examples.patch | 82 ++++++++++++++++++++++ .../cpp-taskflow-2.4.0-fix_installation_path.patch | 22 ++++++ 4 files changed, 137 insertions(+), 27 deletions(-) create mode 100644 dev-cpp/cpp-taskflow/cpp-taskflow-2.4.0-r1.ebuild delete mode 100644 dev-cpp/cpp-taskflow/cpp-taskflow-2.4.0.ebuild create mode 100644 dev-cpp/cpp-taskflow/files/cpp-taskflow-2.4.0-do_not_compile_examples.patch create mode 100644 dev-cpp/cpp-taskflow/files/cpp-taskflow-2.4.0-fix_installation_path.patch (limited to 'dev-cpp/cpp-taskflow') diff --git a/dev-cpp/cpp-taskflow/cpp-taskflow-2.4.0-r1.ebuild b/dev-cpp/cpp-taskflow/cpp-taskflow-2.4.0-r1.ebuild new file mode 100644 index 000000000000..b3df053c1da1 --- /dev/null +++ b/dev-cpp/cpp-taskflow/cpp-taskflow-2.4.0-r1.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit cmake-utils + +DESCRIPTION="Modern C++ Parallel Task Programming" +HOMEPAGE="https://cpp-taskflow.github.io" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc" + +RDEPEND="" +DEPEND="" + +PATCHES=( + "${FILESDIR}"/${P}-do_not_compile_examples.patch + "${FILESDIR}"/${P}-fix_installation_path.patch +) + +HTML_DOCS=( docs/. ) + +src_install() { + cmake-utils_src_install + + if $(use doc); then + einstalldocs + fi +} diff --git a/dev-cpp/cpp-taskflow/cpp-taskflow-2.4.0.ebuild b/dev-cpp/cpp-taskflow/cpp-taskflow-2.4.0.ebuild deleted file mode 100644 index a41d26101436..000000000000 --- a/dev-cpp/cpp-taskflow/cpp-taskflow-2.4.0.ebuild +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="Modern C++ Parallel Task Programming" -HOMEPAGE="https://cpp-taskflow.github.io" -SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="doc" - -RDEPEND="" -DEPEND="" - -HTML_DOCS=( docs/. ) - -src_install() { - insinto /usr/include - doins -r taskflow - - if $(use doc); then - einstalldocs - fi -} diff --git a/dev-cpp/cpp-taskflow/files/cpp-taskflow-2.4.0-do_not_compile_examples.patch b/dev-cpp/cpp-taskflow/files/cpp-taskflow-2.4.0-do_not_compile_examples.patch new file mode 100644 index 000000000000..99f4658adfe4 --- /dev/null +++ b/dev-cpp/cpp-taskflow/files/cpp-taskflow-2.4.0-do_not_compile_examples.patch @@ -0,0 +1,82 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1bf8ed3..190dabe 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -223,76 +223,10 @@ target_include_directories(${PROJECT_NAME} INTERFACE + $ + ) + +-# ----------------------------------------------------------------------------- +-# Example program +-# ----------------------------------------------------------------------------- +- +-message(STATUS "Building examples ...") +-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${TF_EXAMPLE_DIR}) +- +-add_executable(simple ${TF_EXAMPLE_DIR}/simple.cpp) +-target_link_libraries( +- simple ${PROJECT_NAME} Threads::Threads tf::default_settings +-) +- +-add_executable(observer ${TF_EXAMPLE_DIR}/observer.cpp) +-target_link_libraries( +- observer ${PROJECT_NAME} Threads::Threads tf::default_settings +-) +- +-add_executable(subflow ${TF_EXAMPLE_DIR}/subflow.cpp) +-target_link_libraries( +- subflow ${PROJECT_NAME} Threads::Threads tf::default_settings +-) +- +-add_executable(condition ${TF_EXAMPLE_DIR}/condition.cpp) +-target_link_libraries( +- condition ${PROJECT_NAME} Threads::Threads tf::default_settings +-) +- +-add_executable(visualization ${TF_EXAMPLE_DIR}/visualization.cpp) +-target_link_libraries( +- visualization ${PROJECT_NAME} Threads::Threads tf::default_settings +-) +- +-add_executable(reduce ${TF_EXAMPLE_DIR}/reduce.cpp) +-target_link_libraries( +- reduce ${PROJECT_NAME} Threads::Threads tf::default_settings +-) +- +-add_executable(parallel_for ${TF_EXAMPLE_DIR}/parallel_for.cpp) +-target_link_libraries( +- parallel_for ${PROJECT_NAME} Threads::Threads tf::default_settings +-) +- +-add_executable(run ${TF_EXAMPLE_DIR}/run.cpp) +-target_link_libraries( +- run ${PROJECT_NAME} Threads::Threads tf::default_settings +-) +- +-add_executable(composition ${TF_EXAMPLE_DIR}/composition.cpp) +-target_link_libraries( +- composition ${PROJECT_NAME} Threads::Threads tf::default_settings +-) +- +-#### CUDA examples +-if(${TF_ENABLE_CUDA}) +-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${TF_EXAMPLE_DIR}/cuda) +- +-add_executable(saxpy ${TF_EXAMPLE_DIR}/cuda/saxpy.cu) +-target_link_libraries( +- saxpy ${PROJECT_NAME} Threads::Threads tf::default_settings +-) +- +-add_executable(device_property ${TF_EXAMPLE_DIR}/cuda/device_property.cu) +-target_link_libraries( +- device_property ${PROJECT_NAME} Threads::Threads tf::default_settings +-) +-endif(${TF_ENABLE_CUDA}) +- + # ----------------------------------------------------------------------------- + # Unittest + # ----------------------------------------------------------------------------- ++ + enable_testing() + message(STATUS "Building unit tests ...") + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${TF_UTEST_DIR}) diff --git a/dev-cpp/cpp-taskflow/files/cpp-taskflow-2.4.0-fix_installation_path.patch b/dev-cpp/cpp-taskflow/files/cpp-taskflow-2.4.0-fix_installation_path.patch new file mode 100644 index 000000000000..f68e572f5ab2 --- /dev/null +++ b/dev-cpp/cpp-taskflow/files/cpp-taskflow-2.4.0-fix_installation_path.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 190dabe..6d613d6 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,7 +6,7 @@ MESSAGE(STATUS "CMAKE_ROOT: " ${CMAKE_ROOT}) + #_cmake_modify_IGNORE set(CMAKE_VERBOSE_MAKEFILE ON) + + # Project name +-project(Cpp-Taskflow VERSION 2.3.1 LANGUAGES CXX) ++project(Cpp-Taskflow VERSION 2.4.0 LANGUAGES CXX) + + # build options + option(TF_ENABLE_CUDA "Enables build of cuda code" OFF) +@@ -748,7 +748,7 @@ write_basic_package_version_file( + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake +- DESTINATION ${TF_LIB_INSTALL_DIR}/cmake ++ DESTINATION ${TF_LIB_INSTALL_DIR}/cmake/${PROJECT_NAME} + ) + + -- cgit v1.2.3