From 220013f17a5e14f1f901091f044aed248150915d Mon Sep 17 00:00:00 2001 From: Lukas Bulwahn Date: Fri, 24 May 2013 07:05:46 +0200 Subject: [PATCH] eigen: initial recipe contributed by Kartik Mohta (resolves #71) This commit adds the eigen library from Kartik Mohta's OpenEmbedded layer. Acknowledgements are added in the README file. --- README | 6 +- recipes-extended/eigen/eigen.inc | 22 ++++++ recipes-extended/eigen/eigen_3.1.3.bb | 10 +++ .../eigen/files/eigen-disable-tests.patch | 75 +++++++++++++++++++ 4 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 recipes-extended/eigen/eigen.inc create mode 100644 recipes-extended/eigen/eigen_3.1.3.bb create mode 100644 recipes-extended/eigen/files/eigen-disable-tests.patch diff --git a/README b/README index dd0920c..c548794 100644 --- a/README +++ b/README @@ -10,6 +10,7 @@ CONTRIBUTORS Lukas Bulwahn, BMW Car IT GmbH Stefan Herbrechtsmeier, Bielefeld University Tobias Weigl, BMW Car IT GmbH + Kartik Mohta HOW TO CONTRIBUTE @@ -92,8 +93,11 @@ REDISTRIBUTIONS The log4cxx recipe originated from the recipe in the OpenEmbedded (Classic) Development (cf. http://cgit.openembedded.org/openembedded/tree/recipes/log4cxx) licensed with the MIT License. + The eigen recipe originated from the recipe in Kartik Mohta's OpenEmbedded layer + (cf. https://github.com/kartikmohta/meta-km/tree/master/recipes-extended/eigen) + licensed with the MIT License. The core-image-ros-* recipes originated from the core-image-minimal recipe in OpenEmbedded Core (cf. http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-core/images/core-image-minimal.bb) licensed with the MIT License. - The modified files are redistributed here under the same MIT License. + The original or modified files are redistributed here under the same MIT License. diff --git a/recipes-extended/eigen/eigen.inc b/recipes-extended/eigen/eigen.inc new file mode 100644 index 0000000..fdfec38 --- /dev/null +++ b/recipes-extended/eigen/eigen.inc @@ -0,0 +1,22 @@ +DESCRIPTION = "Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms." +AUTHOR = "Benoît Jacob and Gaël Guennebaud and others" +HOMEPAGE = "http://eigen.tuxfamily.org/" +LICENSE = "MPL-2.0" +LIC_FILES_CHKSUM = "file://COPYING.MPL2;md5=815ca599c9df247a0c7f619bab123dad" + +PR = "r0" + +SRC_URI = "http://bitbucket.org/eigen/eigen/get/${PV}.tar.bz2" + +inherit cmake + +OECMAKE_SOURCEPATH = ".." +OECMAKE_BUILDPATH = "build" + +EXTRA_OECMAKE += "-Dpkg_config_libdir=${libdir}" + +FILES_${PN} = "${includedir} ${libdir}" + +# ${PN} is empty so we need to tweak -dev and -dbg package dependencies +RDEPENDS_${PN}-dev = "" +RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" diff --git a/recipes-extended/eigen/eigen_3.1.3.bb b/recipes-extended/eigen/eigen_3.1.3.bb new file mode 100644 index 0000000..208a0a0 --- /dev/null +++ b/recipes-extended/eigen/eigen_3.1.3.bb @@ -0,0 +1,10 @@ +require eigen.inc + +PR = "r0" + +SRC_URI += "file://eigen-disable-tests.patch" + +SRC_URI[md5sum] = "43eee0e9252a77149d6b65e93e73b79d" +SRC_URI[sha256sum] = "1a443145f321dd47a5ca11f176e7319056198a6124a7577723d92e3c3cd59ece" + +S = "${WORKDIR}/eigen-eigen-2249f9c22fe8" diff --git a/recipes-extended/eigen/files/eigen-disable-tests.patch b/recipes-extended/eigen/files/eigen-disable-tests.patch new file mode 100644 index 0000000..c6212ff --- /dev/null +++ b/recipes-extended/eigen/files/eigen-disable-tests.patch @@ -0,0 +1,75 @@ +eigen: don't try building tests + +While configuring, if the tests are enabled, it checks some machine specific +stuff which we don't want to do while cross-compiling. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Kartik Mohta + +--- a/CMakeLists.txt~ 2012-07-02 20:33:20.330773075 -0400 ++++ b/CMakeLists.txt 2012-07-02 20:34:23.515778505 -0400 +@@ -307,24 +307,24 @@ + + add_subdirectory(doc EXCLUDE_FROM_ALL) + +-include(EigenConfigureTesting) ++#include(EigenConfigureTesting) + # fixme, not sure this line is still needed: +-enable_testing() # must be called from the root CMakeLists, see man page ++#enable_testing() # must be called from the root CMakeLists, see man page + + +-if(EIGEN_LEAVE_TEST_IN_ALL_TARGET) +- add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest +-else() +- add_subdirectory(test EXCLUDE_FROM_ALL) +-endif() +- +-if(EIGEN_LEAVE_TEST_IN_ALL_TARGET) +- add_subdirectory(blas) +- add_subdirectory(lapack) +-else() +- add_subdirectory(blas EXCLUDE_FROM_ALL) +- add_subdirectory(lapack EXCLUDE_FROM_ALL) +-endif() ++#if(EIGEN_LEAVE_TEST_IN_ALL_TARGET) ++# add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest ++#else() ++# add_subdirectory(test EXCLUDE_FROM_ALL) ++#endif() ++ ++#if(EIGEN_LEAVE_TEST_IN_ALL_TARGET) ++# add_subdirectory(blas) ++# add_subdirectory(lapack) ++#else() ++# add_subdirectory(blas EXCLUDE_FROM_ALL) ++# add_subdirectory(lapack EXCLUDE_FROM_ALL) ++#endif() + + add_subdirectory(unsupported) + +@@ -342,7 +342,7 @@ + add_subdirectory(bench/spbench EXCLUDE_FROM_ALL) + endif(NOT WIN32) + +-ei_testing_print_summary() ++#ei_testing_print_summary() + + message(STATUS "") + message(STATUS "Configured Eigen ${EIGEN_VERSION_NUMBER}") +--- a/unsupported/CMakeLists.txt~ 2012-07-02 20:33:58.775385403 -0400 ++++ b/unsupported/CMakeLists.txt 2012-07-02 20:34:06.495509672 -0400 +@@ -1,7 +1,7 @@ + add_subdirectory(Eigen) + add_subdirectory(doc EXCLUDE_FROM_ALL) +-if(EIGEN_LEAVE_TEST_IN_ALL_TARGET) +- add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest +-else() +- add_subdirectory(test EXCLUDE_FROM_ALL) +-endif() ++#if(EIGEN_LEAVE_TEST_IN_ALL_TARGET) ++# add_subdirectory(test) # can't do EXCLUDE_FROM_ALL here, breaks CTest ++#else() ++# add_subdirectory(test EXCLUDE_FROM_ALL) ++#endif()