Changeset View
Changeset View
Standalone View
Standalone View
head/devel/cargo/Makefile
# Created by: Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | # Created by: Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= cargo | PORTNAME= cargo | ||||
PORTVERSION= 0.17.0 | PORTVERSION= 0.19.0 | ||||
CATEGORIES= devel | CATEGORIES= devel | ||||
MAINTAINER= dumbbell@FreeBSD.org | MAINTAINER= dumbbell@FreeBSD.org | ||||
COMMENT= Rust's Package Manager | COMMENT= Rust's Package Manager | ||||
# ' <-- Help Vim syntax hilighting... | # ' <-- Help Vim syntax hilighting... | ||||
LICENSE= APACHE20 \ | LICENSE= APACHE20 \ | ||||
MIT | MIT | ||||
Show All 14 Lines | |||||
# Cargo clones several Git repositories for its dependencies and | # Cargo clones several Git repositories for its dependencies and | ||||
# caches them in its "registry". This is an archive of this registry | # caches them in its "registry". This is an archive of this registry | ||||
# so nothing is downloaded during the build. | # so nothing is downloaded during the build. | ||||
# | # | ||||
# :rust_installer | # :rust_installer | ||||
# This is a collection of mainly shell scripts which are used to | # This is a collection of mainly shell scripts which are used to | ||||
# install Cargo. | # install Cargo. | ||||
MASTER_SITES= https://s3.amazonaws.com/rust-lang-ci/cargo-builds/:cargo_bootstrap | 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) | .if !defined(SKIP_CARGO_REGISTRY) | ||||
MASTER_SITES+= LOCAL/dumbbell/rust:registry | MASTER_SITES+= LOCAL/dumbbell/rust:registry | ||||
DISTFILES+= ${CARGO_REGISTRY}:registry | DISTFILES+= ${CARGO_REGISTRY}:registry | ||||
.endif | .endif | ||||
DIST_SUBDIR?= rust | DIST_SUBDIR?= rust | ||||
USE_GITHUB= yes | USE_GITHUB= yes | ||||
GH_ACCOUNT= rust-lang | GH_ACCOUNT= rust-lang | ||||
GH_PROJECT= rust-installer:rust_installer | GH_PROJECT= rust-installer:rust_installer | ||||
GH_TAGNAME= 755bc3d:rust_installer | GH_TAGNAME= 4f99485:rust_installer | ||||
GH_SUBDIR= src/rust-installer:rust_installer | GH_SUBDIR= src/rust-installer:rust_installer | ||||
ONLY_FOR_ARCHS= amd64 i386 | ONLY_FOR_ARCHS= aarch64 amd64 i386 | ||||
ONLY_FOR_ARCHS_REASON= requires prebuilt bootstrap cargo | ONLY_FOR_ARCHS_REASON= requires prebuilt bootstrap cargo | ||||
# Rust's target arch string is different from *BSD arch strings | # Rust's target arch string is different from *BSD arch strings | ||||
RUST_ARCH_x86_64= x86_64 # dragonfly | RUST_ARCH_aarch64= aarch64 | ||||
RUST_ARCH_amd64= x86_64 | RUST_ARCH_amd64= x86_64 | ||||
RUST_ARCH_i386= i686 | RUST_ARCH_i386= i686 | ||||
RUST_ARCH_x86_64= x86_64 # dragonfly | |||||
RUST_TARGET= ${RUST_ARCH_${ARCH}}-unknown-${OPSYS:tl} | RUST_TARGET= ${RUST_ARCH_${ARCH}}-unknown-${OPSYS:tl} | ||||
CARGO_BOOTSTRAP_DIR?= fbeea902d2c9a5be6d99cc35681565d8f7832592 | CARGO_BOOTSTRAP_DIR?= 2017-04-27 | ||||
CARGO_BOOTSTRAP_VERSION?= nightly | CARGO_BOOTSTRAP_DIR_aarch64?= 2017-04-24 | ||||
CARGO_BOOTSTRAP= ${CARGO_BOOTSTRAP_DIR}/cargo-${CARGO_BOOTSTRAP_VERSION}-${RUST_TARGET}${EXTRACT_SUFX} | 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 | CARGO_REGISTRY= ${PORTNAME}-registry-${DISTVERSIONFULL}.tar.xz | ||||
# We don't USES=cmake here, because cmake is not Cargo's build system. | # We don't USES=cmake here, because cmake is not Cargo's build system. | ||||
# It's used by a bundled dependency (libgit2). | # It's used by a bundled dependency (libgit2). | ||||
BUILD_DEPENDS= cmake:devel/cmake \ | BUILD_DEPENDS= cmake:devel/cmake \ | ||||
${RUST_PORT:T}>=1.14.0:${RUST_PORT} | ${RUST_PORT:T}>=1.18.0:${RUST_PORT} | ||||
LIB_DEPENDS= libssh2.so:security/libssh2 \ | LIB_DEPENDS= libssh2.so:security/libssh2 \ | ||||
libcurl.so:ftp/curl | libcurl.so:ftp/curl | ||||
RUN_DEPENDS= rustc:${RUST_PORT} | RUN_DEPENDS= rustc:${RUST_PORT} | ||||
RUST_PORT?= lang/rust | RUST_PORT?= lang/rust | ||||
USES= gmake python:-2.7,build pkgconfig ssl | USES= gmake python:-2.7,build pkgconfig ssl | ||||
HAS_CONFIGURE= yes | HAS_CONFIGURE= yes | ||||
CONFIGURE_ARGS= --prefix="${PREFIX}" --mandir="${MANPREFIX}/man" | CONFIGURE_ARGS= --prefix="${PREFIX}" --mandir="${MANPREFIX}/man" | ||||
MAKE_ENV= ARGS="${CARGO_ARGS}" \ | MAKE_ENV= ARGS="${CARGO_ARGS}" \ | ||||
OPENSSL_DIR="${OPENSSLBASE}" | OPENSSL_DIR="${OPENSSLBASE}" | ||||
CARGO_ARGS= --jobs ${MAKE_JOBS_NUMBER} | CARGO_ARGS= --jobs ${MAKE_JOBS_NUMBER} | ||||
MAKE_ARGS+= VERBOSE=1 | MAKE_ARGS+= VERBOSE=1 | ||||
OPTIONS_DEFINE= BOOTSTRAP | OPTIONS_DEFINE= BOOTSTRAP | ||||
OPTIONS_DEFAULT=BOOTSTRAP | OPTIONS_DEFAULT=BOOTSTRAP | ||||
BOOTSTRAP_DESC= Bootstrap using pre-built vendor snapshot | BOOTSTRAP_DESC= Bootstrap using pre-built vendor snapshot | ||||
BOOTSTRAP_CONFIGURE_ON= --cargo="${WRKDIR}/${PORTNAME}-nightly-${RUST_TARGET}/cargo/bin/cargo" | 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_CONFIGURE_OFF=--cargo="$$(command -v cargo)" # respect PATH | ||||
BOOTSTRAP_DISTFILES= ${CARGO_BOOTSTRAP}:cargo_bootstrap | BOOTSTRAP_DISTFILES= ${CARGO_BOOTSTRAP}:cargo_bootstrap | ||||
BOOTSTRAP_MAKE_ENV= LD_LIBRARY_PATH="${WRKSRC}/target/snapshot/cargo/lib" | BOOTSTRAP_MAKE_ENV= LD_LIBRARY_PATH="${WRKSRC}/target/snapshot/cargo/lib" | ||||
post-patch: | post-patch: | ||||
# Fix mandir and don't install licenses outside of ${_LICENSE_DIR} | # Fix mandir and don't install licenses outside of ${_LICENSE_DIR} | ||||
@${REINPLACE_CMD} -e 's,share/man,man,' \ | @${REINPLACE_CMD} -e 's,share/man,man,' \ | ||||
-e 's,$$(S)LICENSE-[^[:space:]]* ,,g' \ | -e 's,$$(S)LICENSE-[^[:space:]]* ,,g' \ | ||||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |