[gentoo-commits] repo/proj/guru:dev commit in: sci-mathematics/clingo/files/, sci-mathematics/clingo/

2022-05-05 Thread Alessandro Barbieri
commit: 512fbbae898b3fedb9eb7fafe3a5fbe67049d5bc
Author: Alessandro Barbieri  gmail  com>
AuthorDate: Fri May  6 00:35:57 2022 +
Commit: Alessandro Barbieri  gmail  com>
CommitDate: Fri May  6 00:35:57 2022 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=512fbbae

sci-mathematics/clingo: add 5.5.2, drop 5.5.1-r1

Signed-off-by: Alessandro Barbieri  gmail.com>

 sci-mathematics/clingo/Manifest|  2 +-
 ...{clingo-5.5.1-r1.ebuild => clingo-5.5.2.ebuild} |  3 +-
 .../clingo/files/clingo-5.5.1-system-clasp.patch   | 46 --
 3 files changed, 3 insertions(+), 48 deletions(-)

diff --git a/sci-mathematics/clingo/Manifest b/sci-mathematics/clingo/Manifest
index f65222b9f..894add992 100644
--- a/sci-mathematics/clingo/Manifest
+++ b/sci-mathematics/clingo/Manifest
@@ -1 +1 @@
-DIST clingo-5.5.1.tar.gz 3031728 BLAKE2B 
5d938f5974184b4dff63a8b6ae746059c8a3682c2b7ca3dfbecc020462a656608de3845b83fc1c55fe74be33d7641d4d3bc961026679c7a6b264481bbad81c89
 SHA512 
b142a869d25a188d9ecf4c62940bc73328dacd249dbcdf611c0b6fd7a15b6bb15357cef3ce9b52b863c51f2a79efd65ae405957fc6074023b0c48807d27c0e03
+DIST clingo-5.5.2.tar.gz 3136393 BLAKE2B 
74f911a544d6b2756080ff813dee3d2c02517374854b7e7deafaf73fea236a79ce45a55f3270ec6fd41194c4cee1d76dfbad9617130dcf8109c7623edf8fe9ff
 SHA512 
ec72d33c6f328ee287dc2923fbfab270e05b2da964fa9f89e811e729e7ebaf6ee191decbe743184c42926412e1990f6b8d41adc142a2e2896e0176cda06aa1c9

diff --git a/sci-mathematics/clingo/clingo-5.5.1-r1.ebuild 
b/sci-mathematics/clingo/clingo-5.5.2.ebuild
similarity index 96%
rename from sci-mathematics/clingo/clingo-5.5.1-r1.ebuild
rename to sci-mathematics/clingo/clingo-5.5.2.ebuild
index 50983d7ec..b61a48318 100644
--- a/sci-mathematics/clingo/clingo-5.5.1-r1.ebuild
+++ b/sci-mathematics/clingo/clingo-5.5.2.ebuild
@@ -37,7 +37,7 @@ BDEPEND="
virtual/pkgconfig
 "
 
-PATCHES=( "${FILESDIR}/${P}-system-clasp.patch" )
+#PATCHES=( "${FILESDIR}/${P}-system-clasp.patch" )
 RESTRICT="!test? ( test )"
 REQUIRED_USE="
lua? ( ${LUA_REQUIRED_USE} )
@@ -72,6 +72,7 @@ src_configure() {
-DCLINGO_CMAKE_RANLIB="$(tc-getRANLIB)"
-DCLINGO_INSTALL_LIB=ON
-DCLINGO_USE_LIB=OFF
+   -DCLINGO_USE_LOCAL_CLASP=OFF
)
if use lua; then
mycmakeargs+=( 
"DCLINGO_LUA_VERSION:LIST=$(lua_get_version);EXACT" )

