Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 1 | LICENSE = "GPL-2.0-only & GPL-3.0-only & BSD-3-Clause & LGPL-2.0-only & Apache-2.0" |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 2 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=5fa987762101f748a6cdd951b64ffc6b" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 3 | SRC_URI = "git://github.com/DrTimothyAldenDavis/SuiteSparse;protocol=https;branch=master \ |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 4 | file://0001-Preserve-CXXFLAGS-from-environment-in-Mongoose.patch \ |
| 5 | file://0002-Preserve-links-when-installing-libmetis.patch \ |
| 6 | file://0003-Add-version-information-to-libmetis.patch \ |
| 7 | " |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 8 | SRCREV = "538273cfd53720a10e34a3d80d3779b607e1ac26" |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 9 | |
| 10 | S = "${WORKDIR}/git" |
| 11 | |
| 12 | DEPENDS = "cmake-native lapack gmp mpfr chrpath-native" |
| 13 | |
| 14 | PROVIDES = "mongoose graphblas" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 15 | RPROVIDES:${PN} = "mongoose graphblas" |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 16 | |
| 17 | # The values of $CC, $CXX, and $LD that Bitbake uses have spaces in them which |
| 18 | # causes problems when the SuiteSparse Makefiles try to pass these values on |
| 19 | # the command line. To get around this problem, set these variables to only the |
| 20 | # program name and prepend the rest of the value onto the corresponding FLAGS |
| 21 | # variable. |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 22 | CFLAGS:prepend := "${@" ".join(d.getVar('CC', True).split()[1:])} " |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 23 | export CC := "${@d.getVar('CC', True).split()[0]}" |
| 24 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 25 | CXXFLAGS:prepend := "${@" ".join(d.getVar('CXX', True).split()[1:])} " |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 26 | export CXX := "${@d.getVar('CXX', True).split()[0]}" |
| 27 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 28 | LDFLAGS:prepend := "${@" ".join(d.getVar('LD', True).split()[1:])} " |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 29 | export LD := "${@d.getVar('LD', True).split()[0]}" |
| 30 | |
| 31 | export CMAKE_OPTIONS = " \ |
| 32 | -DCMAKE_INSTALL_PREFIX=${D}${prefix} \ |
| 33 | -DCMAKE_INSTALL_LIBDIR=${baselib} \ |
| 34 | " |
| 35 | |
| 36 | do_compile () { |
| 37 | oe_runmake library |
| 38 | } |
| 39 | |
| 40 | do_install () { |
| 41 | oe_runmake prefix=${D}${prefix} INSTALL=${D}${prefix} install |
| 42 | |
| 43 | # Remove runtime paths from shared libraries |
| 44 | for file in ${D}${libdir}/*.so.*; do |
| 45 | if [ ! -L "$file" ]; then |
| 46 | chrpath -d "$file" |
| 47 | fi |
| 48 | done |
| 49 | } |
| 50 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 51 | FILES:${PN} += " \ |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 52 | ${libdir}/libmongoose.so.* \ |
| 53 | ${libdir}/libgraphblas.so.* \ |
| 54 | ${libdir}/libmetis.so.* \ |
| 55 | ${libdir}/libsuitesparseconfig.so.* \ |
| 56 | ${libdir}/libamd.so.* \ |
| 57 | ${libdir}/libbtf.so.* \ |
| 58 | ${libdir}/libcamd.so.* \ |
| 59 | ${libdir}/libccolamd.so.* \ |
| 60 | ${libdir}/libcolamd.so.* \ |
| 61 | ${libdir}/libcholmod.so.* \ |
| 62 | ${libdir}/libcxsparse.so.* \ |
| 63 | ${libdir}/libldl.so.* \ |
| 64 | ${libdir}/libklu.so.* \ |
| 65 | ${libdir}/libumfpack.so.* \ |
| 66 | ${libdir}/librbio.so.* \ |
| 67 | ${libdir}/libspqr.so.* \ |
| 68 | ${libdir}/libsliplu.so.* \ |
| 69 | ${bindir}/mongoose \ |
| 70 | " |
| 71 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 72 | FILES:${PN}-staticdev += "${libdir}/libmongoose.a" |
| 73 | FILES:${PN}-dev += "${includedir} ${libdir}/*.so" |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 74 | |
| 75 | EXCLUDE_FROM_WORLD = "1" |