summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/levmar')
-rw-r--r--sci-libs/levmar/Manifest1
-rw-r--r--sci-libs/levmar/files/levmar-2.6-demo-underlinking.patch12
-rw-r--r--sci-libs/levmar/files/levmar-2.6-shared.patch12
-rw-r--r--sci-libs/levmar/levmar-2.6.ebuild48
-rw-r--r--sci-libs/levmar/metadata.xml16
5 files changed, 89 insertions, 0 deletions
diff --git a/sci-libs/levmar/Manifest b/sci-libs/levmar/Manifest
new file mode 100644
index 000000000000..eed2a8fea595
--- /dev/null
+++ b/sci-libs/levmar/Manifest
@@ -0,0 +1 @@
+DIST levmar-2.6.tgz 81143 SHA256 3bf4ef1ea4475ded5315e8d8fc992a725f2e7940a74ca3b0f9029d9e6e94bad7 SHA512 5b4c64b63be9b29d6ad2df435af86cd2c2e3216313378561a670ac6a392a51bbf1951e96c6b1afb77c570f23dd8e194017808e46929fec2d8d9a7fe6cf37022b WHIRLPOOL fd9f45474a2fbc57f3a542480271d90a15163edebc6e9b70444f2d9d4c9ad1a3c1301d77cee5c5d41944224c888547c069ee7443a09ff478ea996c3358f81023
diff --git a/sci-libs/levmar/files/levmar-2.6-demo-underlinking.patch b/sci-libs/levmar/files/levmar-2.6-demo-underlinking.patch
new file mode 100644
index 000000000000..a6be5587d3e0
--- /dev/null
+++ b/sci-libs/levmar/files/levmar-2.6-demo-underlinking.patch
@@ -0,0 +1,12 @@
+diff -urN levmar-2.6.old/CMakeLists.txt levmar-2.6/CMakeLists.txt
+--- levmar-2.6.old/CMakeLists.txt 2014-08-07 18:22:25.739008113 +0200
++++ levmar-2.6/CMakeLists.txt 2014-08-07 18:22:36.050014845 +0200
+@@ -67,7 +67,7 @@
+
+ # demo program
+ IF(BUILD_DEMO)
+- SET(LIBS levmar)
++ SET(LIBS levmar m)
+
+ LINK_DIRECTORIES(${CMAKE_BINARY_DIR}) # location of the levmar library
+ LINK_DIRECTORIES(${LAPACKBLAS_DIR})
diff --git a/sci-libs/levmar/files/levmar-2.6-shared.patch b/sci-libs/levmar/files/levmar-2.6-shared.patch
new file mode 100644
index 000000000000..e89750cc028f
--- /dev/null
+++ b/sci-libs/levmar/files/levmar-2.6-shared.patch
@@ -0,0 +1,12 @@
+diff -Nur levmar-2.6.orig/CMakeLists.txt levmar-2.6/CMakeLists.txt
+--- levmar-2.6.orig/CMakeLists.txt 2012-04-13 04:53:53.000000000 +0100
++++ levmar-2.6/CMakeLists.txt 2012-04-13 04:54:20.000000000 +0100
+@@ -60,7 +60,7 @@
+ ENDIF(HAVE_PLASMA)
+
+ # levmar library source files
+-ADD_LIBRARY(levmar STATIC
++ADD_LIBRARY(levmar SHARED
+ lm.c Axb.c misc.c lmlec.c lmbc.c lmblec.c lmbleic.c
+ levmar.h misc.h compiler.h
+ )
diff --git a/sci-libs/levmar/levmar-2.6.ebuild b/sci-libs/levmar/levmar-2.6.ebuild
new file mode 100644
index 000000000000..8b7c227a30de
--- /dev/null
+++ b/sci-libs/levmar/levmar-2.6.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils eutils toolchain-funcs
+
+DESCRIPTION="Levenberg-Marquardt nonlinear least squares C library"
+HOMEPAGE="http://www.ics.forth.gr/~lourakis/levmar/"
+SRC_URI="${HOMEPAGE}/${P}.tgz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="test"
+
+RDEPEND="
+ virtual/blas
+ virtual/lapack"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-shared.patch
+ "${FILESDIR}"/${P}-demo-underlinking.patch
+)
+
+src_configure() {
+ local mycmakeargs+=(
+ -DNEED_F2C=OFF
+ -DHAVE_LAPACK=ON
+ -DLAPACKBLAS_LIB_NAMES="$($(tc-getPKG_CONFIG) --libs blas lapack)"
+ $(cmake-utils_use test BUILD_DEMO)
+ )
+ cmake-utils_src_configure
+}
+
+src_test() {
+ cd ${CMAKE_BUILD_DIR}
+ ./lmdemo || die
+}
+
+src_install() {
+ dolib.so ${CMAKE_BUILD_DIR}/liblevmar.so
+ insinto /usr/include
+ doins levmar.h
+}
diff --git a/sci-libs/levmar/metadata.xml b/sci-libs/levmar/metadata.xml
new file mode 100644
index 000000000000..b0078f29f202
--- /dev/null
+++ b/sci-libs/levmar/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>3dprint</herd>
+<maintainer>
+ <email>amynka@gentoo.org</email>
+</maintainer>
+<longdescription lang="en">
+ levmar is a native ANSI C implementation of the Levenberg-Marquardt
+ optimization algorithm. Both unconstrained and constrained (under
+ linear equations, inequality and box constraints)
+ Levenberg-Marquardt variants are included. The LM algorithm is an
+ iterative technique that finds a local minimum of a function that is
+ expressed as the sum of squares of nonlinear functions.
+</longdescription>
+</pkgmetadata>