diff --git a/sci-mathematics/clingo/files/clingo-5.5.1-system-clasp.patch 
b/sci-mathematics/clingo/files/clingo-5.5.1-system-clasp.patch
deleted file mode 100644
index 0adad6116..0
--- a/sci-mathematics/clingo/files/clingo-5.5.1-system-clasp.patch
+++ /dev/null
@@ -1,46 +0,0 @@
 a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -232,8 +232,10 @@
- 
- enable_testing()
- 
-+find_package(Potassco REQUIRED)
-+find_package(Clasp REQUIRED)
-+
- # NOTE: assumes that submodule has been initialized
--set(CLASP_BUILD_APP ${CLINGO_BUILD_APPS} CACHE BOOL "")
- if (CLINGO_USE_LIB)
- set(clingo_library_targets)
- add_library(libclingo INTERFACE IMPORTED)
-@@ -241,11 +243,6 @@
- set_property(TARGET libclingo PROPERTY INTERFACE_LINK_LIBRARIES "clingo")
- else()
- set(clingo_library_targets libgringo libpotassco libclasp libreify)
--set(CLASP_USE_LOCAL_LIB_POTASSCO ON CACHE BOOL "" FORCE)
--if (NOT CLINGO_BUILD_SHARED AND CLINGO_INSTALL_LIB)
--set(CLASP_INSTALL_LIB ${CLINGO_INSTALL_LIB} CACHE BOOL "" FORCE)
--endif()
--add_subdirectory(clasp)
- add_subdirectory(libreify)
- add_subdirectory(libgringo)
- add_subdirectory(libclingo)
 a/libclingo/CMakeLists.txt
-+++ b/libclingo/CMakeLists.txt
-@@ -37,8 +37,6 @@
- ${source-group})
- # ]]]
- 
--list(APPEND header "${CLASP_SOURCE_DIR}/app/clasp_app.h")
--list(APPEND source "${CLASP_SOURCE_DIR}/app/clasp_app.cpp")
- 
- set(clingo_public_scope_ PUBLIC)
- set(clingo_private_scope_ PRIVATE)
-@@ -62,7 +60,7 @@
- "$"
- "$"
- ${clingo_private_scope_}
--"$")
-+"/usr/include/clasp/cli")
- target_compile_definitions(libclingo ${clingo_private_scope_} 
CLINGO_BUILD_LIBRARY)
- 
- if (NOT CLINGO_BUILD_SHARED)



[gentoo-commits] repo/proj/guru:dev commit in: sci-mathematics/clingo/files/, sci-mathematics/clingo/

2022-05-03 Thread Alessandro Barbieri
commit: b63bc684cc2101bb29c2343b1f60ccb6f21ea4de
Author: Alessandro Barbieri  gmail  com>
AuthorDate: Tue May  3 20:09:39 2022 +
Commit: Alessandro Barbieri  gmail  com>
CommitDate: Tue May  3 20:21:35 2022 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=b63bc684

sci-mathematics/clingo: fix for new clasp

Signed-off-by: Alessandro Barbieri  gmail.com>

 ...{clingo-5.5.1.ebuild => clingo-5.5.1-r1.ebuild} |  4 +--
 .../clingo/files/clingo-5.5.1-system-clasp.patch   | 38 --
 2 files changed, 16 insertions(+), 26 deletions(-)

diff --git a/sci-mathematics/clingo/clingo-5.5.1.ebuild 
b/sci-mathematics/clingo/clingo-5.5.1-r1.ebuild
similarity index 94%
rename from sci-mathematics/clingo/clingo-5.5.1.ebuild
rename to sci-mathematics/clingo/clingo-5.5.1-r1.ebuild
index b68917848..087adc44c 100644
--- a/sci-mathematics/clingo/clingo-5.5.1.ebuild
+++ b/sci-mathematics/clingo/clingo-5.5.1-r1.ebuild
@@ -22,7 +22,7 @@ KEYWORDS="~amd64"
 IUSE="examples lua python test +tools"
 
 RDEPEND="
