suitesparse_5.8.1.bb 2.5 KB

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