Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151106111
D11783.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
24 KB
Referenced Files
None
Subscribers
None
D11783.diff
View Options
Index: MOVED
===================================================================
--- MOVED
+++ MOVED
@@ -9543,3 +9543,4 @@
devel/py33-setuptools||2017-09-03|Removed, please update to Python 3.6
x11-toolkits/py33-tkinter||2017-09-03|Removed, please update to Python 3.6
devel/py3-enum34||2017-09-03|Removed, Python 3.3 only
+devel/cargo|lang/rust|2017-09-10|Merged with lang/rust
Index: Mk/Uses/cargo.mk
===================================================================
--- Mk/Uses/cargo.mk
+++ Mk/Uses/cargo.mk
@@ -46,10 +46,10 @@
CARGO_BUILDDEP?= yes
.if ${CARGO_BUILDDEP:tl} == "yes"
-BUILD_DEPENDS+= cargo:devel/cargo rustc:lang/rust
+BUILD_DEPENDS+= rust>=1.19.0:lang/rust
.endif
-# Location of cargo binary (default to devel/cargo binary)
+# Location of cargo binary (default to lang/rust's Cargo binary)
CARGO_CARGO_BIN?= ${LOCALBASE}/bin/cargo
# Location of the cargo output directory.
Index: Mk/bsd.gecko.mk
===================================================================
--- Mk/bsd.gecko.mk
+++ Mk/bsd.gecko.mk
@@ -389,10 +389,7 @@
.endif
.if ${PORT_OPTIONS:MRUST}
-BUILD_DEPENDS+= rust>=1.15.1:${RUST_PORT}
-. if ${MOZILLA_VER:R:R} >= 51
-BUILD_DEPENDS+= cargo>=0.16.0:devel/cargo
-. endif
+BUILD_DEPENDS+= rust>=1.19.0:${RUST_PORT}
RUST_PORT?= lang/rust
MOZ_OPTIONS+= --enable-rust
.else
Index: UPDATING
===================================================================
--- UPDATING
+++ UPDATING
@@ -5,6 +5,13 @@
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
+20170910:
+ AFFECTS: users of devel/cargo
+ AUTHOR: rust@Freebsd.org
+
+ Starting with version 1.19.0, Cargo is provided with Rust. Therefore,
+ devel/cargo was merged into lang/rust.
+
20170904
AFFECTS: users of net-mgmt/seafile-server
AUTHOR: ultima@FreeBSD.org
Index: devel/Makefile
===================================================================
--- devel/Makefile
+++ devel/Makefile
@@ -254,7 +254,6 @@
SUBDIR += calibrator
SUBDIR += capstone3
SUBDIR += capstone4
- SUBDIR += cargo
SUBDIR += cask
SUBDIR += catch
SUBDIR += cbrowser
Index: devel/cargo/Makefile
===================================================================
--- devel/cargo/Makefile
+++ devel/cargo/Makefile
@@ -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>
Index: devel/cargo/distinfo
===================================================================
--- devel/cargo/distinfo
+++ devel/cargo/distinfo
@@ -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
Index: devel/cargo/pkg-descr
===================================================================
--- devel/cargo/pkg-descr
+++ devel/cargo/pkg-descr
@@ -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/
Index: devel/cargo/pkg-plist
===================================================================
--- devel/cargo/pkg-plist
+++ devel/cargo/pkg-plist
@@ -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
Index: lang/rust/Makefile
===================================================================
--- lang/rust/Makefile
+++ lang/rust/Makefile
@@ -3,7 +3,7 @@
PORTNAME= rust
PORTVERSION?= 1.19.0
-PORTREVISION?= 1
+PORTREVISION?= 2
CATEGORIES= lang
MASTER_SITES= http://static.rust-lang.org/dist/:src \
https://static.rust-lang.org/dist/:rust_bootstrap \
@@ -13,20 +13,14 @@
LOCAL/dumbbell/rust:cargo_bootstrap \
LOCAL/marino:bootstrap
DISTNAME?= ${PORTNAME}c-${PORTVERSION}-src
-BOOTSTRAP_FILES=${RUSTC_BOOTSTRAP}:rust_bootstrap \
+DISTFILES?= ${DISTNAME}${EXTRACT_SUFX}:src \
+ ${RUSTC_BOOTSTRAP}:rust_bootstrap \
${RUST_STD_BOOTSTRAP}:rust_bootstrap \
${CARGO_BOOTSTRAP}:cargo_bootstrap
-DISTFILES?= ${DISTNAME}${EXTRACT_SUFX}:src \
- ${BOOTSTRAP_FILES}
-.if !defined(SKIP_CARGO_REGISTRY)
-MASTER_SITES+= LOCAL/riggs/rust:registry \
- LOCAL/dumbbell/rust:registry
-DISTFILES+= ${CARGO_REGISTRY}:registry
-.endif
DIST_SUBDIR?= rust
EXTRACT_ONLY?= ${DISTFILES:N*\:*bootstrap:C/:.*//}
-MAINTAINER?= rust@FreeBSD.org
+MAINTAINER= rust@FreeBSD.org
COMMENT= Language with a focus on memory safety and concurrency
LICENSE= APACHE20 \
@@ -36,6 +30,8 @@
LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-MIT
BUILD_DEPENDS= cmake:devel/cmake
+LIB_DEPENDS= libcurl.so:ftp/curl \
+ libssh2.so:security/libssh2
ONLY_FOR_ARCHS?= aarch64 amd64 i386
ONLY_FOR_ARCHS_REASON= requires prebuilt bootstrap compiler
@@ -58,7 +54,6 @@
CARGO_BOOTSTRAP_VERSION?= 0.19.0
CARGO_BOOTSTRAP_VERSION_aarch64?=0.19.0
CARGO_BOOTSTRAP= ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}/cargo-${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}}-${RUST_TARGET}${EXTRACT_SUFX}
-CARGO_REGISTRY= ${PORTNAME}-registry-${DISTVERSIONFULL}.tar.xz
RUST_CHANNEL= ${PKGNAMESUFFIX:Ustable:S/^-//}
@@ -70,11 +65,12 @@
RUST_TARGET= ${RUST_ARCH_${ARCH}}-unknown-${OPSYS:tl}
PLIST_SUB+= RUST_TARGET=${RUST_TARGET}
-USES= compiler gmake libedit python:2.7,build
+USES= compiler gmake libedit pkgconfig python:2.7,build ssl
-OPTIONS_DEFINE= DOCS GDB LLNEXTGEN PORT_LLVM
+OPTIONS_DEFINE= DOCS GDB LLNEXTGEN PORT_LLVM SOURCES
GDB_DESC= Install ports gdb (necessary for debugging rust programs)
LLNEXTGEN_DESC= Build with grammar verification
+SOURCES_DESC= Install source files
GDB_RUN_DEPENDS= ${LOCALBASE}/bin/gdb:devel/gdb
LLNEXTGEN_BUILD_DEPENDS= LLnextgen:devel/llnextgen
@@ -89,21 +85,29 @@
# We use them in:
# - pre-install to cleanup the ${STAGEDIR}
# - post-install to populate the ${TMPPLIST}
-RUST_MANIFESTS= lib/rustlib/manifest-rustc \
+RUST_MANIFESTS= lib/rustlib/manifest-cargo \
+ lib/rustlib/manifest-rustc \
+ lib/rustlib/manifest-rust-analysis-${RUST_TARGET} \
lib/rustlib/manifest-rust-std-${RUST_TARGET}
-RUST_DOCS_MANIFESTS= lib/rustlib/manifest-rust-docs
-DOCS_VARS= rust_manifests+=${RUST_DOCS_MANIFESTS}
+RUST_DOCS_MANIFEST= lib/rustlib/manifest-rust-docs
+RUST_SRC_MANIFEST= lib/rustlib/manifest-rust-src
+DOCS_VARS= rust_manifests+=${RUST_DOCS_MANIFEST}
+SOURCES_VARS= rust_manifests+=${RUST_SRC_MANIFEST}
PLIST_FILES= lib/rustlib/components \
lib/rustlib/rust-installer-version
.include <bsd.port.pre.mk>
.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200031
-EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-ino64
+EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-ino64
.endif
-X_PY_ENV = HOME=${WRKDIR}
-X_PY_CMD = ${PYTHON_CMD} ${WRKSRC}/x.py
+X_PY_ENV= HOME="${WRKDIR}" \
+ OPENSSL_DIR="${OPENSSLBASE}"
+X_PY_CMD= ${PYTHON_CMD} ${WRKSRC}/x.py
+
+CRATES_PATCHED_BY_FBSD10_FIX= src/vendor/libssh2-sys \
+ src/vendor/lzma-sys
pre-fetch:
# FIXME: This is the same check for CONFLICTS as the standard
@@ -161,6 +165,9 @@
post-patch:
@${REINPLACE_CMD} -e 's|gdb|${LOCALBASE}/bin/gdb|' \
${WRKSRC}/src/etc/rust-gdb
+# If we override the versions and date of the bootstraps (for instance
+# on aarch64 where we provide our own bootstraps), we need to update
+# places where they are recorded.
@if test "${BOOTSTRAPS_DATE_${ARCH}}"; then \
${REINPLACE_CMD} -e \
's|^date:.*|date: ${BOOTSTRAPS_DATE_${ARCH}:U${BOOTSTRAPS_DATE}}|' \
@@ -179,6 +186,26 @@
's|cargo-nightly-|cargo-${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}}-|' \
${WRKSRC}/src/bootstrap/bootstrap.py; \
fi
+# `extra-patch-ino64` may be applied. If that's the case, we need to
+# update `.cargo-checksum.json` to reflect the new checksums verified by
+# Cargo.
+ @cd "${WRKSRC}/src/vendor/libc"; \
+ for file in $$(${FIND} * -name "*.orig"); do \
+ old_checksum=$$(${SHA256} -q "$$file"); \
+ new_checksum=$$(${SHA256} -q "$${file%%.orig}"); \
+ regex="$$regex -e s|\"$${file%%.orig}\":\"$$old_checksum\"|\"$${file%%.orig}\":\"$$new_checksum\"|"; \
+ done; \
+ if test "$$regex"; then \
+ ${REINPLACE_CMD} -E $$regex .cargo-checksum.json; \
+ fi
+# We make a backup of a few files before the FreeBSD 10 autotools
+# fix is applied. We'll need them in `do-configure` to update the
+# `.cargo-checksum.json` files.
+ @for crate in ${CRATES_PATCHED_BY_FBSD10_FIX}; do \
+ for file in $$(${FIND} "${WRKSRC}/$$crate" -name "config.rpath"); do \
+ ${CP} "$$file" "$$file.orig"; \
+ done; \
+ done
do-configure:
${SED} -E \
@@ -190,6 +217,20 @@
-e 's,%TARGET%,${RUST_TARGET},' \
< ${FILESDIR}/config.toml \
> ${WRKSRC}/config.toml
+# The FreeBSD 10 autotools fix may modify some files just before
+# `do-configure`. Like after `extra-path-ino64`, we need to update
+# `.cargo-checksum.json`.
+ @for crate in ${CRATES_PATCHED_BY_FBSD10_FIX}; do \
+ cd "${WRKSRC}/$$crate"; \
+ for file in $$(${FIND} * -name "*.orig"); do \
+ old_checksum=$$(${SHA256} -q "$$file"); \
+ new_checksum=$$(${SHA256} -q "$${file%%.orig}"); \
+ regex="$$regex -e s|\"$${file%%.orig}\":\"$$old_checksum\"|\"$${file%%.orig}\":\"$$new_checksum\"|"; \
+ done; \
+ if test "$$regex"; then \
+ ${REINPLACE_CMD} -E $$regex .cargo-checksum.json; \
+ fi; \
+ done
post-configure-DOCS-on:
${REINPLACE_CMD} -e 's,%DOCS%,true,' ${WRKSRC}/config.toml
@@ -216,7 +257,7 @@
# new ones. Otherwise, the staging directory is polluted with unneeded
# files.
pre-install:
- @for f in ${RUST_MANIFESTS} ${RUST_DOCS_MANIFESTS}; do \
+ @for f in ${RUST_MANIFESTS} ${RUST_DOCS_MANIFEST} ${RUST_SRC_MANIFEST}; do \
if test -f "${STAGEDIR}${PREFIX}/$$f"; then \
${SED} -E -e 's,^(file|dir):,${STAGEDIR},' \
< "${STAGEDIR}${PREFIX}/$$f" \
@@ -243,6 +284,12 @@
# on the absolute path of the source files. As it is user-specific, we
# can't know their filename in advance.
#
+# Both rustc and Cargo components install the same README.md and LICENSE
+# files. The install process backs up the first copy to install the
+# second. Thus here, we need to remove those backups. We also need to
+# dedup the entries in the generated PLIST, because both components'
+# manifests list them.
+#
# We fix manpage entries in the generated manifests because Rust
# installs them uncompressed but the Ports framework compresses them.
post-install:
@@ -266,17 +313,35 @@
}' \
${STAGEDIR}${PREFIX}/$$f >> ${TMPPLIST}; \
done
+ ${RM} ${STAGEDIR}${PREFIX}/share/doc/rust/*.old
+ ${SORT} -u < ${TMPPLIST} > ${TMPPLIST}.uniq
+ ${MV} ${TMPPLIST}.uniq ${TMPPLIST}
@${RM} \
${STAGEDIR}${PREFIX}/lib/rustlib/install.log \
${STAGEDIR}${PREFIX}/lib/rustlib/uninstall.sh
# FIXME: Static libraries in lib/rustlib/*/lib/*.rlib are not stripped,
# but they contain non-object files which make strip(1) unhappy.
@${STRIP_CMD} \
+ ${STAGEDIR}${PREFIX}/bin/cargo \
${STAGEDIR}${PREFIX}/bin/rustc \
${STAGEDIR}${PREFIX}/bin/rustdoc \
${STAGEDIR}${PREFIX}/lib/*.so \
${STAGEDIR}${PREFIX}/lib/rustlib/*/lib/*.so
+# We set `extended = true` in config.toml because we want to build
+# Cargo at the same time. However, this installs the rust-src component
+# as well. If the user doesn't want that, I don't know how to prevent
+# its install. So for now, use the rust-src manifest to remove it from
+# ${STAGEDIR}.
+post-install-SOURCES-off:
+ if test -f "${STAGEDIR}${PREFIX}/${RUST_SRC_MANIFEST}"; then \
+ ${SED} -E -e 's,^(file|dir):,,' \
+ < "${STAGEDIR}${PREFIX}/${RUST_SRC_MANIFEST}" \
+ | ${XARGS} ${RM} -r; \
+ ${RM} "${STAGEDIR}${PREFIX}/${RUST_SRC_MANIFEST}"; \
+ ${RM} -r "${STAGEDIR}${PREFIX}/lib/rustlib/src"; \
+ fi
+
# Note that make test does not work when rust is already installed.
do-test:
cd ${WRKSRC} && \
@@ -288,22 +353,3 @@
--jobs ${MAKE_JOBS_NUMBER}
.include <bsd.port.post.mk>
-
-# "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}/${DIST_SUBDIR}/${CARGO_REGISTRY} -C${WRKDIR} \
- --uid 0 --gid 0 \
- --exclude 'src/*/benches/' \
- --exclude 'src/*/ci/' \
- --exclude 'src/*/examples/' \
- --exclude 'index/github.com-*/.git/' \
- .cargo
- ${MAKE} -C${.CURDIR} makesum
Index: lang/rust/distinfo
===================================================================
--- lang/rust/distinfo
+++ lang/rust/distinfo
@@ -19,5 +19,3 @@
SIZE (rust/2017-06-08/rust-std-1.18.0-x86_64-unknown-freebsd.tar.gz) = 66585539
SHA256 (rust/2017-06-08/cargo-0.19.0-x86_64-unknown-freebsd.tar.gz) = a8d45ad508ecbe9ec9e19fddabda4476466486f97cfb1b59d0a43a1012acb788
SIZE (rust/2017-06-08/cargo-0.19.0-x86_64-unknown-freebsd.tar.gz) = 5176510
-SHA256 (rust/rust-registry-1.19.0.tar.xz) = 7f1d5b33ba11bbb05e468317680b54a61557e087e0d0deb0d69c2535f1b61146
-SIZE (rust/rust-registry-1.19.0.tar.xz) = 28571276
Index: lang/rust/files/config.toml
===================================================================
--- lang/rust/files/config.toml
+++ lang/rust/files/config.toml
@@ -1,5 +1,11 @@
[build]
+# Use bundled crates; this should permit offline build.
+vendor = true
+
+# In addition to rustc, rust-std and rust-docs, build Cargo.
+extended = true
+
# python(1) location.
python = "%PYTHON_CMD%"
@@ -20,3 +26,8 @@
[target.%TARGET%]
llvm-config = "%LLVM_CONFIG%"
+
+[dist]
+
+# Do not build the source archive.
+src-tarball = false
Index: lang/rust/files/extra-patch-ino64
===================================================================
--- lang/rust/files/extra-patch-ino64
+++ lang/rust/files/extra-patch-ino64
@@ -29,7 +29,7 @@
- pub st_birthtime: ::time_t,
- pub st_birthtime_nsec: ::c_long,
+ pub st_gen: ::uint64_t,
-+ pub st_spare: [::int64_t; 10],
++ pub st_spare: [::uint64_t; 10],
}
}
--- ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/mod.rs.orig 2017-04-24 18:56:45.000000000 +0000
@@ -97,7 +97,7 @@
- pub st_birthtime_nsec: ::c_long,
- __unused: [u8; 8],
+ pub st_gen: ::uint64_t,
-+ pub st_lspare: [::uint64_t; 10],
++ pub st_spare: [::uint64_t; 10],
}
}
--- ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/x86_64.rs.orig 2017-04-24 18:56:45.000000000 +0000
@@ -131,7 +131,7 @@
- pub st_birthtime: ::time_t,
- pub st_birthtime_nsec: ::c_long,
+ pub st_gen: ::uint64_t,
-+ pub st_spare: [::int64_t; 10],
++ pub st_spare: [::uint64_t; 10],
}
}
--- ./src/liblibc/src/unix/bsd/freebsdlike/mod.rs.orig 2017-04-24 18:56:45.000000000 +0000
@@ -270,7 +270,7 @@
- pub st_birthtime: ::time_t,
- pub st_birthtime_nsec: ::c_long,
+ pub st_gen: ::uint64_t,
-+ pub st_spare: [::int64_t; 10],
++ pub st_spare: [::uint64_t; 10],
}
}
--- ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/x86_64.rs.orig 2017-04-24 20:20:26.000000000 +0000
@@ -282,10 +282,10 @@
- pub st_mode: ::mode_t,
pub st_nlink: ::nlink_t,
+ pub st_mode: ::mode_t,
-+ pub st_pad0: u16,
++ pub st_pad0: ::uint16_t,
pub st_uid: ::uid_t,
pub st_gid: ::gid_t,
-+ pub st_pad1: ::u32,
++ pub st_pad1: ::uint32_t,
pub st_rdev: ::dev_t,
pub st_atime: ::time_t,
pub st_atime_nsec: ::c_long,
@@ -304,7 +304,7 @@
- pub st_birthtime: ::time_t,
- pub st_birthtime_nsec: ::c_long,
+ pub st_gen: ::uint64_t,
-+ pub st_spare: [u64; 10],
++ pub st_spare: [::uint64_t; 10],
}
}
--- ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs.orig 2017-04-24 20:20:26.000000000 +0000
@@ -345,21 +345,21 @@
- pub st_mode: ::mode_t,
pub st_nlink: ::nlink_t,
+ pub st_mode: ::mode_t,
-+ pub st_pad0: u16,
++ pub st_pad0: ::uint16_t,
pub st_uid: ::uid_t,
pub st_gid: ::gid_t,
-+ pub st_pad1: u32,
++ pub st_pad1: ::uint32_t,
pub st_rdev: ::dev_t,
-+ pub st_atime_ext: ::i32,
++ pub st_atime_ext: ::int32_t,
pub st_atime: ::time_t,
pub st_atime_nsec: ::c_long,
-+ pub st_mtime_ext: ::i32,
++ pub st_mtime_ext: i32,
pub st_mtime: ::time_t,
pub st_mtime_nsec: ::c_long,
-+ pub st_ctime_ext: ::i32,
++ pub st_ctime_ext: ::int32_t,
pub st_ctime: ::time_t,
pub st_ctime_nsec: ::c_long,
-+ pub st_birthtime_ext: ::i32,
++ pub st_birthtime_ext: ::int32_t,
+ pub st_birthtime: ::time_t,
+ pub st_birthtime_nsec: ::c_long,
pub st_size: ::off_t,
@@ -372,7 +372,7 @@
- pub st_birthtime_nsec: ::c_long,
- __unused: [u8; 8],
+ pub st_gen: ::uint64_t,
-+ pub st_spare: [u64; 10],
++ pub st_spare: [::uint64_t; 10],
}
}
--- ./src/vendor/libc/src/unix/bsd/freebsdlike/mod.rs.orig 2017-04-24 20:20:26.000000000 +0000
Index: multimedia/librespot/Makefile
===================================================================
--- multimedia/librespot/Makefile
+++ multimedia/librespot/Makefile
@@ -12,7 +12,7 @@
BROKEN= tries to clone git repository during build phase
-BUILD_DEPENDS= cargo>0:devel/cargo \
+BUILD_DEPENDS= rust>=1.19.0:lang/rust \
portaudio>0:audio/portaudio
USES= localbase pathfix pkgconfig shebangfix
Index: www/firefox/Makefile
===================================================================
--- www/firefox/Makefile
+++ www/firefox/Makefile
@@ -48,7 +48,7 @@
OPTIONS_DEFINE= RUST
OPTIONS_DEFAULT= BUNDLED_CAIRO
OPTIONS_EXCLUDE= GNOMEUI
-# XXX lang/rust and devel/cargo currently build only on these platforms
+# XXX lang/rust currently builds only on these platforms
OPTIONS_DEFAULT_aarch64=RUST
OPTIONS_DEFAULT_amd64= RUST
OPTIONS_DEFAULT_i386= RUST
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 7, 2:49 AM (12 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31007290
Default Alt Text
D11783.diff (24 KB)
Attached To
Mode
D11783: lang/rust: Build and install Cargo
Attached
Detach File
Event Timeline
Log In to Comment