This commit is contained in:
Cody P Schafer
2014-11-10 17:25:43 -05:00
parent 13e0b5736f
commit d7d6cf7511
6 changed files with 58 additions and 9 deletions
+18
View File
@@ -37,6 +37,8 @@ RUST_PATH = "${RUST_PATH_NATIVE}"
CARGO = "cargo"
OECARGO_PATH ??= ""
oe_runrustc () {
bbnote ${RUSTC} ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@"
"${RUSTC}" ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@"
@@ -51,9 +53,25 @@ oe_cargo_config () {
# assumed to be a path to a binary. If flags are needed, a wrapper must
# be used.
cat >.cargo/config <<EOF
paths = [
EOF
for p in ${OECARGO_PATH}; do
printf "\"%s\" " "$p"
done | sed -e 's/[ \n]+/,/g' -e 's/,$//' >>.cargo/config
cat >>.cargo/config <<EOF
]
[target.${RUST_TARGET_SYS}]
ar = "${TARGET_PREFIX}ar"
linker = "${TARGET_PREFIX}gcc"
EOF
cat >>Cargo.toml <<EOF
[profile.dev]
rpath = true
EOF
}
+8 -1
View File
@@ -17,4 +17,11 @@
# --enable-hidden-symbols \
#"
CFLAGS += "-fPIC"
#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"
+12 -1
View File
@@ -8,9 +8,20 @@ LIC_FILES_CHKSUM = "\
file://COPYING;md5=29c24df0df4c2bab5efb8d5a33a73202 \
"
DEPENDS = "zlib"
inherit cmake
# CLAR = tests, needs python-native
EXTRA_OECMAKE = "-DBUILD_CLAR=OFF"
EXTRA_OECMAKE = "\
-DTHREADSAFE=ON \
-DBUILD_CLAR=OFF \
-DSHA1_TYPE="builtin" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_EXAMPLES=OFF \
"
CFLAGS_append .= " -fPIC"
BBCLASSEXTEND = "native"
+2 -2
View File
@@ -1,3 +1,3 @@
# cargo tries to build a shared object using several static objects, one of
# which includes the contenst of zlib (zutil.o)
CFLAGS += "-fPIC"
# which includes the contents of zlib (zutil.o as 'libcurl-f3f9ef32955b72e6.rlib(r-z-zutil.o)')
CFLAGS_append = " -fPIC"
+8 -5
View File
@@ -6,14 +6,15 @@ LICENSE = "MIT | Apache-2.0"
DEPENDS = "openssl-native rust-native zlib-native libgit2-native curl-native ca-certificates-native"
SRC_URI = "git://github.com/rust-lang/cargo.git;protocol=https"
SRC_URI = "git://github.com/rust-lang/cargo.git;protocol=https;name=cargo"
LIC_FILES_CHKSUM ="\
file://LICENSE-MIT;md5=362255802eb5aa87810d12ddf3cfedb4 \
file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \
file://LICENSE-THIRD-PARTY;md5=afbb7ae0aa70c8e437a007314eae5f3b \
"
#PV = "0.0.0+0.0.1-pre+git${SRCPV}"
SRCREV_FORMAT = "cargo"
PV .= "+git${SRCPV}"
S = "${WORKDIR}/git"
B = "${S}"
@@ -30,16 +31,18 @@ do_configure () {
"--infodir=${infodir}" \
"--mandir=${mandir}" \
"--libdir=${libdir}"
# cargo downloads a cargo snapshot to build itself using cargo, we need
# to override it's arch info.
oe_cargo_config
}
do_compile () {
echo "COMPILE ${PN}"
env
# cargo downloads a cargo snapshot to build itself using cargo, we need
# to override it's arch info.
oe_cargo_config
export RUST_PATH="${RUST_PATH}"
export LD_LIBRARY_PATH="${RUST_PATH}"
oe_runmake ARGS="--verbose"
}
+10
View File
@@ -0,0 +1,10 @@
SRCREV_cargo = "8cc600a33436a3c75372b252ddecb1f90961d61b"
require cargo.inc
SRC_URI_append = " \
git://github.com/jmesmon/git2-rs.git;protocol=https;name=git2-rs;destsuffix=git2-rs \
"
#git://github.com/jmesmon/libz-sys.git;protocol=https;name=libz-sys;destsuffix=libz-sys
SRCREV_git2-rs = "fa270b5eed7e9e94aa7d8bc18fa923d8e6b32ba6"
#SRCREV_libz-sys = "
OECARGO_PATH = "${WORKDIR}/git2-rs"