levmar-2.6.ebuild 938 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit cmake-utils eutils toolchain-funcs
  5. DESCRIPTION="Levenberg-Marquardt nonlinear least squares C library"
  6. HOMEPAGE="http://www.ics.forth.gr/~lourakis/levmar/"
  7. SRC_URI="${HOMEPAGE}/${P}.tgz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
  11. IUSE="test"
  12. RDEPEND="
  13. virtual/blas
  14. virtual/lapack"
  15. DEPEND="${RDEPEND}
  16. virtual/pkgconfig"
  17. PATCHES=(
  18. "${FILESDIR}"/${P}-shared.patch
  19. "${FILESDIR}"/${P}-demo-underlinking.patch
  20. )
  21. src_configure() {
  22. local mycmakeargs+=(
  23. -DNEED_F2C=OFF
  24. -DHAVE_LAPACK=ON
  25. -DLAPACKBLAS_LIB_NAMES="$($(tc-getPKG_CONFIG) --libs blas lapack)"
  26. $(cmake-utils_use test BUILD_DEMO)
  27. )
  28. cmake-utils_src_configure
  29. }
  30. src_test() {
  31. cd ${CMAKE_BUILD_DIR}
  32. ./lmdemo || die
  33. }
  34. src_install() {
  35. dolib.so ${CMAKE_BUILD_DIR}/liblevmar.so
  36. insinto /usr/include
  37. doins levmar.h
  38. }