diff options
author | scheidell <scheidell@FreeBSD.org> | 2012-04-08 00:22:23 +0800 |
---|---|---|
committer | scheidell <scheidell@FreeBSD.org> | 2012-04-08 00:22:23 +0800 |
commit | 542a37f5698c93a8aeb1b3b466f0d5ddfbd7617d (patch) | |
tree | 5c9516ad199ad63cf254a24148f18c4d01193f9a /lang/rust | |
parent | 2c1ba0b50f3a223e9257aa56f33ea6afba3160c1 (diff) | |
download | freebsd-ports-gnome-542a37f5698c93a8aeb1b3b466f0d5ddfbd7617d.tar.gz freebsd-ports-gnome-542a37f5698c93a8aeb1b3b466f0d5ddfbd7617d.tar.zst freebsd-ports-gnome-542a37f5698c93a8aeb1b3b466f0d5ddfbd7617d.zip |
- Update to 0.2
- The bootstrap compiler needs "cc" to link objects.
PR: ports/166551
Submitted by: Jyun-Yan You <jyyou@cs.nctu.edu.tw> (maintainer)
Feature safe: yes
Diffstat (limited to 'lang/rust')
-rw-r--r-- | lang/rust/Makefile | 36 | ||||
-rw-r--r-- | lang/rust/distinfo | 10 | ||||
-rw-r--r-- | lang/rust/files/patch-configure | 40 | ||||
-rw-r--r-- | lang/rust/files/patch-mk__rustllvm.mk | 11 | ||||
-rw-r--r-- | lang/rust/files/patch-mk_platform.mk | 23 | ||||
-rw-r--r-- | lang/rust/files/patch-src_cargo_cargo.rs | 12 | ||||
-rw-r--r-- | lang/rust/files/patch-src_libcore_cmath.rs | 6 | ||||
-rw-r--r-- | lang/rust/files/patch-src_libcore_f32.rs | 12 | ||||
-rw-r--r-- | lang/rust/files/patch-src_rt_rust__unwind.h | 17 | ||||
-rw-r--r-- | lang/rust/pkg-plist | 15 |
10 files changed, 46 insertions, 136 deletions
diff --git a/lang/rust/Makefile b/lang/rust/Makefile index f04de7b7ad78..5e0ad94b637b 100644 --- a/lang/rust/Makefile +++ b/lang/rust/Makefile @@ -6,23 +6,14 @@ # PORTNAME= rust -PORTVERSION= 0.1 -PORTREVISION= 1 +PORTVERSION= 0.2 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} +MASTER_SITES= http://dl.rust-lang.org/dist/ 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-${CC}.tar.bz2 -RUST_TARGET= x86_64-unknown-freebsd +OPTIONS= CARGO "Build with package manager" on ONLY_FOR_ARCHS= amd64 HAS_CONFIGURE= yes @@ -48,6 +39,9 @@ USE_GCC= 4.6+ RUN_DEPENDS+= curl:${PORTSDIR}/ftp/curl \ git:${PORTSDIR}/devel/git \ gpg:${PORTSDIR}/security/gnupg +PLIST_SUB+= CARGO="" +.else +PLIST_SUB+= CARGO="@comment " .endif LIB_DEPENDS+= execinfo.1:${PORTSDIR}/devel/libexecinfo @@ -55,26 +49,20 @@ 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 '/probe_need CFG_CURL/d' \ ${WRKSRC}/configure ${REINPLACE_CMD} \ - -e '/src\/etc\/get-snapshot.py $$(CFG_HOST_TRIPLE)/d' \ - ${WRKSRC}/mk/stage0.mk + -e 's|subprocess.call(\["curl"|subprocess.call(["fetch"|' \ + ${WRKSRC}/src/etc/snapshot.py ${REINPLACE_CMD} \ - -e 's|\$$(PREFIX_ROOT)/share/man|${MANPREFIX}/man|g' \ + -e 's|$$(PREFIX_ROOT)/share/man|${MANPREFIX}/man|' \ ${WRKSRC}/mk/install.mk -.if ${OSVERSION} >= 900044 +.if defined(WITHOUT_CARGO) ${REINPLACE_CMD} \ - -e 's|prog: str = "gcc"|prog: str = "clang"|' \ - ${WRKSRC}/src/comp/back/link.rs + -e '/$$(Q)$$(call INSTALL,$$(HB3),$$(PHB),cargo$$(X))/d' \ + ${WRKSRC}/mk/install.mk .endif .include <bsd.port.post.mk> diff --git a/lang/rust/distinfo b/lang/rust/distinfo index 73db14e14694..bb57d8feefda 100644 --- a/lang/rust/distinfo +++ b/lang/rust/distinfo @@ -1,8 +1,2 @@ -SHA256 (rust-0.1.tar.gz) = a1a234592168443b3bd6dce03378ee410393b07f8075c6a56e339638fdda8263 -SIZE (rust-0.1.tar.gz) = 10601377 -SHA256 (rust-0.1-boot-clang.tar.bz2) = cb920a23c04a1530ba0d74efd6464b1b42b55fdb7fbb22763ea9bd94675de6ee -SIZE (rust-0.1-boot-clang.tar.bz2) = 7818448 -SHA256 (rust-0.1-boot-gcc44.tar.bz2) = 682a8f4c735940e1f2e115adfbffde4838989e820a4f551576c0c9b4be1a0d2e -SIZE (rust-0.1-boot-gcc44.tar.bz2) = 9759370 -SHA256 (rust-0.1-boot-gcc46.tar.bz2) = 682a8f4c735940e1f2e115adfbffde4838989e820a4f551576c0c9b4be1a0d2e -SIZE (rust-0.1-boot-gcc46.tar.bz2) = 9759370 +SHA256 (rust-0.2.tar.gz) = cedf679fd6bf46b63b9d754496920cbaa8c9ba4187d40f5f78fc28e775820f0d +SIZE (rust-0.2.tar.gz) = 11349998 diff --git a/lang/rust/files/patch-configure b/lang/rust/files/patch-configure deleted file mode 100644 index 6dfa1b14c2cd..000000000000 --- a/lang/rust/files/patch-configure +++ /dev/null @@ -1,40 +0,0 @@ ---- ./configure.orig 2012-01-26 10:47:57.178803535 +0800 -+++ ./configure 2012-01-26 10:48:24.324805426 +0800 -@@ -340,7 +340,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) -@@ -534,14 +535,23 @@ - # Disable unused LLVM features - LLVM_OPTS="$LLVM_DBG_OPTS --disable-docs --disable-jit --enable-bindings=none --disable-threads --disable-pthreads" - -- LLVM_CXX_32="g++ -m32" -- LLVM_CC_32="gcc -m32" -+ if [ "$CFG_C_COMPILER" = "clang" ] -+ then -+ LLVM_CXX_32="clang++ -m32" -+ LLVM_CC_32="clang -m32" -+ LLVM_CXX_64="clang++" -+ LLVM_CC_64="clang" -+ else -+ LLVM_CXX_32="g++ -m32" -+ LLVM_CC_32="gcc -m32" -+ LLVM_CXX_64="g++" -+ LLVM_CC_64="gcc" -+ fi -+ - LLVM_CFLAGS_32="-m32" - LLVM_CXXFLAGS_32="-m32" - LLVM_LDFLAGS_32="-m32" - -- LLVM_CXX_64="g++" -- LLVM_CC_64="gcc" - LLVM_CFLAGS_64="" - LLVM_CXXFLAGS_64="" - LLVM_LDFLAGS_64="" diff --git a/lang/rust/files/patch-mk__rustllvm.mk b/lang/rust/files/patch-mk__rustllvm.mk deleted file mode 100644 index 8a83256a55ad..000000000000 --- a/lang/rust/files/patch-mk__rustllvm.mk +++ /dev/null @@ -1,11 +0,0 @@ ---- ./mk/rustllvm.mk.orig 2012-01-21 05:09:09.000000000 +0800 -+++ ./mk/rustllvm.mk 2012-01-26 10:41:49.661804374 +0800 -@@ -37,7 +37,7 @@ - - rustllvm/$(1)/%.o: rustllvm/%.cpp $$(MKFILE_DEPS) $$(LLVM_CONFIG_$(1)) - @$$(call E, compile: $$@) -- $$(Q)$$(call CFG_COMPILE_C_$(1), $$@, $$(LLVM_CXXFLAGS_$(1)) $$(RUSTLLVM_INCS_$(1))) $$< -+ $$(Q)$$(call CFG_COMPILE_C_$(1), $$@, $$(subst -I, -iquote , $$(LLVM_CXXFLAGS_$(1))) $$(RUSTLLVM_INCS_$(1))) $$< - endef - - # Instantiate template for all stages diff --git a/lang/rust/files/patch-mk_platform.mk b/lang/rust/files/patch-mk_platform.mk index 0955f6b8fed1..7d56a0b99fac 100644 --- a/lang/rust/files/patch-mk_platform.mk +++ b/lang/rust/files/patch-mk_platform.mk @@ -1,11 +1,20 @@ ---- 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 +--- mk/platform.mk.orig 2012-04-05 22:34:59.678608449 +0800 ++++ mk/platform.mk 2012-04-05 22:35:13.749110633 +0800 +@@ -213,7 +213,7 @@ + ifeq ($(origin CPP),default) + CPP=cpp + endif - CFG_GCCISH_CFLAGS += -Wall -Werror -fno-rtti -g -+ CFG_GCCISH_CFLAGS += -Wall -Werror -Wno-c++11-compat -fno-rtti -g ++ CFG_GCCISH_CFLAGS += -Wall -fno-rtti -g + CFG_GCCISH_LINK_FLAGS += -g + CFG_DEPEND_C = $(CFG_GCCISH_CROSS)$(CXX) $(CFG_GCCISH_CFLAGS) -MT "$(1)" \ + -MM $(2) +@@ -244,7 +244,7 @@ + ifeq ($(origin CPP),default) + CPP=cpp + endif +- CFG_GCCISH_CFLAGS += -Wall -Werror -fno-rtti -g ++ CFG_GCCISH_CFLAGS += -Wall -fno-rtti -g CFG_GCCISH_LINK_FLAGS += -g CFG_DEPEND_C = $(CFG_GCCISH_CROSS)$(CXX) $(CFG_GCCISH_CFLAGS) -MT "$(1)" \ -MM $(2) diff --git a/lang/rust/files/patch-src_cargo_cargo.rs b/lang/rust/files/patch-src_cargo_cargo.rs deleted file mode 100644 index 196557e4d126..000000000000 --- a/lang/rust/files/patch-src_cargo_cargo.rs +++ /dev/null @@ -1,12 +0,0 @@ ---- 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]); diff --git a/lang/rust/files/patch-src_libcore_cmath.rs b/lang/rust/files/patch-src_libcore_cmath.rs index 1756e7679774..801bd79e0b00 100644 --- a/lang/rust/files/patch-src_libcore_cmath.rs +++ b/lang/rust/files/patch-src_libcore_cmath.rs @@ -1,6 +1,6 @@ ---- src/libcore/cmath.rs.orig 2012-02-02 09:08:04.690802969 +0800 -+++ src/libcore/cmath.rs 2012-02-02 09:12:37.705978161 +0800 -@@ -161,7 +161,6 @@ +--- src/libcore/cmath.rs.orig 2012-04-01 10:40:10.385607179 +0800 ++++ src/libcore/cmath.rs 2012-04-01 10:40:34.370606102 +0800 +@@ -164,7 +164,6 @@ #[link_name="sqrtf"] pure fn sqrt(n: c_float) -> c_float; #[link_name="tanf"] pure fn tan(n: c_float) -> c_float; #[link_name="tanhf"] pure fn tanh(n: c_float) -> c_float; diff --git a/lang/rust/files/patch-src_libcore_f32.rs b/lang/rust/files/patch-src_libcore_f32.rs index 8be7ef7cc9fa..46380a843642 100644 --- a/lang/rust/files/patch-src_libcore_f32.rs +++ b/lang/rust/files/patch-src_libcore_f32.rs @@ -1,15 +1,15 @@ ---- src/libcore/f32.rs.orig 2012-02-02 09:20:38.079803515 +0800 -+++ src/libcore/f32.rs 2012-02-02 09:20:53.241930085 +0800 -@@ -9,6 +9,8 @@ +--- src/libcore/f32.rs.orig 2012-04-01 10:40:20.915606509 +0800 ++++ src/libcore/f32.rs 2012-04-01 10:43:43.847606825 +0800 +@@ -5,6 +5,8 @@ import cmath::c_float::*; import cmath::c_float_targ_consts::*; +import cmath::c_double; + - type t = f32; + // FIXME find out why these have to be exported explicitly - // These are not defined inside consts:: for consistency with -@@ -247,6 +249,10 @@ + export add, sub, mul, div, rem, lt, le, gt, eq, eq, ne; +@@ -176,6 +178,10 @@ ret ln(n) / consts::ln_2; } diff --git a/lang/rust/files/patch-src_rt_rust__unwind.h b/lang/rust/files/patch-src_rt_rust__unwind.h deleted file mode 100644 index 1d3a1d38a804..000000000000 --- a/lang/rust/files/patch-src_rt_rust__unwind.h +++ /dev/null @@ -1,17 +0,0 @@ ---- 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 -+ diff --git a/lang/rust/pkg-plist b/lang/rust/pkg-plist index d338c1483814..e7fe2b64cfd6 100644 --- a/lang/rust/pkg-plist +++ b/lang/rust/pkg-plist @@ -1,17 +1,16 @@ -bin/cargo +%%CARGO%%bin/cargo bin/rustc bin/rustdoc -lib/libcore-14bd852465126fe7-0.1.so -lib/librustc-4171d83aef249987-0.1.so +lib/libcore-d27e4777a53c3e50-0.2.so +lib/librustc-7d2730a49abe278a-0.2.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/libstd-d399da1ab6f5bec0-0.2.so +lib/rustc/x86_64-unknown-freebsd/lib/libcore-d27e4777a53c3e50-0.2.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/librustc-7d2730a49abe278a-0.2.so lib/rustc/x86_64-unknown-freebsd/lib/librustrt.so -lib/rustc/x86_64-unknown-freebsd/lib/libstd-79ca5fac56b63fde-0.1.so +lib/rustc/x86_64-unknown-freebsd/lib/libstd-d399da1ab6f5bec0-0.2.so @dirrm lib/rustc/x86_64-unknown-freebsd/lib @dirrm lib/rustc/x86_64-unknown-freebsd @dirrm lib/rustc |