Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 1 | LICENSE = "GPLv2 & GPLv3 & BSD-3-Clause & LGPL-2.0 & Apache-2.0" |
| 2 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f9f2b9d61cb769a67c4cd079e1166de7" |
| 3 | SRC_URI = "git://github.com/DrTimothyAldenDavis/SuiteSparse;protocol=https \ |
| 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 | " |
| 8 | |
| 9 | SRC_URI[md5sum] = "c414679bbc9432a3def01b31ad921140" |
| 10 | SRC_URI[sha256sum] = "06726e471fbaa55f792578f9b4ab282ea9d008cf39ddcc3b42b73400acddef40" |
| 11 | |
| 12 | SRCREV = "v${PV}" |
| 13 | |
| 14 | S = "${WORKDIR}/git" |
| 15 | |
| 16 | DEPENDS = "cmake-native lapack gmp mpfr chrpath-native" |
| 17 | |
| 18 | PROVIDES = "mongoose graphblas" |
| 19 | RPROVIDES_${PN} = "mongoose graphblas" |
| 20 | |
| 21 | # The values of $CC, $CXX, and $LD that Bitbake uses have spaces in them which |
| 22 | # causes problems when the SuiteSparse Makefiles try to pass these values on |
| 23 | # the command line. To get around this problem, set these variables to only the |
| 24 | # program name and prepend the rest of the value onto the corresponding FLAGS |
| 25 | # variable. |
| 26 | CFLAGS_prepend := "${@" ".join(d.getVar('CC', True).split()[1:])} " |
| 27 | export CC := "${@d.getVar('CC', True).split()[0]}" |
| 28 | |
| 29 | CXXFLAGS_prepend := "${@" ".join(d.getVar('CXX', True).split()[1:])} " |
| 30 | export CXX := "${@d.getVar('CXX', True).split()[0]}" |
| 31 | |
| 32 | LDFLAGS_prepend := "${@" ".join(d.getVar('LD', True).split()[1:])} " |
| 33 | export LD := "${@d.getVar('LD', True).split()[0]}" |
| 34 | |
| 35 | export CMAKE_OPTIONS = " \ |
| 36 | -DCMAKE_INSTALL_PREFIX=${D}${prefix} \ |
| 37 | -DCMAKE_INSTALL_LIBDIR=${baselib} \ |
| 38 | " |
| 39 | |
| 40 | do_compile () { |
| 41 | oe_runmake library |
| 42 | } |
| 43 | |
| 44 | do_install () { |
| 45 | oe_runmake prefix=${D}${prefix} INSTALL=${D}${prefix} install |
| 46 | |
| 47 | # Remove runtime paths from shared libraries |
| 48 | for file in ${D}${libdir}/*.so.*; do |
| 49 | if [ ! -L "$file" ]; then |
| 50 | chrpath -d "$file" |
| 51 | fi |
| 52 | done |
| 53 | } |
| 54 | |
| 55 | FILES_${PN} += " \ |
| 56 | ${libdir}/libmongoose.so.* \ |
| 57 | ${libdir}/libgraphblas.so.* \ |
| 58 | ${libdir}/libmetis.so.* \ |
| 59 | ${libdir}/libsuitesparseconfig.so.* \ |
| 60 | ${libdir}/libamd.so.* \ |
| 61 | ${libdir}/libbtf.so.* \ |
| 62 | ${libdir}/libcamd.so.* \ |
| 63 | ${libdir}/libccolamd.so.* \ |
| 64 | ${libdir}/libcolamd.so.* \ |
| 65 | ${libdir}/libcholmod.so.* \ |
| 66 | ${libdir}/libcxsparse.so.* \ |
| 67 | ${libdir}/libldl.so.* \ |
| 68 | ${libdir}/libklu.so.* \ |
| 69 | ${libdir}/libumfpack.so.* \ |
| 70 | ${libdir}/librbio.so.* \ |
| 71 | ${libdir}/libspqr.so.* \ |
| 72 | ${libdir}/libsliplu.so.* \ |
| 73 | ${bindir}/mongoose \ |
| 74 | " |
| 75 | |
| 76 | FILES_${PN}-staticdev += "${libdir}/libmongoose.a" |
| 77 | FILES_${PN}-dev += "${includedir} ${libdir}/*.so" |
| 78 | |
| 79 | EXCLUDE_FROM_WORLD = "1" |
| 80 | |