1 |
commit: 16d8232dda328e7c0de4bf6ddc62d22e90d7018b |
2 |
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Apr 27 21:33:21 2022 +0000 |
4 |
Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com> |
5 |
CommitDate: Thu Apr 28 05:57:30 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=16d8232d |
7 |
|
8 |
sci-mathematics/clasp: new package, add 3.3.7 |
9 |
|
10 |
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com> |
11 |
|
12 |
sci-mathematics/clasp/Manifest | 1 + |
13 |
sci-mathematics/clasp/clasp-3.3.7.ebuild | 42 ++++++++++++++++++++++ |
14 |
.../clasp/files/clasp-3.3.7-find-Potassco.patch | 11 ++++++ |
15 |
.../clasp/files/clasp-3.3.7-libclasp_app.patch | 28 +++++++++++++++ |
16 |
sci-mathematics/clasp/metadata.xml | 15 ++++++++ |
17 |
5 files changed, 97 insertions(+) |
18 |
|
19 |
diff --git a/sci-mathematics/clasp/Manifest b/sci-mathematics/clasp/Manifest |
20 |
new file mode 100644 |
21 |
index 000000000..0aae4bcce |
22 |
--- /dev/null |
23 |
+++ b/sci-mathematics/clasp/Manifest |
24 |
@@ -0,0 +1 @@ |
25 |
+DIST clasp-3.3.7.tar.gz 628370 BLAKE2B 48519646055ceb7f122d2efc8745f5bc7a444d6b90e0506edde139cccb8efb9d81391d8c8bc6fab654b1c652c986676e34f9e66797fb13d12b9eb8a82da847a4 SHA512 1615224838eb31b90ea9b9daaf192a059833db7dec90567c063c73cc33d7cf2ba7de49960c090c0522794b29fb2ca85c091f23e8a8402f7ff0ca99d6973e4fc7 |
26 |
|
27 |
diff --git a/sci-mathematics/clasp/clasp-3.3.7.ebuild b/sci-mathematics/clasp/clasp-3.3.7.ebuild |
28 |
new file mode 100644 |
29 |
index 000000000..5de0f038b |
30 |
--- /dev/null |
31 |
+++ b/sci-mathematics/clasp/clasp-3.3.7.ebuild |
32 |
@@ -0,0 +1,42 @@ |
33 |
+# Copyright 1999-2022 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=8 |
37 |
+ |
38 |
+inherit cmake |
39 |
+ |
40 |
+DESCRIPTION="A conflict-driven nogood learning answer set solver" |
41 |
+HOMEPAGE=" |
42 |
+ https://github.com/potassco/clasp |
43 |
+ http://www.cs.uni-potsdam.de/clasp/ |
44 |
+" |
45 |
+SRC_URI="https://github.com/potassco/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" |
46 |
+ |
47 |
+LICENSE="MIT" |
48 |
+SLOT="0" |
49 |
+KEYWORDS="~amd64" |
50 |
+IUSE="examples test +threads +tools" |
51 |
+ |
52 |
+RDEPEND="sci-mathematics/libpotassco:=" |
53 |
+DEPEND="${RDEPEND}" |
54 |
+ |
55 |
+RESTRICT="!test? ( test )" |
56 |
+PATCHES=( |
57 |
+ "${FILESDIR}/${P}-find-Potassco.patch" |
58 |
+ "${FILESDIR}/${P}-libclasp_app.patch" |
59 |
+) |
60 |
+ |
61 |
+src_configure() { |
62 |
+ local mycmakeargs=( |
63 |
+ -DCLASP_BUILD_APP=$(usex tools) |
64 |
+ -DCLASP_BUILD_EXAMPLES=$(usex examples) |
65 |
+ -DCLASP_BUILD_TESTS=$(usex test) |
66 |
+ -DCLASP_BUILD_WITH_THREADS=$(usex threads) |
67 |
+ |
68 |
+ -DCLASP_BUILD_STATIC=OFF |
69 |
+ -DCLASP_INSTALL_LIB=ON |
70 |
+ -DCLASP_INSTALL_VERSIONED=OFF |
71 |
+ -DCLASP_USE_LOCAL_LIB_POTASSCO=OFF |
72 |
+ ) |
73 |
+ cmake_src_configure |
74 |
+} |
75 |
|
76 |
diff --git a/sci-mathematics/clasp/files/clasp-3.3.7-find-Potassco.patch b/sci-mathematics/clasp/files/clasp-3.3.7-find-Potassco.patch |
77 |
new file mode 100644 |
78 |
index 000000000..1a59a199c |
79 |
--- /dev/null |
80 |
+++ b/sci-mathematics/clasp/files/clasp-3.3.7-find-Potassco.patch |
81 |
@@ -0,0 +1,11 @@ |
82 |
+--- a/CMakeLists.txt |
83 |
++++ b/CMakeLists.txt |
84 |
+@@ -98,7 +98,7 @@ |
85 |
+ |
86 |
+ # Check for or build external dependency |
87 |
+ if (NOT CLASP_USE_LOCAL_LIB_POTASSCO) |
88 |
+- find_package(potassco 1.0 REQUIRED CONFIG) |
89 |
++ find_package(Potassco 1.0 REQUIRED CONFIG) |
90 |
+ else() |
91 |
+ if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libpotassco/CMakeLists.txt) |
92 |
+ message(STATUS "Potassco is not installed - fetching submodule") |
93 |
|
94 |
diff --git a/sci-mathematics/clasp/files/clasp-3.3.7-libclasp_app.patch b/sci-mathematics/clasp/files/clasp-3.3.7-libclasp_app.patch |
95 |
new file mode 100644 |
96 |
index 000000000..f8138010b |
97 |
--- /dev/null |
98 |
+++ b/sci-mathematics/clasp/files/clasp-3.3.7-libclasp_app.patch |
99 |
@@ -0,0 +1,28 @@ |
100 |
+diff '--color=auto' -ru /var/tmp/portage/sci-mathematics/clasp-3.3.7/work/clasp-3.3.7/app/CMakeLists.txt clasp-3.3.7/app/CMakeLists.txt |
101 |
+--- /var/tmp/portage/sci-mathematics/clasp-3.3.7/work/clasp-3.3.7/app/CMakeLists.txt 2022-04-28 06:43:26.295108990 +0200 |
102 |
++++ clasp-3.3.7/app/CMakeLists.txt 2022-04-28 07:03:05.488454553 +0200 |
103 |
+@@ -1,8 +1,8 @@ |
104 |
+-set(files |
105 |
+- clasp_app.cpp |
106 |
+- clasp_app.h |
107 |
+- main.cpp) |
108 |
+-add_executable(clasp ${files}) |
109 |
++add_library(clasp_app SHARED clasp_app.cpp) |
110 |
++set(clasp_app_header clasp_app.h) |
111 |
++add_executable(clasp main.cpp) |
112 |
++target_include_directories(clasp_app PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |
113 |
++target_include_directories(clasp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |
114 |
+ set_target_properties(clasp PROPERTIES FOLDER exe) |
115 |
+ if (NOT CMAKE_INSTALL_BINDIR) |
116 |
+ message(STATUS "BINDIR not set - using bin") |
117 |
+@@ -19,6 +19,9 @@ |
118 |
+ endif() |
119 |
+ target_link_libraries(clasp "-static") |
120 |
+ endif() |
121 |
+-target_link_libraries(clasp libclasp) |
122 |
++target_link_libraries(clasp_app libclasp) |
123 |
++target_link_libraries(clasp clasp_app) |
124 |
+ |
125 |
+ install(TARGETS clasp EXPORT clasp DESTINATION ${CMAKE_INSTALL_BINDIR}) |
126 |
++install(TARGETS clasp_app EXPORT clasp_app DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
127 |
++install(FILES ${clasp_app_header} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/clasp/app) |
128 |
|
129 |
diff --git a/sci-mathematics/clasp/metadata.xml b/sci-mathematics/clasp/metadata.xml |
130 |
new file mode 100644 |
131 |
index 000000000..2e071045e |
132 |
--- /dev/null |
133 |
+++ b/sci-mathematics/clasp/metadata.xml |
134 |
@@ -0,0 +1,15 @@ |
135 |
+<?xml version="1.0" encoding="UTF-8"?> |
136 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
137 |
+<pkgmetadata> |
138 |
+ <maintainer type="person"> |
139 |
+ <email>lssndrbarbieri@×××××.com</email> |
140 |
+ <name>Alessandro Barbieri</name> |
141 |
+ </maintainer> |
142 |
+ <use> |
143 |
+ <flag name="tools">whether or not to build the clasp application</flag> |
144 |
+ </use> |
145 |
+ <upstream> |
146 |
+ <bugs-to>https://github.com/potassco/clasp/issues</bugs-to> |
147 |
+ <remote-id type="github">potassco/clasp</remote-id> |
148 |
+ </upstream> |
149 |
+</pkgmetadata> |