1 |
commit: d8c4c8e754d02129e8a850690fd95f0ee41d4e5b |
2 |
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 23 07:33:24 2020 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 25 03:05:24 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8c4c8e7 |
7 |
|
8 |
dev-cpp/cpp-taskflow: also install cmake project configuration |
9 |
|
10 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
11 |
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org> |
12 |
|
13 |
...w-2.4.0.ebuild => cpp-taskflow-2.4.0-r1.ebuild} | 10 ++- |
14 |
...pp-taskflow-2.4.0-do_not_compile_examples.patch | 82 ++++++++++++++++++++++ |
15 |
.../cpp-taskflow-2.4.0-fix_installation_path.patch | 22 ++++++ |
16 |
3 files changed, 112 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/dev-cpp/cpp-taskflow/cpp-taskflow-2.4.0.ebuild b/dev-cpp/cpp-taskflow/cpp-taskflow-2.4.0-r1.ebuild |
19 |
similarity index 73% |
20 |
rename from dev-cpp/cpp-taskflow/cpp-taskflow-2.4.0.ebuild |
21 |
rename to dev-cpp/cpp-taskflow/cpp-taskflow-2.4.0-r1.ebuild |
22 |
index a41d2610143..b3df053c1da 100644 |
23 |
--- a/dev-cpp/cpp-taskflow/cpp-taskflow-2.4.0.ebuild |
24 |
+++ b/dev-cpp/cpp-taskflow/cpp-taskflow-2.4.0-r1.ebuild |
25 |
@@ -3,6 +3,8 @@ |
26 |
|
27 |
EAPI=7 |
28 |
|
29 |
+inherit cmake-utils |
30 |
+ |
31 |
DESCRIPTION="Modern C++ Parallel Task Programming" |
32 |
HOMEPAGE="https://cpp-taskflow.github.io" |
33 |
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
34 |
@@ -15,11 +17,15 @@ IUSE="doc" |
35 |
RDEPEND="" |
36 |
DEPEND="" |
37 |
|
38 |
+PATCHES=( |
39 |
+ "${FILESDIR}"/${P}-do_not_compile_examples.patch |
40 |
+ "${FILESDIR}"/${P}-fix_installation_path.patch |
41 |
+) |
42 |
+ |
43 |
HTML_DOCS=( docs/. ) |
44 |
|
45 |
src_install() { |
46 |
- insinto /usr/include |
47 |
- doins -r taskflow |
48 |
+ cmake-utils_src_install |
49 |
|
50 |
if $(use doc); then |
51 |
einstalldocs |
52 |
|
53 |
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 |
54 |
new file mode 100644 |
55 |
index 00000000000..99f4658adfe |
56 |
--- /dev/null |
57 |
+++ b/dev-cpp/cpp-taskflow/files/cpp-taskflow-2.4.0-do_not_compile_examples.patch |
58 |
@@ -0,0 +1,82 @@ |
59 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
60 |
+index 1bf8ed3..190dabe 100644 |
61 |
+--- a/CMakeLists.txt |
62 |
++++ b/CMakeLists.txt |
63 |
+@@ -223,76 +223,10 @@ target_include_directories(${PROJECT_NAME} INTERFACE |
64 |
+ $<INSTALL_INTERFACE:include/> |
65 |
+ ) |
66 |
+ |
67 |
+-# ----------------------------------------------------------------------------- |
68 |
+-# Example program |
69 |
+-# ----------------------------------------------------------------------------- |
70 |
+- |
71 |
+-message(STATUS "Building examples ...") |
72 |
+-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${TF_EXAMPLE_DIR}) |
73 |
+- |
74 |
+-add_executable(simple ${TF_EXAMPLE_DIR}/simple.cpp) |
75 |
+-target_link_libraries( |
76 |
+- simple ${PROJECT_NAME} Threads::Threads tf::default_settings |
77 |
+-) |
78 |
+- |
79 |
+-add_executable(observer ${TF_EXAMPLE_DIR}/observer.cpp) |
80 |
+-target_link_libraries( |
81 |
+- observer ${PROJECT_NAME} Threads::Threads tf::default_settings |
82 |
+-) |
83 |
+- |
84 |
+-add_executable(subflow ${TF_EXAMPLE_DIR}/subflow.cpp) |
85 |
+-target_link_libraries( |
86 |
+- subflow ${PROJECT_NAME} Threads::Threads tf::default_settings |
87 |
+-) |
88 |
+- |
89 |
+-add_executable(condition ${TF_EXAMPLE_DIR}/condition.cpp) |
90 |
+-target_link_libraries( |
91 |
+- condition ${PROJECT_NAME} Threads::Threads tf::default_settings |
92 |
+-) |
93 |
+- |
94 |
+-add_executable(visualization ${TF_EXAMPLE_DIR}/visualization.cpp) |
95 |
+-target_link_libraries( |
96 |
+- visualization ${PROJECT_NAME} Threads::Threads tf::default_settings |
97 |
+-) |
98 |
+- |
99 |
+-add_executable(reduce ${TF_EXAMPLE_DIR}/reduce.cpp) |
100 |
+-target_link_libraries( |
101 |
+- reduce ${PROJECT_NAME} Threads::Threads tf::default_settings |
102 |
+-) |
103 |
+- |
104 |
+-add_executable(parallel_for ${TF_EXAMPLE_DIR}/parallel_for.cpp) |
105 |
+-target_link_libraries( |
106 |
+- parallel_for ${PROJECT_NAME} Threads::Threads tf::default_settings |
107 |
+-) |
108 |
+- |
109 |
+-add_executable(run ${TF_EXAMPLE_DIR}/run.cpp) |
110 |
+-target_link_libraries( |
111 |
+- run ${PROJECT_NAME} Threads::Threads tf::default_settings |
112 |
+-) |
113 |
+- |
114 |
+-add_executable(composition ${TF_EXAMPLE_DIR}/composition.cpp) |
115 |
+-target_link_libraries( |
116 |
+- composition ${PROJECT_NAME} Threads::Threads tf::default_settings |
117 |
+-) |
118 |
+- |
119 |
+-#### CUDA examples |
120 |
+-if(${TF_ENABLE_CUDA}) |
121 |
+-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${TF_EXAMPLE_DIR}/cuda) |
122 |
+- |
123 |
+-add_executable(saxpy ${TF_EXAMPLE_DIR}/cuda/saxpy.cu) |
124 |
+-target_link_libraries( |
125 |
+- saxpy ${PROJECT_NAME} Threads::Threads tf::default_settings |
126 |
+-) |
127 |
+- |
128 |
+-add_executable(device_property ${TF_EXAMPLE_DIR}/cuda/device_property.cu) |
129 |
+-target_link_libraries( |
130 |
+- device_property ${PROJECT_NAME} Threads::Threads tf::default_settings |
131 |
+-) |
132 |
+-endif(${TF_ENABLE_CUDA}) |
133 |
+- |
134 |
+ # ----------------------------------------------------------------------------- |
135 |
+ # Unittest |
136 |
+ # ----------------------------------------------------------------------------- |
137 |
++ |
138 |
+ enable_testing() |
139 |
+ message(STATUS "Building unit tests ...") |
140 |
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${TF_UTEST_DIR}) |
141 |
|
142 |
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 |
143 |
new file mode 100644 |
144 |
index 00000000000..f68e572f5ab |
145 |
--- /dev/null |
146 |
+++ b/dev-cpp/cpp-taskflow/files/cpp-taskflow-2.4.0-fix_installation_path.patch |
147 |
@@ -0,0 +1,22 @@ |
148 |
+diff --git a/CMakeLists.txt b/CMakeLists.txt |
149 |
+index 190dabe..6d613d6 100644 |
150 |
+--- a/CMakeLists.txt |
151 |
++++ b/CMakeLists.txt |
152 |
+@@ -6,7 +6,7 @@ MESSAGE(STATUS "CMAKE_ROOT: " ${CMAKE_ROOT}) |
153 |
+ #_cmake_modify_IGNORE set(CMAKE_VERBOSE_MAKEFILE ON) |
154 |
+ |
155 |
+ # Project name |
156 |
+-project(Cpp-Taskflow VERSION 2.3.1 LANGUAGES CXX) |
157 |
++project(Cpp-Taskflow VERSION 2.4.0 LANGUAGES CXX) |
158 |
+ |
159 |
+ # build options |
160 |
+ option(TF_ENABLE_CUDA "Enables build of cuda code" OFF) |
161 |
+@@ -748,7 +748,7 @@ write_basic_package_version_file( |
162 |
+ install( |
163 |
+ FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake |
164 |
+ ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake |
165 |
+- DESTINATION ${TF_LIB_INSTALL_DIR}/cmake |
166 |
++ DESTINATION ${TF_LIB_INSTALL_DIR}/cmake/${PROJECT_NAME} |
167 |
+ ) |
168 |
+ |
169 |
+ |