cargo hacks
This commit is contained in:
@@ -5,7 +5,7 @@ CARGO = "cargo"
|
|||||||
# Cargo only supports in-tree builds at the moment
|
# Cargo only supports in-tree builds at the moment
|
||||||
B = "${S}"
|
B = "${S}"
|
||||||
|
|
||||||
OECARGO_PATH ??= ""
|
EXTRA_OECARGO_PATHS ??= ""
|
||||||
|
|
||||||
oe_cargo_config () {
|
oe_cargo_config () {
|
||||||
mkdir -p .cargo
|
mkdir -p .cargo
|
||||||
@@ -17,7 +17,7 @@ oe_cargo_config () {
|
|||||||
# be used.
|
# be used.
|
||||||
echo "paths = [" >.cargo/config
|
echo "paths = [" >.cargo/config
|
||||||
|
|
||||||
for p in ${OECARGO_PATH}; do
|
for p in ${EXTRA_OECARGO_PATHS}; do
|
||||||
printf "\"%s\" " "$p"
|
printf "\"%s\" " "$p"
|
||||||
done | sed -e 's/[ \n]+/,/g' -e 's/,$//' >>.cargo/config
|
done | sed -e 's/[ \n]+/,/g' -e 's/,$//' >>.cargo/config
|
||||||
echo "]" >>.cargo/config
|
echo "]" >>.cargo/config
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
inherit rust
|
inherit cargo
|
||||||
SUMMARY = "Cargo downloads your Rust project's dependencies and builds your project"
|
SUMMARY = "Cargo downloads your Rust project's dependencies and builds your project"
|
||||||
HOMEPAGE = "http://crates.io"
|
HOMEPAGE = "http://crates.io"
|
||||||
SECTION = "devel"
|
SECTION = "devel"
|
||||||
@@ -13,7 +13,7 @@ LIC_FILES_CHKSUM ="\
|
|||||||
file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \
|
file://LICENSE-APACHE;md5=1836efb2eb779966696f473ee8540542 \
|
||||||
file://LICENSE-THIRD-PARTY;md5=afbb7ae0aa70c8e437a007314eae5f3b \
|
file://LICENSE-THIRD-PARTY;md5=afbb7ae0aa70c8e437a007314eae5f3b \
|
||||||
"
|
"
|
||||||
SRCREV_FORMAT = "cargo"
|
SRCREV_FORMAT ?= "cargo"
|
||||||
PV .= "+git${SRCPV}"
|
PV .= "+git${SRCPV}"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
@@ -36,7 +36,8 @@ do_configure () {
|
|||||||
"--datadir=${datadir}" \
|
"--datadir=${datadir}" \
|
||||||
"--infodir=${infodir}" \
|
"--infodir=${infodir}" \
|
||||||
"--mandir=${mandir}" \
|
"--mandir=${mandir}" \
|
||||||
"--libdir=${libdir}"
|
"--libdir=${libdir}" \
|
||||||
|
|| die "Could not configure cargo"
|
||||||
|
|
||||||
# cargo downloads a cargo snapshot to build itself using cargo, we need
|
# cargo downloads a cargo snapshot to build itself using cargo, we need
|
||||||
# to override it's arch info.
|
# to override it's arch info.
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
SRCREV_cargo = "f936f3543fd1d4f2101cd937a4f52ce9f9676eae"
|
||||||
|
require cargo.inc
|
||||||
|
|
||||||
|
SRC_URI += " \
|
||||||
|
git://github.com/carllerche/curl-rust.git;protocol=http;name=curl-rust;destsuffix=curl-rust \
|
||||||
|
file://curl-rust/0001-curl-sys-avoid-explicitly-linking-in-openssl-If-it-.patch;patchdir=../curl-rust \
|
||||||
|
file://curl-rust//0001-openssl-sys-is-used-in-curl-rust-so-include-it-expli.patch;patchdir=../curl-rust \
|
||||||
|
"
|
||||||
|
|
||||||
|
SRCREV_curl-rust = "c1b96e146f6752353a1e84cca932c628e6bf73af"
|
||||||
|
SRCREV_FORMAT = "cargo_curl-rust"
|
||||||
|
EXTRA_OECARGO_PATHS = "${WORKDIR}/curl-rust"
|
||||||
|
|
||||||
+48
@@ -0,0 +1,48 @@
|
|||||||
|
From b5c97df71c3ed0a6a31281e679cb77440293ef55 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cody P Schafer <dev@codyps.com>
|
||||||
|
Date: Tue, 25 Nov 2014 11:50:28 -0500
|
||||||
|
Subject: [PATCH] curl-sys: avoid explicitly linking in openssl. If it is
|
||||||
|
needed, pkgconfig will pull it in
|
||||||
|
|
||||||
|
---
|
||||||
|
curl-sys/Cargo.toml | 14 --------------
|
||||||
|
curl-sys/lib.rs | 1 -
|
||||||
|
2 files changed, 15 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/curl-sys/Cargo.toml b/curl-sys/Cargo.toml
|
||||||
|
index 20bb49a..80a320f 100644
|
||||||
|
--- a/curl-sys/Cargo.toml
|
||||||
|
+++ b/curl-sys/Cargo.toml
|
||||||
|
@@ -14,17 +14,3 @@ path = "lib.rs"
|
||||||
|
|
||||||
|
[dependencies.libz-sys]
|
||||||
|
git = "https://github.com/alexcrichton/libz-sys"
|
||||||
|
-
|
||||||
|
-# Unix platforms use OpenSSL for now to provide SSL functionality
|
||||||
|
-[target.i686-apple-darwin.dependencies.openssl-sys]
|
||||||
|
- git = "https://github.com/sfackler/rust-openssl"
|
||||||
|
-[target.x86_64-apple-darwin.dependencies.openssl-sys]
|
||||||
|
- git = "https://github.com/sfackler/rust-openssl"
|
||||||
|
-[target.i686-unknown-linux-gnu.dependencies.openssl-sys]
|
||||||
|
- git = "https://github.com/sfackler/rust-openssl"
|
||||||
|
-[target.x86_64-unknown-linux-gnu.dependencies.openssl-sys]
|
||||||
|
- git = "https://github.com/sfackler/rust-openssl"
|
||||||
|
-[target.i686-unknown-freebsd.dependencies.openssl-sys]
|
||||||
|
- git = "https://github.com/sfackler/rust-openssl"
|
||||||
|
-[target.x86_64-unknown-freebsd.dependencies.openssl-sys]
|
||||||
|
- git = "https://github.com/sfackler/rust-openssl"
|
||||||
|
diff --git a/curl-sys/lib.rs b/curl-sys/lib.rs
|
||||||
|
index bbfb12c..9cfbb23 100644
|
||||||
|
--- a/curl-sys/lib.rs
|
||||||
|
+++ b/curl-sys/lib.rs
|
||||||
|
@@ -3,7 +3,6 @@
|
||||||
|
|
||||||
|
extern crate libc;
|
||||||
|
extern crate "libz-sys" as libz;
|
||||||
|
-#[cfg(unix)] extern crate "openssl-sys" as openssl;
|
||||||
|
|
||||||
|
use libc::{c_void, c_int, c_char, c_uint, c_long};
|
||||||
|
|
||||||
|
--
|
||||||
|
2.1.3
|
||||||
|
|
||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
From c8c54e266bad3e568f55caea4f061182a0d9fd23 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cody P Schafer <dev@codyps.com>
|
||||||
|
Date: Tue, 25 Nov 2014 12:26:48 -0500
|
||||||
|
Subject: [PATCH] openssl-sys is used in curl-rust, so include it explicitly
|
||||||
|
here
|
||||||
|
|
||||||
|
---
|
||||||
|
Cargo.toml | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/Cargo.toml b/Cargo.toml
|
||||||
|
index ba6e748..9e25cd1 100644
|
||||||
|
--- a/Cargo.toml
|
||||||
|
+++ b/Cargo.toml
|
||||||
|
@@ -10,3 +10,6 @@ git = "https://github.com/servo/rust-url"
|
||||||
|
[dependencies.curl-sys]
|
||||||
|
path = "curl-sys"
|
||||||
|
version = "*"
|
||||||
|
+
|
||||||
|
+[dependencies.openssl-sys]
|
||||||
|
+git = "https://github.com/sfackler/rust-openssl"
|
||||||
|
--
|
||||||
|
2.1.3
|
||||||
|
|
||||||
Reference in New Issue
Block a user