Merge pull request #101 from cardoe/drop-shared-src
Drop shared source directory
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
# In order to share the same source between multiple packages (.bb files), we
|
||||
# unpack and patch the X source here into a shared dir.
|
||||
#
|
||||
# Take a look at gcc-source.inc for the general structure of this
|
||||
|
||||
# We require that "SOURCE_NAME" be set
|
||||
|
||||
# nopackages.bbclass {
|
||||
deltask do_package
|
||||
deltask do_package_write_rpm
|
||||
deltask do_package_write_ipk
|
||||
deltask do_package_write_deb
|
||||
deltask do_package_qa
|
||||
deltask do_packagedata
|
||||
#}
|
||||
|
||||
deltask do_configure
|
||||
deltask do_compile
|
||||
deltask do_install
|
||||
deltask do_populate_sysroot
|
||||
deltask do_populate_lic
|
||||
deltask do_rm_work
|
||||
|
||||
|
||||
# override to get rid of '-native' or other misc
|
||||
# XXX: consider ${PR}
|
||||
PN = "${SOURCE_NAME}-source-${PV}"
|
||||
WORKDIR = "${TMPDIR}/work-shared/${SOURCE_NAME}-${PV}-${PR}"
|
||||
SSTATE_SWSPEC = "sstate:${SOURCE_NAME}::${PV}:${PR}::${SSTATE_VERSION}:"
|
||||
|
||||
STAMP = "${STAMPS_DIR}/work-shared/${SOURCE_NAME}-${PV}-${PR}"
|
||||
STAMPCLEAN = "${STAMPS_DIR}/work-shared/${SOURCE_NAME}-${PV}-*"
|
||||
|
||||
INHIBIT_DEFAULT_DEPS = "1"
|
||||
DEPENDS = ""
|
||||
PACKAGES = ""
|
||||
|
||||
EXCLUDE_FROM_WORLD = "1"
|
||||
@@ -1,23 +0,0 @@
|
||||
# gcc's shared source code disables fetch (via the commented code below). We
|
||||
# can't do that because rust.bb currently fetches a rustc-snapshot archive itself.
|
||||
#do_fetch() {
|
||||
# :
|
||||
#}
|
||||
#do_fetch[noexec] = "1"
|
||||
|
||||
# gcc does `deltask` do_unpack. We avoid this so that the depends work sanely
|
||||
# (things that need source code can still be ordered after do_unpack).
|
||||
# As a side effect, we can also unpack things that aren't shared.
|
||||
# Note: just setting this normally doesn't work. Use of python() is required.
|
||||
python () {
|
||||
d.setVarFlag('do_unpack', 'cleandirs', '')
|
||||
}
|
||||
# Avoid disabling do_patch for the same reason.
|
||||
#deltask do_patch
|
||||
|
||||
SRC_URI = ""
|
||||
|
||||
S = "${TMPDIR}/work-shared/${SOURCE_NAME}-${PV}-${PR}"
|
||||
|
||||
do_unpack[depends] += "${SOURCE_NAME}-source-${PV}:do_patch"
|
||||
do_populate_lic[depends] += "${SOURCE_NAME}-source-${PV}:do_unpack"
|
||||
@@ -2,12 +2,15 @@ SUMMARY = "Rust compiler run-time"
|
||||
HOMEPAGE = "http://www.rust-lang.org"
|
||||
SECTION = "devel"
|
||||
LICENSE = "MIT"
|
||||
|
||||
require rust-shared-source.inc
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=27b14ab4ce08d04c3a9a5f0ed7997362"
|
||||
|
||||
S .= "/src/compiler-rt"
|
||||
B = "${WORKDIR}/build"
|
||||
SRC_URI = "\
|
||||
https://static.rust-lang.org/dist/rustc-${PV}-src.tar.gz;name=rust \
|
||||
"
|
||||
SRC_URI[rust.md5sum] = "a48fef30353fc9daa70b484b690ce5db"
|
||||
SRC_URI[rust.sha256sum] = "a4015aacf4f6d8a8239253c4da46e7abaa8584f8214d1828d2ff0a8f56176869"
|
||||
|
||||
S = "${WORKDIR}/rustc-${PV}/src/compiler-rt"
|
||||
|
||||
# Pick up $CC from the environment
|
||||
EXTRA_OEMAKE += "-e"
|
||||
@@ -2,9 +2,15 @@ SUMMARY = "Rust standard libaries"
|
||||
HOMEPAGE = "http://www.rust-lang.org"
|
||||
SECTION = "devel"
|
||||
LICENSE = "MIT | Apache-2.0"
|
||||
|
||||
LIC_FILES_CHKSUM ="file://COPYRIGHT;md5=43e1f1fb9c0ee3af66693d8c4fecafa8"
|
||||
require rust-shared-source.inc
|
||||
|
||||
SRC_URI = "\
|
||||
https://static.rust-lang.org/dist/rustc-${PV}-src.tar.gz;name=rust \
|
||||
"
|
||||
SRC_URI[rust.md5sum] = "a48fef30353fc9daa70b484b690ce5db"
|
||||
SRC_URI[rust.sha256sum] = "a4015aacf4f6d8a8239253c4da46e7abaa8584f8214d1828d2ff0a8f56176869"
|
||||
|
||||
S = "${WORKDIR}/rustc-${PV}"
|
||||
|
||||
CARGO_INDEX_COMMIT = "6127fc24b0b6fe73fe4d339817fbf000b9a798a2"
|
||||
|
||||
@@ -21,7 +27,7 @@ inherit cargo
|
||||
# Needed so cargo can find libbacktrace
|
||||
RUSTFLAGS += "-L ${STAGING_LIBDIR}"
|
||||
|
||||
B = "${WORKDIR}/build"
|
||||
S = "${WORKDIR}/rustc-${PV}"
|
||||
|
||||
do_compile_prepend () {
|
||||
cd ${S}/src/rustc/std_shim
|
||||
@@ -1,6 +1,9 @@
|
||||
require rust.inc
|
||||
inherit cross
|
||||
|
||||
SRC_URI[rust.md5sum] = "a48fef30353fc9daa70b484b690ce5db"
|
||||
SRC_URI[rust.sha256sum] = "a4015aacf4f6d8a8239253c4da46e7abaa8584f8214d1828d2ff0a8f56176869"
|
||||
|
||||
# Otherwise we'll depend on what we provide
|
||||
INHIBIT_DEFAULT_RUST_DEPS = "1"
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
require rust-llvm.inc
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=4c0bc17c954e99fd547528d938832bfa"
|
||||
|
||||
do_install_append () {
|
||||
cd "${B}"
|
||||
install -d "${D}${bindir}"
|
||||
install -m755 "Release/bin/FileCheck" "${D}${bindir}"
|
||||
}
|
||||
@@ -1,9 +1,14 @@
|
||||
require rust-shared-source.inc
|
||||
|
||||
SUMMARY = "LLVM compiler framework (packaged with rust)"
|
||||
LICENSE = "NCSA"
|
||||
|
||||
S .= "/src/llvm"
|
||||
SRC_URI = "\
|
||||
https://static.rust-lang.org/dist/rustc-${PV}-src.tar.gz;name=rust \
|
||||
file://rust-llvm/0001-Don-t-build-unittests.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/rustc-${PV}/src/llvm"
|
||||
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=4c0bc17c954e99fd547528d938832bfa"
|
||||
|
||||
inherit autotools
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
require rust-llvm.inc
|
||||
|
||||
SRC_URI[rust.md5sum] = "a48fef30353fc9daa70b484b690ce5db"
|
||||
SRC_URI[rust.sha256sum] = "a4015aacf4f6d8a8239253c4da46e7abaa8584f8214d1828d2ff0a8f56176869"
|
||||
|
||||
do_install_append () {
|
||||
cd "${B}"
|
||||
install -d "${D}${bindir}"
|
||||
install -m755 "Release/bin/FileCheck" "${D}${bindir}"
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
SRC_URI = "\
|
||||
https://static.rust-lang.org/dist/rustc-${PV}-src.tar.gz;name=rust \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/rustc-${PV}"
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
inherit shared-source-use
|
||||
require rust-version.inc
|
||||
S .= "/rustc-${PV}"
|
||||
@@ -1,6 +0,0 @@
|
||||
# Note: if you adjust this, you'll also need to change the hashes in
|
||||
# rust-source.bb
|
||||
SOURCE_NAME = "rust"
|
||||
PV = "1.10.0"
|
||||
|
||||
LICENSE = "MIT | Apache-2.0"
|
||||
@@ -1,11 +0,0 @@
|
||||
inherit rust-installer
|
||||
require rust.inc
|
||||
|
||||
DEPENDS += "rust-llvm"
|
||||
|
||||
# Otherwise we'll depend on what we provide
|
||||
INHIBIT_DEFAULT_RUST_DEPS_class-native = "1"
|
||||
# We don't need to depend on gcc-native because yocto assumes it exists
|
||||
PROVIDES_class-native = "virtual/${TARGET_PREFIX}rust"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
@@ -1,15 +1,17 @@
|
||||
# ex: sts=4 et sw=4 ts=8
|
||||
inherit rust
|
||||
require rust-shared-source.inc
|
||||
require rust-snapshot-2016-05-24.inc
|
||||
|
||||
LIC_FILES_CHKSUM ="file://COPYRIGHT;md5=43e1f1fb9c0ee3af66693d8c4fecafa8"
|
||||
|
||||
SUMMARY = "Rust compiler and runtime libaries"
|
||||
HOMEPAGE = "http://www.rust-lang.org"
|
||||
SECTION = "devel"
|
||||
LICENSE = "MIT | Apache-2.0"
|
||||
LIC_FILES_CHKSUM ="file://COPYRIGHT;md5=43e1f1fb9c0ee3af66693d8c4fecafa8"
|
||||
|
||||
B = "${WORKDIR}/build"
|
||||
inherit rust
|
||||
require rust-snapshot-2016-05-24.inc
|
||||
|
||||
SRC_URI = "\
|
||||
https://static.rust-lang.org/dist/rustc-${PV}-src.tar.gz;name=rust \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/rustc-${PV}"
|
||||
|
||||
DEPENDS += "file-native"
|
||||
|
||||
@@ -385,14 +387,6 @@ llvmdir = "${STAGING_DIR_NATIVE}/${prefix_native}"
|
||||
export CFG_DISABLE_LDCONFIG="notempty"
|
||||
|
||||
do_configure () {
|
||||
# Note: when we adjust the generated targets, rust doesn't rebuild (even
|
||||
# when it should), so for now we need to remove the build dir to keep
|
||||
# things in sync.
|
||||
cd "${WORKDIR}"
|
||||
rm -rf "${B}/"
|
||||
mkdir -p "${B}/"
|
||||
cd "${B}"
|
||||
|
||||
# FIXME: target_prefix vs prefix, see cross.bbclass
|
||||
|
||||
# FIXME: this path to rustc (via `which rustc`) may not be quite right in the case
|
||||
@@ -484,4 +478,4 @@ rust_do_install () {
|
||||
do_install () {
|
||||
rust_do_install
|
||||
}
|
||||
|
||||
# ex: sts=4 et sw=4 ts=8
|
||||
|
||||
@@ -1,18 +1,7 @@
|
||||
# In order to share the same source between multiple packages (.bb files), we
|
||||
# unpack and patch the rustc source here into a shared dir.
|
||||
#
|
||||
# Take a look at gcc-source.inc for the general structure of this
|
||||
inherit rust-installer
|
||||
require rust.inc
|
||||
|
||||
inherit shared-source-provide
|
||||
|
||||
require rust-version.inc
|
||||
require rust-release.inc
|
||||
|
||||
SRC_URI[rust.md5sum] = "a48fef30353fc9daa70b484b690ce5db"
|
||||
SRC_URI[rust.sha256sum] = "a4015aacf4f6d8a8239253c4da46e7abaa8584f8214d1828d2ff0a8f56176869"
|
||||
LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=eb87dba71cb424233bcce88db3ae2f1a"
|
||||
|
||||
SRC_URI_append = "\
|
||||
SRC_URI += " \
|
||||
file://rust/0001-Add-config-for-musl-based-arm-builds.patch \
|
||||
file://rust/0002-Target-add-default-target.json-path-libdir-rust-targ.patch \
|
||||
file://rust/0003-mk-for-stage0-use-RUSTFLAGS-to-override-target-libs-.patch \
|
||||
@@ -24,6 +13,17 @@ SRC_URI_append = "\
|
||||
file://rust/0009-mk-platform.mk-pass-C-crate_hash-to-builds.patch \
|
||||
file://rust/0010-mk-allow-changing-the-platform-configuration-source-.patch \
|
||||
file://rust/0011-Get-rid-of-the-.note-interpretation-of-rustc-dylib-m.patch \
|
||||
file://rust-llvm/0001-Don-t-build-unittests.patch;patchdir=src/llvm \
|
||||
file://rust-installer/0001-add-option-to-disable-rewriting-of-install-paths.patch;patchdir=src/rust-installer \
|
||||
"
|
||||
"
|
||||
|
||||
SRC_URI[rust.md5sum] = "a48fef30353fc9daa70b484b690ce5db"
|
||||
SRC_URI[rust.sha256sum] = "a4015aacf4f6d8a8239253c4da46e7abaa8584f8214d1828d2ff0a8f56176869"
|
||||
|
||||
DEPENDS += "rust-llvm"
|
||||
|
||||
# Otherwise we'll depend on what we provide
|
||||
INHIBIT_DEFAULT_RUST_DEPS_class-native = "1"
|
||||
# We don't need to depend on gcc-native because yocto assumes it exists
|
||||
PROVIDES_class-native = "virtual/${TARGET_PREFIX}rust"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
Reference in New Issue
Block a user