-   sci-mathematics/clasp:=[tools]
+   >=sci-mathematics/clasp-3.3.8:=[tools]
sci-libs/libpotassco:=
lua? ( ${LUA_DEPS} )
python? ( ${PYTHON_DEPS} )
@@ -67,7 +67,7 @@ src_configure() {
-DCLINGO_USE_LIB=OFF
)
if use lua; then
-   mycmakeargs+=( 
"-DCLINGO_LUA_VERSION:LIST=$(lua_get_version);EXACT" )
+   mycmakeargs+=( 
"DCLINGO_LUA_VERSION:LIST=$(lua_get_version);EXACT" )
mycmakeargs+=( "-DLUACLINGO_INSTALL_DIR=$(lua_get_cmod_dir)" )
fi
if use python; then

diff --git a/sci-mathematics/clingo/files/clingo-5.5.1-system-clasp.patch 
b/sci-mathematics/clingo/files/clingo-5.5.1-system-clasp.patch
index 0eadf4fda..0adad6116 100644
--- a/sci-mathematics/clingo/files/clingo-5.5.1-system-clasp.patch
+++ b/sci-mathematics/clingo/files/clingo-5.5.1-system-clasp.patch
@@ -1,20 +1,20 @@
-diff '--color=auto' -ru 
/var/tmp/portage/sci-mathematics/clingo-5.5.1/work/clingo-5.5.1/CMakeLists.txt 
clingo-5.5.1/CMakeLists.txt
 
/var/tmp/portage/sci-mathematics/clingo-5.5.1/work/clingo-5.5.1/CMakeLists.txt  
   2022-04-28 06:09:26.673973864 +0200
-+++ clingo-5.5.1/CMakeLists.txt2022-04-28 06:27:47.090303346 +0200
-@@ -232,20 +232,15 @@
+--- a/CMakeLists.txt
 b/CMakeLists.txt
+@@ -232,8 +232,10 @@
  
  enable_testing()
  
--# NOTE: assumes that submodule has been initialized
++find_package(Potassco REQUIRED)
++find_package(Clasp REQUIRED)
++
+ # NOTE: assumes that submodule has been initialized
 -set(CLASP_BUILD_APP ${CLINGO_BUILD_APPS} CACHE BOOL "")
  if (CLINGO_USE_LIB)
  set(clingo_library_targets)
  add_library(libclingo INTERFACE IMPORTED)
- set_property(TARGET libclingo PROPERTY INTERFACE_INCLUDE_DIRECTORIES 
"${CLINGO_SOURCE_DIR}/libclingo")
+@@ -241,11 +243,6 @@
  set_property(TARGET libclingo PROPERTY INTERFACE_LINK_LIBRARIES "clingo")
  else()
-+find_package(Potassco REQUIRED)
-+find_package(Clasp REQUIRED)
  set(clingo_library_targets libgringo libpotassco libclasp libreify)
 -set(CLASP_USE_LOCAL_LIB_POTASSCO ON CACHE BOOL "" FORCE)
 -if (NOT CLINGO_BUILD_SHARED AND CLINGO_INSTALL_LIB)
@@ -24,33 +24,23 @@ diff '--color=auto' -ru 
/var/tmp/portage/sci-mathematics/clingo-5.5.1/work/cling
  add_subdirectory(libreify)
  add_subdirectory(libgringo)
  add_subdirectory(libclingo)
-diff '--color=auto' -ru 
/var/tmp/portage/sci-mathematics/clingo-5.5.1/work/clingo-5.5.1/libclingo/CMakeLists.txt
 clingo-5.5.1/libclingo/CMakeLists.txt
 
/var/tmp/portage/sci-mathematics/clingo-5.5.1/work/clingo-5.5.1/libclingo/CMakeLists.txt
   2022-04-28 06:09:26.590972375 +0200
-+++ clingo-5.5.1/libclingo/CMakeLists.txt  2022-04-28 07:12:59.047212489 
+0200
-@@ -37,9 +37,6 @@
+--- a/libclingo/CMakeLists.txt
 b/libclingo/CMakeLists.txt
