Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jan 2017 10:45:30 +0000 (UTC)
From:      =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= <dumbbell@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r432111 - in head/devel/cargo: . files
Message-ID:  <201701221045.v0MAjUkM068167@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dumbbell
Date: Sun Jan 22 10:45:29 2017
New Revision: 432111
URL: https://svnweb.freebsd.org/changeset/ports/432111

Log:
  devel/cargo: Update to 0.15.0, enable on i386
  
  The new version requires cargo(1) to be available. Therefore, we let the
  Ports system to extract the bootstrap cargo (it was done by the Cargo
  build system before) and set a configure flag to point to it.
  
  We need to set OPENSSL_DIR as a Make environment variable because the
  openssl-sys crate's build.rs doesn't know about FreeBSD.
  
  Finally, enable devel/cargo on i386. A bootstrap cargo executable is
  available for FreeBSD/i386 since last October but I missed it. We can
  now use it to build a port/package for i386.
  
  PR:		216143
  Approved by:	bapt (mentor)
  Differential Revision:	https://reviews.freebsd.org/D9273

Added:
  head/devel/cargo/distinfo.amd64
     - copied, changed from r432110, head/devel/cargo/distinfo
  head/devel/cargo/distinfo.i386   (contents, props changed)
Deleted:
  head/devel/cargo/distinfo
  head/devel/cargo/files/
Modified:
  head/devel/cargo/Makefile

Modified: head/devel/cargo/Makefile
==============================================================================
--- head/devel/cargo/Makefile	Sun Jan 22 10:43:25 2017	(r432110)
+++ head/devel/cargo/Makefile	Sun Jan 22 10:45:29 2017	(r432111)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	cargo
-PORTVERSION=	0.14.0
+PORTVERSION=	0.15.0
 CATEGORIES=	devel
 
 MAINTAINER=	dumbbell@FreeBSD.org
@@ -34,10 +34,11 @@ LICENSE_FILE_MIT=	${WRKSRC}/LICENSE-MIT
 #   install Cargo.
 
 MASTER_SITES=	https://static.rust-lang.org/cargo-dist/2016-11-02/:bootstrap \
-		LOCAL/dumbbell/cargo:registry
+		LOCAL/dumbbell/rust:registry
 .if !defined(SKIP_CARGO_REGISTRY)
 DISTFILES+=	${CARGO_REGISTRY}:registry
 .endif
+DISTINFO_FILE=	${.CURDIR}/distinfo.${ARCH}
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	rust-lang
@@ -45,11 +46,15 @@ GH_PROJECT=	rust-installer:rust_installe
 GH_TAGNAME=	755bc3d:rust_installer
 GH_SUBDIR=	src/rust-installer:rust_installer
 
-ONLY_FOR_ARCHS=	amd64
+ONLY_FOR_ARCHS=	amd64 i386
 ONLY_FOR_ARCHS_REASON=	requires prebuilt bootstrap cargo
 
-CARGO_BOOT_SIG=	${ARCH:S/amd64/x86_64/}-unknown-${OPSYS:tl}
-CARGO_BOOT=	${PORTNAME}-nightly-${CARGO_BOOT_SIG}${EXTRACT_SUFX}
+# Rust's target arch string is different from *BSD arch strings
+RUST_ARCH_x86_64=	x86_64 # dragonfly
+RUST_ARCH_amd64=	x86_64
+RUST_ARCH_i386=		i686
+RUST_TARGET=		${RUST_ARCH_${ARCH}}-unknown-${OPSYS:tl}
+CARGO_BOOT=	${PORTNAME}-nightly-${RUST_TARGET}${EXTRACT_SUFX}
 CARGO_REGISTRY=	${PORTNAME}-registry-${DISTVERSIONFULL}.tar.xz
 
 # We don't USES=cmake here, because cmake is not Cargo's build system.
@@ -73,12 +78,15 @@ OPTIONS_DEFINE=	BOOTSTRAP
 OPTIONS_DEFAULT=BOOTSTRAP
 
 BOOTSTRAP_DESC=		Bootstrap using pre-built vendor snapshot
-BOOTSTRAP_CONFIGURE_OFF=--local-cargo="$$(command -v cargo)" # respect PATH
+BOOTSTRAP_CONFIGURE_ON=	--cargo="${WRKDIR}/${PORTNAME}-nightly-${RUST_TARGET}/cargo/bin/cargo"
+BOOTSTRAP_CONFIGURE_OFF=--cargo="$$(command -v cargo)" # respect PATH
 BOOTSTRAP_DISTFILES=	${CARGO_BOOT}:bootstrap
