buildroot/package/eigen/eigen.mk

32 lines
973 B
Makefile
Raw Permalink Normal View History

################################################################################
#
# eigen
#
################################################################################
EIGEN_VERSION = 3.4.0
package/eigen: use cmake-package infra The eigen package was introduced as a generic package, but upstream was in fact using CMake. The motivation of this change is to fix package detection with CMake. Eigen3 library normally installs a signature file named "signature_of_eigen3_matrix_library" to help library detection: https://gitlab.com/libeigen/eigen/-/blob/3.3.7/CMakeLists.txt#L423 The library also provide a CMake macro that use this file to detect it: https://gitlab.com/libeigen/eigen/-/blob/3.3.7/cmake/FindEigen3.cmake#L76 Without the signature file installed, packages searching for this library with this method will fail. Other packages usings pkg-config are not affected by this issue. By using the cmake-package infrastructure, all the needed files are now installed, fixing this CMake detection issue. Other changes in this patch: - Updated the Eigen git repository to the new url: https://gitlab.com/libeigen/eigen - Removed all build and install staging commands (now included in upstream cmake) - Package needs EIGEN_SUPPORTS_IN_SOURCE_BUILD = NO - Removed the BR2_PACKAGE_EIGEN_UNSUPPORTED_MODULES option, as this option is not proposed by the upstream CMake. Unsupported module header files are now unconditionally installed. As such, no need to introduce a legacy entry for BR2_PACKAGE_EIGEN_UNSUPPORTED_MODULES: users that had it enabled will still get the files installed, while those that did not will get them installed now. - Updated hash for source package, because the first component in the stored paths changed from eigen-eigen-323c052e1731/ to eigen-3.3.7/ and some mercurial related files (.hg_archival.txt, .hgtags) got dropped after the conversion to git. - Reformat hash file with two spaces delimiters - Define EIGEN_CONF_OPTS to set pkg-config .pc install path Signed-off-by: Julien Olivain <juju@cotds.org> Tested-by: Matthew Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-06-16 02:49:11 +08:00
EIGEN_SOURCE = eigen-$(EIGEN_VERSION).tar.bz2
EIGEN_SITE = $(call gitlab,libeigen,eigen,$(EIGEN_VERSION))
EIGEN_LICENSE = MPL2, BSD-3-Clause, LGPL-2.1
EIGEN_LICENSE_FILES = COPYING.MPL2 COPYING.BSD COPYING.LGPL COPYING.README
EIGEN_INSTALL_STAGING = YES
EIGEN_INSTALL_TARGET = NO
package/eigen: use cmake-package infra The eigen package was introduced as a generic package, but upstream was in fact using CMake. The motivation of this change is to fix package detection with CMake. Eigen3 library normally installs a signature file named "signature_of_eigen3_matrix_library" to help library detection: https://gitlab.com/libeigen/eigen/-/blob/3.3.7/CMakeLists.txt#L423 The library also provide a CMake macro that use this file to detect it: https://gitlab.com/libeigen/eigen/-/blob/3.3.7/cmake/FindEigen3.cmake#L76 Without the signature file installed, packages searching for this library with this method will fail. Other packages usings pkg-config are not affected by this issue. By using the cmake-package infrastructure, all the needed files are now installed, fixing this CMake detection issue. Other changes in this patch: - Updated the Eigen git repository to the new url: https://gitlab.com/libeigen/eigen - Removed all build and install staging commands (now included in upstream cmake) - Package needs EIGEN_SUPPORTS_IN_SOURCE_BUILD = NO - Removed the BR2_PACKAGE_EIGEN_UNSUPPORTED_MODULES option, as this option is not proposed by the upstream CMake. Unsupported module header files are now unconditionally installed. As such, no need to introduce a legacy entry for BR2_PACKAGE_EIGEN_UNSUPPORTED_MODULES: users that had it enabled will still get the files installed, while those that did not will get them installed now. - Updated hash for source package, because the first component in the stored paths changed from eigen-eigen-323c052e1731/ to eigen-3.3.7/ and some mercurial related files (.hg_archival.txt, .hgtags) got dropped after the conversion to git. - Reformat hash file with two spaces delimiters - Define EIGEN_CONF_OPTS to set pkg-config .pc install path Signed-off-by: Julien Olivain <juju@cotds.org> Tested-by: Matthew Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-06-16 02:49:11 +08:00
EIGEN_SUPPORTS_IN_SOURCE_BUILD = NO
package/eigen: use cmake-package infra The eigen package was introduced as a generic package, but upstream was in fact using CMake. The motivation of this change is to fix package detection with CMake. Eigen3 library normally installs a signature file named "signature_of_eigen3_matrix_library" to help library detection: https://gitlab.com/libeigen/eigen/-/blob/3.3.7/CMakeLists.txt#L423 The library also provide a CMake macro that use this file to detect it: https://gitlab.com/libeigen/eigen/-/blob/3.3.7/cmake/FindEigen3.cmake#L76 Without the signature file installed, packages searching for this library with this method will fail. Other packages usings pkg-config are not affected by this issue. By using the cmake-package infrastructure, all the needed files are now installed, fixing this CMake detection issue. Other changes in this patch: - Updated the Eigen git repository to the new url: https://gitlab.com/libeigen/eigen - Removed all build and install staging commands (now included in upstream cmake) - Package needs EIGEN_SUPPORTS_IN_SOURCE_BUILD = NO - Removed the BR2_PACKAGE_EIGEN_UNSUPPORTED_MODULES option, as this option is not proposed by the upstream CMake. Unsupported module header files are now unconditionally installed. As such, no need to introduce a legacy entry for BR2_PACKAGE_EIGEN_UNSUPPORTED_MODULES: users that had it enabled will still get the files installed, while those that did not will get them installed now. - Updated hash for source package, because the first component in the stored paths changed from eigen-eigen-323c052e1731/ to eigen-3.3.7/ and some mercurial related files (.hg_archival.txt, .hgtags) got dropped after the conversion to git. - Reformat hash file with two spaces delimiters - Define EIGEN_CONF_OPTS to set pkg-config .pc install path Signed-off-by: Julien Olivain <juju@cotds.org> Tested-by: Matthew Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-06-16 02:49:11 +08:00
# Default Eigen CMake installs .pc file in /usr/share/pkgconfig
# change it to /usr/lib/pkgconfig, to be consistent with other packages.
EIGEN_CONF_OPTS = -DPKGCONFIG_INSTALL_DIR=/usr/lib/pkgconfig
ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
EIGEN_CONF_OPTS += \
-DCMAKE_Fortran_COMPILER=$(TARGET_FC) \
-DEIGEN_BUILD_BLAS=ON \
-DEIGEN_BUILD_LAPACK=ON
else
EIGEN_CONF_OPTS += \
-DEIGEN_BUILD_BLAS=OFF \
-DEIGEN_BUILD_LAPACK=OFF
endif
package/eigen: use cmake-package infra The eigen package was introduced as a generic package, but upstream was in fact using CMake. The motivation of this change is to fix package detection with CMake. Eigen3 library normally installs a signature file named "signature_of_eigen3_matrix_library" to help library detection: https://gitlab.com/libeigen/eigen/-/blob/3.3.7/CMakeLists.txt#L423 The library also provide a CMake macro that use this file to detect it: https://gitlab.com/libeigen/eigen/-/blob/3.3.7/cmake/FindEigen3.cmake#L76 Without the signature file installed, packages searching for this library with this method will fail. Other packages usings pkg-config are not affected by this issue. By using the cmake-package infrastructure, all the needed files are now installed, fixing this CMake detection issue. Other changes in this patch: - Updated the Eigen git repository to the new url: https://gitlab.com/libeigen/eigen - Removed all build and install staging commands (now included in upstream cmake) - Package needs EIGEN_SUPPORTS_IN_SOURCE_BUILD = NO - Removed the BR2_PACKAGE_EIGEN_UNSUPPORTED_MODULES option, as this option is not proposed by the upstream CMake. Unsupported module header files are now unconditionally installed. As such, no need to introduce a legacy entry for BR2_PACKAGE_EIGEN_UNSUPPORTED_MODULES: users that had it enabled will still get the files installed, while those that did not will get them installed now. - Updated hash for source package, because the first component in the stored paths changed from eigen-eigen-323c052e1731/ to eigen-3.3.7/ and some mercurial related files (.hg_archival.txt, .hgtags) got dropped after the conversion to git. - Reformat hash file with two spaces delimiters - Define EIGEN_CONF_OPTS to set pkg-config .pc install path Signed-off-by: Julien Olivain <juju@cotds.org> Tested-by: Matthew Weber <matthew.weber@rockwellcollins.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-06-16 02:49:11 +08:00
$(eval $(cmake-package))