aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordumbbell <dumbbell@FreeBSD.org>2017-01-22 18:45:29 +0800
committerdumbbell <dumbbell@FreeBSD.org>2017-01-22 18:45:29 +0800
commitdf8e466b756dca16955697a8b182533c91b7c7f2 (patch)
tree5582207f7400d1d0c2ff2cd861389eb70953eef5
parentad553d97a2f0c38350d8f5987aaa630889b82a7d (diff)
downloadfreebsd-ports-gnome-df8e466b756dca16955697a8b182533c91b7c7f2.tar.gz
freebsd-ports-gnome-df8e466b756dca16955697a8b182533c91b7c7f2.tar.zst
freebsd-ports-gnome-df8e466b756dca16955697a8b182533c91b7c7f2.zip
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
-rw-r--r--devel/cargo/Makefile22
-rw-r--r--devel/cargo/distinfo.amd64 (renamed from devel/cargo/distinfo)10
-rw-r--r--devel/cargo/distinfo.i3869
-rw-r--r--devel/cargo/files/patch-configure10
-rw-r--r--devel/cargo/files/patch-src_snapshots.txt18
5 files changed, 29 insertions, 40 deletions
diff --git a/devel/cargo/Makefile b/devel/cargo/Makefile
index 32071806e0de..55aac6d5e7fe 100644
--- a/devel/cargo/Makefile
+++ b/devel/cargo/Makefile
@@ -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_installer
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:
diff --git a/devel/cargo/distinfo b/devel/cargo/distinfo.amd64
index df306a995573..356d162bfe21 100644
--- a/devel/cargo/distinfo
+++ b/devel/cargo/distinfo.amd64
@@ -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
diff --git a/devel/cargo/distinfo.i386 b/devel/cargo/distinfo.i386
new file mode 100644
index 000000000000..57390c26568e
--- /dev/null
+++ b/devel/cargo/distinfo.i386
@@ -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
diff --git a/devel/cargo/files/patch-configure b/devel/cargo/files/patch-configure
deleted file mode 100644
index 5f180268a4a8..000000000000
--- a/devel/cargo/files/patch-configure
+++ /dev/null
@@ -1,10 +0,0 @@
---- configure.orig 2016-08-19 21:24:29 UTC
-+++ configure
-@@ -346,7 +346,6 @@ fi
-
- step_msg "looking for build programs"
-
--probe_need CFG_CURLORWGET curl wget
- probe_need CFG_PYTHON python2.7 python2 python
- probe_need CFG_CC cc gcc clang
-
diff --git a/devel/cargo/files/patch-src_snapshots.txt b/devel/cargo/files/patch-src_snapshots.txt
deleted file mode 100644
index 86b0533624cd..000000000000
--- a/devel/cargo/files/patch-src_snapshots.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-2016-01-31 lacks snapshots for any BSD system, skip them to use 2015-04-02.
-
- gmake[2]: Entering directory '.../cargo-0.9.0'
- /usr/local/bin/python2.7 src/etc/dl-snapshot.py x86_64-unknown-freebsd
- Traceback (most recent call last):
- File "src/etc/dl-snapshot.py", line 57, in <module>
- raise Exception("no snapshot for the triple '%s'" % triple)
- Exception: no snapshot for the triple 'x86_64-unknown-freebsd'
-
---- src/snapshots.txt.orig 2016-04-08 20:31:50 UTC
-+++ src/snapshots.txt
-@@ -1,3 +1,6 @@
-+2016-11-02
-+ freebsd-x86_64 5ef450453f6ba199c73c5de22460997a24d216a7
-+
- 2016-03-21
- linux-i386 ac401c16ff53e0c51b88707579b4f95d7d4c4763
- linux-x86_64 84266cf626ca4fcdc290bca8f1a74e6ad9e8b3d9