blob: 787ace440c720096170d0c6ea60427dd86f44149 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "Linear Algebra PACKage"
2URL = "http://www.netlib.org/lapack"
3LICENSE = "BSD-3-Clause"
Patrick Williams03907ee2022-05-01 06:28:52 -05004LIC_FILES_CHKSUM = "file://LICENSE;md5=a32c99f24d097c72d1857e533b55642b"
Andrew Geissler82c905d2020-04-13 13:39:40 -05005
6# Recipe needs FORTRAN support (copied from conf/local.conf.sample.extended)
7# Enabling FORTRAN
8# Note this is not officially supported and is just illustrated here to
9# show an example of how it can be done
10# You'll also need your fortran recipe to depend on libgfortran
Patrick Williams213cb262021-08-07 19:21:33 -050011#FORTRAN:forcevariable = ",fortran"
12#RUNTIMETARGET:append:pn-gcc-runtime = " libquadmath"
Andrew Geissler82c905d2020-04-13 13:39:40 -050013
Patrick Williams2a254922023-08-11 09:48:11 -050014DEPENDS = "libgfortran \
15 ${@bb.utils.contains('PTEST_ENABLED', '1', 'rsync-native', '', d)} \
16 "
17RDEPENDS:${PN}-ptest += "cmake"
Andrew Geissler82c905d2020-04-13 13:39:40 -050018
Patrick Williams03907ee2022-05-01 06:28:52 -050019SRCREV = "32b062a33352e05771dcc01b981ebe961bf2e42f"
Patrick Williams2a254922023-08-11 09:48:11 -050020SRC_URI = "git://github.com/Reference-LAPACK/lapack.git;protocol=https;branch=master \
21 ${@bb.utils.contains('PTEST_ENABLED', '1', 'file://run-ptest', '', d)} \
22 "
Andrew Geissler82c905d2020-04-13 13:39:40 -050023S = "${WORKDIR}/git"
24
Patrick Williams92b42cb2022-09-03 06:53:57 -050025PACKAGECONFIG ?= ""
26PACKAGECONFIG[lapacke] = "-DLAPACKE=ON,-DLAPACKE=OFF"
27
Patrick Williams2a254922023-08-11 09:48:11 -050028EXTRA_OECMAKE = " -DBUILD_SHARED_LIBS=ON \
29 ${@bb.utils.contains('PTEST_ENABLED', '1', ' -DBUILD_TESTING=ON', '', d)} \
30 "
Andrew Geissler82c905d2020-04-13 13:39:40 -050031OECMAKE_GENERATOR = "Unix Makefiles"
32
Patrick Williams2a254922023-08-11 09:48:11 -050033inherit cmake pkgconfig ptest
Andrew Geissler82c905d2020-04-13 13:39:40 -050034EXCLUDE_FROM_WORLD = "1"
Patrick Williams2a254922023-08-11 09:48:11 -050035
36do_install_ptest () {
37 rsync -a ${B}/TESTING ${D}${PTEST_PATH} \
38 --exclude CMakeFiles \
39 --exclude cmake_install.cmake \
40 --exclude Makefile
41 rsync -a ${B}/BLAS ${D}${PTEST_PATH} \
42 --exclude CMakeFiles \
43 --exclude cmake_install.cmake \
44 --exclude Makefile
45 rsync -a ${B}/LAPACKE ${D}${PTEST_PATH} \
46 --exclude CMakeFiles \
47 --exclude cmake_install.cmake \
48 --exclude Makefile
49 cp -r ${B}/bin ${D}${PTEST_PATH}
50 cp -r ${B}/lapack_testing.py ${D}${PTEST_PATH}
51 cp ${B}/CTestTestfile.cmake ${D}${PTEST_PATH}
52 cp ${S}/TESTING/*.in ${S}/TESTING/runtest.cmake ${D}${PTEST_PATH}/TESTING
53 cp ${S}/BLAS/TESTING/*.in ${D}${PTEST_PATH}/BLAS/TESTING
54 sed -i -e 's#${B}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
55 sed -i -e 's#${S}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
56 sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
57 sed -i -e 's#${PYTHON}#/usr/bin/python3#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
58 sed -i -e 's#${WORKDIR}##g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
59}