Merge pull request #63 from starlab-io/rust-cleanup

Miscellaneous cleanups for support recipes
This commit is contained in:
Doug Goldstein
2016-08-04 08:35:42 -05:00
committed by GitHub
13 changed files with 12 additions and 79 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
*.pyc

View File

@@ -62,8 +62,9 @@ oe_cargo_fix_env () {
cargo_util_do_compile () {
cd "${B}"
# prevent cargo from trying to fetch down new data
touch "${WORKDIR}/cargo_home/registry/index/.cargo-index-lock"
# prevent cargo from trying to fetch down new data
mkdir -p "${WORKDIR}/cargo_home/registry/index/"
touch "${WORKDIR}/cargo_home/registry/index/.cargo-index-lock"
oe_cargo_fix_env
oe_cargo_build

View File

@@ -8,7 +8,5 @@ BBFILE_COLLECTIONS += "rust-layer"
BBFILE_PATTERN_rust-layer := "^${LAYERDIR}/"
BBFILE_PRIORITY_rust-layer = "7"
LICENSE_PATH += "${LAYERDIR}/files/common-licenses"
# Override security flags
require conf/distro/include/rust_security_flags.inc

View File

@@ -1,11 +0,0 @@
LINKING EXCEPTION
In addition to the permissions in the GNU General Public License, the authors
give you unlimited permission to link the compiled version of this library into
combinations with other programs, and to distribute those combinations without
any restriction coming from the use of this file. (The General Public License
restrictions do apply in other respects; for example, they cover modification
of the file, and distribution when not linked into a combined executable.)
insert GPL v2 text here

View File

@@ -1,27 +0,0 @@
## An excerpt from curl-sys's build script:
#export CFLAGS := $(CFLAGS) -fPIC -ffunction-sections -fdata-sections
#OPTS := $(OPTS) \
# --enable-static=yes \
# --enable-shared=no \
# --disable-ldap --disable-ldaps --disable-ftp --disable-rtsp \
# --disable-dict --disable-telnet --disable-tftp --disable-pop3 \
# --disable-imap --disable-smtp --disable-gopher --disable-manual \
# --enable-optimize --without-librtmp --without-libidn \
# --prefix="$(OUT_DIR)"
## Due to how rust links, we need -fPIC. Without it,
#EXTRA_OECONF_append = " \
# --with-zlib \
# --enable-static \
# --enable-hidden-symbols \
#"
#BUILD_CFLAGS += "-fPIC"
#TARGET_CFLAGS += "-fPIC"
#| note: /usr/bin/ld: .../tmp/work/x86_64-linux/cargo-native/2014-11-07-r0/git/target/x86_64-unknown-linux-gnu/deps/libcurl-f3f9ef32955b72e6.rlib(r-curl-libcurl_la-openssl.o): undefined reference to symbol 'SSL_CTX_set_cipher_list'
#| /usr/lib/libssl.so.1.0.0: error adding symbols: DSO missing from command line
#DEPENDS_append = "openssl"
PACKAGECONFIG = "ipv6"
CFLAGS_append = " -fPIC"

View File

@@ -1,3 +0,0 @@
require libgit2.inc
S = "${WORKDIR}/git"
SRC_URI = "git://github.com/libgit2/libgit2.git;protocol=https"

View File

@@ -1,6 +1,6 @@
SUMMARY = "the Git linkable library"
HOMEPAGE = "http://libgit2.github.com/"
LICENSE = "GPL-2.0-with-linking-exception"
LICENSE = "GPL-2.0-with-GCC-exception"
DEPENDS = "openssl zlib"
@@ -16,17 +16,4 @@ EXTRA_OECMAKE = "\
-DBUILD_EXAMPLES=OFF \
"
CFLAGS_append .= " -fPIC"
# Prior to poky commit 60d504b431fa7cdc6ded141def7ae18edb1834e5,
# the cmake class did not define CMAKE_AR in the generated toolchain
# file. This is needed to support building a static library.
# See https://github.com/jmesmon/meta-rust/issues/1
OECMAKE_AR ?= "${AR}"
cmake_do_generate_toolchain_file_append() {
cat >> ${WORKDIR}/toolchain.cmake <<EOF
set( CMAKE_AR ${OECMAKE_AR} CACHE FILEPATH "Archiver" )
EOF
}
BBCLASSEXTEND = "native"

View File

@@ -1,6 +0,0 @@
LIC_FILES_CHKSUM = "file://COPYING;md5=29c24df0df4c2bab5efb8d5a33a73202"
SRC_URI[md5sum] = "dbf516d18e176bbb131de3efccfee533"
SRC_URI[sha256sum] = "c7f1bf99ed8aeba65a485489869e2a50f022f3cd847df85e192fc99fdd6c8b5e"
require libgit2-release.inc

View File

@@ -1,4 +0,0 @@
LIC_FILES_CHKSUM = "file://COPYING;md5=34197a479f637beb9e09e56893f48bc2"
SRC_URI[md5sum] = "b7db3ab71dfa19fe1dc7fef76d6af216"
SRC_URI[sha256sum] = "c7f5e2d7381dbc4d7e878013d14f9993ae8a41bd23f032718e39ffba57894029"
require libgit2-release.inc

View File

@@ -0,0 +1,4 @@
LIC_FILES_CHKSUM = "file://COPYING;md5=34197a479f637beb9e09e56893f48bc2"
SRC_URI[md5sum] = "3674ca2d40388b1175e25b6f5a3a82ad"
SRC_URI[sha256sum] = "60198cbb34066b9b5c1613d15c0479f6cd25f4aef42f7ec515cd1cc13a77fede"
require libgit2-release.inc

View File

@@ -1,4 +0,0 @@
require libgit2-git.inc
SRCREV ?= "47f37400253210f483d84fb9c2ecf44fb5986849"
LIC_FILES_CHKSUM = "file://COPYING;md5=5ddd5fb64b24982b32a490dccccdabc5"
DEFAULT_PREFERENCE = "-1"

View File

@@ -1,3 +0,0 @@
# cargo tries to build a shared object using several static objects, one of
# which includes the contents of zlib (zutil.o as 'libcurl-f3f9ef32955b72e6.rlib(r-z-zutil.o)')
CFLAGS_append = " -fPIC"

View File

@@ -469,9 +469,9 @@ rust_do_install () {
install -m 0644 "$tgt" "$td"
done
## rust will complain about multiple providers of the runtime libs
## (libstd, libsync, etc.) without this.
(cd "${D}${libdir}" && ln -sf "rustlib/${HOST_SYS}/lib/lib"*.so .)
# Remove any files directly installed into libdir to avoid
# conflicts between cross and native
rm -f ${D}${libdir}/lib*.so
}
do_install () {