clean up some common definitions across rust versions

These bits and pieces had evidently been copy-pasted forward into each
new recipe version, but now they are all identical and can be tidied up.
This commit is contained in:
Dan Callaghan
2020-12-17 17:27:35 +10:00
parent f56fd4ec68
commit 8cfc3c9826
19 changed files with 8 additions and 165 deletions

View File

@@ -2,6 +2,7 @@ SUMMARY = "Rust standard libaries"
HOMEPAGE = "http://www.rust-lang.org"
SECTION = "devel"
LICENSE = "MIT | Apache-2.0"
LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"
RUSTLIB_DEP = ""
inherit cargo
@@ -12,7 +13,9 @@ RUSTFLAGS += "-L ${STAGING_LIBDIR} -C link-arg=-Wl,-soname,libstd.so"
S = "${RUSTSRC}/src/libstd"
CARGO_FEATURES ?= "panic-unwind backtrace"
CARGO_BUILD_FLAGS += "--features '${CARGO_FEATURES}'"
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
do_compile_prepend () {
export CARGO_TARGET_DIR="${B}"

View File

@@ -1,8 +1,2 @@
require rust-source-${PV}.inc
require libstd-rs.inc
LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"
CARGO_FEATURES ?= "panic-unwind backtrace"
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"

View File

@@ -1,8 +1,2 @@
require rust-source-${PV}.inc
require libstd-rs.inc
LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"
CARGO_FEATURES ?= "panic-unwind backtrace"
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"

View File

@@ -1,8 +1,2 @@
require rust-source-${PV}.inc
require libstd-rs.inc
LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"
CARGO_FEATURES ?= "panic-unwind backtrace"
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"

View File

@@ -1,8 +1,2 @@
require rust-source-${PV}.inc
require libstd-rs.inc
LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"
CARGO_FEATURES ?= "panic-unwind backtrace"
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"

View File

@@ -1,8 +1,2 @@
require rust-source-${PV}.inc
require libstd-rs.inc
LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"
CARGO_FEATURES ?= "panic-unwind backtrace"
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"

View File

@@ -1,8 +1,2 @@
require rust-source-${PV}.inc
require libstd-rs.inc
LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"
CARGO_FEATURES ?= "panic-unwind backtrace"
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"

View File

@@ -1,8 +1,2 @@
require rust-source-${PV}.inc
require libstd-rs.inc
LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"
CARGO_FEATURES ?= "panic-unwind backtrace"
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"

View File

@@ -1,8 +1,2 @@
require rust-source-${PV}.inc
require libstd-rs.inc
LIC_FILES_CHKSUM = "file://../../COPYRIGHT;md5=93a95682d51b4cb0a633a97046940ef0"
CARGO_FEATURES ?= "panic-unwind backtrace"
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"

View File

@@ -1,5 +1,5 @@
LICENSE = "NCSA"
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=4c0bc17c954e99fd547528d938832bfa"
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=c6b766a4e85dd28301eeed54a6684648"
require rust-llvm.inc

View File

@@ -5,7 +5,7 @@ SRC_URI += "file://0002-llvm-allow-env-override-of-exe-path.patch"
S = "${RUSTSRC}/src/llvm-project/llvm"
LIC_FILES_CHKSUM ?= "file://LICENSE.TXT;md5=4c0bc17c954e99fd547528d938832bfa"
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
inherit cmake python3native
@@ -46,9 +46,9 @@ INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm-rust/bin/llvm-config"
do_install_append_class-target() {
# Disable checks on the native tools, since these should came from the native recipe
sed -i -e 's/\(.*APPEND.*_IMPORT_CHECK_FILES_FOR_.*{_IMPORT_PREFIX}\/bin\/.*\)/#\1/' ${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake
do_install_append () {
# we don't need any of this stuff to build Rust
rm -rf "${D}/usr/lib/cmake"
}
PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liblto"

View File

@@ -1,16 +1,2 @@
require rust-source-${PV}.inc
require rust-llvm-ncsa.inc
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=c6b766a4e85dd28301eeed54a6684648"
do_install_prepend () {
# the install does a sed on this without installing the file
# we don't need it for anything
mkdir -p "${D}/usr/share/llvm/cmake"
touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake"
}
do_install_append () {
# we don't need any of this stuff to build Rust
rm -rf "${D}/usr/lib/cmake"
}

View File

@@ -1,16 +1,2 @@
require rust-source-${PV}.inc
require rust-llvm-ncsa.inc
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=c6b766a4e85dd28301eeed54a6684648"
do_install_prepend () {
# the install does a sed on this without installing the file
# we don't need it for anything
mkdir -p "${D}/usr/share/llvm/cmake"
touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake"
}
do_install_append () {
# we don't need any of this stuff to build Rust
rm -rf "${D}/usr/lib/cmake"
}

View File

@@ -1,16 +1,2 @@
require rust-source-${PV}.inc
require rust-llvm-ncsa.inc
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=c6b766a4e85dd28301eeed54a6684648"
do_install_prepend () {
# the install does a sed on this without installing the file
# we don't need it for anything
mkdir -p "${D}/usr/share/llvm/cmake"
touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake"
}
do_install_append () {
# we don't need any of this stuff to build Rust
rm -rf "${D}/usr/lib/cmake"
}

View File

@@ -1,16 +1,2 @@
require rust-source-${PV}.inc
require rust-llvm.inc
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
do_install_prepend () {
# the install does a sed on this without installing the file
# we don't need it for anything
mkdir -p "${D}/usr/share/llvm/cmake"
touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake"
}
do_install_append () {
# we don't need any of this stuff to build Rust
rm -rf "${D}/usr/lib/cmake"
}

View File

@@ -1,16 +1,2 @@
require rust-source-${PV}.inc
require rust-llvm.inc
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
do_install_prepend () {
# the install does a sed on this without installing the file
# we don't need it for anything
mkdir -p "${D}/usr/share/llvm/cmake"
touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake"
}
do_install_append () {
# we don't need any of this stuff to build Rust
rm -rf "${D}/usr/lib/cmake"
}

View File

@@ -1,16 +1,2 @@
require rust-source-${PV}.inc
require rust-llvm.inc
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
do_install_prepend () {
# the install does a sed on this without installing the file
# we don't need it for anything
mkdir -p "${D}/usr/share/llvm/cmake"
touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake"
}
do_install_append () {
# we don't need any of this stuff to build Rust
rm -rf "${D}/usr/lib/cmake"
}

View File

@@ -1,16 +1,2 @@
require rust-source-${PV}.inc
require rust-llvm.inc
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
do_install_prepend () {
# the install does a sed on this without installing the file
# we don't need it for anything
mkdir -p "${D}/usr/share/llvm/cmake"
touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake"
}
do_install_append () {
# we don't need any of this stuff to build Rust
rm -rf "${D}/usr/lib/cmake"
}

View File

@@ -1,16 +1,2 @@
require rust-source-${PV}.inc
require rust-llvm.inc
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe"
do_install_prepend () {
# the install does a sed on this without installing the file
# we don't need it for anything
mkdir -p "${D}/usr/share/llvm/cmake"
touch "${D}/usr/share/llvm/cmake/LLVMExports-noconfig.cmake"
}
do_install_append () {
# we don't need any of this stuff to build Rust
rm -rf "${D}/usr/lib/cmake"
}