diff options
author | dumbbell <dumbbell@FreeBSD.org> | 2017-09-16 02:01:17 +0800 |
---|---|---|
committer | dumbbell <dumbbell@FreeBSD.org> | 2017-09-16 02:01:17 +0800 |
commit | 0b663e6dddf67c26d69ee9e838a493969939381c (patch) | |
tree | fc0dda6a227504f83fbc652cef96d083c9e79a92 /devel/cargo | |
parent | eefc293cf2a313845432c80b58a5fd5fa5ae0472 (diff) | |
download | freebsd-ports-gnome-0b663e6dddf67c26d69ee9e838a493969939381c.tar.gz freebsd-ports-gnome-0b663e6dddf67c26d69ee9e838a493969939381c.tar.zst freebsd-ports-gnome-0b663e6dddf67c26d69ee9e838a493969939381c.zip |
lang/rust: Install Cargo + use bundled crates
This port now provides Cargo. This is the recommended now because Cargo
won't be provided separately in the future.
To build Cargo, we set `extended = true` in `config.toml`. As a side
effect, this flag also installs Rust source code. The port has a new
`SOURCES` option (disabled by default) to keep those sources.
As a consequence of this, `devel/cargo` is removed. Several ports
and Makefiles in Mk were updated to depend on `lang/rust` instead of
`devel/cargo`.
The other big change in this patch is the use of the bundled crates,
instead of relying on Cargo's registry (which was part of the distfiles,
in order to allow offline builds). So now, we don't need to prepare the
registry when updating this port.
This has several other benefits:
* It fixes the build with sudo(8).
* It fixes the use of the ino-64 patch (it was not applied to the
registry, thus not used).
Compilation errors were fixed in the ino-64 patch.
Various `.cargo-checksum.json` files are updated after the sources are
patched (FBSD10_FIX, ino-64, and so on). This fixes builds which were
failing with errors such as:
error: the listed checksum of `.../rustc-1.19.0-src/src/vendor/lzma-sys/xz-5.2.3/build-aux/config.rpath` has changed:
expected: c8b4c017079da9dfb3086a0583e60ffe736184d89005dc5973f0bb0fd17c04bb
actual: 561b00eb30ecaef2c9da17bc195e7d2a7ea63facea38ea9849fbb0ed340bebba
PR: 221088
Reported by: joneum@, nwhitehorn@, romain@,
Ekaterina Vaartis <vaartis@cock.li>,
david@catwhisker.org,
fullermd@over-yonder.net,
rum1cro@yandex.ru,
w.schwarzenfeld@utanet.at
Differential Revision: https://reviews.freebsd.org/D11783
Diffstat (limited to 'devel/cargo')
-rw-r--r-- | devel/cargo/Makefile | 145 | ||||
-rw-r--r-- | devel/cargo/distinfo | 13 | ||||
-rw-r--r-- | devel/cargo/pkg-descr | 4 | ||||
-rw-r--r-- | devel/cargo/pkg-plist | 31 |
4 files changed, 0 insertions, 193 deletions
diff --git a/devel/cargo/Makefile b/devel/cargo/Makefile deleted file mode 100644 index 2333a0ddf4f4..000000000000 --- a/devel/cargo/Makefile +++ /dev/null @@ -1,145 +0,0 @@ -# Created by: Jean-Sébastien Pédron <dumbbell@FreeBSD.org> -# $FreeBSD$ - -PORTNAME= cargo -PORTVERSION= 0.19.0 -CATEGORIES= devel - -MAINTAINER= rust@FreeBSD.org -COMMENT= Rust's Package Manager -# ' <-- Help Vim syntax hilighting... - -LICENSE= APACHE20 \ - MIT -LICENSE_COMB= dual -# APACHE20 license is standard, see Templates/Licenses/APACHE20 -LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-MIT - -# The following files are required: -# -# Main source archive from GitHub -# This is the source of Cargo, taken from GitHub. -# -# :cargo_bootstrap -# Like Rust, this is a prebuilt "cargo" used to bootstrap it, because -# Cargo is a standard Rust package itself. -# -# :registry -# Cargo clones several Git repositories for its dependencies and -# caches them in its "registry". This is an archive of this registry -# so nothing is downloaded during the build. -# -# :rust_installer -# This is a collection of mainly shell scripts which are used to -# install Cargo. - -MASTER_SITES= https://static.rust-lang.org/dist/:cargo_bootstrap \ - https://s3.amazonaws.com/rust-lang-ci/cargo-builds/:cargo_bootstrap \ - LOCAL/dumbbell/rust:cargo_bootstrap -.if !defined(SKIP_CARGO_REGISTRY) -MASTER_SITES+= LOCAL/dumbbell/rust:registry -DISTFILES+= ${CARGO_REGISTRY}:registry -.endif -DIST_SUBDIR?= rust - -USE_GITHUB= yes -GH_ACCOUNT= rust-lang -GH_PROJECT= rust-installer:rust_installer -GH_TAGNAME= 4f99485:rust_installer -GH_SUBDIR= src/rust-installer:rust_installer - -ONLY_FOR_ARCHS= aarch64 amd64 i386 -ONLY_FOR_ARCHS_REASON= requires prebuilt bootstrap cargo - -# Rust's target arch string is different from *BSD arch strings -RUST_ARCH_aarch64= aarch64 -RUST_ARCH_amd64= x86_64 -RUST_ARCH_i386= i686 -RUST_ARCH_x86_64= x86_64 # dragonfly -RUST_TARGET= ${RUST_ARCH_${ARCH}}-unknown-${OPSYS:tl} - -CARGO_BOOTSTRAP_DIR?= 2017-04-27 -CARGO_BOOTSTRAP_DIR_aarch64?= 2017-04-24 -CARGO_BOOTSTRAP_VERSION?= 0.18.0 -CARGO_BOOTSTRAP_VERSION_aarch64?=0.18.0 -CARGO_BOOTSTRAP= ${CARGO_BOOTSTRAP_DIR_${ARCH}:U${CARGO_BOOTSTRAP_DIR}}/cargo-${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}}-${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. -# It's used by a bundled dependency (libgit2). -BUILD_DEPENDS= cmake:devel/cmake \ - ${RUST_PORT:T}>=1.18.0:${RUST_PORT} -LIB_DEPENDS= libssh2.so:security/libssh2 \ - libcurl.so:ftp/curl -RUN_DEPENDS= rustc:${RUST_PORT} -RUST_PORT?= lang/rust - -USES= gmake python:-2.7,build pkgconfig ssl -HAS_CONFIGURE= yes -CONFIGURE_ARGS= --prefix="${PREFIX}" --mandir="${MANPREFIX}/man" -MAKE_ENV= ARGS="${CARGO_ARGS}" \ - OPENSSL_DIR="${OPENSSLBASE}" -CARGO_ARGS= --jobs ${MAKE_JOBS_NUMBER} - -MAKE_ARGS+= VERBOSE=1 - -OPTIONS_DEFINE= BOOTSTRAP -OPTIONS_DEFAULT=BOOTSTRAP - -BOOTSTRAP_DESC= Bootstrap using pre-built vendor snapshot -BOOTSTRAP_CONFIGURE_ON= --cargo="${WRKDIR}/${PORTNAME}-${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}}-${RUST_TARGET}/cargo/bin/cargo" -BOOTSTRAP_CONFIGURE_OFF=--cargo="$$(command -v cargo)" # respect PATH -BOOTSTRAP_DISTFILES= ${CARGO_BOOTSTRAP}:cargo_bootstrap -BOOTSTRAP_MAKE_ENV= LD_LIBRARY_PATH="${WRKSRC}/target/snapshot/cargo/lib" - -post-patch: -# Fix mandir and don't install licenses outside of ${_LICENSE_DIR} - @${REINPLACE_CMD} -e 's,share/man,man,' \ - -e 's,$$(S)LICENSE-[^[:space:]]* ,,g' \ - ${WRKSRC}/Makefile.in - -# In case the previous "make stage" failed, this ensures rust's -# install.sh won't backup previously staged files before reinstalling -# new ones. Otheriwe, the staging directory is polluted with unneeded -# files. -pre-install: - @if test -f ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-cargo; then \ - ${SED} -E -e 's,^(dir|file:),${STAGEDIR},' \ - < ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-cargo \ - | ${XARGS} ${RM}; \ - fi - @${RM} \ - ${STAGEDIR}${PREFIX}/lib/rustlib/components \ - ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-cargo \ - ${STAGEDIR}${PREFIX}/lib/rustlib/rust-installer-version \ - ${STAGEDIR}${PREFIX}/lib/rustlib/uninstall.sh - -post-install: - @${RM} ${STAGEDIR}${PREFIX}/lib/rustlib/install.log - @${REINPLACE_CMD} -i '' -e 's|${STAGEDIR}||' \ - ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-cargo - @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/cargo - @${RM} \ - ${STAGEDIR}${PREFIX}/lib/rustlib/components \ - ${STAGEDIR}${PREFIX}/lib/rustlib/rust-installer-version \ - ${STAGEDIR}${PREFIX}/lib/rustlib/uninstall.sh - -# "make gen-registry" is a special target to ease this port update. -# -# After changing the version number and the Git revision, you can run -# "make gen-registry" to update the distinfo and create a new snapshot of -# the registry. The new registry is written to ${DISTDIR} and can be -# uploaded. - -gen-registry: - ${MAKE} -C${.CURDIR} -DSKIP_CARGO_REGISTRY makesum - ${MAKE} -C${.CURDIR} -DSKIP_CARGO_REGISTRY - ${TAR} cJvf ${_DISTDIR}/${CARGO_REGISTRY} -C${WRKDIR} \ - --uid 0 --gid 0 \ - --exclude libgit2/tests/ \ - --exclude curl/tests/ \ - --exclude 'index/github.com-*/.git/' \ - .cargo - ${MAKE} -C${.CURDIR} makesum - -.include <bsd.port.mk> diff --git a/devel/cargo/distinfo b/devel/cargo/distinfo deleted file mode 100644 index c23e8b89be7f..000000000000 --- a/devel/cargo/distinfo +++ /dev/null @@ -1,13 +0,0 @@ -TIMESTAMP = 1497712480 -SHA256 (rust/cargo-registry-0.19.0.tar.xz) = dd77a7d109cfe8a04a0f00e19516a41a69b99655bca9a17a38ab6c2d37bb4b53 -SIZE (rust/cargo-registry-0.19.0.tar.xz) = 18957548 -SHA256 (rust/2017-04-27/cargo-0.18.0-x86_64-unknown-freebsd.tar.gz) = 171147f876c08cf82a6da60fabf737fd580df90e2fec9c57368642beaea67450 -SIZE (rust/2017-04-27/cargo-0.18.0-x86_64-unknown-freebsd.tar.gz) = 5039329 -SHA256 (rust/2017-04-27/cargo-0.18.0-i686-unknown-freebsd.tar.gz) = 30ec4cfc667e3a8fca3cb0377b6a6f5dbcd19ad7143046db24e37432646e60a2 -SIZE (rust/2017-04-27/cargo-0.18.0-i686-unknown-freebsd.tar.gz) = 4914461 -SHA256 (rust/2017-04-24/cargo-0.18.0-aarch64-unknown-freebsd.tar.gz) = 8cdbf046bfc98e1cb92b89c306e4389b92a8df9db44b8f7c784aaac25ad52877 -SIZE (rust/2017-04-24/cargo-0.18.0-aarch64-unknown-freebsd.tar.gz) = 2935624 -SHA256 (rust/rust-lang-cargo-0.19.0_GH0.tar.gz) = 9ea59d17a7fa81aa4bdefa2bb45a5315219414386753eaf0988cadd465550b40 -SIZE (rust/rust-lang-cargo-0.19.0_GH0.tar.gz) = 652163 -SHA256 (rust/rust-lang-rust-installer-4f99485_GH0.tar.gz) = daa34a28d8fe64dd358e5a0c3a83b7018da6df41c9b4420d28ffdb8b05a82478 -SIZE (rust/rust-lang-rust-installer-4f99485_GH0.tar.gz) = 19990 diff --git a/devel/cargo/pkg-descr b/devel/cargo/pkg-descr deleted file mode 100644 index f8eff90f7458..000000000000 --- a/devel/cargo/pkg-descr +++ /dev/null @@ -1,4 +0,0 @@ -Cargo is Rust's Package Manager. Cargo downloads your Rust project's -dependencies and compiles your project. - -WWW: http://doc.crates.io/ diff --git a/devel/cargo/pkg-plist b/devel/cargo/pkg-plist deleted file mode 100644 index 81ffe9d167ac..000000000000 --- a/devel/cargo/pkg-plist +++ /dev/null @@ -1,31 +0,0 @@ -bin/cargo -etc/bash_completion.d/cargo -lib/rustlib/manifest-cargo -man/man1/cargo-bench.1.gz -man/man1/cargo-build.1.gz -man/man1/cargo-check.1.gz -man/man1/cargo-clean.1.gz -man/man1/cargo-doc.1.gz -man/man1/cargo-fetch.1.gz -man/man1/cargo-generate-lockfile.1.gz -man/man1/cargo-init.1.gz -man/man1/cargo-install.1.gz -man/man1/cargo-login.1.gz -man/man1/cargo-metadata.1.gz -man/man1/cargo-new.1.gz -man/man1/cargo-owner.1.gz -man/man1/cargo-package.1.gz -man/man1/cargo-pkgid.1.gz -man/man1/cargo-publish.1.gz -man/man1/cargo-run.1.gz -man/man1/cargo-rustc.1.gz -man/man1/cargo-rustdoc.1.gz -man/man1/cargo-search.1.gz -man/man1/cargo-test.1.gz -man/man1/cargo-uninstall.1.gz -man/man1/cargo-update.1.gz -man/man1/cargo-version.1.gz -man/man1/cargo-yank.1.gz -man/man1/cargo.1.gz -%%PORTDOCS%%%%DOCSDIR%%/README.md -share/zsh/site-functions/_cargo |