blob: 56cbfce20eb6cf34a7c2f0c2dd464a4c9eb40f87 [file] [log] [blame]
Andrew Geissler9aee5002022-03-30 16:27:02 +00001LICENSE = "GPL-2.0-only & GPL-3.0-only & BSD-3-Clause & LGPL-2.0-only & Apache-2.0"
Andrew Geissler69721092021-07-23 12:57:00 -04002LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=5fa987762101f748a6cdd951b64ffc6b"
Andrew Geissler517393d2023-01-13 08:55:19 -06003SRC_URI = "git://github.com/DrTimothyAldenDavis/SuiteSparse;protocol=https;branch=stable \
Andrew Geissler4b7c1152020-11-30 19:55:29 -06004 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 Geissler69721092021-07-23 12:57:00 -04008SRCREV = "538273cfd53720a10e34a3d80d3779b607e1ac26"
Andrew Geissler4b7c1152020-11-30 19:55:29 -06009
10S = "${WORKDIR}/git"
11
12DEPENDS = "cmake-native lapack gmp mpfr chrpath-native"
13
14PROVIDES = "mongoose graphblas"
Patrick Williams213cb262021-08-07 19:21:33 -050015RPROVIDES:${PN} = "mongoose graphblas"
Andrew Geissler4b7c1152020-11-30 19:55:29 -060016
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 Williams213cb262021-08-07 19:21:33 -050022CFLAGS:prepend := "${@" ".join(d.getVar('CC', True).split()[1:])} "
Andrew Geissler4b7c1152020-11-30 19:55:29 -060023export CC := "${@d.getVar('CC', True).split()[0]}"
24
Patrick Williams213cb262021-08-07 19:21:33 -050025CXXFLAGS:prepend := "${@" ".join(d.getVar('CXX', True).split()[1:])} "
Andrew Geissler4b7c1152020-11-30 19:55:29 -060026export CXX := "${@d.getVar('CXX', True).split()[0]}"
27
Patrick Williams213cb262021-08-07 19:21:33 -050028LDFLAGS:prepend := "${@" ".join(d.getVar('LD', True).split()[1:])} "
Andrew Geissler4b7c1152020-11-30 19:55:29 -060029export 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
Patrick Williams213cb262021-08-07 19:21:33 -050051FILES:${PN} += " \
Andrew Geissler4b7c1152020-11-30 19:55:29 -060052 ${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 Williams213cb262021-08-07 19:21:33 -050072FILES:${PN}-staticdev += "${libdir}/libmongoose.a"
73FILES:${PN}-dev += "${includedir} ${libdir}/*.so"
Andrew Geissler4b7c1152020-11-30 19:55:29 -060074
75EXCLUDE_FROM_WORLD = "1"