Index: lang/rust/Makefile =================================================================== --- lang/rust/Makefile +++ lang/rust/Makefile @@ -6,7 +6,9 @@ CATEGORIES= lang MASTER_SITES= http://static.rust-lang.org/dist/:src \ https://static.rust-lang.org/dist/:rust_bootstrap \ + LOCAL/dumbbell/rust:rust_bootstrap \ https://s3.amazonaws.com/rust-lang-ci/cargo-builds/:cargo_bootstrap \ + LOCAL/dumbbell/rust:cargo_bootstrap \ LOCAL/marino:bootstrap DISTNAME?= ${PORTNAME}c-${PORTVERSION}-src BOOTSTRAP_FILES=${RUSTC_BOOTSTRAP}:rust_bootstrap \ @@ -33,7 +35,7 @@ BUILD_DEPENDS= cmake:devel/cmake -ONLY_FOR_ARCHS?= amd64 i386 +ONLY_FOR_ARCHS?= aarch64 amd64 i386 ONLY_FOR_ARCHS_REASON= requires prebuilt bootstrap compiler # FIXME: The bootstrapped rustc adds -L/usr/local/lib in front of @@ -44,25 +46,30 @@ CONFLICTS_INSTALL?= rust-nightly RUST_BOOTSTRAP_DIR?= 2017-03-11 +RUST_BOOTSTRAP_DIR_aarch64?= 2017-04-24 RUST_BOOTSTRAP_VERSION?= 1.16.0 -RUSTC_BOOTSTRAP= ${RUST_BOOTSTRAP_DIR}/rustc-${RUST_BOOTSTRAP_VERSION}-${RUST_TARGET}.tar.gz -RUST_STD_BOOTSTRAP= ${RUST_BOOTSTRAP_DIR}/rust-std-${RUST_BOOTSTRAP_VERSION}-${RUST_TARGET}.tar.gz +RUST_BOOTSTRAP_VERSION_aarch64?=1.17.0 +RUSTC_BOOTSTRAP= ${RUST_BOOTSTRAP_DIR_${ARCH}:U${RUST_BOOTSTRAP_DIR}}/rustc-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${RUST_TARGET}.tar.gz +RUST_STD_BOOTSTRAP= ${RUST_BOOTSTRAP_DIR_${ARCH}:U${RUST_BOOTSTRAP_DIR}}/rust-std-${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${RUST_TARGET}.tar.gz CARGO_BOOTSTRAP_DIR?= 6b05583d71f982bcad049b9fa094c637c062e751 +CARGO_BOOTSTRAP_DIR_aarch64?= 2017-04-24 CARGO_BOOTSTRAP_VERSION?= nightly -CARGO_BOOTSTRAP= ${CARGO_BOOTSTRAP_DIR}/cargo-${CARGO_BOOTSTRAP_VERSION}-${RUST_TARGET}.tar.gz +CARGO_BOOTSTRAP_VERSION_aarch64?=0.18.0 +CARGO_BOOTSTRAP= ${CARGO_BOOTSTRAP_DIR_${ARCH}:U${CARGO_BOOTSTRAP_DIR}}/cargo-${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}}-${RUST_TARGET}${EXTRACT_SUFX} CARGO_REGISTRY= ${PORTNAME}-registry-${DISTVERSIONFULL}.tar.xz RUST_CHANNEL= ${PKGNAMESUFFIX:Ustable:S/^-//} # Rust's target arch string is different from *BSD arch strings -RUST_ARCH_x86_64= x86_64 # dragonfly +RUST_ARCH_aarch64= aarch64 RUST_ARCH_amd64= x86_64 RUST_ARCH_i386= i686 +RUST_ARCH_x86_64= x86_64 # dragonfly RUST_TARGET= ${RUST_ARCH_${ARCH}}-unknown-${OPSYS:tl} PLIST_SUB+= RUST_TARGET=${RUST_TARGET} -USES= compiler gmake libedit python:2,build +USES= compiler gmake libedit python:2.7,build HAS_CONFIGURE= yes CONFIGURE_ARGS= --disable-valgrind \ ${CHOSEN_COMPILER_TYPE:Mclang:C/.+/--enable-&/} \ @@ -70,7 +77,8 @@ --musl-root=${PREFIX} \ --local-rust-root=${PREFIX} \ --mandir=${MANPREFIX}/man \ - --release-channel=${RUST_CHANNEL} + --release-channel=${RUST_CHANNEL} \ + --python="${PYTHON_CMD}" MAKE_ARGS+= VERBOSE=1 @@ -134,29 +142,32 @@ exit 1;\ fi -LIBSTD= rust-std-1.16.0-${RUST_ARCH_${ARCH}}-unknown-freebsd/rust-std-${RUST_ARCH_${ARCH}}-unknown-freebsd/lib/rustlib/${RUST_ARCH_${ARCH}}-unknown-freebsd/lib/libstd-aef6cb139bd07bdc.rlib -STDF= std-aef6cb139bd07bdc.0.o +RUST_STD_DIR= ${RUST_STD_BOOTSTRAP:T:R:R} +LIBSTD_SUFFIX= aef6cb139bd07bdc +LIBSTD_SUFFIX_aarch64= b41e0ffe8c1bd541 +LIBSTD= ${RUST_STD_DIR}/rust-std-${RUST_TARGET}/lib/rustlib/${RUST_TARGET}/lib/libstd-${LIBSTD_SUFFIX_${ARCH}:U${LIBSTD_SUFFIX}}.rlib +STDF= ${LIBSTD:T:R:S/lib//}.0.o post-extract: @${MKDIR} \ - ${WRKSRC}/build/cache/${RUST_BOOTSTRAP_DIR} \ - ${WRKSRC}/build/cache/${CARGO_BOOTSTRAP_DIR} + ${WRKSRC}/build/cache/${RUST_BOOTSTRAP_DIR_${ARCH}:U${RUST_BOOTSTRAP_DIR}} \ + ${WRKSRC}/build/cache/${CARGO_BOOTSTRAP_DIR_${ARCH}:U${CARGO_BOOTSTRAP_DIR}} ${LN} -sf ${DISTDIR}/${DIST_SUBDIR}/${RUSTC_BOOTSTRAP} \ - ${WRKSRC}/build/cache/${RUST_BOOTSTRAP_DIR} + ${WRKSRC}/build/cache/${RUST_BOOTSTRAP_DIR_${ARCH}:U${RUST_BOOTSTRAP_DIR}} .if ${OPSYS} != FreeBSD || ${OSVERSION} < 1200031 ${LN} -sf ${DISTDIR}/${DIST_SUBDIR}/${RUST_STD_BOOTSTRAP} \ - ${WRKSRC}/build/cache/${RUST_BOOTSTRAP_DIR} + ${WRKSRC}/build/cache/${RUST_BOOTSTRAP_DIR_${ARCH}:U${RUST_BOOTSTRAP_DIR}} .endif ${LN} -sf ${DISTDIR}/${DIST_SUBDIR}/${CARGO_BOOTSTRAP} \ - ${WRKSRC}/build/cache/${CARGO_BOOTSTRAP_DIR} - ${TAR} -x -C ${WRKSRC} -f ${DISTDIR}/${DIST_SUBDIR}/${RUST_STD_BOOTSTRAP} + ${WRKSRC}/build/cache/${CARGO_BOOTSTRAP_DIR_${ARCH}:U${CARGO_BOOTSTRAP_DIR}} .if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200031 + ${TAR} -x -C ${WRKSRC} -f ${DISTDIR}/${DIST_SUBDIR}/${RUST_STD_BOOTSTRAP} ${CC} ${CFLAGS} -fPIC -c -o ${WRKSRC}/old_fstat.o ${FILESDIR}/old_fstat.c (cd ${WRKSRC} && ${AR} x ${WRKSRC}/${LIBSTD} ${STDF}) ${LD} -r -o ${WRKSRC}/std.xx.o ${WRKSRC}/${STDF} ${WRKSRC}/old_fstat.o ${MV} ${WRKSRC}/std.xx.o ${WRKSRC}/${STDF} (cd ${WRKSRC} && ${AR} r ${WRKSRC}/${LIBSTD} ${STDF}) - ${TAR} -cy -C ${WRKSRC} -f ${WRKSRC}/rustc.tbz rust-std-1.16.0-${RUST_ARCH_${ARCH}}-unknown-freebsd + ${TAR} -cy -C ${WRKSRC} -f ${WRKSRC}/rustc.tbz ${RUST_STD_DIR} ${MV} ${WRKSRC}/rustc.tbz ${WRKSRC}/build/cache/${RUST_STD_BOOTSTRAP} .endif @@ -166,6 +177,21 @@ ${WRKSRC}/mk/main.mk @${REINPLACE_CMD} -e 's|gdb|${LOCALBASE}/bin/gdb|' \ ${WRKSRC}/src/etc/rust-gdb + @if test "${RUST_BOOTSTRAP_DIR_${ARCH}}" -o "${RUST_BOOTSTRAP_VERSION_${ARCH}}"; then \ + ${REINPLACE_CMD} -e \ + 's|^rustc:.*|rustc: ${RUST_BOOTSTRAP_VERSION_${ARCH}:U${RUST_BOOTSTRAP_VERSION}}-${RUST_BOOTSTRAP_DIR_${ARCH}:U${RUST_BOOTSTRAP_DIR}}|' \ + ${WRKSRC}/src/stage0.txt; \ + fi + @if test "${CARGO_BOOTSTRAP_DIR_${ARCH}}"; then \ + ${REINPLACE_CMD} -e \ + 's|^cargo:.*|cargo: ${RUST_BOOTSTRAP_DIR_${ARCH}:U${RUST_BOOTSTRAP_DIR}}|' \ + ${WRKSRC}/src/stage0.txt; \ + fi + @if test "${CARGO_BOOTSTRAP_VERSION_${ARCH}}"; then \ + ${REINPLACE_CMD} -e \ + 's|cargo-nightly-|cargo-${CARGO_BOOTSTRAP_VERSION_${ARCH}:U${CARGO_BOOTSTRAP_VERSION}}-|' \ + ${WRKSRC}/src/bootstrap/bootstrap.py; \ + fi # In case the previous "make stage" failed, this ensures rust's # install.sh won't backup previously staged files before reinstalling Index: lang/rust/distinfo =================================================================== --- lang/rust/distinfo +++ lang/rust/distinfo @@ -7,6 +7,12 @@ SIZE (rust/2017-03-11/rust-std-1.16.0-x86_64-unknown-freebsd.tar.gz) = 54920061 SHA256 (rust/6b05583d71f982bcad049b9fa094c637c062e751/cargo-nightly-x86_64-unknown-freebsd.tar.gz) = 924b172afe6a990ae19b346ef5ca2a6203f68a22af8d7229039fdc28068ff125 SIZE (rust/6b05583d71f982bcad049b9fa094c637c062e751/cargo-nightly-x86_64-unknown-freebsd.tar.gz) = 4970379 +SHA256 (rust/2017-04-24/rustc-1.17.0-aarch64-unknown-freebsd.tar.gz) = 85c234018cfc7548051d6f726a379ba2c37b80c393a74a96e7212a0c4e15e92e +SIZE (rust/2017-04-24/rustc-1.17.0-aarch64-unknown-freebsd.tar.gz) = 33612511 +SHA256 (rust/2017-04-24/rust-std-1.17.0-aarch64-unknown-freebsd.tar.gz) = a86d963998cce1f357cbb748c0cd45307255eac964181f3879348e44faf6772c +SIZE (rust/2017-04-24/rust-std-1.17.0-aarch64-unknown-freebsd.tar.gz) = 43207694 +SHA256 (rust/2017-04-24/cargo-0.18.0-aarch64-unknown-freebsd.tar.gz) = 8cdbf046bfc98e1cb92b89c306e4389b92a8df9db44b8f7c784aaac25ad52877 +SIZE (rust/2017-04-24/cargo-0.18.0-aarch64-unknown-freebsd.tar.gz) = 2935624 SHA256 (rust/2017-03-11/rustc-1.16.0-i686-unknown-freebsd.tar.gz) = 6d32e211c0e9d33adc65f96f06d3996d8e167a29df85ddc6d877d424f82c7443 SIZE (rust/2017-03-11/rustc-1.16.0-i686-unknown-freebsd.tar.gz) = 42809380 SHA256 (rust/2017-03-11/rust-std-1.16.0-i686-unknown-freebsd.tar.gz) = 62c2f030cefe475b7c9e349543f134d3a9ad22830b0422db8230f47e7619fc5f Index: lang/rust/files/extra-patch-ino64 =================================================================== --- lang/rust/files/extra-patch-ino64 +++ lang/rust/files/extra-patch-ino64 @@ -1,3 +1,37 @@ +--- ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs.orig 2017-04-24 18:56:45.000000000 +0000 ++++ ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs 2017-05-30 07:55:40.703709000 +0000 +@@ -7,10 +7,12 @@ + pub struct stat { + pub st_dev: ::dev_t, + pub st_ino: ::ino_t, +- pub st_mode: ::mode_t, + pub st_nlink: ::nlink_t, ++ pub st_mode: ::mode_t, ++ pub st_pad0: ::uint16_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, ++ pub st_pad1: ::uint32_t, + pub st_rdev: ::dev_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, +@@ -18,13 +20,13 @@ + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, ++ pub st_birthtime: ::time_t, ++ pub st_birthtime_nsec: ::c_long, + pub st_size: ::off_t, + pub st_blocks: ::blkcnt_t, + pub st_blksize: ::blksize_t, + pub st_flags: ::fflags_t, +- pub st_gen: ::uint32_t, +- pub st_lspare: ::int32_t, +- pub st_birthtime: ::time_t, +- pub st_birthtime_nsec: ::c_long, ++ pub st_gen: ::uint64_t, ++ pub st_spare: [::int64_t; 10], + } + } --- ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/mod.rs.orig 2017-04-24 18:56:45.000000000 +0000 +++ ./src/liblibc/src/unix/bsd/freebsdlike/freebsd/mod.rs 2017-05-25 16:28:37.280076000 +0000 @@ -1,8 +1,8 @@ @@ -201,6 +235,40 @@ } } +--- ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs.orig 2017-04-24 20:20:26.000000000 +0000 ++++ ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/aarch64.rs 2017-05-30 07:57:19.874957000 +0000 +@@ -7,10 +7,12 @@ + pub struct stat { + pub st_dev: ::dev_t, + pub st_ino: ::ino_t, +- pub st_mode: ::mode_t, + pub st_nlink: ::nlink_t, ++ pub st_mode: ::mode_t, ++ pub st_pad0: ::uint16_t, + pub st_uid: ::uid_t, + pub st_gid: ::gid_t, ++ pub st_pad1: ::uint32_t, + pub st_rdev: ::dev_t, + pub st_atime: ::time_t, + pub st_atime_nsec: ::c_long, +@@ -18,13 +20,13 @@ + pub st_mtime_nsec: ::c_long, + pub st_ctime: ::time_t, + pub st_ctime_nsec: ::c_long, ++ pub st_birthtime: ::time_t, ++ pub st_birthtime_nsec: ::c_long, + pub st_size: ::off_t, + pub st_blocks: ::blkcnt_t, + pub st_blksize: ::blksize_t, + pub st_flags: ::fflags_t, +- pub st_gen: ::uint32_t, +- pub st_lspare: ::int32_t, +- pub st_birthtime: ::time_t, +- pub st_birthtime_nsec: ::c_long, ++ pub st_gen: ::uint64_t, ++ pub st_spare: [::int64_t; 10], + } + } --- ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/x86_64.rs.orig 2017-04-24 20:20:26.000000000 +0000 +++ ./src/vendor/libc/src/unix/bsd/freebsdlike/freebsd/x86_64.rs 2017-05-25 16:25:42.305261000 +0000 @@ -7,10 +7,12 @@