1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-06 01:57:40 +00:00
Commit Graph

118 Commits

Author SHA1 Message Date
Bryan Drewery
18dac0b76c Update to 1.25.0.
- The ABI patch is no longer needed on head due to fixes being upstreamed
  to use the pre-ino64 symbols.  The ABI patch is still needed for the
  bootstrap but should be removable for 1.26.0 if it uses beta 2018-03-18.

PR:		227130 [based on]
Tested by:	dumbbell, Charlie Li
Submitted by:	riggs [based on]
Differential Revision:	https://reviews.freebsd.org/D14921 [based on]
2018-04-16 21:35:26 +00:00
Jean-Sébastien Pédron
9882c6b366 lang/rust: Update to 1.24.1
The announcement is available on Rust blog:
https://blog.rust-lang.org/2018/03/01/Rust-1.24.1.html

There is a compilation error when it builds `clippy-driver` and `miri`
but it apparently doesn't affect the result. There are probably optional
tools/dependencies.
2018-03-22 18:14:21 +00:00
Bryan Drewery
6e03832857 Update rust-nightly to 2018-03-21.
The ABI patch and bootstrap patching are no longer needed on head after
fixes fully upstreamed in https://github.com/rust-lang/rust/issues/42681.
2018-03-21 16:20:51 +00:00
Bryan Drewery
6f39fa8fca Fix WITH_CCACHE_BUILD when using Poudriere's ccache-memcached support. 2018-03-09 21:35:49 +00:00
Bryan Drewery
dd76289525 - Fix kevent on head by binding to the old ABI symbol version.
- Add some context in the patches for where they came from.  They need to be
  in 1 patch due to needing to use the .orig file for fixing up checksums.

Obtained from:	rust upstream
2018-03-09 02:54:10 +00:00
Bryan Drewery
0d3244c26e Support WITH_CCACHE_BUILD for bundled LLVM 2018-02-25 03:10:33 +00:00
Bryan Drewery
01b60efd6f Unbreak on i386/amd64 and update to 1.25.0-2018-02-19
- Stop using git to build as it is unmaintainable due to submodules,
  but more importantly because src/vendor is no longer bundled.  Just
  fetch the source already generated that has all dependencies bundled.
  It may be a bit slower to get updates but is far more maintainable.
- Copy all patches to lang/rust-nightly/files since they may not always
  apply exactly between both versions.
- Add in patch for llvm-config getting -lexecinfo wrong, this is in
  review with LLVM at https://reviews.llvm.org/D42702.
- Bring in other random updates from lang/rust.
2018-02-24 06:17:17 +00:00
Bryan Drewery
d1c499f952 No need to actually recompress rust-std, libarchive does the right thing 2018-02-24 05:57:52 +00:00
Bryan Drewery
19e547ff22 Newer versions (rust-nightly 2018-02-19) pack multiple .o files into
libstd.  We only need to patch one of them.
2018-02-23 22:14:12 +00:00
Jan Beich
d4cd41d698 lang/rust: unbreak on aarch64 after r459911
gmake: Leaving directory '.../aarch64-unknown-freebsd/release/build/rustc_binaryen-cfb76adb9420e94c/out/build'
--- stderr
c++: error: the clang compiler does not support '-march=native'
c++: error: the clang compiler does not support '-march=native'

PR:		225600
Reported by:	Gergely Czuczy, pkg-fallout
Obtained from:	upstream (binaryen 1.37.35)
Approved by:	portmgr blanket
2018-02-22 22:05:21 +00:00
Bryan Drewery
be58f70a63 Use https for fetching bootstrap packages 2018-02-21 23:26:40 +00:00
Jean-Sébastien Pédron
989f546e02 lang/rust: Update to 1.24.0
The announcement is available on Rust blog:
https://blog.rust-lang.org/2018/02/15/Rust-1.24.html

