mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-25 04:43:33 +00:00
Add rust 0.1, a language with a focus on memory safety and concurrency.
PR: ports/164366 Submitted by: Jyun-Yan You <jyyou@cs.nctu.edu.tw>
This commit is contained in:
parent
4ff20939ab
commit
a7fe5ec546
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=289669
@ -299,6 +299,7 @@
|
||||
SUBDIR += ruby18
|
||||
SUBDIR += ruby19
|
||||
SUBDIR += runawk
|
||||
SUBDIR += rust
|
||||
SUBDIR += s9fes
|
||||
SUBDIR += sather-specification
|
||||
SUBDIR += sather-tutorial
|
||||
|
75
lang/rust/Makefile
Normal file
75
lang/rust/Makefile
Normal file
@ -0,0 +1,75 @@
|
||||
# New ports collection makefile for: rust
|
||||
# Date created: 2012-01-21
|
||||
# Whom: Jyun-Yan You <jyyou@cs.nctu.edu.tw>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= rust
|
||||
PORTVERSION= 0.1
|
||||
CATEGORIES= lang
|
||||
MASTER_SITES= http://dl.rust-lang.org/dist/:source \
|
||||
http://people.cs.nctu.edu.tw/~jyyou/rust/:boot
|
||||
DISTFILES= ${RUST_SOURCE}:source \
|
||||
${RUST_BOOT}:boot
|
||||
EXTRACT_ONLY= ${RUST_SOURCE}
|
||||
|
||||
MAINTAINER= jyyou@cs.nctu.edu.tw
|
||||
COMMENT= A language with a focus on memory safety and concurrency
|
||||
|
||||
OPTIONS= CARGO "Build with package manager" off
|
||||
|
||||
RUST_SOURCE= ${DISTNAME}${EXTRACT_SUFX}
|
||||
RUST_BOOT= rust-${PORTVERSION}-boot.tar.bz2
|
||||
RUST_TARGET= x86_64-unknown-freebsd
|
||||
|
||||
ONLY_FOR_ARCHS= amd64
|
||||
HAS_CONFIGURE= yes
|
||||
USE_LDCONFIG= yes
|
||||
USE_GMAKE= yes
|
||||
USE_PERL5_BUILD= yes
|
||||
USE_PYTHON_BUILD= 2.6-2.7
|
||||
|
||||
MAN1= rustc.1
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OSVERSION} >= 900044
|
||||
LIB_DEPENDS+= unwind.8:${PORTSDIR}/devel/libunwind
|
||||
CC= clang
|
||||
CXX= clang++
|
||||
CONFIGURE_ARGS+= --enable-clang
|
||||
.else
|
||||
USE_GCC= 4.4+
|
||||
.endif
|
||||
|
||||
.if ${OSVERSION} < 800107
|
||||
IGNORE= needs tgammaf(3)
|
||||
.endif
|
||||
|
||||
.if !defined(WITHOUT_CARGO)
|
||||
RUN_DEPENDS+= curl:${PORTSDIR}/ftp/curl \
|
||||
git:${PORTSDIR}/devel/git \
|
||||
gpg:${PORTSDIR}/security/gnupg
|
||||
.endif
|
||||
|
||||
LIB_DEPENDS+= execinfo.1:${PORTSDIR}/devel/libexecinfo
|
||||
|
||||
MAKE_ARGS+= CC=${CC} CXX=${CXX} ARCH=x86_64
|
||||
CONFIGURE_ARGS+= --disable-valgrind --disable-docs
|
||||
|
||||
post-extract:
|
||||
${MKDIR} ${WRKSRC}/${RUST_TARGET} && \
|
||||
cd ${WRKSRC}/${RUST_TARGET} && \
|
||||
tar xf ${DISTDIR}/${RUST_BOOT} && \
|
||||
${MV} rust-stage0 stage0
|
||||
|
||||
post-patch:
|
||||
${REINPLACE_CMD} \
|
||||
-e '/src\/etc\/get-snapshot.py $$(CFG_HOST_TRIPLE)/d' \
|
||||
${WRKSRC}/mk/stage0.mk
|
||||
${REINPLACE_CMD} \
|
||||
-e 's|\$$(PREFIX_ROOT)/share/man|${MANPREFIX}/man|g' \
|
||||
${WRKSRC}/mk/install.mk
|
||||
|
||||
.include <bsd.port.post.mk>
|
4
lang/rust/distinfo
Normal file
4
lang/rust/distinfo
Normal file
@ -0,0 +1,4 @@
|
||||
SHA256 (rust-0.1.tar.gz) = a1a234592168443b3bd6dce03378ee410393b07f8075c6a56e339638fdda8263
|
||||
SIZE (rust-0.1.tar.gz) = 10601377
|
||||
SHA256 (rust-0.1-boot.tar.bz2) = 682a8f4c735940e1f2e115adfbffde4838989e820a4f551576c0c9b4be1a0d2e
|
||||
SIZE (rust-0.1-boot.tar.bz2) = 9759370
|
20
lang/rust/files/patch-configure
Normal file
20
lang/rust/files/patch-configure
Normal file
@ -0,0 +1,20 @@
|
||||
--- configure.orig 2012-01-22 04:29:36.401802685 +0800
|
||||
+++ configure 2012-01-22 11:40:28.231803897 +0800
|
||||
@@ -281,7 +281,6 @@
|
||||
|
||||
probe_need CFG_PERL perl
|
||||
probe_need CFG_PYTHON python python2.6 python2 python3
|
||||
-probe_need CFG_CURL curl
|
||||
|
||||
probe CFG_GIT git
|
||||
probe CFG_CLANG clang++
|
||||
@@ -340,7 +339,8 @@
|
||||
CFG_CLANG_VERSION=$("$CFG_CLANG" \
|
||||
--version \
|
||||
| grep version \
|
||||
- | cut -d ' ' -f 3)
|
||||
+ | sed 's/.*\(version .*\)/\1/' \
|
||||
+ | cut -d ' ' -f 2)
|
||||
|
||||
case $CFG_CLANG_VERSION in
|
||||
(3.0svn | 3.0 | 3.1)
|
11
lang/rust/files/patch-mk_platform.mk
Normal file
11
lang/rust/files/patch-mk_platform.mk
Normal file
@ -0,0 +1,11 @@
|
||||
--- mk/platform.mk.orig 2012-01-22 08:59:58.097803422 +0800
|
||||
+++ mk/platform.mk 2012-01-22 04:45:22.124872578 +0800
|
||||
@@ -188,7 +188,7 @@
|
||||
CC=clang
|
||||
CXX=clang++
|
||||
CPP=cpp
|
||||
- CFG_GCCISH_CFLAGS += -Wall -Werror -fno-rtti -g
|
||||
+ CFG_GCCISH_CFLAGS += -Wall -Werror -Wno-c++11-compat -fno-rtti -g
|
||||
CFG_GCCISH_LINK_FLAGS += -g
|
||||
CFG_DEPEND_C = $(CFG_GCCISH_CROSS)$(CXX) $(CFG_GCCISH_CFLAGS) -MT "$(1)" \
|
||||
-MM $(2)
|
12
lang/rust/files/patch-src_cargo_cargo.rs
Normal file
12
lang/rust/files/patch-src_cargo_cargo.rs
Normal file
@ -0,0 +1,12 @@
|
||||
--- src/cargo/cargo.rs.orig 2012-01-22 03:39:41.002804510 +0800
|
||||
+++ src/cargo/cargo.rs 2012-01-22 09:19:29.018803328 +0800
|
||||
@@ -389,7 +389,8 @@
|
||||
let exec_suffix = os::exec_suffix();
|
||||
for ct: str in new {
|
||||
if (exec_suffix != "" && str::ends_with(ct, exec_suffix)) ||
|
||||
- (exec_suffix == "" && !str::starts_with(ct, "./lib")) {
|
||||
+ (exec_suffix == "" && !str::starts_with(fs::basename(ct),
|
||||
+ "lib")) {
|
||||
#debug(" bin: %s", ct);
|
||||
// FIXME: need libstd fs::copy or something
|
||||
run::run_program("cp", [ct, c.bindir]);
|
17
lang/rust/files/patch-src_rt_rust__unwind.h
Normal file
17
lang/rust/files/patch-src_rt_rust__unwind.h
Normal file
@ -0,0 +1,17 @@
|
||||
--- src/rt/rust_unwind.h.orig 2012-01-22 08:58:11.386020911 +0800
|
||||
+++ src/rt/rust_unwind.h 2012-01-22 04:37:29.745804340 +0800
|
||||
@@ -17,6 +17,8 @@
|
||||
|
||||
#if (defined __APPLE__) || (defined __clang__)
|
||||
|
||||
+#ifndef __FreeBSD__
|
||||
+
|
||||
typedef int _Unwind_Action;
|
||||
typedef void _Unwind_Exception;
|
||||
|
||||
@@ -24,3 +26,5 @@
|
||||
|
||||
#endif
|
||||
|
||||
+#endif
|
||||
+
|
8
lang/rust/pkg-descr
Normal file
8
lang/rust/pkg-descr
Normal file
@ -0,0 +1,8 @@
|
||||
Rust is a curly-brace, block-structured expression language.
|
||||
It visually resembles the C language family, but differs significantly
|
||||
in syntactic and semantic details. Its design is oriented toward
|
||||
concerns of "programming in the large", that is,
|
||||
of creating and maintaining boundaries - both abstract and operational -
|
||||
that preserve large-system integrity, availability and concurrency.
|
||||
|
||||
WWW: http://www.rust-lang.org/
|
17
lang/rust/pkg-plist
Normal file
17
lang/rust/pkg-plist
Normal file
@ -0,0 +1,17 @@
|
||||
bin/cargo
|
||||
bin/rustc
|
||||
bin/rustdoc
|
||||
lib/libcore-14bd852465126fe7-0.1.so
|
||||
lib/librustc-4171d83aef249987-0.1.so
|
||||
lib/librustllvm.so
|
||||
lib/librustrt.so
|
||||
lib/libstd-79ca5fac56b63fde-0.1.so
|
||||
lib/rustc/x86_64-unknown-freebsd/lib/intrinsics.bc
|
||||
lib/rustc/x86_64-unknown-freebsd/lib/libcore-14bd852465126fe7-0.1.so
|
||||
lib/rustc/x86_64-unknown-freebsd/lib/libmorestack.a
|
||||
lib/rustc/x86_64-unknown-freebsd/lib/librustc-4171d83aef249987-0.1.so
|
||||
lib/rustc/x86_64-unknown-freebsd/lib/librustrt.so
|
||||
lib/rustc/x86_64-unknown-freebsd/lib/libstd-79ca5fac56b63fde-0.1.so
|
||||
@dirrm lib/rustc/x86_64-unknown-freebsd/lib
|
||||
@dirrm lib/rustc/x86_64-unknown-freebsd
|
||||
@dirrm lib/rustc
|
Loading…
Reference in New Issue
Block a user