diff options
author | Alexey Shvetsov <alexxy@gentoo.org> | 2011-11-27 01:27:52 +0400 |
---|---|---|
committer | Alexey Shvetsov <alexxy@gentoo.org> | 2011-11-27 01:27:52 +0400 |
commit | a56736695bb5da2625ad1b839cb848abed953d6a (patch) | |
tree | bfd8bda311ca046bd617ff3219f39d59b368d9b8 /sci-libs | |
parent | [dev-cpp/curlpp] Import from alexxy overlay (diff) | |
download | betagarden-a56736695bb5da2625ad1b839cb848abed953d6a.tar.gz betagarden-a56736695bb5da2625ad1b839cb848abed953d6a.tar.bz2 betagarden-a56736695bb5da2625ad1b839cb848abed953d6a.zip |
[sci-libs/levmar] Import from alexxy overlay
(Portage version: 2.2.0_alpha78/git/Linux x86_64, signed Manifest commit with key F82F92E6)
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/levmar/Manifest | 24 | ||||
-rw-r--r-- | sci-libs/levmar/files/cmakeusage-2.5.patch | 128 | ||||
-rw-r--r-- | sci-libs/levmar/levmar-2.5.ebuild | 61 | ||||
-rw-r--r-- | sci-libs/levmar/metadata.xml | 17 |
4 files changed, 230 insertions, 0 deletions
diff --git a/sci-libs/levmar/Manifest b/sci-libs/levmar/Manifest new file mode 100644 index 0000000..566942b --- /dev/null +++ b/sci-libs/levmar/Manifest @@ -0,0 +1,24 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +AUX cmakeusage-2.5.patch 5063 RMD160 5e1e2365ae6e012d0b32076c79e6cedb2faf1c20 SHA1 79e0efadd46394ac4cd24ccce991d2a49ce6acf9 SHA256 790e427ef34b0facadf8d7fab274414922dc99f465a8510b000637d788424bd3 +DIST levmar-2.5.tgz 78817 RMD160 fc43206eef2969a143e3a9597b68d06eccbd14dd SHA1 46c11812689baba96f3b53cf89f0f3edb3582e61 SHA256 b70f6ac3eff30ec29150e217b137312cb84e85529815efea2c12e4eab74b9d75 +EBUILD levmar-2.5.ebuild 1692 RMD160 e1110417882d9816dd19c9a65ab832ff7752e822 SHA1 8170b89300049c72133cac771f7cf16f3e7fefbc SHA256 2f893caa4784ffc12c41cb998e96f5dd8c3f2acb5043cb00277a18dc1436353e +MISC metadata.xml 667 RMD160 56dabdcb5ed7fe4e69f445cce919a476666c685b SHA1 8bf04f90bd02c556caba79c4d8739e63febb2285 SHA256 a66a15cfbdf24b92d1bc74dc3eac573ea2238a55d91baaaef2e00cb8249b65bb +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.18 (GNU/Linux) + +iQIcBAEBCAAGBQJO0VnYAAoJEOf+E+/4L5LmMnoP/2RaWJK+G5ctfIApNCckMGGE +kTm76zNIDe7kcZ3SxF0ZrAxBy5s6c3qZEUr0dDrZdNG9RSe+LKxFN9A6mDtBskPX +o5BDumbQ9I2mwstJw0cvQpe8g+b/71j46vEBml/GRHUW6bZvFCbNFdTgmsZm13CH +iPw8TSkg7+ox/EQEUTWb/AsyBaZgS4OveE3v1z5VoGFj06oto1RHtiTtDZRZiYYw +CIXtnzmArIupSGm6Df+VyJuZp/595/tYtK2Fklg7mnWFTUnVl1vpBcOWicWxOByj +Ei0eWnHu2yiX/ld77ILfXAq6v6xVZr40SSUA68+zetXrGGJanxwLhFkib7kgJs7o +gw9heJKgAGHngoVoCHysvrX+Got2OeDRqvk4M/MZsP2RrVR9jyENRSUH03QtBNNK +cWSUx0XWMv8Ap4dDSYd7vKjK2CI8+ThsEjZ2RO495H9XKww94YjMZhlNR8yUHbru +KSCldbcSEY/ATRA1karLg5nMX5Rdnog7LY5Z8VqUKJrrp8zPf7/XBBSsdkdPP4Qa +BaT/5G5z48hOIYvKC1tu+CYPX5qf3TVRoec/dt5lxyY1QYjYTpgWyDW9KYb9s/to +IjsBp6f70HZoV2yiuoXY0mAdXPumPvIO9IwFIy3yuUkLQ0AY5PZYE0NaFjynesb4 +RaPsAMTMy3trk6iAJi6Z +=0riH +-----END PGP SIGNATURE----- diff --git a/sci-libs/levmar/files/cmakeusage-2.5.patch b/sci-libs/levmar/files/cmakeusage-2.5.patch new file mode 100644 index 0000000..ed709ca --- /dev/null +++ b/sci-libs/levmar/files/cmakeusage-2.5.patch @@ -0,0 +1,128 @@ +diff -ur levmar-2.5/CMakeLists.txt levmar-2.5.new/CMakeLists.txt +--- levmar-2.5/CMakeLists.txt 2009-09-01 14:23:07.000000000 +0200 ++++ levmar-2.5.new/CMakeLists.txt 2010-05-18 16:58:48.943757800 +0200 +@@ -2,53 +2,50 @@ + # http://www.insightsoftwareconsortium.org/wiki/index.php/CMake_Tutorial
+
+ PROJECT(LEVMAR)
+-#CMAKE_MINIMUM_REQUIRED(VERSION 1.4)
++CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+-# compiler flags
+-#ADD_DEFINITIONS(-DLINSOLVERS_RETAIN_MEMORY) # do not free memory between linear solvers calls
+-#REMOVE_DEFINITIONS(-DLINSOLVERS_RETAIN_MEMORY) # free memory between calls
+-
+-# f2c is sometimes equivalent to libF77 & libI77; in that case, set HAVE_F2C to 0
+-SET(HAVE_F2C 1 CACHE BOOL "Do we have f2c or F77/I77?" )
+-
+-# the directory where the lapack/blas/f2c libraries reside
+-SET(LAPACKBLAS_DIR /usr/lib CACHE PATH "Path to lapack/blas libraries")
+-
+-# actual names for the lapack/blas/f2c libraries
+-SET(LAPACK_LIB lapack CACHE STRING "The name of the lapack library")
+-SET(BLAS_LIB blas CACHE STRING "The name of the blas library")
+-IF(HAVE_F2C)
+- SET(F2C_LIB f2c CACHE STRING "The name of the f2c library")
+-ELSE(HAVE_F2C)
+- SET(F77_LIB libF77 CACHE STRING "The name of the F77 library")
+- SET(I77_LIB libI77 CACHE STRING "The name of the I77 library")
+-ENDIF(HAVE_F2C)
++if(COMMAND cmake_policy)
++ cmake_policy(SET CMP0003 NEW)
++endif(COMMAND cmake_policy)
+
+-########################## NO CHANGES BEYOND THIS POINT ##########################
+
+-INCLUDE_DIRECTORIES(.)
+-#INCLUDE_DIRECTORIES(/usr/include)
++OPTION(SUPPORT_DOUBLE_PRECICION "support double precicion solver" TRUE)
++OPTION(SUPPORT_SINGLE_PRECICION "support single precicion solver" TRUE)
++OPTION(BUILD_EXAMPLE "build example" FALSE)
++
++IF(SUPPORT_DOUBLE_PRECICION)
++ ADD_DEFINITIONS(-DLM_DBL_PREC)
++ENDIF(SUPPORT_DOUBLE_PRECICION)
++
++IF(SUPPORT_SINGLE_PRECICION)
++ ADD_DEFINITIONS(-DLM_SNGL_PREC)
++ENDIF(SUPPORT_SINGLE_PRECICION)
++
++ENABLE_LANGUAGE(Fortran)
++
++FIND_PACKAGE(LAPACK REQUIRED)
++IF(LAPACK_FOUND)
++ ADD_DEFINITIONS(-DHAVE_LAPACK)
++ENDIF(LAPACK_FOUND)
+
+ # 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
+ )
+
+-# demo program
+-LINK_DIRECTORIES(${LAPACKBLAS_DIR})
+-LINK_DIRECTORIES(.)
+-ADD_EXECUTABLE(lmdemo lmdemo.c levmar.h)
+-# libraries the demo depends on
+-IF(HAVE_F2C)
+- TARGET_LINK_LIBRARIES(lmdemo levmar ${LAPACK_LIB} ${BLAS_LIB} ${F2C_LIB})
+-ELSE(HAVE_F2C)
+- TARGET_LINK_LIBRARIES(lmdemo levmar ${LAPACK_LIB} ${BLAS_LIB} ${F77_LIB} ${I77_LIB})
+-ENDIF(HAVE_F2C)
+-
+-# make sure that the library is built before the demo
+-ADD_DEPENDENCIES(lmdemo levmar)
+-
+-#SUBDIRS(matlab)
++IF(LAPACK_FOUND)
++ LINK_DIRECTORIES(${LAPACK_LINKER_FLAGS})
++ TARGET_LINK_LIBRARIES(levmar ${LAPACK_LIBRARIES})
++ENDIF(LAPACK_FOUND)
++
++IF(BUILD_EXAMPLE)
++ ADD_EXECUTABLE(lmdemo lmdemo.c)
++ TARGET_LINK_LIBRARIES(lmdemo levmar)
++ENDIF(BUILD_EXAMPLE)
++
++INSTALL(TARGETS levmar
++ RUNTIME DESTINATION "bin"
++ LIBRARY DESTINATION "lib"
++ ARCHIVE DESTINATION "lib")
+
+-#ADD_TEST(levmar_tst lmdemo)
++INSTALL(FILES levmar.h DESTINATION "include")
+diff -ur levmar-2.5/levmar.h levmar-2.5.new/levmar.h +--- levmar-2.5/levmar.h 2009-12-02 11:23:35.000000000 +0100 ++++ levmar-2.5.new/levmar.h 2010-05-18 16:43:24.986917129 +0200 +@@ -26,7 +26,7 @@ + /************************************* Start of configuration options *************************************/ + + /* specify whether to use LAPACK or not. The first option is strongly recommended */ +-#define HAVE_LAPACK /* use LAPACK */ ++//#define HAVE_LAPACK /* use LAPACK */ + /* #undef HAVE_LAPACK */ /* uncomment this to force not using LAPACK */ + + /* to avoid the overhead of repeated mallocs(), routines in Axb.c can be instructed to +@@ -34,15 +34,15 @@ + * non-reentrant and is not safe in a shared memory multiprocessing environment. + * Bellow, this option is turned on only when not compiling with OpenMP. + */ +-#if !defined(_OPENMP) +-#define LINSOLVERS_RETAIN_MEMORY /* comment this if you don't want routines in Axb.c retain working memory between calls */ +-#endif ++//#if !defined(_OPENMP) ++//#define LINSOLVERS_RETAIN_MEMORY /* comment this if you don't want routines in Axb.c retain working memory between calls */ ++//#endif + + /* determine the precision variants to be build. Default settings build + * both the single and double precision routines + */ +-#define LM_DBL_PREC /* comment this if you don't want the double precision routines to be compiled */ +-#define LM_SNGL_PREC /* comment this if you don't want the single precision routines to be compiled */ ++//#define LM_DBL_PREC /* comment this if you don't want the double precision routines to be compiled */ ++//#define LM_SNGL_PREC /* comment this if you don't want the single precision routines to be compiled */ + + /****************** End of configuration options, no changes necessary beyond this point ******************/ + diff --git a/sci-libs/levmar/levmar-2.5.ebuild b/sci-libs/levmar/levmar-2.5.ebuild new file mode 100644 index 0000000..73142e7 --- /dev/null +++ b/sci-libs/levmar/levmar-2.5.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/libexif/libexif-0.6.12-r4.ebuild,v 1.8 2006/01/07 11:43:17 eradicator Exp $ + +EAPI="3" + +inherit eutils + +DESCRIPTION="A C++ implementation of the Levenberg-Marquardt non-linear regression" +HOMEPAGE="http://www.ics.forth.gr/~lourakis/levmar/" +SRC_URI="http://www.ics.forth.gr/~lourakis/levmar/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="nosingle nodouble examples" + +RDEPEND="virtual/lapack" +DEPEND="${RDEPEND} + >=dev-util/cmake-2.6" + +src_prepare() { + epatch "${FILESDIR}/cmakeusage-2.5.patch" +} + +src_compile() { + local CMAKE_VARIABLES="" + CMAKE_VARIABLES="${CMAKE_VARIABLES} -DCMAKE_INSTALL_PREFIX:PATH=/usr" + + if use nosingle; then + CMAKE_VARIABLES="${CMAKE_VARIABLES} -DSUPPORT_SINGLE_PRECICION:BOOL=OFF" + else + CMAKE_VARIABLES="${CMAKE_VARIABLES} -DSUPPORT_SINGLE_PRECICION:BOOL=ON" + fi + + if use nodouble; then + CMAKE_VARIABLES="${CMAKE_VARIABLES} -DSUPPORT_DOUBLE_PRECICION:BOOL=OFF" + else + CMAKE_VARIABLES="${CMAKE_VARIABLES} -DSUPPORT_DOUBLE_PRECICION:BOOL=ON" + fi + + if use examples; then + CMAKE_VARIABLES="${CMAKE_VARIABLES} -DBUILD_EXAMPLE:BOOL=ON" + else + CMAKE_VARIABLES="${CMAKE_VARIABLES} -DBUILD_EXAMPLE:BOOL=OFF" + fi + + cmake ${CMAKE_VARIABLES} . || die "cmake configuration failed" + + emake || die "make failed" +} + +src_install() { + make DESTDIR="${D}" install || die "make install failed" + dodoc README.txt + + if use examples; then + dodir /usr/share/${P}/examples/ || die "Failed to create examples directory" + cp "lmdemo.c" "${D}/usr/share/${P}/examples/" || die "Failed to copy example files" + fi +} diff --git a/sci-libs/levmar/metadata.xml b/sci-libs/levmar/metadata.xml new file mode 100644 index 0000000..867a8ef --- /dev/null +++ b/sci-libs/levmar/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>sci</herd> + <maintainer> + <email>gw.fossdev@gmail.com</email> + <name>Gert Wollny</name> + </maintainer> +<longdescription> + levmar is a C/C++ implementation of the Levenberg-Marquard optimization algorithm +</longdescription> +<use> + <flag name='nosingle'>Build and install without support for single precicion math</flag> + <flag name='nodouble'>Build and install without support for double precicion math</flag> + <flag name='examples'>Build the example to test the compile and install its source</flag> +</use> +</pkgmetadata> |