From 28ea86f23ef8781e40234c37eab91b3766844c27 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 4 Jul 2013 06:04:57 +0200 Subject: [PATCH] rust: fix x86 build; disable cross builds for now. --- srcpkgs/rust/template | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/srcpkgs/rust/template b/srcpkgs/rust/template index 553f742e1f8..78b9d16c52f 100644 --- a/srcpkgs/rust/template +++ b/srcpkgs/rust/template @@ -3,7 +3,7 @@ pkgname=rust version=0.7 revision=1 build_style=configure -configure_args="--prefix=/usr --disable-docs --build-triple=$(gcc -dumpmachine)" +configure_args="--prefix=/usr --disable-docs" hostmakedepends="which pkg-config perl curl python chrpath" short_desc="A safe, concurrent, practical language" maintainer="pancake " @@ -12,6 +12,14 @@ license="MIT, Apache-2.0" distfiles="http://static.rust-lang.org/dist/rust-${version}.tar.gz" checksum=0b88b8a4489382e0a69214eaab88e2e7c316ec33c164af0d3b53630b17590df0 +if [ "$XBPS_MACHINE" = "x86_64" ]; then + configure_args+=" --build-triple=$(gcc -dumpmachine)" +fi + +if [ "$CROSS_BUILD" ]; then + msg_error "$pkgver cannot be cross compiled currently.\n" +fi + post_install() { vinstall COPYRIGHT 644 usr/share/licenses/rust LICENSE