blob: 9ccf2d0bff48eb1bcbe03ebc2097ae77d450110d [file] [log] [blame]
Andrew Geissler4b7c1152020-11-30 19:55:29 -06001LICENSE = "GPLv2 & GPLv3 & BSD-3-Clause & LGPL-2.0 & Apache-2.0"
2LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f9f2b9d61cb769a67c4cd079e1166de7"
3SRC_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
9SRC_URI[md5sum] = "c414679bbc9432a3def01b31ad921140"
10SRC_URI[sha256sum] = "06726e471fbaa55f792578f9b4ab282ea9d008cf39ddcc3b42b73400acddef40"
11
12SRCREV = "v${PV}"
13
14S = "${WORKDIR}/git"
15
16DEPENDS = "cmake-native lapack gmp mpfr chrpath-native"
17
18PROVIDES = "mongoose graphblas"
19RPROVIDES_${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.
26CFLAGS_prepend := "${@" ".join(d.getVar('CC', True).split()[1:])} "
27export CC := "${@d.getVar('CC', True).split()[0]}"
28
29CXXFLAGS_prepend := "${@" ".join(d.getVar('CXX', True).split()[1:])} "
30export CXX := "${@d.getVar('CXX', True).split()[0]}"
31
32LDFLAGS_prepend := "${@" ".join(d.getVar('LD', True).split()[1:])} "
33export LD := "${@d.getVar('LD', True).split()[0]}"
34
35export CMAKE_OPTIONS = " \
36 -DCMAKE_INSTALL_PREFIX=${D}${prefix} \
37 -DCMAKE_INSTALL_LIBDIR=${baselib} \
38"
39
40do_compile () {
41 oe_runmake library
42}
43
44do_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
55FILES_${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
76FILES_${PN}-staticdev += "${libdir}/libmongoose.a"
77FILES_${PN}-dev += "${includedir} ${libdir}/*.so"
78
79EXCLUDE_FROM_WORLD = "1"
80