Index: devel/Makefile =================================================================== --- devel/Makefile +++ devel/Makefile @@ -191,6 +191,7 @@ SUBDIR += caf SUBDIR += calibrator SUBDIR += capstone + SUBDIR += cargo SUBDIR += cask SUBDIR += catch SUBDIR += cbind Index: devel/cargo/Makefile =================================================================== --- /dev/null +++ devel/cargo/Makefile @@ -0,0 +1,131 @@ +# Created by: Jean-Sébastien Pédron +# $FreeBSD$ + +PORTNAME= cargo +PORTVERSION= 0.2.0.20150612 +CATEGORIES= devel + +MAINTAINER= ports@FreeBSD.org +COMMENT= Rust's Package Manager +# ' <-- Help Vim syntax hilighting... + +LICENSE= APACHE20 \ + MIT +LICENSE_COMB= dual +LICENSE_FILE= ${WRKSRC}/LICENSE-APACHE \ + ${WRKSRC}/LICENSE-MIT + +# The following files are required: +# +# GH:src +# This is the source of Cargo, taken from GitHub. +# +# LOCAL/dumbbell:bootstrap +# Like Rust, this is a prebuilt "cargo" used to bootstrap it, because +# Cargo is a standard Rust package itself. +# +# LOCAL/dumbbell:registry +# Cargo clones several Git repositories for its dependencies and +# caches them in its "registry". This is a archive of this registry so +# nothing is downlaoded during the build. +# +# LOCAL/dumbbell:installer +# This is a collection of mainly shell scripts which are used to +# install Cargo. + +MASTER_SITES= LOCAL/dumbbell:bootstrap \ + LOCAL/dumbbell:registry \ + https://people.freebsd.org/~dumbbell/rust/:bootstrap \ + https://people.freebsd.org/~dumbbell/rust/:registry + +DISTFILES= ${CARGO_BOOT}:bootstrap \ + ${CARGO_REGISTRY}:registry +EXTRACT_ONLY= ${DISTNAME}${_GITHUB_EXTRACT_SUFX} \ + ${DISTFILE_rust_installer} \ + ${CARGO_REGISTRY} + +USE_GITHUB= yes +GH_ACCOUNT= rust-lang +GH_PROJECT= ${PORTNAME} \ + rust-installer:rust_installer +GH_TAGNAME= ae8b752b4e \ + e54d482:rust_installer + +CARGO_BOOT= ${PORTNAME}-bootstrap-0.2.0.20150503-${CARGO_BOOT_SIG}${EXTRACT_SUFX} +CARGO_BOOT_SIG= x86_64-unknown-freebsd +CARGO_REGISTRY= ${DISTNAME:S/${GH_ACCOUNT}-${PORTNAME}/${PORTNAME}-registry/}${EXTRACT_SUFX} +RUST_INSTALLER= ${GH_ACCOUNT}-rust-installer-${PORTVERSION}-e54d4823d26cdb3f98e5a1b17e1c257cd329aa61_GH0${EXTRACT_SUFX} + +USES= gmake python:2,build pkgconfig + +BUILD_DEPENDS= ${LOCALBASE}/bin/cmake:${PORTSDIR}/devel/cmake \ + rustc:${PORTSDIR}/lang/rust-nightly +LIB_DEPENDS= libssh2.so:${PORTSDIR}/security/libssh2 \ + libcurl.so:${PORTSDIR}/ftp/curl + +# FIXME: Don't add rust as a runtime dependency. As we need rust-nightly +# to build Cargo, the same version would be pulled by installing Cargo, +# preventing its use with the stable version of Rust. +# RUN_DEPENDS= rustc:${PORTSDIR}/lang/rust + +HAS_CONFIGURE= yes +CONFIGURE_ARGS= --mandir=${MANPREFIX}/man +MAKE_ENV+= LD_LIBRARY_PATH="${WRKSRC}/target/snapshot/cargo/lib" + +# git log -1 --date=short --pretty=format:'%cd' +CFG_VER_DATE= 2015-06-12 +# git rev-parse --short HEAD +CFG_VER_HASH= ${GH_TAGNAME} + +.if defined(BATCH) || defined(PACKAGE_BUILDING) +MAKE_ARGS+= VERBOSE=1 +.endif + +MAKE_JOBS_UNSAFE= yes + +.include + +post-extract: + @(${RMDIR} ${WRKSRC}/src/rust-installer && \ + ${MV} ${WRKSRC_rust_installer} ${WRKSRC}/src/rust-installer) + @${MKDIR} ${WRKSRC}/target/dl + ${LN} -sf ${DISTDIR}/${CARGO_BOOT} ${WRKSRC}/target/dl/${PORTNAME}-nightly-${CARGO_BOOT_SIG}${EXTRACT_SUFX} + #${EXTRACT_CMD} \ + # -C ${WRKSRC}/.. \ + # ${EXTRACT_BEFORE_ARGS}${DISTDIR}/${CARGO_REGISTRY} \ + # ${EXTRACT_AFTER_ARGS} + +post-patch: + ${REINPLACE_CMD} \ + -e 's|^CFG_VER_DATE =.*|CFG_VER_DATE = ${CFG_VER_DATE}|' \ + -e 's|^CFG_VER_HASH =.*|CFG_VER_HASH = ${CFG_VER_HASH}|' \ + ${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} -e 's|${STAGEDIR}||' \ + ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-cargo + @${RM} ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-cargo.bak + @${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 + +.include Index: devel/cargo/distinfo =================================================================== --- /dev/null +++ devel/cargo/distinfo @@ -0,0 +1,8 @@ +SHA256 (cargo-bootstrap-0.2.0.20150503-x86_64-unknown-freebsd.tar.gz) = 70ccf0494c4d71104f2f9328d480ef4d71547b811ca382a859a77c01c0b023ee +SIZE (cargo-bootstrap-0.2.0.20150503-x86_64-unknown-freebsd.tar.gz) = 5391291 +SHA256 (cargo-registry-0.2.0.20150612-ae8b752b4e_GH0.tar.gz) = 13b44725892d1a2c20666fe4986b8e3fc077b59fb921af413a03d04c38a0d2e5 +SIZE (cargo-registry-0.2.0.20150612-ae8b752b4e_GH0.tar.gz) = 26233500 +SHA256 (rust-lang-cargo-0.2.0.20150612-ae8b752b4e_GH0.tar.gz) = 16fefddd6907f9198371e42535c670c441717c490d65c0530636fb08c3333332 +SIZE (rust-lang-cargo-0.2.0.20150612-ae8b752b4e_GH0.tar.gz) = 344102 +SHA256 (rust-lang-rust-installer-e54d482_GH0.tar.gz) = a4a6f2cf9c85880190a45d74b4a74c52d620a3522f2b3e1715ea01179cba3aba +SIZE (rust-lang-rust-installer-e54d482_GH0.tar.gz) = 14598 Index: devel/cargo/files/patch-configure =================================================================== --- /dev/null +++ devel/cargo/files/patch-configure @@ -0,0 +1,12 @@ +--- configure.orig 2015-05-02 23:16:20 UTC ++++ configure +@@ -341,8 +341,7 @@ validate_opt + + step_msg "looking for build programs" + +-probe_need CFG_CURLORWGET curl wget +-probe_need CFG_PYTHON python ++probe_need CFG_PYTHON python2.7 python2 python + probe_need CFG_CC cc gcc clang + + if [ ! -z "${CFG_LOCAL_RUST_ROOT}" ]; then Index: devel/cargo/files/patch-src_snapshots.txt =================================================================== --- /dev/null +++ devel/cargo/files/patch-src_snapshots.txt @@ -0,0 +1,10 @@ +--- src/snapshots.txt.orig 2015-05-02 23:16:20 UTC ++++ src/snapshots.txt +@@ -5,6 +5,7 @@ + macos-x86_64 1f7008a6ec860e2bc7580e71bdf320ac518ddeb8 + winnt-i386 8c0088ae9e47133b976f7ad155c50ca9abb2906c + winnt-x86_64 01ae9ea568211a20f048e7b00d902d6fe72d1627 ++ freebsd-x86_64 1af86a56acccf28ab3e5674b05dc5c0efd7a8bc8 + + 2015-03-26 + linux-i386 d8b59fb0a0e8222b1753370f1d7c91dcb9697b37 Index: devel/cargo/pkg-descr =================================================================== --- /dev/null +++ devel/cargo/pkg-descr @@ -0,0 +1,4 @@ +Cargo is Cargo, 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 =================================================================== --- /dev/null +++ devel/cargo/pkg-plist @@ -0,0 +1,9 @@ +bin/cargo +etc/bash_completion.d/cargo +lib/rustlib/manifest-cargo +%%PORTDOCS%%%%DOCSDIR%%/LICENSE-APACHE +%%PORTDOCS%%%%DOCSDIR%%/LICENSE-MIT +%%PORTDOCS%%%%DOCSDIR%%/LICENSE-THIRD-PARTY +%%PORTDOCS%%%%DOCSDIR%%/README.md +share/man/man1/cargo.1 +share/zsh/site-functions/_cargo Index: graphics/darktable/Makefile =================================================================== --- graphics/darktable/Makefile +++ graphics/darktable/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= darktable -PORTVERSION= 1.6.6 +PORTVERSION= 1.6.7 CATEGORIES= graphics MASTER_SITES= https://github.com/darktable-org/${PORTNAME}/releases/download/release-${PORTVERSION}/ Index: graphics/darktable/distinfo =================================================================== --- graphics/darktable/distinfo +++ graphics/darktable/distinfo @@ -1,2 +1,2 @@ -SHA256 (darktable-1.6.6.tar.xz) = f85e4b8219677eba34f5a41e1a0784cc6ec06576326a99f04e460a4f41fd21a5 -SIZE (darktable-1.6.6.tar.xz) = 3097760 +SHA256 (darktable-1.6.7.tar.xz) = a75073b49df0a30cd2686624feeb6210bc083bc37112ae6e045f8523db4c4c98 +SIZE (darktable-1.6.7.tar.xz) = 3113804 Index: lang/Makefile =================================================================== --- lang/Makefile +++ lang/Makefile @@ -275,6 +275,7 @@ SUBDIR += ruby22 SUBDIR += runawk SUBDIR += rust + SUBDIR += rust-nightly SUBDIR += s9fes SUBDIR += sagittarius-scheme SUBDIR += sather-specification Index: lang/rust-nightly/Makefile =================================================================== --- /dev/null +++ lang/rust-nightly/Makefile @@ -0,0 +1,122 @@ +# Created by: Jean-Sébastien Pédron +# $FreeBSD$ + +PORTNAME= rust-nightly +PORTVERSION= 1.2.0.20150611 +CATEGORIES= lang +MASTER_SITES= http://static.rust-lang.org/stage0-snapshots/:bootstrap +DISTFILES= ${RUST_BOOT}:bootstrap +EXTRACT_ONLY= ${DISTNAME}${_GITHUB_EXTRACT_SUFX} \ + ${DISTFILE_compiler_rt} \ + ${DISTFILE_hoedown} \ + ${DISTFILE_jemalloc} \ + ${DISTFILE_rust_installer} + +USE_GITHUB= yes +GH_ACCOUNT= rust-lang +GH_PROJECT= rust \ + compiler-rt:compiler_rt \ + hoedown:hoedown \ + jemalloc:jemalloc \ + rust-installer:rust_installer +GH_TAGNAME= deff2f50a9 \ + 58ab642:compiler_rt \ + 238c4d5:hoedown \ + e24a1a0:jemalloc \ + e54d482:rust_installer + +MAINTAINER= ports@FreeBSD.org +COMMENT= Language with a focus on memory safety and concurrency + +LICENSE= APACHE20 \ + MIT +LICENSE_COMB= dual +LICENSE_FILE= ${WRKSRC}/LICENSE-APACHE \ + ${WRKSRC}/LICENSE-MIT + +ONLY_FOR_ARCHS= amd64 +ONLY_FOR_ARCHS_REASON= requires prebuilt bootstrap compiler + +# FIXME: The bootstrapped rustc adds -L/usr/local/lib in front of +# the LDFLAGS. When stage0's rustc is linked, it picks the installed +# librust*so and fails. +CONFLICTS_BUILD= rust \ + rust-nightly +CONFLICTS_INSTALL= rust-nightly + +RUST_BOOT= rust-stage0-${RUST_BOOT_SIG}.tar.bz2 +RUST_BOOT_SIG= 2015-05-24-ba0e1cd-freebsd-x86_64-370db40613f5c08563ed7e38357826dd42d4e0f8 + +USES= gmake python:2,build +HAS_CONFIGURE= yes +CONFIGURE_ARGS= --disable-valgrind --disable-docs \ + --enable-clang --mandir=${MANPREFIX}/man + +# Use LLVM from ports, instead of the copy shipped with rust. +LLVM_VER= 36 +BUILD_DEPENDS+= llvm${LLVM_VER}>=0:${PORTSDIR}/devel/llvm${LLVM_VER} +CONFIGURE_ARGS+=--llvm-root=${LOCALBASE}/llvm${LLVM_VER} + +.if defined(BATCH) || defined(PACKAGE_BUILDING) +MAKE_ARGS+= VERBOSE=1 +.endif + +OPTIONS_DEFINE= LLNEXTGEN +LLNEXTGEN_DESC= Build with grammar verification + +LLNEXTGEN_BUILD_DEPENDS= LLnextgen:${PORTSDIR}/devel/llnextgen + +.include + +.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000000 +BROKEN= Only compiles on FreeBSD 10 and 11 +.endif + +.if ${OPSYS} == DragonFly +IGNORE= please use lang/rust-dragonfly instead +.endif + +post-extract: + @(${RMDIR} ${WRKSRC}/src/compiler-rt && \ + ${MV} ${WRKSRC_compiler_rt} ${WRKSRC}/src/compiler-rt) + @(${RMDIR} ${WRKSRC}/src/rt/hoedown && \ + ${MV} ${WRKSRC_hoedown} ${WRKSRC}/src/rt/hoedown) + @(${RMDIR} ${WRKSRC}/src/jemalloc && \ + ${MV} ${WRKSRC_jemalloc} ${WRKSRC}/src/jemalloc) + @(${RMDIR} ${WRKSRC}/src/rust-installer && \ + ${MV} ${WRKSRC_rust_installer} ${WRKSRC}/src/rust-installer) + @${MKDIR} ${WRKSRC}/dl + ${LN} -sf ${DISTDIR}/${RUST_BOOT} ${WRKSRC}/dl + (cd ${WRKSRC} && find . -type d -exec chmod 0755 {} \;) + +# 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-rustc; then \ + ${SED} -E -e 's,^(dir|file:),${STAGEDIR},' \ + < ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-rustc \ + | ${XARGS} ${RM}; \ + fi + @${RM} \ + ${STAGEDIR}${PREFIX}/lib/rustlib/components \ + ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-rustc \ + ${STAGEDIR}${PREFIX}/lib/rustlib/rust-installer-version \ + ${STAGEDIR}${PREFIX}/lib/rustlib/uninstall.sh + +post-install: + @${RM} ${STAGEDIR}${PREFIX}/lib/rustlib/install.log + @${REINPLACE_CMD} -e 's|${STAGEDIR}||' \ + ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-rustc + @${RM} ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-rustc.bak + @${STRIP_CMD} \ + ${STAGEDIR}${PREFIX}/bin/rustc \ + ${STAGEDIR}${PREFIX}/bin/rustdoc \ + ${STAGEDIR}${PREFIX}/lib/*.so \ + ${STAGEDIR}${PREFIX}/lib/rustlib/*/lib/*.so +.if ${PORT_OPTIONS:MDOCS} + @${MV} ${STAGEDIR}${PREFIX}/share/doc/rust ${STAGEDIR}${DOCSDIR} +.endif + +.include Index: lang/rust-nightly/distinfo =================================================================== --- /dev/null +++ lang/rust-nightly/distinfo @@ -0,0 +1,12 @@ +SHA256 (rust-stage0-2015-05-24-ba0e1cd-freebsd-x86_64-370db40613f5c08563ed7e38357826dd42d4e0f8.tar.bz2) = 454530016c6a2f033de5fdfa6086a8caf78a597b99519f1b9a2ecbdd18b001eb +SIZE (rust-stage0-2015-05-24-ba0e1cd-freebsd-x86_64-370db40613f5c08563ed7e38357826dd42d4e0f8.tar.bz2) = 13137436 +SHA256 (rust-lang-rust-1.2.0.20150611-deff2f50a9_GH0.tar.gz) = 2f708a14086ae329e71c2cd997d343e3690ee88b45d0264be5a97fdfc011ee47 +SIZE (rust-lang-rust-1.2.0.20150611-deff2f50a9_GH0.tar.gz) = 6475297 +SHA256 (rust-lang-compiler-rt-58ab642_GH0.tar.gz) = 5553488bae570271b7faf9f112b2594bb70d802d3d071f9ab0e37919e6327f98 +SIZE (rust-lang-compiler-rt-58ab642_GH0.tar.gz) = 1938952 +SHA256 (rust-lang-hoedown-238c4d5_GH0.tar.gz) = e2e62b68cc4ea415c6d584f5e97a4b94f60023acde30345ec7bd68aa52739368 +SIZE (rust-lang-hoedown-238c4d5_GH0.tar.gz) = 60652 +SHA256 (rust-lang-jemalloc-e24a1a0_GH0.tar.gz) = c50c61eae80772cbc7af0905110c30fcea267a57bbc930df115bd4a647a5e2e1 +SIZE (rust-lang-jemalloc-e24a1a0_GH0.tar.gz) = 398919 +SHA256 (rust-lang-rust-installer-e54d482_GH0.tar.gz) = a4a6f2cf9c85880190a45d74b4a74c52d620a3522f2b3e1715ea01179cba3aba +SIZE (rust-lang-rust-installer-e54d482_GH0.tar.gz) = 14598 Index: lang/rust-nightly/files/patch-configure =================================================================== --- /dev/null +++ lang/rust-nightly/files/patch-configure @@ -0,0 +1,10 @@ +--- configure.orig 2015-06-09 09:12:09 UTC ++++ configure +@@ -695,7 +695,6 @@ putvar CFG_BOOTSTRAP_KEY + + step_msg "looking for build programs" + +-probe_need CFG_CURLORWGET curl wget + if [ -z "$CFG_PYTHON_PROVIDED" ]; then + probe_need CFG_PYTHON python2.7 python2.6 python2 python + fi Index: lang/rust-nightly/pkg-descr =================================================================== --- /dev/null +++ lang/rust-nightly/pkg-descr @@ -0,0 +1,14 @@ +Rust is an open-source systems programming language that runs blazingly +fast, prevents almost all crashes, and eliminates data races. +Some of its features: + + - Algebraic data types, type inference + - Pattern matching and closures + - Concurrency without data races + - Guaranteed memory safety + - Optional garbage collection + - Zero-cost abstractions + - Minimal runtime + - Efficient C bindings + +WWW: http://www.rust-lang.org/ Index: lang/rust-nightly/pkg-plist =================================================================== --- /dev/null +++ lang/rust-nightly/pkg-plist @@ -0,0 +1,86 @@ +bin/rust-gdb +bin/rustc +bin/rustdoc +lib/libarena-d8ace771.so +lib/libflate-d8ace771.so +lib/libfmt_macros-d8ace771.so +lib/libgetopts-d8ace771.so +lib/libgraphviz-d8ace771.so +lib/liblog-d8ace771.so +lib/librbml-d8ace771.so +lib/librustc-d8ace771.so +lib/librustc_back-d8ace771.so +lib/librustc_borrowck-d8ace771.so +lib/librustc_data_structures-d8ace771.so +lib/librustc_driver-d8ace771.so +lib/librustc_lint-d8ace771.so +lib/librustc_llvm-d8ace771.so +lib/librustc_privacy-d8ace771.so +lib/librustc_resolve-d8ace771.so +lib/librustc_trans-d8ace771.so +lib/librustc_typeck-d8ace771.so +lib/librustdoc-d8ace771.so +lib/libserialize-d8ace771.so +lib/libstd-d8ace771.so +lib/libsyntax-d8ace771.so +lib/libterm-d8ace771.so +lib/libtest-d8ace771.so +lib/rustlib/components +lib/rustlib/etc/debugger_pretty_printers_common.py +lib/rustlib/etc/gdb_load_rust_pretty_printers.py +lib/rustlib/etc/gdb_rust_pretty_printing.py +lib/rustlib/manifest-rustc +lib/rustlib/rust-installer-version +lib/rustlib/uninstall.sh +lib/rustlib/x86_64-unknown-freebsd/lib/liballoc-d8ace771.rlib +lib/rustlib/x86_64-unknown-freebsd/lib/libarena-d8ace771.rlib +lib/rustlib/x86_64-unknown-freebsd/lib/libarena-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/libcollections-d8ace771.rlib +lib/rustlib/x86_64-unknown-freebsd/lib/libcompiler-rt.a +lib/rustlib/x86_64-unknown-freebsd/lib/libcore-d8ace771.rlib +lib/rustlib/x86_64-unknown-freebsd/lib/libflate-d8ace771.rlib +lib/rustlib/x86_64-unknown-freebsd/lib/libflate-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/libfmt_macros-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/libgetopts-d8ace771.rlib +lib/rustlib/x86_64-unknown-freebsd/lib/libgetopts-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/libgraphviz-d8ace771.rlib +lib/rustlib/x86_64-unknown-freebsd/lib/libgraphviz-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/liblibc-d8ace771.rlib +lib/rustlib/x86_64-unknown-freebsd/lib/liblog-d8ace771.rlib +lib/rustlib/x86_64-unknown-freebsd/lib/liblog-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/libmorestack.a +lib/rustlib/x86_64-unknown-freebsd/lib/librand-d8ace771.rlib +lib/rustlib/x86_64-unknown-freebsd/lib/librbml-d8ace771.rlib +lib/rustlib/x86_64-unknown-freebsd/lib/librbml-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/librustc-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/librustc_back-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/librustc_bitflags-d8ace771.rlib +lib/rustlib/x86_64-unknown-freebsd/lib/librustc_borrowck-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/librustc_data_structures-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/librustc_driver-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/librustc_lint-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/librustc_llvm-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/librustc_privacy-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/librustc_resolve-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/librustc_trans-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/librustc_typeck-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/librustc_unicode-d8ace771.rlib +lib/rustlib/x86_64-unknown-freebsd/lib/librustdoc-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/libserialize-d8ace771.rlib +lib/rustlib/x86_64-unknown-freebsd/lib/libserialize-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/libstd-d8ace771.rlib +lib/rustlib/x86_64-unknown-freebsd/lib/libstd-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/libsyntax-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/libterm-d8ace771.rlib +lib/rustlib/x86_64-unknown-freebsd/lib/libterm-d8ace771.so +lib/rustlib/x86_64-unknown-freebsd/lib/libtest-d8ace771.rlib +lib/rustlib/x86_64-unknown-freebsd/lib/libtest-d8ace771.so +man/man1/rustc.1.gz +man/man1/rustdoc.1.gz +@dir lib/rustlib/x86_64-unknown-freebsd/lib +@dir lib/rustlib/x86_64-unknown-freebsd +@dir lib/rustlib +%%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT +%%PORTDOCS%%%%DOCSDIR%%/LICENSE-APACHE +%%PORTDOCS%%%%DOCSDIR%%/LICENSE-MIT +%%PORTDOCS%%%%DOCSDIR%%/README.md Index: lang/rust/Makefile =================================================================== --- lang/rust/Makefile +++ lang/rust/Makefile @@ -3,6 +3,7 @@ PORTNAME= rust PORTVERSION= 1.0.0 +PORTREVISION= 1 CATEGORIES= lang MASTER_SITES= http://static.rust-lang.org/dist/:src \ http://static.rust-lang.org/stage0-snapshots/:bootstrap @@ -23,17 +24,26 @@ ONLY_FOR_ARCHS= amd64 ONLY_FOR_ARCHS_REASON= requires prebuilt bootstrap compiler +# FIXME: The bootstrapped rustc adds -L/usr/local/lib in front of +# the LDFLAGS. When stage0's rustc is linked, it picks the installed +# librust*so and fails. +CONFLICTS_BUILD= rust \ + rust-nightly +CONFLICTS_INSTALL= rust-nightly + RUST_SOURCE= ${DISTNAME}-src${EXTRACT_SUFX} RUST_BOOT= rust-stage0-${RUST_BOOT_SIG}.tar.bz2 RUST_BOOT_SIG= 2015-03-27-5520801-freebsd-x86_64-0910bbad35e213f679d0433884fd51398eb3bc8d -USES= gmake perl5 python:2 +USES= gmake python:2,build HAS_CONFIGURE= yes CONFIGURE_ARGS= --disable-valgrind --disable-docs \ --enable-clang --mandir=${MANPREFIX}/man -USE_LDCONFIG= yes -USE_PERL5= build -MAKE_ARGS= ARCH=x86_64 + +# Use LLVM from ports, instead of the copy shipped with rust. +LLVM_VER= 36 +BUILD_DEPENDS+= llvm${LLVM_VER}>=0:${PORTSDIR}/devel/llvm${LLVM_VER} +CONFIGURE_ARGS+=--llvm-root=${LOCALBASE}/llvm${LLVM_VER} .if defined(BATCH) || defined(PACKAGE_BUILDING) MAKE_ARGS+= VERBOSE=1 @@ -57,14 +67,33 @@ post-extract: @${MKDIR} ${WRKSRC}/dl ${LN} -sf ${DISTDIR}/${RUST_BOOT} ${WRKSRC}/dl + (cd ${WRKSRC} && find . -type d -exec chmod 0755 {} \;) + +# 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-rustc; then \ + ${SED} -E -e 's,^(dir|file:),${STAGEDIR},' \ + < ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-rustc \ + | ${XARGS} ${RM}; \ + fi + @${RM} \ + ${STAGEDIR}${PREFIX}/lib/rustlib/components \ + ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-rustc \ + ${STAGEDIR}${PREFIX}/lib/rustlib/rust-installer-version \ + ${STAGEDIR}${PREFIX}/lib/rustlib/uninstall.sh post-install: - @${RM} ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-rustc @${RM} ${STAGEDIR}${PREFIX}/lib/rustlib/install.log - @${RM} ${STAGEDIR}${PREFIX}/lib/rustlib/uninstall.sh - @${STRIP_CMD} `${GREP} -v -e '^@dir' -e '^man' -e 'rlib$$' \ - -e '^.*\.a$$' -e '^.*\.py$$' -e '^%' -e '^.*/rust-gdb$$' \ - -e '^.*rustlib/components$$' -e '^.*/rust-installer-version$$' \ - ${PLIST} | ${SED} 's:^:${STAGEDIR}${PREFIX}/:'` + @${REINPLACE_CMD} -e 's|${STAGEDIR}||' \ + ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-rustc + @${RM} ${STAGEDIR}${PREFIX}/lib/rustlib/manifest-rustc.bak + @${STRIP_CMD} \ + ${STAGEDIR}${PREFIX}/bin/rustc \ + ${STAGEDIR}${PREFIX}/bin/rustdoc \ + ${STAGEDIR}${PREFIX}/lib/*.so \ + ${STAGEDIR}${PREFIX}/lib/rustlib/*/lib/*.so .include Index: lang/rust/files/patch-src_librustc__back_target_freebsd__base.rs =================================================================== --- /dev/null +++ lang/rust/files/patch-src_librustc__back_target_freebsd__base.rs @@ -0,0 +1,12 @@ +--- src/librustc_back/target/freebsd_base.rs.orig 2015-05-07 14:37:17 UTC ++++ src/librustc_back/target/freebsd_base.rs +@@ -19,9 +19,6 @@ pub fn opts() -> TargetOptions { + morestack: true, + has_rpath: true, + pre_link_args: vec!( +- "-L/usr/local/lib".to_string(), +- "-L/usr/local/lib/gcc46".to_string(), +- "-L/usr/local/lib/gcc44".to_string(), + ), + + .. Default::default() Index: lang/rust/pkg-plist =================================================================== --- lang/rust/pkg-plist +++ lang/rust/pkg-plist @@ -27,7 +27,9 @@ lib/rustlib/components lib/rustlib/etc/gdb_load_rust_pretty_printers.py lib/rustlib/etc/gdb_rust_pretty_printing.py +lib/rustlib/manifest-rustc lib/rustlib/rust-installer-version +lib/rustlib/uninstall.sh lib/rustlib/x86_64-unknown-freebsd/lib/liballoc-4e7c5e5c.rlib lib/rustlib/x86_64-unknown-freebsd/lib/libarena-4e7c5e5c.rlib lib/rustlib/x86_64-unknown-freebsd/lib/libarena-4e7c5e5c.so