diff options
author | lwhsu <lwhsu@FreeBSD.org> | 2013-04-24 21:46:41 +0800 |
---|---|---|
committer | lwhsu <lwhsu@FreeBSD.org> | 2013-04-24 21:46:41 +0800 |
commit | 6cf100ec184677f0304996daf1132f2c22966032 (patch) | |
tree | 7bf15438072007443742108775dda3a86af6e375 /lang/rust | |
parent | 06d3bb217c86573a723be48ad5b235c5f952a9bb (diff) | |
download | freebsd-ports-gnome-6cf100ec184677f0304996daf1132f2c22966032.tar.gz freebsd-ports-gnome-6cf100ec184677f0304996daf1132f2c22966032.tar.zst freebsd-ports-gnome-6cf100ec184677f0304996daf1132f2c22966032.zip |
- Update to 0.6
PR: ports/177665
Submitted by: Jyun-Yan You <jyyou@cs.nctu.edu.tw> (maintainer)
Diffstat (limited to 'lang/rust')
-rw-r--r-- | lang/rust/Makefile | 32 | ||||
-rw-r--r-- | lang/rust/distinfo | 8 | ||||
-rw-r--r-- | lang/rust/files/log2.patch | 82 | ||||
-rw-r--r-- | lang/rust/files/patch-configure | 17 | ||||
-rw-r--r-- | lang/rust/files/patch-mk_platform.mk | 38 | ||||
-rw-r--r-- | lang/rust/files/tgammaf.patch | 32 | ||||
-rw-r--r-- | lang/rust/pkg-plist | 33 |
7 files changed, 97 insertions, 145 deletions
diff --git a/lang/rust/Makefile b/lang/rust/Makefile index 16197c680b73..f554cd1a917e 100644 --- a/lang/rust/Makefile +++ b/lang/rust/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= rust -PORTVERSION= 0.5 +PORTVERSION= 0.6 CATEGORIES= lang MASTER_SITES= http://static.rust-lang.org/dist/:src \ http://static.rust-lang.org/stage0-snapshots/:boot @@ -15,7 +15,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-12-19-8554d5e-freebsd-x86_64-2bffa280f338913c735672f6ddb630c6da126fad +RUST_BOOT_SIG= 2013-03-28-f7a2371-freebsd-x86_64-01f1e4b94504045e763eecb71c7e0852f6e85036 RUST_TARGET= x86_64-unknown-freebsd ONLY_FOR_ARCHS= amd64 @@ -28,9 +28,9 @@ USE_PYTHON_BUILD= 2.6-2.7 MAN1= rustc.1 -OPTIONS_DEFINE= CARGO -CARGO_DESC= Build with package manager -OPTIONS_DEFAULT= CARGO +OPTIONS_DEFINE= RUSTPKG +RUSTPKG_DESC= Build with package manager +OPTIONS_DEFAULT= RUSTPKG .include <bsd.port.pre.mk> @@ -38,10 +38,6 @@ OPTIONS_DEFAULT= CARGO 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 @@ -51,13 +47,12 @@ CONFIGURE_ARGS+= --enable-clang USE_GCC= yes .endif -.if ${PORT_OPTIONS:MCARGO} +.if ${PORT_OPTIONS:MRUSTPKG} RUN_DEPENDS+= curl:${PORTSDIR}/ftp/curl \ - git:${PORTSDIR}/devel/git \ - gpg:${PORTSDIR}/security/gnupg -PLIST_SUB+= CARGO="" + git:${PORTSDIR}/devel/git +PLIST_SUB+= RUSTPKG="" .else -PLIST_SUB+= CARGO="@comment " +PLIST_SUB+= RUSTPKG="@comment " .endif LIB_DEPENDS+= execinfo:${PORTSDIR}/devel/libexecinfo @@ -73,17 +68,14 @@ post-extract: post-patch: ${REINPLACE_CMD} \ - -e 's|subprocess.call(\["curl"|subprocess.call(["fetch"|' \ - ${WRKSRC}/src/etc/snapshot.py - ${REINPLACE_CMD} \ -e 's|$$(PREFIX_ROOT)/share/man|${MANPREFIX}/man|' \ ${WRKSRC}/mk/install.mk ${REINPLACE_CMD} \ - -e '/get-snapshot.py $$(CFG_HOST_TRIPLE)/d' \ + -e '/get-snapshot.py $$(CFG_BUILD_TRIPLE)/d' \ ${WRKSRC}/mk/stage0.mk -.if empty(PORT_OPTIONS:MCARGO) +.if empty(PORT_OPTIONS:MRUSTPKG) ${REINPLACE_CMD} \ - -e '/$$(Q)$$(call INSTALL,$$(HB2),$$(PHB),cargo$$(X))/d' \ + -e '/$$(Q)$$(call INSTALL,$$(HB2),$$(PHB),rustpkg$$(X_$$(CFG_BUILD_TRIPLE)))/d' \ ${WRKSRC}/mk/install.mk .endif diff --git a/lang/rust/distinfo b/lang/rust/distinfo index ea4d094121f5..ddd42e6979e8 100644 --- a/lang/rust/distinfo +++ b/lang/rust/distinfo @@ -1,4 +1,4 @@ -SHA256 (rust-0.5.tar.gz) = d326d22707f0562d669c11efbc33ae812ddbf76ab78f07087fc5beb095a8928a -SIZE (rust-0.5.tar.gz) = 24304179 -SHA256 (rust-stage0-2012-12-19-8554d5e-freebsd-x86_64-2bffa280f338913c735672f6ddb630c6da126fad.tar.bz2) = 31d960789db8c7b67d2760ddbc7b397e21d2fc7c6e872c3ae0186c2d2f2e8006 -SIZE (rust-stage0-2012-12-19-8554d5e-freebsd-x86_64-2bffa280f338913c735672f6ddb630c6da126fad.tar.bz2) = 13856177 +SHA256 (rust-0.6.tar.gz) = e11cb529a1e20f27d99033181a9e0e131817136b46d2742f0fa1afa1210053e5 +SIZE (rust-0.6.tar.gz) = 23595432 +SHA256 (rust-stage0-2013-03-28-f7a2371-freebsd-x86_64-01f1e4b94504045e763eecb71c7e0852f6e85036.tar.bz2) = 2e4afca52678f6004573beb01a72084c4118cc1ac813a171bfcace35cf873cc6 +SIZE (rust-stage0-2013-03-28-f7a2371-freebsd-x86_64-01f1e4b94504045e763eecb71c7e0852f6e85036.tar.bz2) = 16732821 diff --git a/lang/rust/files/log2.patch b/lang/rust/files/log2.patch index ed0b307f6a66..d6054b3b5ef5 100644 --- a/lang/rust/files/log2.patch +++ b/lang/rust/files/log2.patch @@ -1,48 +1,66 @@ ---- 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 @@ - } +--- src/libcore/num/cmath.rs.orig 2013-04-06 12:52:09.596039132 +0800 ++++ src/libcore/num/cmath.rs 2013-04-06 12:53:24.474452681 +0800 +@@ -64,7 +64,6 @@ + // renamed: to be consitent with log as ln + #[link_name="log1p"] unsafe fn ln1p(n: c_double) -> c_double; + unsafe fn log10(n: c_double) -> c_double; +- unsafe fn log2(n: c_double) -> c_double; + #[link_name="ilogb"] unsafe fn ilog_radix(n: c_double) -> c_int; + unsafe fn modf(n: c_double, iptr: &mut c_double) -> c_double; + unsafe fn pow(n: c_double, e: c_double) -> c_double; +@@ -148,7 +147,6 @@ + #[link_name="logf"] unsafe fn ln(n: c_float) -> c_float; + #[link_name="logbf"] unsafe fn log_radix(n: c_float) -> c_float; + #[link_name="log1pf"] unsafe fn ln1p(n: c_float) -> c_float; +- #[link_name="log2f"] unsafe fn log2(n: c_float) -> c_float; + #[link_name="log10f"] unsafe fn log10(n: c_float) -> c_float; + #[link_name="ilogbf"] unsafe fn ilog_radix(n: c_float) -> c_int; + #[link_name="modff"] unsafe fn modf(n: c_float, +--- src/libcore/num/f32.rs.orig 2013-04-06 12:52:15.395037527 +0800 ++++ src/libcore/num/f32.rs 2013-04-06 13:00:55.623679761 +0800 +@@ -81,7 +81,6 @@ + cmath::c_float_utils::log_radix) + delegate!(fn ln1p(n: c_float) -> c_float = cmath::c_float_utils::ln1p) + delegate!(fn log10(n: c_float) -> c_float = cmath::c_float_utils::log10) +-delegate!(fn log2(n: c_float) -> c_float = cmath::c_float_utils::log2) + delegate!(fn ilog_radix(n: c_float) -> c_int = + cmath::c_float_utils::ilog_radix) + delegate!(fn modf(n: c_float, iptr: &mut c_float) -> c_float = +@@ -254,7 +253,12 @@ - pub pure fn logarithm(n: f32, b: f32) -> f32 { + #[inline(always)] + pub fn logarithm(n: f32, b: f32) -> f32 { - return log2(n) / log2(b); + return ln(n) / ln(b); +} + -+pub pure fn log2(n: f32) -> f32 { ++#[inline(always)] ++pub 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 @@ - } + #[cfg(notest)] +--- src/libcore/num/f64.rs.orig 2013-04-06 12:52:25.866037307 +0800 ++++ src/libcore/num/f64.rs 2013-04-06 13:02:33.051357016 +0800 +@@ -82,7 +82,6 @@ + cmath::c_double_utils::log_radix) + delegate!(fn ln1p(n: c_double) -> c_double = cmath::c_double_utils::ln1p) + delegate!(fn log10(n: c_double) -> c_double = cmath::c_double_utils::log10) +-delegate!(fn log2(n: c_double) -> c_double = cmath::c_double_utils::log2) + delegate!(fn ilog_radix(n: c_double) -> c_int = + cmath::c_double_utils::ilog_radix) + delegate!(fn modf(n: c_double, iptr: &mut c_double) -> c_double = +@@ -276,7 +275,12 @@ - pub pure fn logarithm(n: f64, b: f64) -> f64 { + #[inline(always)] + pub fn logarithm(n: f64, b: f64) -> f64 { - return log2(n) / log2(b); + return ln(n) / ln(b); +} + -+pub pure fn log2(n: f64) -> f64 { ++#[inline(always)] ++pub fn log2(n: f64) -> f64 { + return ln(n) / consts::ln_2; } - impl f64: num::Num { + #[cfg(notest)] diff --git a/lang/rust/files/patch-configure b/lang/rust/files/patch-configure index da7744e5f074..ba22d3f04a97 100644 --- a/lang/rust/files/patch-configure +++ b/lang/rust/files/patch-configure @@ -1,6 +1,6 @@ ---- configure.orig 2012-12-19 07:29:12.000000000 +0800 -+++ configure 2012-12-24 20:52:33.524922231 +0800 -@@ -363,7 +363,6 @@ +--- configure.orig 2013-04-06 12:44:15.918202587 +0800 ++++ configure 2013-04-06 12:45:10.302044128 +0800 +@@ -401,7 +401,6 @@ step_msg "looking for build programs" probe_need CFG_PERL perl @@ -8,7 +8,7 @@ probe_need CFG_PYTHON python2.7 python2.6 python2 python python_version=$($CFG_PYTHON -V 2>&1) -@@ -472,15 +471,6 @@ +@@ -511,15 +510,6 @@ fi fi @@ -24,12 +24,3 @@ if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ] then err "either clang or gcc is required" -@@ -516,7 +506,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 --git a/lang/rust/files/patch-mk_platform.mk b/lang/rust/files/patch-mk_platform.mk index e699a662bcef..7aafd3ac0abc 100644 --- a/lang/rust/files/patch-mk_platform.mk +++ b/lang/rust/files/patch-mk_platform.mk @@ -1,27 +1,11 @@ ---- mk/platform.mk.orig 2012-12-25 08:33:07.971922333 +0800 -+++ mk/platform.mk 2012-12-25 08:33:16.996994081 +0800 -@@ -222,7 +222,7 @@ - ifeq ($(origin CPP),default) - CPP=clang -E - endif -- CFG_GCCISH_CFLAGS += -Wall -Werror -g -+ CFG_GCCISH_CFLAGS += -Wall -g - CFG_GCCISH_CXXFLAGS += -fno-rtti - CFG_GCCISH_LINK_FLAGS += -g - # These flags will cause the compiler to produce a .d file -@@ -268,7 +268,7 @@ - ifeq ($(origin CPP),default) - CPP=gcc -E - endif -- CFG_GCCISH_CFLAGS += -Wall -Werror -g -+ CFG_GCCISH_CFLAGS += -Wall -g - CFG_GCCISH_CXXFLAGS += -fno-rtti - CFG_GCCISH_LINK_FLAGS += -g - # These flags will cause the compiler to produce a .d file -@@ -322,4 +322,4 @@ - endef - - $(foreach target,$(CFG_TARGET_TRIPLES),\ -- $(eval $(call CFG_MAKE_ASSEMBLER,$(target)))) -\ No newline at end of file -+ $(eval $(call CFG_MAKE_ASSEMBLER,$(target)))) +--- mk/platform.mk.orig 2013-04-06 12:47:35.924036199 +0800 ++++ mk/platform.mk 2013-04-06 12:48:04.696038055 +0800 +@@ -299,7 +299,7 @@ + CFG_LIB_NAME_x86_64-unknown-freebsd=lib$(1).so + CFG_LIB_GLOB_x86_64-unknown-freebsd=lib$(1)-*.so + CFG_LIB_DSYM_GLOB_x86_64-unknown-freebsd=$(1)-*.dylib.dSYM +-CFG_GCCISH_CFLAGS_x86_64-unknown-freebsd := -Wall -Werror -g -fPIC -I/usr/local/include ++CFG_GCCISH_CFLAGS_x86_64-unknown-freebsd := -Wall -g -fPIC -I/usr/local/include + CFG_GCCISH_LINK_FLAGS_x86_64-unknown-freebsd := -shared -fPIC -g -lpthread -lrt + CFG_GCCISH_DEF_FLAG_x86_64-unknown-freebsd := -Wl,--export-dynamic,--dynamic-list= + CFG_GCCISH_PRE_LIB_FLAGS_x86_64-unknown-freebsd := -Wl,-whole-archive diff --git a/lang/rust/files/tgammaf.patch b/lang/rust/files/tgammaf.patch deleted file mode 100644 index ec35761daf40..000000000000 --- a/lang/rust/files/tgammaf.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- 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_utils; -+ - // 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_utils::tgamma(n as f64) as f32; -+} -+ - pub pure fn signbit(x: f32) -> int { - if is_negative(x) { return 1; } else { return 0; } - } diff --git a/lang/rust/pkg-plist b/lang/rust/pkg-plist index e719780535d5..c1daa5985949 100644 --- a/lang/rust/pkg-plist +++ b/lang/rust/pkg-plist @@ -1,27 +1,26 @@ -%%CARGO%%bin/cargo +bin/rust bin/rustc bin/rustdoc bin/rusti -lib/libcargo.so -lib/libcore-c3ca5d77d81b46c1-0.5.so -lib/librustc-c84825241471686d-0.5.so -lib/librustc.so -lib/librustdoc.so -lib/librusti-5047c7f210c7cac8-0.5.so -lib/librusti.so +%%RUSTPKG%%bin/rustpkg +lib/libcore-c3ca5d77d81b46c1-0.6.so +lib/librust-39583f72884834e3-0.6.so +lib/librustc-c84825241471686d-0.6.so +lib/librusti-5047c7f210c7cac8-0.6.so lib/librustllvm.so lib/librustrt.so -lib/libstd-4782a756585a81-0.5.so -lib/libsyntax-84efebcb12c867a2-0.5.so -lib/rustc/x86_64-unknown-freebsd/lib/libcargo-4951d6ef10eecbb6-0.5.so -lib/rustc/x86_64-unknown-freebsd/lib/libcore-c3ca5d77d81b46c1-0.5.so +lib/libstd-4782a756585a81-0.6.so +lib/libsyntax-84efebcb12c867a2-0.6.so +lib/rustc/x86_64-unknown-freebsd/lib/libcore-c3ca5d77d81b46c1-0.6.so lib/rustc/x86_64-unknown-freebsd/lib/libmorestack.a -lib/rustc/x86_64-unknown-freebsd/lib/librustc-c84825241471686d-0.5.so -lib/rustc/x86_64-unknown-freebsd/lib/librustdoc-1ac3c0763957e4b0-0.5.so -lib/rustc/x86_64-unknown-freebsd/lib/librusti-5047c7f210c7cac8-0.5.so +lib/rustc/x86_64-unknown-freebsd/lib/librust-39583f72884834e3-0.6.so +lib/rustc/x86_64-unknown-freebsd/lib/librustc-c84825241471686d-0.6.so +lib/rustc/x86_64-unknown-freebsd/lib/librustdoc-1ac3c0763957e4b0-0.6.so +lib/rustc/x86_64-unknown-freebsd/lib/librusti-5047c7f210c7cac8-0.6.so +lib/rustc/x86_64-unknown-freebsd/lib/librustpkg-795073e423d025b-0.6.so lib/rustc/x86_64-unknown-freebsd/lib/librustrt.so -lib/rustc/x86_64-unknown-freebsd/lib/libstd-4782a756585a81-0.5.so -lib/rustc/x86_64-unknown-freebsd/lib/libsyntax-84efebcb12c867a2-0.5.so +lib/rustc/x86_64-unknown-freebsd/lib/libstd-4782a756585a81-0.6.so +lib/rustc/x86_64-unknown-freebsd/lib/libsyntax-84efebcb12c867a2-0.6.so @dirrm lib/rustc/x86_64-unknown-freebsd/lib @dirrm lib/rustc/x86_64-unknown-freebsd @dirrm lib/rustc |