summaryrefslogtreecommitdiff
path: root/sci-mathematics/cryptominisat/cryptominisat-5.11.21-r1.ebuild
blob: db2ca950f559f3420333b19d76942ca4b9d9549c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

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/"

if [[ "${PV}" == *9999* ]] ; then
	inherit git-r3

	EGIT_REPO_URI="https://github.com/msoos/${PN}.git"
else
	SRC_URI="https://github.com/msoos/${PN}/archive/${PV}.tar.gz
		-> ${P}.tar.gz"

	KEYWORDS="~amd64 ~x86"
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
}