Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Oct 2012 00:09:26 +0800 (CST)
From:      Jyun-Yan You <jyyou@cs.nctu.edu.tw>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/172791: [MAINTAINER] lang/rust: update to 0.4
Message-ID:  <201210161609.q9GG9QrW033190@alumni.cs.nctu.edu.tw>
Resent-Message-ID: <201210161610.q9GGA09K076027@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         172791
>Category:       ports
>Synopsis:       [MAINTAINER] lang/rust: update to 0.4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct 16 16:10:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Jyun-Yan You
>Release:        FreeBSD 8.3-RELEASE-p3 amd64
>Organization:
>Environment:
System: FreeBSD alumni.cs.nctu.edu.tw 8.3-RELEASE-p3 FreeBSD 8.3-RELEASE-p3 #0: Tue Jun 12 00:39:29 UTC 2012
>Description:
- Update to 0.4

Added file(s):
- files/log2.patch
- files/patch-configure
- files/tgammaf.patch

Removed file(s):
- files/patch-src_libcore_cmath.rs
- files/patch-src_libcore_f32.rs

Generated with FreeBSD Port Tools 0.99
>How-To-Repeat:
>Fix:

--- rust-0.4.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/lang/rust/Makefile /amd/gcs/98/9855518/src/ports/lang/rust/Makefile
--- /usr/ports/lang/rust/Makefile	2012-07-20 06:06:33.000000000 +0800
+++ /amd/gcs/98/9855518/src/ports/lang/rust/Makefile	2012-10-16 23:51:44.533577000 +0800
@@ -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 @@
 
 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 @@
 
 .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-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} \
diff -ruN --exclude=CVS /usr/ports/lang/rust/distinfo /amd/gcs/98/9855518/src/ports/lang/rust/distinfo
--- /usr/ports/lang/rust/distinfo	2012-07-20 06:06:33.000000000 +0800
+++ /amd/gcs/98/9855518/src/ports/lang/rust/distinfo	2012-10-16 23:51:44.538574000 +0800
@@ -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
diff -ruN --exclude=CVS /usr/ports/lang/rust/files/log2.patch /amd/gcs/98/9855518/src/ports/lang/rust/files/log2.patch
--- /usr/ports/lang/rust/files/log2.patch	1970-01-01 08:00:00.000000000 +0800
+++ /amd/gcs/98/9855518/src/ports/lang/rust/files/log2.patch	2012-10-16 23:51:44.548562000 +0800
@@ -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 {
diff -ruN --exclude=CVS /usr/ports/lang/rust/files/patch-configure /amd/gcs/98/9855518/src/ports/lang/rust/files/patch-configure
--- /usr/ports/lang/rust/files/patch-configure	1970-01-01 08:00:00.000000000 +0800
+++ /amd/gcs/98/9855518/src/ports/lang/rust/files/patch-configure	2012-10-16 23:51:44.545565000 +0800
@@ -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"
+         ;;
diff -ruN --exclude=CVS /usr/ports/lang/rust/files/patch-src_libcore_cmath.rs /amd/gcs/98/9855518/src/ports/lang/rust/files/patch-src_libcore_cmath.rs
--- /usr/ports/lang/rust/files/patch-src_libcore_cmath.rs	2012-04-08 00:22:23.000000000 +0800
+++ /amd/gcs/98/9855518/src/ports/lang/rust/files/patch-src_libcore_cmath.rs	1970-01-01 08:00:00.000000000 +0800
@@ -1,10 +0,0 @@
---- 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;
--    #[link_name="tgammaf"] pure fn tgamma(n: c_float) -> c_float;
-     #[link_name="truncf"] pure fn trunc(n: c_float) -> c_float;
- }
- 
diff -ruN --exclude=CVS /usr/ports/lang/rust/files/patch-src_libcore_f32.rs /amd/gcs/98/9855518/src/ports/lang/rust/files/patch-src_libcore_f32.rs
--- /usr/ports/lang/rust/files/patch-src_libcore_f32.rs	2012-07-20 06:06:33.000000000 +0800
+++ /amd/gcs/98/9855518/src/ports/lang/rust/files/patch-src_libcore_f32.rs	1970-01-01 08:00:00.000000000 +0800
@@ -1,22 +0,0 @@
---- src/libcore/f32.rs.orig	2012-07-16 17:14:25.444144084 +0800
-+++ src/libcore/f32.rs	2012-07-16 17:15:29.799514797 +0800
-@@ -5,6 +5,8 @@
- import cmath::c_float::*;
- import cmath::c_float_targ_consts::*;
- 
-+import cmath::c_double;
-+
- export add, sub, mul, div, rem, lt, le, gt, eq, ne;
- export is_positive, is_negative, is_nonpositive, is_nonnegative;
- export is_zero, is_infinite, is_finite;
-@@ -179,6 +181,10 @@
-     fn from_int(n: int) -> f32 { ret n as f32;    }
- }
- 
-+pure fn tgamma(n: f32) -> f32 {
-+    ret c_double::tgamma(n as f64) as f32;
-+}
-+
- //
- // Local Variables:
- // mode: rust
diff -ruN --exclude=CVS /usr/ports/lang/rust/files/tgammaf.patch /amd/gcs/98/9855518/src/ports/lang/rust/files/tgammaf.patch
--- /usr/ports/lang/rust/files/tgammaf.patch	1970-01-01 08:00:00.000000000 +0800
+++ /amd/gcs/98/9855518/src/ports/lang/rust/files/tgammaf.patch	2012-10-16 23:51:44.550562000 +0800
@@ -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; }
+ }
diff -ruN --exclude=CVS /usr/ports/lang/rust/pkg-plist /amd/gcs/98/9855518/src/ports/lang/rust/pkg-plist
--- /usr/ports/lang/rust/pkg-plist	2012-07-20 06:06:33.000000000 +0800
+++ /amd/gcs/98/9855518/src/ports/lang/rust/pkg-plist	2012-10-16 23:51:44.530580000 +0800
@@ -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
--- rust-0.4.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



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