# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 CMAKE_MAKEFILE_GENERATOR="emake" # needed for tests inherit cmake DESCRIPTION="COIN-OR C++ Algorithmic Differentiation" HOMEPAGE="https://projects.coin-or.org/CppAD/" SRC_URI="https://github.com/coin-or/CppAD/archive/${PV}.tar.gz -> ${P}.tar.gz" S="${WORKDIR}/CppAD-${PV}" LICENSE="EPL-2.0" SLOT="0/${PV}" # soname is bumped every versions KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" IUSE="adolc doc eigen ipopt" # adolc currently can't build tests and ipopt fails them. RESTRICT="adolc? ( test ) ipopt? ( test )" # No need for RDEPEND. DEPEND=" dev-libs/boost adolc? ( sci-libs/adolc ) eigen? ( dev-cpp/eigen ) ipopt? ( sci-libs/ipopt )" BDEPEND=" virtual/pkgconfig doc? ( app-text/doxygen[dot] virtual/latex-base )" PATCHES=( "${FILESDIR}"/${P}-pkgconfig.patch ) src_prepare() { cmake_src_prepare # Gentoo uses coin/ rather than coin-or/ for includes. sed -i 's/