diff options
5 files changed, 192 insertions, 0 deletions
diff --git a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb index 4d86ef9775..c08d32bbdb 100644 --- a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb +++ b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb | |||
| @@ -276,6 +276,7 @@ RDEPENDS_packagegroup-meta-oe-devtools ="\ | |||
| 276 | rapidjson \ | 276 | rapidjson \ |
| 277 | sip3 \ | 277 | sip3 \ |
| 278 | squashfs-tools-ng \ | 278 | squashfs-tools-ng \ |
| 279 | suitesparse \ | ||
| 279 | uftrace \ | 280 | uftrace \ |
| 280 | libxerces-c \ | 281 | libxerces-c \ |
| 281 | xerces-c-samples \ | 282 | xerces-c-samples \ |
diff --git a/meta-oe/recipes-devtools/suitesparse/suitesparse/0001-Preserve-CXXFLAGS-from-environment-in-Mongoose.patch b/meta-oe/recipes-devtools/suitesparse/suitesparse/0001-Preserve-CXXFLAGS-from-environment-in-Mongoose.patch new file mode 100644 index 0000000000..c955b5fa7d --- /dev/null +++ b/meta-oe/recipes-devtools/suitesparse/suitesparse/0001-Preserve-CXXFLAGS-from-environment-in-Mongoose.patch | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | From 83628b471a1a79dae50bb158fca9448b668dd3a6 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Gregory Anders <greg@gpanders.com> | ||
| 3 | Date: Wed, 21 Oct 2020 10:43:16 -0600 | ||
| 4 | Subject: [PATCH] Preserve CXXFLAGS from environment in Mongoose | ||
| 5 | |||
| 6 | This allows CXXFLAGS set in the environment to also be used in the CMake | ||
| 7 | build process, instead of overwriting them. This is useful in a cross | ||
| 8 | compile context where the CXXFLAGS variable might contain necessary | ||
| 9 | flags for cross compiling. | ||
| 10 | --- | ||
| 11 | Mongoose/CMakeLists.txt | 6 +++--- | ||
| 12 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/Mongoose/CMakeLists.txt b/Mongoose/CMakeLists.txt | ||
| 15 | index 7e134ab..91a7f70 100644 | ||
| 16 | --- a/Mongoose/CMakeLists.txt | ||
| 17 | +++ b/Mongoose/CMakeLists.txt | ||
| 18 | @@ -321,14 +321,14 @@ add_test(Unit_Test_EdgeSep ./tests/mongoose_unit_test_edgesep) | ||
| 19 | message(STATUS "CMAKE_CXX_COMPILER: " ${BoldBlue} ${CMAKE_CXX_COMPILER_ID} ${ColourReset}) | ||
| 20 | if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") | ||
| 21 | # using Clang | ||
| 22 | - SET(CMAKE_CXX_FLAGS "-O3 -fwrapv") | ||
| 23 | + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fwrapv") | ||
| 24 | # Debug flags for Clang | ||
| 25 | SET(CMAKE_CXX_FLAGS_DEBUG "--coverage -g -fwrapv") | ||
| 26 | SET(CMAKE_C_FLAGS_DEBUG "--coverage -g") | ||
| 27 | SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "--coverage -g") | ||
| 28 | elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") | ||
| 29 | # using GCC | ||
| 30 | - SET(CMAKE_CXX_FLAGS "-O3 -fwrapv") | ||
| 31 | + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -fwrapv") | ||
| 32 | # Debug flags for GCC | ||
| 33 | if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.6") | ||
| 34 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") | ||
| 35 | @@ -339,7 +339,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") | ||
| 36 | SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "-fprofile-arcs -ftest-coverage") | ||
| 37 | elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") | ||
| 38 | # using Intel C++ | ||
| 39 | - SET(CMAKE_CXX_FLAGS "-O3 -no-prec-div -xHOST -ipo -fwrapv") | ||
| 40 | + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -no-prec-div -xHOST -ipo -fwrapv") | ||
| 41 | # Debug flags for Intel | ||
| 42 | SET(CMAKE_CXX_FLAGS_DEBUG "-g -O0 -Wall -fwrapv") | ||
| 43 | SET(CMAKE_C_FLAGS_DEBUG "-g -O0 -Wall") | ||
diff --git a/meta-oe/recipes-devtools/suitesparse/suitesparse/0002-Preserve-links-when-installing-libmetis.patch b/meta-oe/recipes-devtools/suitesparse/suitesparse/0002-Preserve-links-when-installing-libmetis.patch new file mode 100644 index 0000000000..190eaf164d --- /dev/null +++ b/meta-oe/recipes-devtools/suitesparse/suitesparse/0002-Preserve-links-when-installing-libmetis.patch | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | From 31175fb408a4f5e85e39a9aabd4a29f9d9c1fe25 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Gregory Anders <greg@gpanders.com> | ||
| 3 | Date: Wed, 21 Oct 2020 15:26:52 -0600 | ||
| 4 | Subject: [PATCH] Preserve links when installing libmetis | ||
| 5 | |||
| 6 | --- | ||
| 7 | Makefile | 2 +- | ||
| 8 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 9 | |||
| 10 | diff --git a/Makefile b/Makefile | ||
| 11 | index 7631955..57fd022 100644 | ||
| 12 | --- a/Makefile | ||
| 13 | +++ b/Makefile | ||
| 14 | @@ -76,7 +76,7 @@ ifeq (,$(MY_METIS_LIB)) | ||
| 15 | @mkdir -p $(INSTALL_LIB) | ||
| 16 | @mkdir -p $(INSTALL_INCLUDE) | ||
| 17 | @mkdir -p $(INSTALL_DOC) | ||
| 18 | - - $(CP) lib/libmetis.* $(INSTALL_LIB) | ||
| 19 | + - $(CP) -d lib/libmetis.* $(INSTALL_LIB) | ||
| 20 | - $(CP) metis-5.1.0/manual/manual.pdf $(INSTALL_DOC)/METIS_manual.pdf | ||
| 21 | - $(CP) metis-5.1.0/README.txt $(INSTALL_DOC)/METIS_README.txt | ||
| 22 | # the following is needed only on the Mac, so *.dylib is hardcoded: | ||
diff --git a/meta-oe/recipes-devtools/suitesparse/suitesparse/0003-Add-version-information-to-libmetis.patch b/meta-oe/recipes-devtools/suitesparse/suitesparse/0003-Add-version-information-to-libmetis.patch new file mode 100644 index 0000000000..dee6039a81 --- /dev/null +++ b/meta-oe/recipes-devtools/suitesparse/suitesparse/0003-Add-version-information-to-libmetis.patch | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | From 11ab355fdda93b762fcc07ac3f7c6ab1be0a5f5a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Gregory Anders <greg@gpanders.com> | ||
| 3 | Date: Wed, 21 Oct 2020 15:27:07 -0600 | ||
| 4 | Subject: [PATCH] Add version information to libmetis | ||
| 5 | |||
| 6 | --- | ||
| 7 | metis-5.1.0/Makefile | 8 ++++---- | ||
| 8 | metis-5.1.0/libmetis/CMakeLists.txt | 1 + | ||
| 9 | 2 files changed, 5 insertions(+), 4 deletions(-) | ||
| 10 | |||
| 11 | diff --git a/metis-5.1.0/Makefile b/metis-5.1.0/Makefile | ||
| 12 | index 9cc03b9..c445d85 100644 | ||
| 13 | --- a/metis-5.1.0/Makefile | ||
| 14 | +++ b/metis-5.1.0/Makefile | ||
| 15 | @@ -18,8 +18,11 @@ systype = $(shell uname -s) | ||
| 16 | |||
| 17 | BUILDDIR = build/$(systype)-$(cputype) | ||
| 18 | |||
| 19 | +VERNUM=5.1.0 | ||
| 20 | +PKGNAME=metis-$(VERNUM) | ||
| 21 | + | ||
| 22 | # Process configuration options. | ||
| 23 | -CONFIG_FLAGS = | ||
| 24 | +CONFIG_FLAGS = -DMETIS_VERSION=$(VERNUM) | ||
| 25 | ifeq ($(gklib_path), not-set) | ||
| 26 | gklib_path = GKlib | ||
| 27 | endif | ||
| 28 | @@ -52,9 +55,6 @@ ifneq ($(cc), not-set) | ||
| 29 | CONFIG_FLAGS += -DCMAKE_C_COMPILER=$(cc) | ||
| 30 | endif | ||
| 31 | |||
| 32 | -VERNUM=5.1.0 | ||
| 33 | -PKGNAME=metis-$(VERNUM) | ||
| 34 | - | ||
| 35 | JOBS ?= 1 | ||
| 36 | |||
| 37 | define run-config | ||
| 38 | diff --git a/metis-5.1.0/libmetis/CMakeLists.txt b/metis-5.1.0/libmetis/CMakeLists.txt | ||
| 39 | index 120e94d..11bde87 100644 | ||
| 40 | --- a/metis-5.1.0/libmetis/CMakeLists.txt | ||
| 41 | +++ b/metis-5.1.0/libmetis/CMakeLists.txt | ||
| 42 | @@ -4,6 +4,7 @@ include_directories(.) | ||
| 43 | file(GLOB metis_sources *.c) | ||
| 44 | # Build libmetis. | ||
| 45 | add_library(metis ${METIS_LIBRARY_TYPE} ${GKlib_sources} ${metis_sources}) | ||
| 46 | +set_target_properties(metis PROPERTIES VERSION ${METIS_VERSION}) | ||
| 47 | if(UNIX) | ||
| 48 | target_link_libraries(metis m) | ||
| 49 | endif() | ||
diff --git a/meta-oe/recipes-devtools/suitesparse/suitesparse_5.8.1.bb b/meta-oe/recipes-devtools/suitesparse/suitesparse_5.8.1.bb new file mode 100644 index 0000000000..af8b1f8568 --- /dev/null +++ b/meta-oe/recipes-devtools/suitesparse/suitesparse_5.8.1.bb | |||
| @@ -0,0 +1,77 @@ | |||
| 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" | ||