PR:		225582
2018-02-19 21:53:01 +00:00
Jean-Sébastien Pédron
ea45925117 lang/rust: Grep std-$hash.*.o name from libstd-*.rlib
The suffix of that file changed in recent versions of Rust and it's
changing again between Rust 1.23.0 and 1.24.0. So let's grep the
filename from the list of files contained in the ar archive.
2018-02-17 11:11:50 +00:00
Jean-Sébastien Pédron
860708a57a lang/rust: Add manifest-rustfmt-preview to PLIST
This wasn't reported by a simple `poudriere bulk`, but a `poudriere
testport` revealed the problem:

    ====> Running Q/A tests (stage-qa)
    Error: 'lib/rustlib/manifest-rustfmt-preview' is referring to /wrkdirs/usr/ports/lang/rust/work/stage
    Warning: 'bin/rustfmt' is not stripped consider trying INSTALL_TARGET=install-strip or using ${STRIP_CMD}
    ...
    ===> Checking for items in STAGEDIR missing from pkg-plist
    Error: Orphaned: bin/rustfmt
    Error: Orphaned: lib/rustlib/manifest-rustfmt-preview

PR:		225445
Reported by:	jbeich@
2018-01-25 13:59:23 +00:00
Jean-Sébastien Pédron
9d417de57c lang/rust: Update to 1.23.0
Firefox 57.0 failed to build with Rust 1.23.0 with the following error:

    error: unused import: `std::ascii::AsciiExt`
      --> /wrkdirs/usr/ports/www/firefox/work/firefox-57.0.4/servo/components/style/gecko_string_cache/mod.rs:16:5
       |
    16 | use std::ascii::AsciiExt;
       |     ^^^^^^^^^^^^^^^^^^^^
       |
    note: lint level defined here
      --> /wrkdirs/usr/ports/www/firefox/work/firefox-57.0.4/servo/components/style/lib.rs:26:9
       |
    26 | #![deny(warnings)]
       |         ^^^^^^^^
       = note: #[deny(unused_imports)] implied by #[deny(warnings)]

Now that Firefox is updated to 58.0, the build succeeds.
2018-01-25 08:07:58 +00:00
Jean-Sébastien Pédron
3f6cb8de16 lang/rust: Skip .cargo-checksum.json update when it's missing
Currently we need to update `.cargo-checksum.json` in several patched
crates. But those crates are missing from the sources if they come from
GitHub instead of a proper released source archive. This change makes
`post-patch` and `do-configure` recipes fine in both cases.
2018-01-05 23:33:42 +00:00
Jean-Sébastien Pédron
a5fce162f8 lang/rust: Always replace bootstrap versions in stage0.txt
This simplifies the `Makefile`. The condition was fragile anyway because
it was based solely on the Makefile and not the actual content of
`stage0.txt`.
2018-01-05 23:28:16 +00:00
Jean-Sébastien Pédron
f29ef5baf9 lang/rust: Find libstd's suffix at runtime
... instead of hard-coding all values in the Makefile.

This eases the update of Rust.
2018-01-05 23:20:50 +00:00
Jean-Sébastien Pédron
c988c24319 lang/rust: Disable "omit frame pointers"
Before the patch, the default behavior of the compiler was to omit frame
pointers. However, even though it looks fine for the code produced
by the compiler, the compiler itself was broken. When there was a
compilation error, rustc panics to report that error. While handling
that panic, it tries to unwind the stack but fails to do so, which
results in an abort(3).

Here is an example:

    $ rustc hello.rs
    error: invalid reference to argument `0` (no arguments given)
     --> hello.rs:2:5
      |
    2 |     println!("Hello {}")
      |     ^^^^^^^^^^^^^^^^^^^^
      |
      = note: this error originates in a macro outside of the current crate

    error: aborting due to previous error

    fatal runtime error: failed to initiate panic, error 5
    Abort trap (core dumped)

The problem also exists on other systems such as OpenBSD and
i686-unknown-linux-musl. "omit frame pointers" was already disabled for
i686-unknown-linux-musl:
88a28ff602/src/librustc_back/target/i686_unknown_linux_musl.rs (L22)

The patch does the same for *-unknown-freebsd.

See the upstream bug for more informations:
https://github.com/rust-lang/rust/issues/43575
2017-11-30 13:33:05 +00:00
Jan Beich
d65b2886b1 lang/rust: avoid LLVM targeting SSE2 on i386 by default
This may help ports like textproc/ripgrep to run on old hardware.
Rust itself still requires SSE2 until bootstrap is regenerated.

PR:		223415
Approved by:	rust (dumbbell)
2017-11-27 22:02:29 +00:00
Jean-Sébastien Pédron
fefc322b07 lang/rust: Remove the LLVM_PORT option
FTR, this option allowed to used LLVM from ports instead of building the
bundled copy.

The problem is that this combination isn't really tested upstream. This
led to regressions which are difficult to diagnose. For instance, in
Rust 1.21.0, the bundled LLVM provided a new API to query the features
supported by the target arch. The equivalent code inside Rust was
removed to use that new API. Unfortunately, building Rust 1.21.0+ with a
copy of LLVM not providing this API didn't failed but instead made that
list of CPU features empty. This resulted in the following obscure build
failure in Firefox:

    error[E0432]: unresolved import `x86::sse2`

To avoid future pain for both end users and maintainers, we decided to
remove that option. Yes, it will increase the (already long) time to
build Rust, but it should save time wasted on debugging what is not
really supported anyway.

PR:		223342, 223300
Reported by:	Many users
2017-11-27 18:16:15 +00:00
Jean-Sébastien Pédron
ba01899161 lang/rust: Update to 1.22.1
Support for LibreSSL up-to 2.6.3 is now included, thus we can remove the
patches to the `openssl` and `openssl-sys` crates.

The renewed bootstrap for aarch64 was created on 11.0-RELEASE, instead
of 11.1-STABLE. It should allow it to run on all 11.x and thus fix the
build on 11.0-RELEASE. [1]

PR:		223009 [1]
2017-11-27 08:20:32 +00:00
Jean-Sébastien Pédron
3130d6b687 lang/rust: Add support for LibreSSL 2.6.3
Patches come from upstream:
    https://github.com/sfackler/rust-openssl

PR:		223500
Reported by:	Charlie Li <ml+freebsd-bugs@vishwin.info>
2017-11-09 14:14:59 +00:00
Jean-Sébastien Pédron
410580ce93 lang/rust: Fix paths in manifest-rls-preview
Like other manifests, without this, it still references the stage
directory. This error is reported when DEVELOPER=YES is set.

While here, strip `bin/rls`.

Reported by:	bar@, cpm@
2017-10-29 12:38:09 +00:00
Jean-Sébastien Pédron
76740e13d8 lang/rust: Update to 1.21.0
The official bootstraps wouldn't work: rustc was stalled on a mutex
while compiling a crate early in the build. This was solved by creating
a new bootstraps for "rustc" and "rust-std" from the existing FreeBSD
package. We keep using the official "cargo" bootstrap.

PR:		223123
2017-10-28 09:13:21 +00:00
Jan Beich
03b1a75e35 lang/rust: unbreak FFI for returning struct on i386
As this fixes Stylo on i386, remove the workaround in www/firefox.

PR:		223047
Suggested by:	Sebastien Marie <semarie@openbsd.org>
Approved by:	rust (dumbbell)
MFH:		2017Q4 (required by Firefox 57 scheduled on 2017-11-14)
2017-10-23 22:58:48 +00:00
Jean-Sébastien Pédron
67a4c4a209 lang/rust: Add support for LibreSSL 2.6.1 and 2.6.2
Patches come from upstream:
    https://github.com/sfackler/rust-openssl

PR:		222359
Reported by:	Charlie Li <ml+freebsd-bugs@vishwin.info>,
		Piotr Kubaj <pkubaj@anongoth.pl>,
		w.schwarzenfeld@utanet.at,
		nhoyle@hoyletech.com
2017-10-11 12:28:00 +00:00
Jean-Sébastien Pédron
97c4fb35a8 lang/rust: Update to 1.20.0
This patch only upgrades the port to Rust 1.20.0. The PR also covers a
build failure with the latest LibreSSL, which is not addressed here.

PR:		222359
Reported by:	Charlie Li <ml+freebsd-bugs@vishwin.info>
2017-10-04 08:13:38 +00:00
Jean-Sébastien Pédron
0cc13b3d48 lang/rust: Install Cargo + use bundled crates
This port now provides Cargo. This is the recommended now because Cargo
won't be provided separately in the future.

To build Cargo, we set `extended = true` in `config.toml`. As a side
effect, this flag also installs Rust source code. The port has a new
`SOURCES` option (disabled by default) to keep those sources.

As a consequence of this, `devel/cargo` is removed. Several ports
and Makefiles in Mk were updated to depend on `lang/rust` instead of
`devel/cargo`.

The other big change in this patch is the use of the bundled crates,
instead of relying on Cargo's registry (which was part of the distfiles,
in order to allow offline builds). So now, we don't need to prepare the
registry when updating this port.

This has several other benefits:
    * It fixes the build with sudo(8).
    * It fixes the use of the ino-64 patch (it was not applied to the
      registry, thus not used).

Compilation errors were fixed in the ino-64 patch.

Various `.cargo-checksum.json` files are updated after the sources are
patched (FBSD10_FIX, ino-64, and so on). This fixes builds which were
failing with errors such as:

    error: the listed checksum of `.../rustc-1.19.0-src/src/vendor/lzma-sys/xz-5.2.3/build-aux/config.rpath` has changed:
    expected: c8b4c017079da9dfb3086a0583e60ffe736184d89005dc5973f0bb0fd17c04bb
    actual:   561b00eb30ecaef2c9da17bc195e7d2a7ea63facea38ea9849fbb0ed340bebba

PR:		221088
Reported by:	joneum@, nwhitehorn@, romain@,
		Ekaterina Vaartis <vaartis@cock.li>,
		david@catwhisker.org,
		fullermd@over-yonder.net,
		rum1cro@yandex.ru,
		w.schwarzenfeld@utanet.at
Differential Revision:	https://reviews.freebsd.org/D11783
2017-09-15 18:01:17 +00:00
Thomas Zander
de97c5e9a7 Allow RUST_BACKTRACE to work without /proc mounted
Submitted by:	jbeich
Differential Revision:	https://reviews.freebsd.org/D11574
2017-09-10 16:49:46 +00:00
Jean-Sébastien Pédron
650b93f90c lang/rust: Turn off PORT_LLVM by default
This change was accidentally committed with the previous commit.
2017-07-28 23:03:26 +00:00
Jean-Sébastien Pédron
5d7e68a151 lang/rust: Fix build with PORT_LLVM
The path to `llvm-config40` was set to the empty string in the generated
`config.toml`, because I was still using the ${LLVM_PREFIX} variable
instead of the appropriate ${LLVM_CONFIG}. Bad completion and lack of
testing, sorry for that...

Reported by:	Rainer Hurling <rhurlin@gwdg.de>,
		Walter Schwarzenfeld <w.schwarzenfeld@utanet.at>,
		dim@
2017-07-28 22:30:39 +00:00
Jean-Sébastien Pédron
df5438d295 lang/rust: Fix ${PORT_LLVM_BUILD_DEPENDS}
The BUILD_DEPENDS argument for the PORT_LLVM option was not updated: it
was using the ${LLVM_PREFIX} variable which was removed. Now, it uses
${LOCALBASE} and ${LLVM_VER} as a suffix to the executable verified.

Submitted by:	Rainer Hurling <rhurlin@gwdg.de>
Reported by:	Rainer Hurling <rhurlin@gwdg.de>
2017-07-28 16:29:08 +00:00
Jean-Sébastien Pédron
771fbc02f4 lang/rust: Update to 1.19.0
The main change in the port is the switch from configure+make to the
`x.py` build script. This is the recommended way of building Rust. It
takes a configuration file, `config.toml`, which, in the port case,
indicates:

 * where to install things;
 * which release channel to use;
 * where to find Python and llvm-config;
 * if documentation should be also built.

The build process should now honor ${MAKE_JOBS_NUMBER} instead of always
using all available CPU cores.

The Cargo registry archive is significantly larger. It includes the
whole registry index (not only the crates needed by Rust). If the index
is missing, Cargo wants to download it from crates.io and I couldn't
find a way to convince it skip it.

New bootstraps for FreeBSD/aarch64 were prepared for this update. Those
are based on Rust 1.18.0 and Cargo 0.19.0.

CONFLICTS_BUILD with installed lang/rust and lang/rust-nightly is
commented out for now. I couldn't see any build failure with an installed
lang/rust so it looks promising. But I couldn't test with an installed
lang/rust-nightly because the latter is marked BROKEN for now. Once it's
restored, I'll do more testing and hopefully completely remove this
CONFLICTS_BUILD variables.
2017-07-28 10:18:54 +00:00
Jean-Sébastien Pédron
bc63a7ccbe lang/rust: Fix value of ${CARGO_BOOTSTRAP_DIR_aarch64}
It was pointing to the wrong directory.

Reported by:	jbeich@
2017-06-18 12:20:01 +00:00
Jean-Sébastien Pédron
8c78bf0c00 lang/rust: Enable on FreeBSD/aarch64 + various fixes
This port now uses an unofficial bootstrap of Rust 1.17.0 and Cargo
0.18.0 for FreeBSD/aarch64. Here are my notes to create this boostrap:
https://gist.github.com/dumbbell/b587da50ef014078da9e732a4331ebad

The port's Makefile was changed to:
    - allow to override the versions and directories of the bootstrap
      archives;
    - patch the bootstrap script and manifest with those
      versions/directories.

Beside changes to support FreeBSD/aarch64, the port received the
following fixes:
    - Pass python path to the configure script.
    - Fix and simplify the extraction of rust-std bootstrap by re-using
      existing variables.
    - Make sure tar(1) doesn't produce sparse file entries when it
      recreates the rust-std bootstrap because Python 2's tarfile module
      doesn't support them (PR 219842).

PR:		216143, 219842
Differential Revision:	https://reviews.freebsd.org/D10857
2017-06-17 14:44:30 +00:00
Thomas Zander
588a1dd506 Fix build on HEAD
Submitted by:	dim, rhurlin@gwdg.de (via mail)
2017-06-13 05:34:55 +00:00
Thomas Zander
0375d315c0 Update to upstream version 1.18.0, set MAINTAINER to rust@ 2017-06-10 17:48:58 +00:00
Thomas Zander
cdde29f0d0 Fix build on pre-ino64 / on i386
Submitted by:	kib
Differential Revision:	https://reviews.freebsd.org/D10973
2017-05-29 05:00:54 +00:00
Konstantin Belousov
421e541db5 Fix lang/rust after ino64 src commit.
Approved by:  bapt, dumbbell
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D10799
2017-05-27 12:06:40 +00:00
Thomas Zander
49c06d8d47 Update to upstream version 1.17.0
Submitted by:	dumbbell (see phabric URL)
Reviewed by:	riggs
Differential Revision:	https://reviews.freebsd.org/D10691
2017-05-14 15:26:44 +00:00
Alex Kozlov
f37a53c2ba - Remove checks for .PARSEDIR and vestiges of pmake support
PR:	218832
Approved by:	portmgr (antoine)
2017-04-26 19:04:30 +00:00
Thomas Zander
57bec1dacb Update to upstream version 1.16.0 2017-03-19 12:08:08 +00:00
Jean-Sébastien Pédron
cc125b3b4b lang/rust, lang/rust-nightly: Generate PLIST in post-install
Several libraries have their filename computed and based on the absolute
path to source files. Therefore, we need to generate the PLIST. Rust
installer already produces manifests listing files it installs. The port
now uses those files to complete `${TMPPLIST}`.

While the port built fine in Poudriere, it failed when built directly on
the host (regular make or with portmaster(1)) or using a different tool
such as Synth. This commit fixes the build for those methods.

Handling of DOCS-specific files is also unified with normal files. This
gets rid of code duplication.

How to do reproducible builds will be studied later.

PR:		217309
Reported by:	Several people on freebsd-ports@ or Bugzilla
Tested by:	Almost everyone who reported the issue
Approved by:	antoine (mentor), riggs (maintainer of lang/rust)
Differential Revision:	https://reviews.freebsd.org/D9816
2017-03-06 13:27:57 +00:00
Alan Somers
fc869c8727 lang/rust*: Advise users to mount procfs
Add a pkg-message to these ports advising users to mount procfs to see
backtraces.

Reviewed by:	dumbbell, riggs
Approved by:	dumbbell (ports)
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D9838
2017-03-01 23:35:05 +00:00
Jean-Sébastien Pédron
8b84c255e7 lang/rust, lang/rust-nightly: Update to 1.15.1 and 1.17.0 respectively
Both versions of Rust seen changes to their build system. Now they
require a bootstrap of Cargo and thus, a snapshot of Cargo's registry.

Each library has its own suffix instead of a common suffix for a given
version of Rust. Thus all future updates of the ports will include
changes to their plist.

$DISTFILES are now all under the `rust` directory in `$DISTDIR`. A
similar change will be committed to devel/cargo later.

lang/rust-nightly is enabled on i386 (bugzilla 216143). The source
snapshot also contains everything to build it on aarch64, but enabling
it will be committed later.

PR:		216143
Approved by:	riggs, bapt (mentor), antoine (mentor)
Differential Revision:	https://reviews.freebsd.org/D9286
2017-02-22 19:04:03 +00:00
Sunpoet Po-Chuan Hsieh
e0b379fa6f Remove BROKEN_FreeBSD_9
Approved by:	portmgr (blanket)
2017-01-01 03:45:12 +00:00
John Marino
ef119717db lang/rust: regenerate distinfo.x86_64 for DF rust 1.14
I'm not sure how this was misgenerated previously.  This matches the
version available via LOCAL/marino
2016-12-29 17:52:05 +00:00
John Marino
4d6c9db9f9 lang/rust: Update distinfo.x86_64 for DragonFly support for v1.14
Preapproved by:	riggs
2016-12-27 15:25:52 +00:00
Thomas Zander
ab4c6046eb Update to upstream version 1.14.0 2016-12-24 19:40:55 +00:00