-BOOTSTRAP_EXTRACT_ONLY=	${DISTFILES:N*\:bootstrap:C/:.*//}
 BOOTSTRAP_MAKE_ENV=	LD_LIBRARY_PATH="${WRKSRC}/target/snapshot/cargo/lib"
 .if !exists(/usr/lib/libssl.so.8) # OPENSSL_SHLIBVER
 BOOTSTRAP_VARS+=	WITH_OPENSSL_PORT=yes
+BOOTSTRAP_MAKE_ENV+=	OPENSSL_DIR=${LOCALBASE}
+.else
+BOOTSTRAP_MAKE_ENV+=	OPENSSL_DIR=/usr
 .endif
 
 post-extract-BOOTSTRAP-on:

Copied and modified: head/devel/cargo/distinfo.amd64 (from r432110, head/devel/cargo/distinfo)
==============================================================================
--- head/devel/cargo/distinfo	Sun Jan 22 10:43:25 2017	(r432110, copy source)
+++ head/devel/cargo/distinfo.amd64	Sun Jan 22 10:45:29 2017	(r432111)
@@ -1,9 +1,9 @@
-TIMESTAMP = 1479719948
-SHA256 (cargo-registry-0.14.0.tar.xz) = 3ed1d9847c7171d87fccf33e1469629e9eba30162329443998909dc2d591dd93
-SIZE (cargo-registry-0.14.0.tar.xz) = 21137544
+TIMESTAMP = 1484954237
+SHA256 (cargo-registry-0.15.0.tar.xz) = 9dcc9747b86f6e647ad429de5df854c69fb4d259c2f4619f22a02a8af6bb6d92
+SIZE (cargo-registry-0.15.0.tar.xz) = 21559740
 SHA256 (cargo-nightly-x86_64-unknown-freebsd.tar.gz) = 4d5e6203d8f6825debb99b4a9e4c8ac2177c55dd2d13458ad6fb972e947bf933
 SIZE (cargo-nightly-x86_64-unknown-freebsd.tar.gz) = 4516956
-SHA256 (rust-lang-cargo-0.14.0_GH0.tar.gz) = 90ec0e644586959f62e6e34e649ba57db6f74aa37b89e90972f817c49b187531
-SIZE (rust-lang-cargo-0.14.0_GH0.tar.gz) = 625305
+SHA256 (rust-lang-cargo-0.15.0_GH0.tar.gz) = 6ebe9e0de255d5bd912528bef0f57db7746e162c6d9875a89c6c8b2b40a21d64
+SIZE (rust-lang-cargo-0.15.0_GH0.tar.gz) = 631157
 SHA256 (rust-lang-rust-installer-755bc3d_GH0.tar.gz) = 103a502bad7af80eef7ccd2dd2969a272a6fa3f237ebeaca083315a45878f07f
 SIZE (rust-lang-rust-installer-755bc3d_GH0.tar.gz) = 19193

Added: head/devel/cargo/distinfo.i386
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/cargo/distinfo.i386	Sun Jan 22 10:45:29 2017	(r432111)
@@ -0,0 +1,9 @@
+TIMESTAMP = 1484954237
+SHA256 (cargo-registry-0.15.0.tar.xz) = 9dcc9747b86f6e647ad429de5df854c69fb4d259c2f4619f22a02a8af6bb6d92
+SIZE (cargo-registry-0.15.0.tar.xz) = 21559740
+SHA256 (cargo-nightly-i686-unknown-freebsd.tar.gz) = bfa152e787369f629294c8d85e2d6afce3730fe78bd469e2fbc3be731c795f7f
+SIZE (cargo-nightly-i686-unknown-freebsd.tar.gz) = 4795563
+SHA256 (rust-lang-cargo-0.15.0_GH0.tar.gz) = 6ebe9e0de255d5bd912528bef0f57db7746e162c6d9875a89c6c8b2b40a21d64
+SIZE (rust-lang-cargo-0.15.0_GH0.tar.gz) = 631157
+SHA256 (rust-lang-rust-installer-755bc3d_GH0.tar.gz) = 103a502bad7af80eef7ccd2dd2969a272a6fa3f237ebeaca083315a45878f07f
+SIZE (rust-lang-rust-installer-755bc3d_GH0.tar.gz) = 19193



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701221045.v0MAjUkM068167>