sci-libs/adolc - 9999 (gentoo)

Search

Install

Install this version:

emerge -a =sci-libs/adolc-9999

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =sci-libs/adolc-9999

Or alternatively:

emerge --autounmask-write -a =sci-libs/adolc-9999

Package Information

Description:
Automatic differentiation system for C/C++
Homepage:
https://projects.coin-or.org/ADOL-C/ https://github.com/coin-or/ADOL-C
License:
|| ( EPL-1.0 GPL-2 )

Ebuild Details

Version EAPI Keywords Slot
9999 8 ~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86 0/$(ver_cut 1)
View Raw Ebuild
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit cmake toolchain-funcs

DESCRIPTION="Automatic differentiation system for C/C++"
HOMEPAGE="https://projects.coin-or.org/ADOL-C/ https://github.com/coin-or/ADOL-C"

if [[ ${PV} == *9999 ]]; then
	inherit git-r3
	EGIT_REPO_URI="https://github.com/coin-or/ADOL-C.git"
else
	SRC_URI="
		https://github.com/coin-or/ADOL-C/archive/releases/${PV}.tar.gz -> ${P}.tar.gz
	"
	S="${WORKDIR}/ADOL-C-releases-${PV}"
	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~x86"
fi

LICENSE="|| ( EPL-1.0 GPL-2 )"
SLOT="0/$(ver_cut 1)"

IUSE="+boost doc mpi openmp sparse test"
RESTRICT="!test? ( test )"

REQUIRED_USE="
	sparse? ( openmp )
"

RDEPEND="
	mpi? (
		sys-cluster/medipack:=
	)
	sparse? (
		>=sci-libs/colpack-1.0.10_p20190621[openmp?]
	)
"
DEPEND="${RDEPEND}
	boost? (
		dev-libs/boost:=
	)
"
BDEPEND="
	doc? (
		app-text/doxygen
	)
"

PATCHES=(
	"${FILESDIR}/${PN}-9999-boost-1.90.patch"
)

pkg_pretend() {
	if [[ ${MERGE_TYPE} != binary ]] && use openmp; then
		tc-check-openmp
	fi
}

pkg_setup() {
	if [[ ${MERGE_TYPE} != binary ]] && use openmp; then
		tc-check-openmp
	fi
}

src_prepare() {
	cmake_src_prepare

	sed -e 's/...<1.2//' -i CMakeLists.txt || die
}

src_configure() {
	local mycmakeargs=(
		-DBUILD_INTERFACE="yes" # build the C interface library and headers for foreign language bindings
		-DBUILD_TESTS="$(usex test)"
		-DBUILD_TESTS_WITH_COV="$(usex test no)"

		$(cmake_use_find_package doc Doxygen)
		$(cmake_use_find_package openmp OpenMP)

		-DENABLE_BOOST_POOL="$(usex boost)" # Enable the use of boost pool"
		-DENABLE_MEDIPACK="$(usex mpi)" # MeDiPack: MPI wrapper for Algorithmic Differentiation tools.
		-DENABLE_SPARSE="$(usex sparse)" # build sparse drivers (colpack required!)
	)

	if use sparse; then
		mycmakeargs+=(
			-DColPack_DIR="${ESYSROOT}/usr"
		)
	fi

	cmake_src_configure
}

USE Flags

Manage flags for this package: euse -i <flag> -p sci-libs/adolc | euse -E <flag> -p sci-libs/adolc | euse -D <flag> -p sci-libs/adolc

Global/Standard Flags

boost
Default: Enabled (+)
doc
mpi

Inherited Eclasses

Dependencies

DEPEND

	mpi? (
		sys-cluster/medipack:=
	)
	sparse? (
		>=sci-libs/colpack-1.0.10_p20190621[openmp?]
	)

	boost? (
		dev-libs/boost:=
	)

RDEPEND

	mpi? (
		sys-cluster/medipack:=
	)
	sparse? (
		>=sci-libs/colpack-1.0.10_p20190621[openmp?]
	)

BDEPEND

	doc? (
		app-text/doxygen
	)