mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
Upgrade to 0.4.
PR: ports/172791 Submitted by: maintainer Feature safe: yes
This commit is contained in:
parent
261f79ac46
commit
ff96836264
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=306053
8 changed files with 121 additions and 49 deletions
|
@ -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 memory safety and concurrency
|
|||
|
||||
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
|
||||
|
@ -68,9 +76,6 @@ post-extract:
|
|||
${MV} rust-stage0 stage0
|
||||
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
|
48
lang/rust/files/log2.patch
Normal file
48
lang/rust/files/log2.patch
Normal file
|
@ -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 {
|
19
lang/rust/files/patch-configure
Normal file
19
lang/rust/files/patch-configure
Normal file
|
@ -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"
|
||||
;;
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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
|
32
lang/rust/files/tgammaf.patch
Normal file
32
lang/rust/files/tgammaf.patch
Normal file
|
@ -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; }
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue