Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Oct 2012 07:03:50 +0000 (UTC)
From:      "Vanilla I. Shu" <vanilla@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r306053 - in head/lang/rust: . files
Message-ID:  <201210180703.q9I73o6M072882@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: vanilla
Date: Thu Oct 18 07:03:50 2012
New Revision: 306053
URL: http://svn.freebsd.org/changeset/ports/306053

Log:
  Upgrade to 0.4.
  
  PR:		ports/172791
  Submitted by:	maintainer
  Feature safe:   yes

Added:
  head/lang/rust/files/log2.patch   (contents, props changed)
  head/lang/rust/files/patch-configure   (contents, props changed)
  head/lang/rust/files/tgammaf.patch   (contents, props changed)
Deleted:
  head/lang/rust/files/patch-src_libcore_cmath.rs
  head/lang/rust/files/patch-src_libcore_f32.rs
Modified:
  head/lang/rust/Makefile
  head/lang/rust/distinfo
  head/lang/rust/pkg-plist

Modified: head/lang/rust/Makefile
==============================================================================
--- head/lang/rust/Makefile	Thu Oct 18 05:02:06 2012	(r306052)
+++ head/lang/rust/Makefile	Thu Oct 18 07:03:50 2012	(r306053)
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	rust
-PORTVERSION=	0.3
+PORTVERSION=	0.4
 CATEGORIES=	lang
 MASTER_SITES=	http://dl.rust-lang.org/dist/:src \
 		http://dl.rust-lang.org/stage0-snapshots/:boot
@@ -19,7 +19,7 @@ COMMENT=	A language with a focus on memo
 
 RUST_SOURCE=	${DISTNAME}${EXTRACT_SUFX}
 RUST_BOOT=	rust-stage0-${RUST_BOOT_SIG}.tar.bz2
-RUST_BOOT_SIG=	2012-07-06-b5f5676-freebsd-x86_64-926e17746576397c10af9796d30af6a730329f71
+RUST_BOOT_SIG=	2012-10-09-cd6f24f-freebsd-x86_64-a2b5e9dddfa8f21cc8a068b77a47ba5425bfdcc6
 RUST_TARGET=	x86_64-unknown-freebsd
 
 ONLY_FOR_ARCHS=	amd64
@@ -38,6 +38,14 @@ OPTIONS_DEFAULT=	CARGO
 
 .include <bsd.port.pre.mk>
 
+.if ${OSVERSION} < 900044
+EXTRA_PATCHES+=	${FILESDIR}/log2.patch
+.endif
+
+.if ${OSVERSION} < 801000
+EXTRA_PATCHES+=	${FILESDIR}/tgammaf.patch
+.endif
+
 .if ${OSVERSION} >= 900044
 LIB_DEPENDS+=	unwind:${PORTSDIR}/devel/libunwind
 CC=		clang
@@ -69,9 +77,6 @@ post-extract:
 
 post-patch:
 	${REINPLACE_CMD} \
-	    -e '/probe_need CFG_CURL/d' \
-	    ${WRKSRC}/configure
-	${REINPLACE_CMD} \
 	    -e 's|subprocess.call(\["curl"|subprocess.call(["fetch"|' \
 	    ${WRKSRC}/src/etc/snapshot.py
 	${REINPLACE_CMD} \

Modified: head/lang/rust/distinfo
==============================================================================
--- head/lang/rust/distinfo	Thu Oct 18 05:02:06 2012	(r306052)
+++ head/lang/rust/distinfo	Thu Oct 18 07:03:50 2012	(r306053)
@@ -1,4 +1,4 @@
-SHA256 (rust-0.3.tar.gz) = b34c895b9596abb6942d1688e6a5189b08b92e2507234779779c1af91e9ae84e
-SIZE (rust-0.3.tar.gz) = 22310335
-SHA256 (rust-stage0-2012-07-06-b5f5676-freebsd-x86_64-926e17746576397c10af9796d30af6a730329f71.tar.bz2) = b991df3cd68568e549241eab5d8b5e9f9dfacb7edaaebca1dd0176c91d0047e2
-SIZE (rust-stage0-2012-07-06-b5f5676-freebsd-x86_64-926e17746576397c10af9796d30af6a730329f71.tar.bz2) = 10308861
+SHA256 (rust-0.4.tar.gz) = 150685f07e4d605cadf9fba25b05e9cc1b009364dd744131cf4230d64981d093
+SIZE (rust-0.4.tar.gz) = 24104527
+SHA256 (rust-stage0-2012-10-09-cd6f24f-freebsd-x86_64-a2b5e9dddfa8f21cc8a068b77a47ba5425bfdcc6.tar.bz2) = 6ef8e6af1af853ed391ff90063deeae3593954b271724d78104e6f31ebb8a470
+SIZE (rust-stage0-2012-10-09-cd6f24f-freebsd-x86_64-a2b5e9dddfa8f21cc8a068b77a47ba5425bfdcc6.tar.bz2) = 13084348

Added: head/lang/rust/files/log2.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/rust/files/log2.patch	Thu Oct 18 07:03:50 2012	(r306053)
@@ -0,0 +1,48 @@
+--- src/libcore/cmath.rs.orig	2012-10-16 21:22:12.704922039 +0800
++++ src/libcore/cmath.rs	2012-10-16 21:23:23.023337237 +0800
+@@ -56,7 +56,6 @@
+     // renamed: to be consitent with log as ln
+     #[link_name="log1p"] pure fn ln1p(n: c_double) -> c_double;
+     pure fn log10(n: c_double) -> c_double;
+-    pure fn log2(n: c_double) -> c_double;
+     #[link_name="ilogb"] pure fn ilog_radix(n: c_double) -> c_int;
+     pure fn modf(n: c_double, iptr: &mut c_double) -> c_double;
+     pure fn pow(n: c_double, e: c_double) -> c_double;
+@@ -131,7 +130,6 @@
+     #[link_name="logf"] pure fn ln(n: c_float) -> c_float;
+     #[link_name="logbf"] pure fn log_radix(n: c_float) -> c_float;
+     #[link_name="log1pf"] pure fn ln1p(n: c_float) -> c_float;
+-    #[link_name="log2f"] pure fn log2(n: c_float) -> c_float;
+     #[link_name="log10f"] pure fn log10(n: c_float) -> c_float;
+     #[link_name="ilogbf"] pure fn ilog_radix(n: c_float) -> c_int;
+     #[link_name="modff"] pure fn modf(n: c_float,
+--- src/libcore/f32.rs.orig	2012-10-16 21:22:27.909922315 +0800
++++ src/libcore/f32.rs	2012-10-16 21:24:32.932336957 +0800
+@@ -135,7 +135,11 @@
+ }
+ 
+ pub pure fn logarithm(n: f32, b: f32) -> f32 {
+-    return log2(n) / log2(b);
++    return ln(n) / ln(b);
++}
++
++pub pure fn log2(n: f32) -> f32 {
++    return ln(n) / consts::ln_2;
+ }
+ 
+ impl f32: num::Num {
+--- src/libcore/f64.rs.orig	2012-10-16 21:22:34.895921647 +0800
++++ src/libcore/f64.rs	2012-10-16 21:25:30.466586496 +0800
+@@ -154,7 +154,11 @@
+ }
+ 
+ pub pure fn logarithm(n: f64, b: f64) -> f64 {
+-    return log2(n) / log2(b);
++    return ln(n) / ln(b);
++}
++
++pub pure fn log2(n: f64) -> f64 {
++    return ln(n) / consts::ln_2;
+ }
+ 
+ impl f64: num::Num {

Added: head/lang/rust/files/patch-configure
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/rust/files/patch-configure	Thu Oct 18 07:03:50 2012	(r306053)
@@ -0,0 +1,19 @@
+--- configure.orig	2012-10-16 22:28:10.833921513 +0800
++++ configure	2012-10-16 22:30:18.122921502 +0800
+@@ -312,7 +312,6 @@
+ step_msg "looking for build programs"
+ 
+ probe_need CFG_PERL        perl
+-probe_need CFG_CURL        curl
+ probe_need CFG_PYTHON      python2.7 python2.6 python2 python
+ 
+ python_version=$($CFG_PYTHON -V 2>&1)
+@@ -451,7 +450,7 @@
+                       | cut -d ' ' -f 2)
+ 
+     case $CFG_CLANG_VERSION in
+-        (3.0svn | 3.0 | 3.1 | 4.0 | 4.1)
++        (3.0svn | 3.0 | 3.1 | 3.2 | 4.0 | 4.1)
+         step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
+         CFG_C_COMPILER="clang"
+         ;;

Added: head/lang/rust/files/tgammaf.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/rust/files/tgammaf.patch	Thu Oct 18 07:03:50 2012	(r306053)
@@ -0,0 +1,32 @@
+--- src/libcore/cmath.rs.orig	2012-10-16 21:27:43.459921547 +0800
++++ src/libcore/cmath.rs	2012-10-16 21:27:59.451920798 +0800
+@@ -145,7 +145,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;
+-    #[link_name="tgammaf"] pure fn tgamma(n: c_float) -> c_float;
+     #[link_name="truncf"] pure fn trunc(n: c_float) -> c_float;
+ }
+ 
+--- src/libcore/f32.rs.orig	2012-10-16 21:27:50.924920698 +0800
++++ src/libcore/f32.rs	2012-10-16 21:30:50.177658387 +0800
+@@ -7,6 +7,8 @@
+ pub use cmath::c_float::*;
+ pub use cmath::c_float_targ_consts::*;
+ 
++priv use cmath::c_double;
++
+ // These are not defined inside consts:: for consistency with
+ // the integer types
+ 
+@@ -130,6 +132,10 @@
+     pub const ln_10: f32 = 2.30258509299404568401799145468436421_f32;
+ }
+ 
++pub pure fn tgamma(n: f32) -> f32 {
++    return c_double::tgamma(n as f64) as f32;
++}
++
+ pub pure fn signbit(x: f32) -> int {
+     if is_negative(x) { return 1; } else { return 0; }
+ }

Modified: head/lang/rust/pkg-plist
==============================================================================
--- head/lang/rust/pkg-plist	Thu Oct 18 05:02:06 2012	(r306052)
+++ head/lang/rust/pkg-plist	Thu Oct 18 07:03:50 2012	(r306053)
@@ -1,18 +1,18 @@
 %%CARGO%%bin/cargo
 bin/rustc
 bin/rustdoc
-lib/libcore-d27e4777a53c3e50-0.3.so
-lib/librustc-73389320c1332876-0.3.so
+lib/libcore-c3ca5d77d81b46c1-0.4.so
+lib/librustc-c84825241471686d-0.4.so
 lib/librustllvm.so
 lib/librustrt.so
-lib/libstd-d399da1ab6f5bec0-0.3.so
-lib/libsyntax-b45cc7d0b085bc34-0.3.so
-lib/rustc/x86_64-unknown-freebsd/lib/libcore-d27e4777a53c3e50-0.3.so
+lib/libstd-4782a756585a81-0.4.so
+lib/libsyntax-84efebcb12c867a2-0.4.so
+lib/rustc/x86_64-unknown-freebsd/lib/libcore-c3ca5d77d81b46c1-0.4.so
 lib/rustc/x86_64-unknown-freebsd/lib/libmorestack.a
-lib/rustc/x86_64-unknown-freebsd/lib/librustc-73389320c1332876-0.3.so
+lib/rustc/x86_64-unknown-freebsd/lib/librustc-c84825241471686d-0.4.so
 lib/rustc/x86_64-unknown-freebsd/lib/librustrt.so
-lib/rustc/x86_64-unknown-freebsd/lib/libstd-d399da1ab6f5bec0-0.3.so
-lib/rustc/x86_64-unknown-freebsd/lib/libsyntax-b45cc7d0b085bc34-0.3.so
+lib/rustc/x86_64-unknown-freebsd/lib/libstd-4782a756585a81-0.4.so
+lib/rustc/x86_64-unknown-freebsd/lib/libsyntax-84efebcb12c867a2-0.4.so
 @dirrm lib/rustc/x86_64-unknown-freebsd/lib
 @dirrm lib/rustc/x86_64-unknown-freebsd
 @dirrm lib/rustc



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210180703.q9I73o6M072882>