summaryrefslogtreecommitdiff
path: root/sci-mathematics/plfit/plfit-0.9.4.ebuild
blob: a01a4159554ab408f08216043dc647e9d4d31f97 (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
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake

DESCRIPTION="Fit power-law distributions to empirical data"
HOMEPAGE="https://github.com/ntamas/plfit"
SRC_URI="https://github.com/ntamas/${PN}/archive/refs/tags/${PV}.tar.gz
	-> ${P}.tar.gz"
# plfit is gpl-2 and its source headers say "or later." The upstream
# doc/ directory contains MIT and BSD licenses for two components.
LICENSE="BSD GPL-2+ MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="cpu_flags_x86_sse cpu_flags_x86_sse2"

PATCHES=(
	"${FILESDIR}/${P}-underlinking.patch"
)

DOCS=( CHANGELOG.md README.rst doc/THANKS )

src_configure() {
	local mycmakeargs=(
		-DPLFIT_COMPILE_PYTHON_MODULE=OFF
		-DPLFIT_USE_SSE=OFF
		-DPLFIT_USE_OPENMP=OFF
	)
	if use cpu_flags_x86_sse || use cpu_flags_x86_sse2; then
		# plfit chooses which to use at compile time based on the
		# constants __SSE__ and __SSE2__.
		mycmakeargs+=( -DPLFIT_USE_SSE=ON )
	fi
	cmake_src_configure
}