You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
993 B
50 lines
993 B
3 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
10 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
3 years ago
|
EAPI=7
|
||
10 years ago
|
|
||
3 years ago
|
inherit cmake toolchain-funcs
|
||
10 years ago
|
|
||
|
DESCRIPTION="Levenberg-Marquardt nonlinear least squares C library"
|
||
7 years ago
|
HOMEPAGE="https://www.ics.forth.gr/~lourakis/levmar/"
|
||
4 years ago
|
SRC_URI="https://www.ics.forth.gr/~lourakis/levmar/${P}.tgz"
|
||
10 years ago
|
|
||
|
LICENSE="GPL-2"
|
||
|
SLOT="0"
|
||
|
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
||
|
IUSE="test"
|
||
5 years ago
|
RESTRICT="!test? ( test )"
|
||
10 years ago
|
|
||
|
RDEPEND="
|
||
|
virtual/blas
|
||
|
virtual/lapack"
|
||
3 years ago
|
BDEPEND="${RDEPEND}
|
||
10 years ago
|
virtual/pkgconfig"
|
||
|
|
||
|
PATCHES=(
|
||
|
"${FILESDIR}"/${P}-shared.patch
|
||
|
"${FILESDIR}"/${P}-demo-underlinking.patch
|
||
|
)
|
||
|
|
||
3 years ago
|
DOCS=(README.txt)
|
||
|
|
||
10 years ago
|
src_configure() {
|
||
|
local mycmakeargs+=(
|
||
|
-DNEED_F2C=OFF
|
||
|
-DHAVE_LAPACK=ON
|
||
|
-DLAPACKBLAS_LIB_NAMES="$($(tc-getPKG_CONFIG) --libs blas lapack)"
|
||
3 years ago
|
-DBUILD_DEMO=$(usex test)
|
||
10 years ago
|
)
|
||
3 years ago
|
cmake_src_configure
|
||
10 years ago
|
}
|
||
|
|
||
|
src_test() {
|
||
3 years ago
|
"${BUILD_DIR}"/lmdemo || die "Tests failed"
|
||
10 years ago
|
}
|
||
|
|
||
|
src_install() {
|
||
3 years ago
|
dolib.so "${BUILD_DIR}"/liblevmar.so
|
||
10 years ago
|
insinto /usr/include
|
||
3 years ago
|
doins "${S}"/levmar.h
|
||
10 years ago
|
}
|