aboutsummaryrefslogtreecommitdiff
path: root/lang/rust-nightly
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <dumbbell@FreeBSD.org>2015-07-14 22:36:53 +0000
committerJean-Sébastien Pédron <dumbbell@FreeBSD.org>2015-07-14 22:36:53 +0000
commit647a98aff07a941100fc31f746e8a050a38d68e6 (patch)
treea3d45048bf3680cce0206caee996f428882c8060 /lang/rust-nightly
parent3c2b3733a50c5c528049de16bcb6b0b4c598ff4f (diff)
downloadports-647a98aff07a941100fc31f746e8a050a38d68e6.tar.gz
ports-647a98aff07a941100fc31f746e8a050a38d68e6.zip
Notes
Diffstat (limited to 'lang/rust-nightly')
-rw-r--r--lang/rust-nightly/Makefile131
-rw-r--r--lang/rust-nightly/distinfo12
-rw-r--r--lang/rust-nightly/files/patch-configure10
-rw-r--r--lang/rust-nightly/pkg-descr14
-rw-r--r--lang/rust-nightly/pkg-plist86
5 files changed, 253 insertions, 0 deletions
diff --git a/lang/rust-nightly/Makefile b/lang/rust-nightly/Makefile
new file mode 100644
index 000000000000..edf2a57ae4a7
--- /dev/null
+++ b/lang/rust-nightly/Makefile
@@ -0,0 +1,131 @@
+# Created by: Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= rust-nightly
+PORTVERSION= 1.3.0.20150703
+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= 7b148381c7 \
+ 58ab642:compiler_rt \
+ 238c4d5:hoedown \
+ e24a1a0:jemalloc \
+ 8e4f8ea:rust_installer
+
+MAINTAINER= dumbbell@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
+
+# Rust's libraries are named librustc_${component}-${RUST_VSN_HASH}.so.
+# The hash depends on Rust version and channel. See
+# $(CFG_FILENAME_EXTRA) definition in src/main.mk.
+RUST_VSN= ${PORTVERSION:R}
+RUST_CHANNEL= ${PORTNAME:S/^rust-//}
+RUST_VSN_HASH!= /usr/bin/printf '%s' ${RUST_VSN}-${RUST_CHANNEL} | /sbin/md5 -q | cut -c 1-8
+PLIST_SUB+= RUST_VSN_HASH=${RUST_VSN_HASH}
+
+USES= gmake python:2,build
+HAS_CONFIGURE= yes
+CONFIGURE_ARGS= --disable-valgrind --disable-docs \
+ --enable-clang --mandir=${MANPREFIX}/man \
+ --release-channel=${RUST_CHANNEL}
+
+# 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 <bsd.port.options.mk>
+
+.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. Otherwise, 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 <bsd.port.mk>
diff --git a/lang/rust-nightly/distinfo b/lang/rust-nightly/distinfo
new file mode 100644
index 000000000000..20806762821e
--- /dev/null
+++ b/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.3.0.20150703-7b148381c7_GH0.tar.gz) = 3df365a30727ffb733fe1cc20545b04eac7be20461c5bf3a51fc95b880a5fcf4
+SIZE (rust-lang-rust-1.3.0.20150703-7b148381c7_GH0.tar.gz) = 6490885
+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-8e4f8ea_GH0.tar.gz) = c865d4d2542e2a6588d928857caf910e201e32e200005c485964717bde7970aa
+SIZE (rust-lang-rust-installer-8e4f8ea_GH0.tar.gz) = 14602
diff --git a/lang/rust-nightly/files/patch-configure b/lang/rust-nightly/files/patch-configure
new file mode 100644
index 000000000000..2488dcb24bc7
--- /dev/null
+++ b/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
diff --git a/lang/rust-nightly/pkg-descr b/lang/rust-nightly/pkg-descr
new file mode 100644
index 000000000000..4b88f6d86097
--- /dev/null
+++ b/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/
diff --git a/lang/rust-nightly/pkg-plist b/lang/rust-nightly/pkg-plist
new file mode 100644
index 000000000000..d76207d6d63d
--- /dev/null
+++ b/lang/rust-nightly/pkg-plist
@@ -0,0 +1,86 @@
+bin/rust-gdb
+bin/rustc
+bin/rustdoc
+lib/libarena-%%RUST_VSN_HASH%%.so
+lib/libflate-%%RUST_VSN_HASH%%.so
+lib/libfmt_macros-%%RUST_VSN_HASH%%.so
+lib/libgetopts-%%RUST_VSN_HASH%%.so
+lib/libgraphviz-%%RUST_VSN_HASH%%.so
+lib/liblog-%%RUST_VSN_HASH%%.so
+lib/librbml-%%RUST_VSN_HASH%%.so
+lib/librustc-%%RUST_VSN_HASH%%.so
+lib/librustc_back-%%RUST_VSN_HASH%%.so
+lib/librustc_borrowck-%%RUST_VSN_HASH%%.so
+lib/librustc_data_structures-%%RUST_VSN_HASH%%.so
+lib/librustc_driver-%%RUST_VSN_HASH%%.so
+lib/librustc_lint-%%RUST_VSN_HASH%%.so
+lib/librustc_llvm-%%RUST_VSN_HASH%%.so
+lib/librustc_privacy-%%RUST_VSN_HASH%%.so
+lib/librustc_resolve-%%RUST_VSN_HASH%%.so
+lib/librustc_trans-%%RUST_VSN_HASH%%.so
+lib/librustc_typeck-%%RUST_VSN_HASH%%.so
+lib/librustdoc-%%RUST_VSN_HASH%%.so
+lib/libserialize-%%RUST_VSN_HASH%%.so
+lib/libstd-%%RUST_VSN_HASH%%.so
+lib/libsyntax-%%RUST_VSN_HASH%%.so
+lib/libterm-%%RUST_VSN_HASH%%.so
+lib/libtest-%%RUST_VSN_HASH%%.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-%%RUST_VSN_HASH%%.rlib
+lib/rustlib/x86_64-unknown-freebsd/lib/libarena-%%RUST_VSN_HASH%%.rlib
+lib/rustlib/x86_64-unknown-freebsd/lib/libarena-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/libcollections-%%RUST_VSN_HASH%%.rlib
+lib/rustlib/x86_64-unknown-freebsd/lib/libcompiler-rt.a
+lib/rustlib/x86_64-unknown-freebsd/lib/libcore-%%RUST_VSN_HASH%%.rlib
+lib/rustlib/x86_64-unknown-freebsd/lib/libflate-%%RUST_VSN_HASH%%.rlib
+lib/rustlib/x86_64-unknown-freebsd/lib/libflate-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/libfmt_macros-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/libgetopts-%%RUST_VSN_HASH%%.rlib
+lib/rustlib/x86_64-unknown-freebsd/lib/libgetopts-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/libgraphviz-%%RUST_VSN_HASH%%.rlib
+lib/rustlib/x86_64-unknown-freebsd/lib/libgraphviz-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/liblibc-%%RUST_VSN_HASH%%.rlib
+lib/rustlib/x86_64-unknown-freebsd/lib/liblog-%%RUST_VSN_HASH%%.rlib
+lib/rustlib/x86_64-unknown-freebsd/lib/liblog-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/libmorestack.a
+lib/rustlib/x86_64-unknown-freebsd/lib/librand-%%RUST_VSN_HASH%%.rlib
+lib/rustlib/x86_64-unknown-freebsd/lib/librbml-%%RUST_VSN_HASH%%.rlib
+lib/rustlib/x86_64-unknown-freebsd/lib/librbml-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/librustc-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/librustc_back-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/librustc_bitflags-%%RUST_VSN_HASH%%.rlib
+lib/rustlib/x86_64-unknown-freebsd/lib/librustc_borrowck-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/librustc_data_structures-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/librustc_driver-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/librustc_lint-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/librustc_llvm-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/librustc_privacy-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/librustc_resolve-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/librustc_trans-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/librustc_typeck-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/librustc_unicode-%%RUST_VSN_HASH%%.rlib
+lib/rustlib/x86_64-unknown-freebsd/lib/librustdoc-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/libserialize-%%RUST_VSN_HASH%%.rlib
+lib/rustlib/x86_64-unknown-freebsd/lib/libserialize-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/libstd-%%RUST_VSN_HASH%%.rlib
+lib/rustlib/x86_64-unknown-freebsd/lib/libstd-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/libsyntax-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/libterm-%%RUST_VSN_HASH%%.rlib
+lib/rustlib/x86_64-unknown-freebsd/lib/libterm-%%RUST_VSN_HASH%%.so
+lib/rustlib/x86_64-unknown-freebsd/lib/libtest-%%RUST_VSN_HASH%%.rlib
+lib/rustlib/x86_64-unknown-freebsd/lib/libtest-%%RUST_VSN_HASH%%.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