+@@ -37,8 +37,6 @@
  ${source-group})
  # ]]]
  
 -list(APPEND header "${CLASP_SOURCE_DIR}/app/clasp_app.h")
 -list(APPEND source "${CLASP_SOURCE_DIR}/app/clasp_app.cpp")
--
+ 
  set(clingo_public_scope_ PUBLIC)
  set(clingo_private_scope_ PRIVATE)
- if (CLINGO_BUILD_SHARED)
-@@ -56,13 +53,14 @@
- 
- add_library(libclingo ${clingo_lib_type})
- target_sources(libclingo ${clingo_private_scope_} ${header} ${source})
--target_link_libraries(libclingo ${clingo_private_scope_} libgringo libclasp)
-+target_link_libraries(libclingo ${clingo_private_scope_} libgringo libclasp 
-lclasp_app)
- target_include_directories(libclingo
- ${clingo_public_scope_}
+@@ -62,7 +60,7 @@
  "$"
  "$"
  ${clingo_private_scope_}
 -"$")
-+"/usr/include/clasp/app"
-+)
++"/usr/include/clasp/cli")
  target_compile_definitions(libclingo ${clingo_private_scope_} 
CLINGO_BUILD_LIBRARY)
  
  if (NOT CLINGO_BUILD_SHARED)



[gentoo-commits] repo/proj/guru:dev commit in: sci-mathematics/clingo/files/, sci-mathematics/clingo/

2022-04-27 Thread Alessandro Barbieri
commit: 3820d604d8ff4840b528a9ec38406ffcdf87d1be
Author: Alessandro Barbieri  gmail  com>
AuthorDate: Thu Apr 28 05:37:18 2022 +
Commit: Alessandro Barbieri  gmail  com>
CommitDate: Thu Apr 28 05:57:31 2022 +
URL:https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3820d604

sci-mathematics/clingo: new package, add 5.5.1

Signed-off-by: Alessandro Barbieri  gmail.com>

 sci-mathematics/clingo/Manifest|  1 +
 sci-mathematics/clingo/clingo-5.5.1.ebuild | 79 ++
 .../clingo/files/clingo-5.5.1-system-clasp.patch   | 56 +++
 sci-mathematics/clingo/metadata.xml| 16 +
 4 files changed, 152 insertions(+)

diff --git a/sci-mathematics/clingo/Manifest b/sci-mathematics/clingo/Manifest
new file mode 100644
index 0..f65222b9f
--- /dev/null
+++ b/sci-mathematics/clingo/Manifest
@@ -0,0 +1 @@
+DIST clingo-5.5.1.tar.gz 3031728 BLAKE2B 
5d938f5974184b4dff63a8b6ae746059c8a3682c2b7ca3dfbecc020462a656608de3845b83fc1c55fe74be33d7641d4d3bc961026679c7a6b264481bbad81c89
 SHA512 
b142a869d25a188d9ecf4c62940bc73328dacd249dbcdf611c0b6fd7a15b6bb15357cef3ce9b52b863c51f2a79efd65ae405957fc6074023b0c48807d27c0e03

