pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/rust Update to 1.20.0
details: https://anonhg.NetBSD.org/pkgsrc/rev/ecafc88995c9
branches: trunk
changeset: 369491:ecafc88995c9
user: ryoon <ryoon%pkgsrc.org@localhost>
date: Sat Sep 30 04:42:43 2017 +0000
description:
Update to 1.20.0
* Disable SunOS/Solaris support because newer bootstrap is not available
* Include Rust libraries and Cargo
Changelog:
Version 1.20.0 (2017-08-31)
Language
Associated constants are now stabilised.
A lot of macro bugs are now fixed.
Compiler
Struct fields are now properly coerced to the expected field type.
Enabled wasm LLVM backend WASM can now be built with the wasm32-experimental-emscripten target.
Changed some of the error messages to be more helpful.
Add support for RELRO(RELocation Read-Only) for platforms that support it.
rustc now reports the total number of errors on compilation failure previously this was only the number of errors in the pass that failed.
Expansion in rustc has been sped up 29x.
added msp430-none-elf target.
rustc will now suggest one-argument enum variant to fix type mismatch when applicable
Fixes backtraces on Redox
rustc now identifies different versions of same crate when absolute paths of different types match in an error message.
Libraries
Relaxed Debug constraints on {HashMap,BTreeMap}::{Keys,Values}.
Impl PartialEq, Eq, PartialOrd, Ord, Debug, Hash for unsized tuples.
Impl fmt::{Display, Debug} for Ref, RefMut, MutexGuard, RwLockReadGuard, RwLockWriteGuard
Impl Clone for DefaultHasher.
Impl Sync for SyncSender.
Impl FromStr for char
Fixed how {f32, f64}::{is_sign_negative, is_sign_positive} handles NaN.
allow messages in the unimplemented!() macro. ie. unimplemented!("Waiting for 1.21 to be stable")
pub(restricted) is now supported in the thread_local! macro.
Upgrade to Unicode 10.0.0
Reimplemented {f32, f64}::{min, max} in Rust instead of using CMath.
Skip the main thread's manual stack guard on Linux
Iterator::nth for ops::{Range, RangeFrom} is now done in O(1) time
#[repr(align(N))] attribute max number is now 2^31 - 1. This was previously 2^15.
{OsStr, Path}::Display now avoids allocations where possible
Stabilized APIs
CStr::into_c_string
CString::as_c_str
CString::into_boxed_c_str
Chain::get_mut
Chain::get_ref
Chain::into_inner
Option::get_or_insert_with
Option::get_or_insert
OsStr::into_os_string
OsString::into_boxed_os_str
Take::get_mut
Take::get_ref
Utf8Error::error_len
char::EscapeDebug
char::escape_debug
compile_error!
f32::from_bits
f32::to_bits
f64::from_bits
f64::to_bits
mem::ManuallyDrop
slice::sort_unstable_by_key
slice::sort_unstable_by
slice::sort_unstable
str::from_boxed_utf8_unchecked
str::as_bytes_mut
str::as_bytes_mut
str::from_utf8_mut
str::from_utf8_unchecked_mut
str::get_mut
str::get_unchecked_mut
str::get_unchecked
str::get
str::into_boxed_bytes
Cargo
Cargo API token location moved from ~/.cargo/config to ~/.cargo/credentials.
Cargo will now build main.rs binaries that are in sub-directories of src/bin. ie. Having src/bin/server/main.rs and src/bin/client/main.rs generates target/debug/server and target/debug/client
You can now specify version of a binary when installed through cargo install using --vers.
Added --no-fail-fast flag to cargo to run all benchmarks regardless of failure.
Changed the convention around which file is the crate root.
The include/exclude property in Cargo.toml now accepts gitignore paths instead of glob patterns. Glob patterns are now deprecated.
Compatibility Notes
Functions with 'static in their return types will now not be as usable as if they were using lifetime parameters instead.
The reimplementation of {f32, f64}::is_sign_{negative, positive} now takes the sign of NaN into account where previously didn't.
Version 1.19.0 (2017-07-20)
Language
Numeric fields can now be used for creating tuple structs. RFC 1506 For example struct Point(u32, u32); let x = Point { 0: 7, 1: 0 };.
Macro recursion limit increased to 1024 from 64.
Added lint for detecting unused macros.
loop can now return a value with break. RFC 1624 For example: let x = loop { break 7; };
C compatible unions are now available. RFC 1444 They can only contain Copy types and cannot have a Drop implementation. Example: union Foo { bar: u8, baz: usize }
Non capturing closures can now be coerced into fns, RFC 1558 Example: let foo: fn(u8) -> u8 = |v: u8| { v };
Compiler
Add support for bootstrapping the Rust compiler toolchain on Android.
Change arm-linux-androideabi to correspond to the armeabi official ABI. If you wish to continue targeting the armeabi-v7a ABI you should use --target armv7-linux-androideabi.
Fixed ICE when removing a source file between compilation sessions.
Minor optimisation of string operations.
Compiler error message is now aborting due to previous error(s) instead of aborting due to N previous errors This was previously inaccurate and would only count certain kinds of errors.
The compiler now supports Visual Studio 2017
The compiler is now built against LLVM 4.0.1 by default
Added a lot of new error codes
Added target-feature=+crt-static option RFC 1721 Which allows libraries with C Run-time Libraries(CRT) to be statically linked.
Fixed various ARM codegen bugs
Libraries
String now implements FromIterator<Cow<'a, str>> and Extend<Cow<'a, str>>
Vec now implements From<&mut [T]>
Box<[u8]> now implements From<Box<str>>
SplitWhitespace now implements Clone
[u8]::reverse is now 5x faster and [u16]::reverse is now 1.5x faster
eprint! and eprintln! macros added to prelude. Same as the print! macros, but for printing to stderr.
Stabilized APIs
OsString::shrink_to_fit
cmp::Reverse
Command::envs
thread::ThreadId
Cargo
Build scripts can now add environment variables to the environment the crate is being compiled in. Example: println!("cargo:rustc-env=FOO=bar");
Subcommands now replace the current process rather than spawning a new child process
Workspace members can now accept glob file patterns
Added --all flag to the cargo bench subcommand to run benchmarks of all the members in a given workspace.
Updated libssh2-sys to 0.2.6
Target directory path is now in the cargmetadata
Cargo no longer checks out a local working directory for the crates.io index This should provide smaller file size for the registry, and improve cloning times, especially on Windows machines.
Added an --exclude option for excluding certai using the --all option
Cargo will now automatically retry when receiving a 5xx error from crates.io
The --features option now accepts multiple comma or space delimited values.
Added support for custom target specific runners
Misc
Added ow prefer to download rust packages with XZ compression over GZip packages.
Added the ability to escape # in rust documentation By adding additional #'s ie. ## is now #
Compatibility Notes
MutexGuard<T> may only be Sync if T is Sync.
-Z flagning for a year previous to this.
As a result of the -Z flag change, the cargo-check plugin no longer works. Users should migrate to the built-in check command, which has been available since 1.16.
Ending a float literal with ._ is now a hard erro use ::self::foo; is now a hard error. self paths are always relative while the :: prefix makes a path absolute, but was ignored and the path was
relative regardless.
Floating point constants in match patterns is now a hard error This was previously ts that don't derive PartialEq & Eq used match patterns is now a hard error This was previously a warning.
Lifetimes named '_ are no longer allowed. This was previously a warning.
From the pound escape, lines consisting of multiple #s are now visible
It is an error to reexport private enum variants. This is known to break a number of crates that depend on an older version of mustache.
On Windows, if VCINSTALLDIR is set incorrectly, rustc will try to use it to find the linker, and the build will fail where it did not previously
Version 1.18.0 (2017-06-08)
Language
Stabilize pub(restricted) pub can now accept a module path to make the item visible to just that module tree. Also accepts the keyword crate to make something public to the whole crate but not
users of the library. Example: pub(crate) mod utils;. RFC 1422.
Stabilize #![windows_subsystem] attribute conservative exposure of the /SUBSYSTEM linker flag on Windows platforms. RFC 1665.
Refactor of trait object type parsing Now ty in macros can accept types like Write + Send, trailing + are now supported in trait objects, and better error reporting for trait objects starting
with ?Sized.
0e+10 is now a valid floating point literal
Now warns if you bind a lifetime parameter to 'static
Tuples, Enum variant fields, and structs with no repr attribute or with #[repr(Rust)] are reordered to minimize padding and produce a smaller representation in some cases.
Compiler
rustc can now emit mir with --emit mir
Improved LLVM IR for trivial functions
Added explanation for E0090(Wrong number of lifetimes are supplied)
rustc compilation is now 15%-20% faster Thanks to optimisation opportunities found through profiling
Improved backtrace formatting when panicking
Libraries
Specialized Vec::from_iter being passed vec::IntoIter if the iterator hasn't been advanced the original Vec is reassembled with no actual iteration or reallocation.
Simplified HashMap Bucket interface provides performance improvements for iterating and cloning.
Specialize Vec::from_elem to use calloc
Fixed Race condition in fs::create_dir_all
No longer caching stdio on Windows
Optimized insertion sort in slice insertion sort in some cases 2.50%~ faster and in one case now 12.50% faster.
Optimized AtomicBool::fetch_nand
Stabilized APIs
Child::try_wait
HashMap::retain
HashSet::retain
PeekMut::pop
TcpStream::peek
UdpSocket::peek
UdpSocket::peek_from
Cargo
Added partial Pijul support Pijul is a version control system in Rust. You can now create new cargo projects with Pijul using cargo new --vcs pijul
Now always emits build script warnings for crates that fail to build
Added Android build support
Added --bins and --tests flags now you can build all programs of a certain type, for example cargo build --bins will build all binaries.
Added support for haiku
Misc
rustdoc can now use pulldown-cmark with the --enable-commonmark flag
Added rust-winbg script for better debugging on Windows
Rust now uses the official cross compiler for NetBSD
rustdoc now accepts # at the start of files
Fixed jemalloc support for musl
Compatibility Notes
Changes to how the 0 flag works in format! Padding zeroes are now always placed after the sign if it exists and before the digits. With the # flag the zeroes are placed after the prefix and
before the digits.
Due to the struct field optimisation, using transmute on structs that have no repr attribute or #[repr(Rust)] will no longer work. This has always been undefined behavior, but is now more likely
to break in practice.
The refactor of trait object type parsing fixed a bug where + was receiving the wrong priority parsing things like &for<'a> Tr<'a> + Send as &(for<'a> Tr<'a> + Send) instead of (&for<'a> Tr<'a>)
+ Send
Overlapping inherent impls are now a hard error
PartialOrd and Ord must agree on the ordering.
rustc main.rs -o out --emit=asm,llvm-ir Now will output out.asm and out.ll instead of only one of the filetypes.
calling a function that returns Self will no longer work when the size of Self cannot be statically determined.
rustc now builds with a "pthreads" flavour of MinGW for Windows GNU this has caused a few regressions namely:
Changed the link order of local static/dynamic libraries (respecting the order on given rather than having the compiler reorder).
Changed how MinGW is linked, native code linked to dynamic libraries may require manually linking to the gcc support library (for the native code itself)
Version 1.17.0 (2017-04-27)
Language
The lifetime of statics and consts defaults to 'static. RFC 1623
Fields of structs may be initialized without duplicating the field/variable names. RFC 1682
Self may be included in the where clause of impls. RFC 1647
When coercing to an unsized type lifetimes must be equal. That is, there is no subtyping between T and U when T: Unsize<U>. For example, coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be
equal to 'b. Soundness fix.
Values passed to the indexing operator, [], automatically coerce
Static variables may contain references to other statics
Compiler
Exit quickly on only --emit dep-info
Make -C relocation-model more correctly determine whether the linker creates a position-independent executable
Add -C overflow-checks to directly control whether integer overflow panics
The rustc type checker now checks items on demand instead of in a single in-order pass. This is mostly an internal refactoring in support of future work, including incremental type checking, but
also resolves RFC 1647, allowing Self to appear in impl where clauses.
Optimize vtable loads
Turn off vectorization for Emscripten targets
Provide suggestions for unknown macros imported with use
Fix ICEs in path resolution
Strip exception handling code on Emscripten when panic=abort
Add clearer error message using &str + &str
Stabilized APIs
Arc::into_raw
Arc::from_raw
Arc::ptr_eq
Rc::into_raw
Rc::from_raw
Rc::ptr_eq
Ordering::then
Ordering::then_with
BTreeMap::range
BTreeMap::range_mut
collections::Bound
process::abort
ptr::read_unaligned
ptr::write_unaligned
Result::expect_err
Cell::swap
Cell::replace
Cell::into_inner
Cell::take
Libraries
BTreeMap and BTreeSet can iterate over ranges
Cell can store non-Copy types. RFC 1651
String implements FromIterator<&char>
Box implements a number of new conversions: From<Box<str>> for String, From<Box<[T]>> for Vec<T>, From<Box<CStr>> for CString, From<Box<OsStr>> for OsString, From<Box<Path>> for PathBuf,
Into<Box<str>> for String, Into<Box<[T]>> for Vec<T>, Into<Box<CStr>> for CString, Into<Box<OsStr>> for OsString, Into<Box<Path>> for PathBuf, Default for Box<str>, Default for Box<CStr>, Default for
Box<OsStr>, From<&CStr> for Box<CStr>, From<&OsStr> for Box<OsStr>, From<&Path> for Box<Path>
ffi::FromBytesWithNulError implements Error and Display
Specialize PartialOrd<A> for [A] where A: Ord
Slightly optimize slice::sort
Add ToString trait specialization for Cow<'a, str> and String
Box<[T]> implements From<&[T]> where T: Copy, Box<str> implements From<&str>
IpAddr implements From for various arrays. SocketAddr implements From<(I, u16)> where I: Into<IpAddr>
format! estimates the needed capacity before writing a string
Support unprivileged symlink creation in Windows
PathBuf implements Default
Implement PartialEq<[A]> for VecDeque<A>
HashMap resizes adaptively to guard against DOS attacks and poor hash functions.
Cargo
Add cargo check --all
Add an option to ignore SSL revocation checking
Add cargo run --package
Add required_features
Assume build.rs is a build script
Find workspace via workspace_root link in containing member
Misc
Documentation is rendered with mdbook instead of the obsolete, in-tree rustbook
The "Unstable Book" documents nightly-only features
Improve the style of the sidebar in rustdoc output
Configure build correctly on 64-bit CPU's with the armhf ABI
Fix MSP430 breakage due to i128
Preliminary Solaris/SPARCv9 support
rustc is linked statically on Windows MSVC targets, allowing it to run without installing the MSVC runtime.
rustdoc --test includes file names in test names
This release includes builds of std for sparc64-unknown-linux-gnu, aarch64-unknown-linux-fuchsia, and x86_64-unknown-linux-fuchsia.
Initial support for aarch64-unknown-freebsd
Initial support for i686-unknown-netbsd
This release no longer includes the old makefile build system. Rust is built with a custom build system, written in Rust, and with Cargo.
Add Debug implementations for libcollection structs
TypeId implements PartialOrd and Ord
--test-threads=0 produces an error
rustup installs documentation by default
The Rust source includes NatVis visualizations. These can be used by WinDbg and Visual Studio to improve the debugging experience.
Compatibility Notes
Rust 1.17 does not correctly detect the MSVC 2017 linker. As a workaround, either use MSVC 2015 or run vcvars.bat.
When coercing to an unsized type lifetimes must be equal. That is, disallow subtyping between T and U when T: Unsize<U>, e.g. coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b.
Soundness fix.
format! and Display::to_string panic if an underlying formatting implementation returns an error. Previously the error was silently ignored. It is incorrect for write_fmt to return an error when
writing to a string.
In-tree crates are verified to be unstable. Previously, some minor crates were marked stable and could be accessed from the stable toolchain.
Rust git source no longer includes vendored crates. Those that need to build with vendored crates should build from release tarballs.
Fix inert attributes from proc_macro_derives
During crate resolution, rustc prefers a crate in the sysroot if two crates are otherwise identical. Unlikely to be encountered outside the Rust build system.
Fixed bugs around how type inference interacts with dead-code. The existing code generally ignores the type of dead-code unless a type-hint is provided; this can cause surprising inference
interactions particularly around defaulting. The new code uniformly ignores the result type of dead-code.
Tuple-struct constructors with private fields are no longer visible
Lifetime parameters that do not appear in the arguments are now considered early-bound, resolving a soundness bug (#32330). The hr_lifetime_in_assoc_type future-compatibility lint has been in
effect since April of 2016.
rustdoc: fix doctests with non-feature crate attributes
Make transmuting from fn item types to pointer-sized types a hard error
diffstat:
lang/rust/Makefile | 154 +-
lang/rust/PLIST | 6128 +++++++++-
lang/rust/PLIST.gdb | 4 -
lang/rust/PLIST.lldb | 3 -
lang/rust/buildlink3.mk | 4 +-
lang/rust/distinfo | 89 +-
lang/rust/patches/patch-mk_cfg_x86__64-apple-darwin.mk | 15 -
lang/rust/patches/patch-mk_main.mk | 15 -
lang/rust/patches/patch-mk_rt.mk | 18 -
lang/rust/patches/patch-mk_rustllvm.mk | 18 -
lang/rust/patches/patch-src_bootstrap_bin_rustc.rs | 15 +
lang/rust/patches/patch-src_compiler-rt_lib_builtins_CMakeLists.txt | 20 -
lang/rust/patches/patch-src_etc_local__stage0.sh | 26 -
lang/rust/patches/patch-src_grammar_check.sh | 15 -
lang/rust/patches/patch-src_libcompiler__builtins_build.rs | 15 -
lang/rust/patches/patch-src_librustc__trans_back_linker.rs | 15 -
lang/rust/patches/patch-src_libstd_rtdeps.rs | 19 -
lang/rust/patches/patch-src_libstd_sys_unix_os.rs | 15 -
lang/rust/patches/patch-src_rust-installer_gen-install-script.sh | 15 -
lang/rust/patches/patch-src_rust-installer_gen-installer.sh | 25 -
lang/rust/patches/patch-src_rust-installer_install-template.sh | 18 -
21 files changed, 6180 insertions(+), 466 deletions(-)
diffs (truncated from 6833 to 300 lines):
diff -r e57efaf4b99d -r ecafc88995c9 lang/rust/Makefile
--- a/lang/rust/Makefile Sat Sep 30 04:38:47 2017 +0000
+++ b/lang/rust/Makefile Sat Sep 30 04:42:43 2017 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.9 2017/09/04 18:08:24 wiz Exp $
+# $NetBSD: Makefile,v 1.10 2017/09/30 04:42:43 ryoon Exp $
-DISTNAME= rustc-1.16.0-src
+DISTNAME= rustc-1.20.0-src
PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
CATEGORIES= lang
MASTER_SITES= http://static.rust-lang.org/dist/
@@ -11,35 +11,11 @@
LICENSE= mit OR apache-2.0
USE_GCC_RUNTIME= yes
-USE_LANGUAGES= c c++
-USE_TOOLS+= bash gmake
-
-HAS_CONFIGURE= yes
-CONFIGURE_ARGS+= --prefix=${PREFIX}
-CONFIGURE_ARGS+= --build=${RUST_ARCH}
-CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR}
-CONFIGURE_ARGS+= --release-channel=stable
-CONFIGURE_ENV+= CFG_DISABLE_CODEGEN_TESTS=1
-
-#
-# Use the Makefile-based build system. Unfortunately this will be going away,
-# likely in the next release, forcing us to use a cargo-based system which will
-# require further binary bootstraps. Hold out as long as we can.
-#
-CONFIGURE_ARGS+= --disable-rustbuild
+USE_LANGUAGES= c c++11
+USE_TOOLS+= bash gmake perl:build pkg-config
UNLIMIT_RESOURCES+= cputime
-REPLACE_BASH+= src/rust-installer/gen-install-script.sh
-REPLACE_BASH+= src/rust-installer/gen-installer.sh
-
-#
-# Lots of per-platform specific documentation, e.g. for each system call,
-# making it difficult to PLIST. If it ends up being important we'll just have
-# to go with lots of PLIST.${OPSYS}
-#
-CONFIGURE_ARGS+= --disable-docs
-
TEST_TARGET= check
# Required for LLVM (-std=c++11)
@@ -48,86 +24,60 @@
.include "../../mk/bsd.prefs.mk"
#
-# Use jemalloc on systems where rust does by default too.
-#
-PLIST_VARS+= jemalloc
-.if ${OPSYS} == "Linux" || ${OPSYS} == "Darwin"
-. include "../../devel/jemalloc/buildlink3.mk"
-CONFIGURE_ARGS+= --jemalloc-root=${BUILDLINK_PREFIX.jemalloc}/lib
-PLIST.jemalloc= yes
-.else
-CONFIGURE_ARGS+= --disable-jemalloc
-.endif
-
-#
# Under NetBSD, do not use DT_RUNPATH
#
BUILDLINK_TRANSFORM.NetBSD+= rm:-Wl,--enable-new-dtags
#
-# Can't use pkgsrc llvm on SunOS at the moment due to a relocation error.
-#
-## llvm 4.0 breaks lang/rust build. Use internal llvm instead.
-#.if ${OPSYS} != "SunOS"
-#. include "../../lang/llvm/buildlink3.mk"
-#CONFIGURE_ARGS+= --llvm-root=${BUILDLINK_PREFIX.llvm}
-#.endif
-
-#
# Rust unfortunately requires itself to build. On platforms which aren't
# supported by upstream (where they offer binary bootstraps), or where we do
# not trust random binaries from the Internet, we need to build and provide our
# own bootstrap. See the stage0-bootstrap below for more details.
#
-CONFIGURE_ARGS+= --enable-local-rust
-CONFIGURE_ARGS+= --local-rust-root=${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}/rustc
-#
DISTFILES:= ${DEFAULT_DISTFILES}
-RUST_STAGE0_VER= 1.15.1
+RUST_STAGE0_VER= 1.19.0
#
.if !empty(MACHINE_PLATFORM:MDarwin-*-i386) || make(distinfo) || make (makesum) || make(mdi)
RUST_ARCH:= i686-apple-darwin
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
-DISTFILES:= ${DISTFILES} ${RUST_STAGE0}
+RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
+DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
.endif
.if !empty(MACHINE_PLATFORM:MDarwin-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
RUST_ARCH:= x86_64-apple-darwin
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
-DISTFILES:= ${DISTFILES} ${RUST_STAGE0}
+RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
+DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
.endif
.if !empty(MACHINE_PLATFORM:MLinux-*-i386) || make(distinfo) || make (makesum) || make(mdi)
RUST_ARCH:= i686-unknown-linux-gnu
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
-DISTFILES:= ${DISTFILES} ${RUST_STAGE0}
+RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
+DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
.endif
.if !empty(MACHINE_PLATFORM:MLinux-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
RUST_ARCH:= x86_64-unknown-linux-gnu
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
-DISTFILES:= ${DISTFILES} ${RUST_STAGE0}
+RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
+DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
.endif
-.if !empty(MACHINE_PLATFORM:MSunOS-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
-RUST_ARCH:= x86_64-sun-solaris
-RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
-SITES.${RUST_STAGE0}= https://us-east.manta.joyent.com/pkgsrc/public/pkg-bootstraps/
-DISTFILES:= ${DISTFILES} ${RUST_STAGE0}
-.endif
+#.if !empty(MACHINE_PLATFORM:MSunOS-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
+#RUST_ARCH:= x86_64-sun-solaris
+#RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
+#SITES.${RUST_STAGE0}= https://us-east.manta.joyent.com/pkgsrc/public/pkg-bootstraps/
+#DISTFILES:= ${DISTFILES} ${RUST_STAGE0}
+#.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
RUST_ARCH= x86_64-unknown-netbsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
-DISTFILES:= ${DISTFILES} ${RUST_STAGE0}
+RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
+DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
.endif
.if !defined(RUST_ARCH)
NOT_FOR_PLATFORM+= ${MACHINE_PLATFORM}
.endif
-PLIST_SRC= PLIST
-.if ${OPSYS} == "Darwin"
-PLIST_SRC+= PLIST.lldb
-.else
-PLIST_SRC+= PLIST.gdb
-.endif
-
OPSYSVARS+= SOEXT
SOEXT.Darwin= dylib
SOEXT.*= so
@@ -148,13 +98,65 @@
TOOLS_PATH.md5sum= ${PREFIX}/bin/gmd5sum
SUBST_CLASSES+= ranlib
-SUBST_STAGE.ranlib= pre-configure
+SUBST_STAGE.ranlib= post-patch
SUBST_FILES.ranlib= mk/rt.mk
SUBST_SED.ranlib= -e 's,RANLIB=.* \\,RANLIB="true" \\,g'
.endif
+SUBST_CLASSES+= rpath
+SUBST_STAGE.rpath= post-patch
+SUBST_FILES.rpath= src/bootstrap/bin/rustc.rs
+SUBST_VARS.rpath= PREFIX
+
+post-extract:
+ ${MV} ${WRKDIR}/rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}/rust-std-${RUST_ARCH}/lib/rustlib/${RUST_ARCH} \
+ ${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}/rustc/lib/rustlib
+
+do-configure:
+ echo '[build]' > ${WRKSRC}/config.toml
+ echo 'rustc = "${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}/rustc/bin/rustc"' \
+ >> ${WRKSRC}/config.toml
+ echo 'cargo = "${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}/cargo/bin/cargo"' \
+ >> ${WRKSRC}/config.toml
+ echo 'python = "${PYTHONBIN}"' >> ${WRKSRC}/config.toml
+ echo 'vendor = true' >> ${WRKSRC}/config.toml
+ echo 'extended = true' >> ${WRKSRC}/config.toml
+ echo 'verbose = 2' >> ${WRKSRC}/config.toml
+
+ echo '[install]' >> ${WRKSRC}/config.toml
+ echo 'prefix = "${PREFIX}"' >> ${WRKSRC}/config.toml
+ echo 'sysconfdir = "${SYSCONFDIR}"' >> ${WRKSRC}/config.toml
+ echo 'mandir = "${PKGMANDIR}"' >> ${WRKSRC}/config.toml
+
+ echo '[rust]' >> ${WRKSRC}/config.toml
+ echo 'channel = "stable"' >> ${WRKSRC}/config.toml
+ echo 'rpath = true' >> ${WRKSRC}/config.toml
+ echo 'codegen-tests = false' >> ${WRKSRC}/config.toml
+
+ echo '[dist]' >> ${WRKSRC}/config.toml
+ echo 'src-tarball = false' >> ${WRKSRC}/config.toml
+
+ echo '[llvm]' >> ${WRKSRC}/config.toml
+ echo 'static-libstdcpp = false' >> ${WRKSRC}/config.toml
+ echo 'ninja = true' >> ${WRKSRC}/config.toml
+
+ echo '[target.${RUST_ARCH}]' >> ${WRKSRC}/config.toml
+ echo 'llvm-config = "${LOCALBASE}/bin/llvm-config"' \
+ >> ${WRKSRC}/config.toml
+
+do-build:
+ cd ${WRKSRC} \
+ && env ${MAKE_ENV} \
+ ${PYTHONBIN} ./x.py dist
+
+do-install:
+ cd ${WRKSRC} \
+ && env ${MAKE_ENV} ${INSTALL_ENV} \
+ ${PYTHONBIN} ./x.py install
+
post-install:
${RM} -f ${DESTDIR}${PREFIX}/lib/rustlib/install.log
+ ${RM} -rf ${DESTDIR}${PREFIX}/lib/rustlib/src
.if ${OPSYS} == "Darwin"
.PHONY: fix-darwin-install-name
@@ -211,5 +213,13 @@
${GTAR} -zcf ${PKGNAME}-${RUST_ARCH}.tar.gz ${PKGNAME}-${RUST_ARCH})
.include "../../devel/cmake/buildlink3.mk"
+.include "../../devel/libgit2/buildlink3.mk"
+.include "../../devel/zlib/buildlink3.mk"
+BUILDLINK_API_DEPENDS.llvm+= llvm>=4.0.1nb1
+.include "../../lang/llvm/buildlink3.mk"
.include "../../lang/python/tool.mk"
+.include "../../security/libssh2/buildlink3.mk"
+.include "../../security/openssl/buildlink3.mk"
+.include "../../www/curl/buildlink3.mk"
+.include "../../www/http-parser/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r e57efaf4b99d -r ecafc88995c9 lang/rust/PLIST
--- a/lang/rust/PLIST Sat Sep 30 04:38:47 2017 +0000
+++ b/lang/rust/PLIST Sat Sep 30 04:42:43 2017 +0000
@@ -1,107 +1,6049 @@
-@comment $NetBSD: PLIST,v 1.3 2017/03/20 11:36:35 jperkin Exp $
+@comment $NetBSD: PLIST,v 1.4 2017/09/30 04:42:43 ryoon Exp $
+bash_completion.d/cargo
+bin/cargo
+bin/rust-gdb
+bin/rust-lldb
bin/rustc
bin/rustdoc
-lib/libarena-${RUST_VERHASH}.${SOEXT}
-lib/libflate-${RUST_VERHASH}.${SOEXT}
-lib/libfmt_macros-${RUST_VERHASH}.${SOEXT}
-lib/libgetopts-${RUST_VERHASH}.${SOEXT}
-lib/libgraphviz-${RUST_VERHASH}.${SOEXT}
-lib/liblog-${RUST_VERHASH}.${SOEXT}
-lib/libproc_macro-${RUST_VERHASH}.${SOEXT}
-lib/libproc_macro_plugin-${RUST_VERHASH}.${SOEXT}
-lib/librustc-${RUST_VERHASH}.${SOEXT}
-lib/librustc_back-${RUST_VERHASH}.${SOEXT}
-lib/librustc_borrowck-${RUST_VERHASH}.${SOEXT}
-lib/librustc_const_eval-${RUST_VERHASH}.${SOEXT}
-lib/librustc_const_math-${RUST_VERHASH}.${SOEXT}
-lib/librustc_data_structures-${RUST_VERHASH}.${SOEXT}
-lib/librustc_driver-${RUST_VERHASH}.${SOEXT}
-lib/librustc_errors-${RUST_VERHASH}.${SOEXT}
-lib/librustc_incremental-${RUST_VERHASH}.${SOEXT}
-lib/librustc_lint-${RUST_VERHASH}.${SOEXT}
-lib/librustc_llvm-${RUST_VERHASH}.${SOEXT}
-lib/librustc_metadata-${RUST_VERHASH}.${SOEXT}
-lib/librustc_mir-${RUST_VERHASH}.${SOEXT}
-lib/librustc_passes-${RUST_VERHASH}.${SOEXT}
-lib/librustc_platform_intrinsics-${RUST_VERHASH}.${SOEXT}
-lib/librustc_plugin-${RUST_VERHASH}.${SOEXT}
-lib/librustc_privacy-${RUST_VERHASH}.${SOEXT}
-lib/librustc_resolve-${RUST_VERHASH}.${SOEXT}
-lib/librustc_save_analysis-${RUST_VERHASH}.${SOEXT}
-lib/librustc_trans-${RUST_VERHASH}.${SOEXT}
-lib/librustc_typeck-${RUST_VERHASH}.${SOEXT}
-lib/librustdoc-${RUST_VERHASH}.${SOEXT}
-lib/libserialize-${RUST_VERHASH}.${SOEXT}
-lib/libstd-${RUST_VERHASH}.${SOEXT}
-lib/libsyntax-${RUST_VERHASH}.${SOEXT}
-lib/libsyntax_ext-${RUST_VERHASH}.${SOEXT}
-lib/libsyntax_pos-${RUST_VERHASH}.${SOEXT}
-lib/libterm-${RUST_VERHASH}.${SOEXT}
-lib/libtest-${RUST_VERHASH}.${SOEXT}
+lib/libarena-f5f78bba81916a46.${SOEXT}
+lib/libfmt_macros-0b9124250167dd63.${SOEXT}
+lib/libgraphviz-9a58d125030e538c.${SOEXT}
+lib/libproc_macro-adb45ea4da914940.${SOEXT}
+lib/librustc-6a534897b169ca84.${SOEXT}
+lib/librustc_allocator-ce0ebe2c233c0205.${SOEXT}
+lib/librustc_back-aba5d596a3ab6c68.${SOEXT}
+lib/librustc_borrowck-feb1c92008a05873.${SOEXT}
+lib/librustc_const_eval-040c8d38ea523f82.${SOEXT}
+lib/librustc_const_math-dcbf1ded6c397655.${SOEXT}
+lib/librustc_data_structures-25c4de29d5c9c855.${SOEXT}
+lib/librustc_driver-307bcdc5163e5dc0.${SOEXT}
+lib/librustc_errors-f9fd84c953130f5e.${SOEXT}
+lib/librustc_incremental-83c71ebb2014f4a5.${SOEXT}
+lib/librustc_lint-f13a42c615c3980b.${SOEXT}
+lib/librustc_llvm-eb3bc7171b4f5500.${SOEXT}
Home |
Main Index |
Thread Index |
Old Index