[gentoo-commits] repo/gentoo:master commit in: sci-mathematics/cryptominisat/files/, sci-mathematics/cryptominisat/

2024-06-12 Thread Maciej Barć
commit: 958deb821b366d4ad159fff9ee601d2128d3dec7
Author: Maciej Barć  gentoo  org>
AuthorDate: Wed Jun 12 23:30:48 2024 +
Commit: Maciej Barć  gentoo  org>
CommitDate: Wed Jun 12 23:40:24 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=958deb82

sci-mathematics/cryptominisat: enable python support

Signed-off-by: Maciej Barć  gentoo.org>

 ...1.21.ebuild => cryptominisat-5.11.21-r1.ebuild} | 52 +-
 .../files/cryptominisat-5.11.21-setup-py.patch | 18 
 2 files changed, 69 insertions(+), 1 deletion(-)

diff --git a/sci-mathematics/cryptominisat/cryptominisat-5.11.21.ebuild 
b/sci-mathematics/cryptominisat/cryptominisat-5.11.21-r1.ebuild
similarity index 52%
rename from sci-mathematics/cryptominisat/cryptominisat-5.11.21.ebuild
rename to sci-mathematics/cryptominisat/cryptominisat-5.11.21-r1.ebuild
index 7de12b4067d1..db2ca950f559 100644
--- a/sci-mathematics/cryptominisat/cryptominisat-5.11.21.ebuild
+++ b/sci-mathematics/cryptominisat/cryptominisat-5.11.21-r1.ebuild
@@ -3,7 +3,15 @@
 
 EAPI=8
 
-inherit cmake
+CMAKE_IN_SOURCE_BUILD="ON"
+
+PYTHON_COMPAT=( python3_{11..13} )
+
+DISTUTILS_EXT="1"
+DISTUTILS_OPTIONAL="1"
+DISTUTILS_USE_PEP517="setuptools"
+
+inherit cmake distutils-r1
 
 DESCRIPTION="Advanced SAT solver with C++ and command-line interfaces"
 HOMEPAGE="https://github.com/msoos/cryptominisat/;
@@ -21,24 +29,66 @@ fi
 
 LICENSE="GPL-2 MIT"
 SLOT="0/${PV}"
+IUSE="python"
 RESTRICT="test"   # Tests require some git modules.
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
 
 RDEPEND="