diff --git a/sci-mathematics/clingo/clingo-5.5.1.ebuild 
b/sci-mathematics/clingo/clingo-5.5.1.ebuild
new file mode 100644
index 0..f49bad27d
--- /dev/null
+++ b/sci-mathematics/clingo/clingo-5.5.1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2022 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{3..4} )
+PYTHON_COMPAT=( python3_{8..10} ) # IDK how to pass pypy3
+
+inherit cmake lua-single python-single-r1 toolchain-funcs
+
+DESCRIPTION="Integrated grounder and solver for answer set logic programs"
+HOMEPAGE="
+   https://github.com/potassco/clingo
+   https://potassco.org/clingo
+"
+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 lua python test +tools"
+
+RDEPEND="
+   sci-mathematics/clasp:=[tools]
+   sci-mathematics/libpotassco:=
+   lua? ( ${LUA_DEPS} )
+   python? ( ${PYTHON_DEPS} )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+   >=dev-util/re2c-0.13.5
+   >=sys-devel/bison-2.5
+   virtual/pkgconfig
+"
+
+PATCHES=( "${FILESDIR}/${P}-system-clasp.patch" )
+RESTRICT="!test? ( test )"
+REQUIRED_USE="
+   lua? ( ${LUA_REQUIRED_USE} )
+   python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+pkg_setup() {
+   use lua && lua-single_pkg_setup
+   use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+   rm -r clasp || die
+   cmake_src_prepare
+}
+
+src_configure() {
+   local mycmakeargs=(
+   -DCLINGO_BUILD_APPS=$(usex tools)
+   -DCLINGO_BUILD_EXAMPLES=$(usex examples)
+   -DCLINGO_BUILD_TESTS=$(usex test)
+   -DCLINGO_BUILD_WITH_LUA=$(usex lua)
+   -DCLINGO_BUILD_WITH_PYTHON=$(usex python)
+
+   -DCLINGO_BUILD_STATIC=OFF
+   -DCLINGO_BUILD_WEB=OFF
+   -DCLINGO_CMAKE_AR="$(tc-getAR)"
+   -DCLINGO_CMAKE_RANLIB="$(tc-getRANLIB)"
+   -DCLINGO_INSTALL_LIB=ON
+   -DCLINGO_USE_LIB=OFF
+   )
+   if use lua; then
+   mycmakeargs+=( 
"-DCLINGO_LUA_VERSION:LIST=$(lua_get_version);EXACT" )
+   mycmakeargs+=( "-DLUACLINGO_INSTALL_DIR=$(lua_get_cmod_dir)" )
+   fi
+   if use python; then
+   local pyversion="${EPYTHON/python/}"
+   mycmakeargs+=( 
"-DCLINGO_PYTHON_VERSION:LIST=${pyversion};EXACT" )
+   mycmakeargs+=( "-DPYCLINGO_INSTALL_DIR=$(python_get_sitedir)" )
+   fi
+   cmake_src_configure
+}

diff --git a/sci-mathematics/clingo/files/clingo-5.5.1-system-clasp.patch 
b/sci-mathematics/clingo/files/clingo-5.5.1-system-clasp.patch
new file mode 100644
index 0..0eadf4fda
--- /dev/null
+++ b/sci-mathematics/clingo/files/clingo-5.5.1-system-clasp.patch
@@ -0,0 +1,56 @@
+diff '--color=auto' -ru 
/var/tmp/portage/sci-mathematics/clingo-5.5.1/work/clingo-5.5.1/CMakeLists.txt 
clingo-5.5.1/CMakeLists.txt
+--- 
/var/tmp/portage/sci-mathematics/clingo-5.5.1/work/clingo-5.5.1/CMakeLists.txt  
   2022-04-28 06:09:26.673973864 +0200
 clingo-5.5.1/CMakeLists.txt2022-04-28 06:27:47.090303346 +0200
+@@ -232,20 +232,15 @@
+ 
+ enable_testing()
+ 
+-# NOTE: assumes that submodule has been initialized
+-set(CLASP_BUILD_APP ${CLINGO_BUILD_APPS} CACHE BOOL "")
+ if (CLINGO_USE_LIB)
+ set(clingo_library_targets)
+ add_library(libclingo INTERFACE IMPORTED)
+ set_property(TARGET libclingo PROPERTY INTERFACE_INCLUDE_DIRECTORIES 
"${CLINGO_SOURCE_DIR}/libclingo")
+ set_property(TARGET libclingo PROPERTY INTERFACE_LINK_LIBRARIES "clingo")
+ else()
++find_package(Potassco REQUIRED)
++find_package(Clasp REQUIRED)
+ set(clingo_library_targets libgringo