Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 609654 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/dev-util/cargo/cargo-0.16.0.ebuild (-23 / +8 lines)
Lines 4-10 Link Here
4
4
5
EAPI=6
5
EAPI=6
6
6
7
CARGO_SNAPSHOT_DATE="2016-09-01"
7
CARGO_SNAPSHOT_DATE="2016-11-28"
8
CRATES="
8
CRATES="
9
advapi32-sys-0.2.0
9
advapi32-sys-0.2.0
10
aho-corasick-0.5.3
10
aho-corasick-0.5.3
Lines 78-97 Link Here
78
ws2_32-sys-0.2.1
78
ws2_32-sys-0.2.1
79
"
79
"
80
80
81
inherit cargo bash-completion-r1
81
inherit cargo bash-completion-r1 rust-toolchain
82
82
83
DESCRIPTION="The Rust's package manager"
83
DESCRIPTION="The Rust's package manager"
84
HOMEPAGE="http://crates.io"
84
HOMEPAGE="http://crates.io"
85
SRC_URI="https://github.com/rust-lang/cargo/archive/${PV}.tar.gz -> ${P}.tar.gz
85
SRC_URI="https://github.com/rust-lang/cargo/archive/${PV}.tar.gz -> ${P}.tar.gz
86
	$(cargo_crate_uris ${CRATES})
86
	$(cargo_crate_uris ${CRATES})
87
	x86?   (
87
	$(rust_all_arch_uris https://static.rust-lang.org/cargo-dist/${CARGO_SNAPSHOT_DATE}/cargo-nightly cargo-snapshot-${CARGO_SNAPSHOT_DATE})"
88
		https://static.rust-lang.org/cargo-dist/${CARGO_SNAPSHOT_DATE}/cargo-nightly-i686-unknown-linux-gnu.tar.gz ->
89
		cargo-snapshot-x86-${CARGO_SNAPSHOT_DATE}.tar.gz
90
	)
91
	amd64? (
92
		https://static.rust-lang.org/cargo-dist/${CARGO_SNAPSHOT_DATE}/cargo-nightly-x86_64-unknown-linux-gnu.tar.gz ->
93
		cargo-snapshot-amd64-${CARGO_SNAPSHOT_DATE}.tar.gz
94
	)"
95
88
96
RESTRICT="mirror"
89
RESTRICT="mirror"
97
LICENSE="|| ( MIT Apache-2.0 )"
90
LICENSE="|| ( MIT Apache-2.0 )"
Lines 117-139 Link Here
117
	sys-apps/sed"
110
	sys-apps/sed"
118
111
119
src_configure() {
112
src_configure() {
120
	# Cargo only supports these GNU triples:
121
	# - Linux: <arch>-unknown-linux-gnu
122
	# - MacOS: <arch>-apple-darwin
123
	# - Windows: <arch>-pc-windows-gnu
124
	# where <arch> could be 'x86_64' (amd64) or 'i686' (x86)
125
	use amd64 && CTARGET="x86_64-unknown-linux-gnu"
126
	use x86 && CTARGET="i686-unknown-linux-gnu"
127
128
	# NOTE: 'disable-nightly' is used by crates (such as 'matches') to entirely
113
	# NOTE: 'disable-nightly' is used by crates (such as 'matches') to entirely
129
	# skip their internal libraries that make use of unstable rustc features.
114
	# skip their internal libraries that make use of unstable rustc features.
130
	# Don't use 'enable-nightly' with a stable release of rustc as DEPEND,
115
	# Don't use 'enable-nightly' with a stable release of rustc as DEPEND,
131
	# otherwise you could get compilation issues.
116
	# otherwise you could get compilation issues.
132
	# see: github.com/gentoo/gentoo-rust/issues/13
117
	# see: github.com/gentoo/gentoo-rust/issues/13
133
	local myeconfargs=(
118
	local myeconfargs=(
134
		--host=${CTARGET}
119
		--host=$(rust_abi)
135
		--build=${CTARGET}
120
		--build=$(rust_abi)
136
		--target=${CTARGET}
121
		--target=$(rust_abi)
137
		--cargo="${WORKDIR}"/${P}/target/snapshot/bin/cargo
122
		--cargo="${WORKDIR}"/${P}/target/snapshot/bin/cargo
138
		--enable-optimize
123
		--enable-optimize
139
#		--release-channel stable
124
#		--release-channel stable
Lines 154-160 Link Here
154
}
139
}
155
140
156
src_install() {
141
src_install() {
157
	emake prepare-image-${CTARGET} IMGDIR_${CTARGET}="${ED}/usr"
142
	emake prepare-image-$(rust_abi) IMGDIR_$(rust_abi)="${ED}/usr"
158
143
159
	# Install HTML documentation
144
	# Install HTML documentation
160
	use doc && HTML_DOCS=("target/doc")
145
	use doc && HTML_DOCS=("target/doc")
Lines 173-177 Link Here
173
	emake test \
158
	emake test \
174
		CFG_ENABLE_OPTIMIZE=1 \
159
		CFG_ENABLE_OPTIMIZE=1 \
175
		VERBOSE=1 \
160
		VERBOSE=1 \
176
		CFG_LOCAL_CARGO="${WORKDIR}"/${P}/target/${CTARGET}/release/cargo
161
		CFG_LOCAL_CARGO="${WORKDIR}"/${P}/target/$(rust_abi)/release/cargo
177
}
162
}

Return to bug 609654