dev-libs/boost:=
sys-libs/zlib:=
+   python? (
+   ${PYTHON_DEPS}
+   $(python_gen_cond_dep '
+   dev-python/tomli[${PYTHON_USEDEP}]
+   ')
+   )
 "
 DEPEND="
${RDEPEND}
 "
+BDEPEND="
+   python? (
+   ${DISTUTILS_DEPS}
+   )
+"
 
 PATCHES=(
+   "${FILESDIR}/${PN}-5.11.21-setup-py.patch"
"${FILESDIR}/${PN}-5.11.21-unistd.patch"
 )
 
+src_prepare() {
+   cmake_src_prepare
+
+   if use python ; then
+   distutils-r1_src_prepare
+   fi
+}
+
 src_configure() {
local -a mycmakeargs=(
-DNOBREAKID=ON
-DENABLE_TESTING=OFF
)
cmake_src_configure
+
+   if use python ; then
+   python_setup
+   fi
+}
+
+src_compile() {
+   cmake_src_compile
+
+   if use python ; then
+   distutils-r1_src_compile
+   fi
+}
+
+src_install() {
+   cmake_src_install
+
+   if use python ; then
+   distutils-r1_src_install
+   fi
 }

diff --git 
a/sci-mathematics/cryptominisat/files/cryptominisat-5.11.21-setup-py.patch 
b/sci-mathematics/cryptominisat/files/cryptominisat-5.11.21-setup-py.patch
new file mode 100644
index ..6b13b3e05b26
--- /dev/null
+++ b/sci-mathematics/cryptominisat/files/cryptominisat-5.11.21-setup-py.patch
@@ -0,0 +1,18 @@
+--- a/setup.py
 b/setup.py
+@@ -27,13 +27,13 @@ import sys
+ import os
+ from setuptools import Extension, setup
+ import sysconfig
+-import toml
++import tomli
+ import pathlib
+ from sys import platform
+ 
+ def _parse_toml(pyproject_path):
+ pyproject_text = pyproject_path.read_text()
+-pyproject_data = toml.loads(pyproject_text)
++pyproject_data = tomli.loads(pyproject_text)
+ return pyproject_data['project']['version']
+ 
+ picosatlib = ('picosatlib', {



[gentoo-commits] repo/gentoo:master commit in: sci-mathematics/cryptominisat/files/, sci-mathematics/cryptominisat/

2023-08-12 Thread Maciej Barć
commit: de2423744ff0655c8da270c05522c2705894
Author: Maciej Barć  gentoo  org>
AuthorDate: Sat Aug 12 19:56:05 2023 +
Commit: Maciej Barć  gentoo  org>
CommitDate: Sat Aug 12 23:23:14 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de24

sci-mathematics/cryptominisat: drop old 5.11.4

Signed-off-by: Maciej Barć  gentoo.org>

 sci-mathematics/cryptominisat/Manifest |  1 -
 .../cryptominisat/cryptominisat-5.11.4.ebuild  | 40 --
 .../files/cryptominisat-5.11.4-gcc-13.patch| 11 --
 3 files changed, 52 deletions(-)

diff --git a/sci-mathematics/cryptominisat/Manifest 
b/sci-mathematics/cryptominisat/Manifest
index 1a686e4e73da..698b6506cda9 100644
--- a/sci-mathematics/cryptominisat/Manifest
+++ b/sci-mathematics/cryptominisat/Manifest
@@ -1,3 +1,2 @@
 DIST cryptominisat-5.11.11.tar.gz 1012869 BLAKE2B 
768ae936380c05f3129ac642fe8e7c3581824f8be8e02c7d6709fbb8ca1e43eae04ba6d16d441063ed4cbe597a64ee357fa8b45e3f740a6cf11c00f9225b6b5d
 SHA512 
21827627a1765b760df4635f3606ba83c76bac52217120a0b4c97bcb05526fe6cf7325dff04385525f763f20a0371586dc929eb3c57023b3367a8af9ea8e947a
 DIST cryptominisat-5.11.12.tar.gz 1013147 BLAKE2B 
f69f8dac97aaddcff89039aa43e786058befe5b86bed98059bda84d7559601ef6d39dcbf296a0c075d0ffae54054f7b3e78db371c8c66d4290b78dcd562bb977
 SHA512 
f6e9bb3f561e066f5fa228fcd0d8887333b251b88f7838c3ac0c130c2b7cd5ae46ff6272b4603a898efa67b3faeef22d01697b60e565d2dc6bfc890c7dc56a93
-DIST cryptominisat-5.11.4.tar.gz 1044845 BLAKE2B 
b6df4e61c5f37d24a61a5c782f08f223c413e19fc2b1625718f7d19d4df8f4d955a92ae447f6c98889927ddc7407b4790092086996a0a32879c7dcb614ca1024
 SHA512 
8593848c468a6b1ac3d9ae343384aa323fb6ddc17802c9b184c178b9a41314c463b1c5f02ffd19d6e844894c7998e41d6e9b808ed70dcc235aa595607f52bc76

diff --git a/sci-mathematics/cryptominisat/cryptominisat-5.11.4.ebuild 
b/sci-mathematics/cryptominisat/cryptominisat-5.11.4.ebuild
deleted file mode 100644
index 6ff76af75ca2..
--- a/sci-mathematics/cryptominisat/cryptominisat-5.11.4.ebuild
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit cmake
-
-DESCRIPTION="Advanced SAT solver with C++ and command-line interfaces"
-HOMEPAGE="https://github.com/msoos/cryptominisat/;
-SRC_URI="https://github.com/msoos/${PN}/archive/${PV}.tar.gz
-   -> ${P}.tar.gz"
-
-SLOT="0/${PV}"
-KEYWORDS="~amd64 ~x86"
-LICENSE="GPL-2 MIT"
-RESTRICT="test"  # tests require many convoluted bundled (git) modules
-
-RDEPEND="
-   dev-libs/boost:=
-   sys-libs/zlib:=
-"
-DEPEND="${RDEPEND}"
-
-PATCHES=( "${FILESDIR}"/${PN}-5.11.4-gcc-13.patch )
-
-src_configure() {
-   local -a mycmakeargs=(
-   -DNOBREAKID=ON
-   -DNOM4RI=ON
-   -DENABLE_TESTING=OFF
-   )
-   cmake_src_configure
-}
-
-src_install() {
-   cmake_src_install
-
-   dodir /usr/share/man
-   mv "${ED}"/usr/man "${ED}"/usr/share/man || die
-}

diff --git 
a/sci-mathematics/cryptominisat/files/cryptominisat-5.11.4-gcc-13.patch 
b/sci-mathematics/cryptominisat/files/cryptominisat-5.11.4-gcc-13.patch
deleted file mode 100644
index e9c7fade75fe..
--- a/sci-mathematics/cryptominisat/files/cryptominisat-5.11.4-gcc-13.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-index 0cf7910..54cb45e 100644
 a/src/ccnr.h
-+++ b/src/ccnr.h
-@@ -23,6 +23,7 @@ THE SOFTWARE.
- #ifndef CCNR_H
- #define CCNR_H
- 
-+#include 
- #include 
- #include 
- #include "ccnr_mersenne.h"