Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "Linear Algebra PACKage" |
| 2 | URL = "http://www.netlib.org/lapack" |
| 3 | LICENSE = "BSD-3-Clause" |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=a32c99f24d097c72d1857e533b55642b" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 5 | |
| 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 Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 11 | #FORTRAN:forcevariable = ",fortran" |
| 12 | #RUNTIMETARGET:append:pn-gcc-runtime = " libquadmath" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 13 | |
Patrick Williams | 2a25492 | 2023-08-11 09:48:11 -0500 | [diff] [blame] | 14 | DEPENDS = "libgfortran \ |
| 15 | ${@bb.utils.contains('PTEST_ENABLED', '1', 'rsync-native', '', d)} \ |
| 16 | " |
| 17 | RDEPENDS:${PN}-ptest += "cmake" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 18 | |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 19 | SRCREV = "32b062a33352e05771dcc01b981ebe961bf2e42f" |
Patrick Williams | 2a25492 | 2023-08-11 09:48:11 -0500 | [diff] [blame] | 20 | SRC_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 Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 23 | S = "${WORKDIR}/git" |
| 24 | |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 25 | PACKAGECONFIG ?= "" |
| 26 | PACKAGECONFIG[lapacke] = "-DLAPACKE=ON,-DLAPACKE=OFF" |
| 27 | |
Patrick Williams | 2a25492 | 2023-08-11 09:48:11 -0500 | [diff] [blame] | 28 | EXTRA_OECMAKE = " -DBUILD_SHARED_LIBS=ON \ |
| 29 | ${@bb.utils.contains('PTEST_ENABLED', '1', ' -DBUILD_TESTING=ON', '', d)} \ |
| 30 | " |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 31 | OECMAKE_GENERATOR = "Unix Makefiles" |
| 32 | |
Patrick Williams | 2a25492 | 2023-08-11 09:48:11 -0500 | [diff] [blame] | 33 | inherit cmake pkgconfig ptest |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 34 | EXCLUDE_FROM_WORLD = "1" |
Patrick Williams | 2a25492 | 2023-08-11 09:48:11 -0500 | [diff] [blame] | 35 | |
| 36 | do_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 | } |