* [gentoo-commits] repo/proj/guru:dev commit in: sci-mathematics/clasp/files/, sci-mathematics/clasp/
@ 2022-04-28 5:57 Alessandro Barbieri
0 siblings, 0 replies; only message in thread
From: Alessandro Barbieri @ 2022-04-28 5:57 UTC (permalink / raw
To: gentoo-commits
commit: 16d8232dda328e7c0de4bf6ddc62d22e90d7018b
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed Apr 27 21:33:21 2022 +0000
Commit: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Thu Apr 28 05:57:30 2022 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=16d8232d
sci-mathematics/clasp: new package, add 3.3.7
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>
sci-mathematics/clasp/Manifest | 1 +
sci-mathematics/clasp/clasp-3.3.7.ebuild | 42 ++++++++++++++++++++++
.../clasp/files/clasp-3.3.7-find-Potassco.patch | 11 ++++++
.../clasp/files/clasp-3.3.7-libclasp_app.patch | 28 +++++++++++++++
sci-mathematics/clasp/metadata.xml | 15 ++++++++
5 files changed, 97 insertions(+)
diff --git a/sci-mathematics/clasp/Manifest b/sci-mathematics/clasp/Manifest
new file mode 100644
index 000000000..0aae4bcce
--- /dev/null
+++ b/sci-mathematics/clasp/Manifest
@@ -0,0 +1 @@
+DIST clasp-3.3.7.tar.gz 628370 BLAKE2B 48519646055ceb7f122d2efc8745f5bc7a444d6b90e0506edde139cccb8efb9d81391d8c8bc6fab654b1c652c986676e34f9e66797fb13d12b9eb8a82da847a4 SHA512 1615224838eb31b90ea9b9daaf192a059833db7dec90567c063c73cc33d7cf2ba7de49960c090c0522794b29fb2ca85c091f23e8a8402f7ff0ca99d6973e4fc7
diff --git a/sci-mathematics/clasp/clasp-3.3.7.ebuild b/sci-mathematics/clasp/clasp-3.3.7.ebuild
new file mode 100644
index 000000000..5de0f038b
--- /dev/null
+++ b/sci-mathematics/clasp/clasp-3.3.7.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="A conflict-driven nogood learning answer set solver"
+HOMEPAGE="
+ https://github.com/potassco/clasp
+ http://www.cs.uni-potsdam.de/clasp/
+"
+SRC_URI="https://github.com/potassco/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="examples test +threads +tools"
+
+RDEPEND="sci-mathematics/libpotassco:="
+DEPEND="${RDEPEND}"
+
+RESTRICT="!test? ( test )"
+PATCHES=(
+ "${FILESDIR}/${P}-find-Potassco.patch"
+ "${FILESDIR}/${P}-libclasp_app.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -DCLASP_BUILD_APP=$(usex tools)
+ -DCLASP_BUILD_EXAMPLES=$(usex examples)
+ -DCLASP_BUILD_TESTS=$(usex test)
+ -DCLASP_BUILD_WITH_THREADS=$(usex threads)
+
+ -DCLASP_BUILD_STATIC=OFF
+ -DCLASP_INSTALL_LIB=ON
+ -DCLASP_INSTALL_VERSIONED=OFF
+ -DCLASP_USE_LOCAL_LIB_POTASSCO=OFF
+ )
+ cmake_src_configure
+}
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
new file mode 100644
index 000000000..1a59a199c
--- /dev/null
+++ b/sci-mathematics/clasp/files/clasp-3.3.7-find-Potassco.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -98,7 +98,7 @@
+
+ # Check for or build external dependency
+ if (NOT CLASP_USE_LOCAL_LIB_POTASSCO)
+- find_package(potassco 1.0 REQUIRED CONFIG)
++ find_package(Potassco 1.0 REQUIRED CONFIG)
+ else()
+ if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libpotassco/CMakeLists.txt)
+ message(STATUS "Potassco is not installed - fetching submodule")
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
new file mode 100644
index 000000000..f8138010b
--- /dev/null
+++ b/sci-mathematics/clasp/files/clasp-3.3.7-libclasp_app.patch
@@ -0,0 +1,28 @@
+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
+--- /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
++++ clasp-3.3.7/app/CMakeLists.txt 2022-04-28 07:03:05.488454553 +0200
+@@ -1,8 +1,8 @@
+-set(files
+- clasp_app.cpp
+- clasp_app.h
+- main.cpp)
+-add_executable(clasp ${files})
++add_library(clasp_app SHARED clasp_app.cpp)
++set(clasp_app_header clasp_app.h)
++add_executable(clasp main.cpp)
++target_include_directories(clasp_app PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
++target_include_directories(clasp PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
+ set_target_properties(clasp PROPERTIES FOLDER exe)
+ if (NOT CMAKE_INSTALL_BINDIR)
+ message(STATUS "BINDIR not set - using bin")
+@@ -19,6 +19,9 @@
+ endif()
+ target_link_libraries(clasp "-static")
+ endif()
+-target_link_libraries(clasp libclasp)
++target_link_libraries(clasp_app libclasp)
++target_link_libraries(clasp clasp_app)
+
+ install(TARGETS clasp EXPORT clasp DESTINATION ${CMAKE_INSTALL_BINDIR})
++install(TARGETS clasp_app EXPORT clasp_app DESTINATION ${CMAKE_INSTALL_LIBDIR})
++install(FILES ${clasp_app_header} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/clasp/app)
diff --git a/sci-mathematics/clasp/metadata.xml b/sci-mathematics/clasp/metadata.xml
new file mode 100644
index 000000000..2e071045e
--- /dev/null
+++ b/sci-mathematics/clasp/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>lssndrbarbieri@gmail.com</email>
+ <name>Alessandro Barbieri</name>
+ </maintainer>
+ <use>
+ <flag name="tools">whether or not to build the clasp application</flag>
+ </use>
+ <upstream>
+ <bugs-to>https://github.com/potassco/clasp/issues</bugs-to>
+ <remote-id type="github">potassco/clasp</remote-id>
+ </upstream>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-28 5:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-28 5:57 [gentoo-commits] repo/proj/guru:dev commit in: sci-mathematics/clasp/files/, sci-mathematics/clasp/ Alessandro Barbieri
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox