1LICENSE = "GPL-2.0-only & GPL-3.0-only & BSD-3-Clause & LGPL-2.0-only & Apache-2.0" 2LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=5fa987762101f748a6cdd951b64ffc6b" 3SRC_URI = "git://github.com/DrTimothyAldenDavis/SuiteSparse;protocol=https;branch=master \ 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 " 8SRCREV = "538273cfd53720a10e34a3d80d3779b607e1ac26" 9 10S = "${WORKDIR}/git" 11 12DEPENDS = "cmake-native lapack gmp mpfr chrpath-native" 13 14PROVIDES = "mongoose graphblas" 15RPROVIDES:${PN} = "mongoose graphblas" 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. 22CFLAGS:prepend := "${@" ".join(d.getVar('CC', True).split()[1:])} " 23export CC := "${@d.getVar('CC', True).split()[0]}" 24 25CXXFLAGS:prepend := "${@" ".join(d.getVar('CXX', True).split()[1:])} " 26export CXX := "${@d.getVar('CXX', True).split()[0]}" 27 28LDFLAGS:prepend := "${@" ".join(d.getVar('LD', True).split()[1:])} " 29export LD := "${@d.getVar('LD', True).split()[0]}" 30 31export CMAKE_OPTIONS = " \ 32 -DCMAKE_INSTALL_PREFIX=${D}${prefix} \ 33 -DCMAKE_INSTALL_LIBDIR=${baselib} \ 34" 35 36do_compile () { 37 oe_runmake library 38} 39 40do_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 51FILES:${PN} += " \ 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 72FILES:${PN}-staticdev += "${libdir}/libmongoose.a" 73FILES:${PN}-dev += "${includedir} ${libdir}/*.so" 74 75EXCLUDE_FROM_WORLD = "1" 76