Page MenuHomeFreeBSD

devel/cargo: New port for Rust's package manager
ClosedPublic

Authored by dumbbell on Jun 12 2015, 6:07 PM.

Details

Summary

This port depends on lang/rust-nightly to build (D2798). It also requires a prebuilt version of cargo: I made one and put it on freefall. Finally, it needs several clones from GitHub, this is the "registry" in the distfiles.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

dumbbell retitled this revision from to devel/cargo: New port for Rust's package manager.
dumbbell updated this object.
dumbbell edited the test plan for this revision. (Show Details)
dumbbell added reviewers: kwm, jonathan.

Changes in this revision:

  • Remove runtime dependency to lang/rust. See the inline comment in the Makefile for an explanation.
  • Add a comment to help Vim with syntax hilighting

Crap... arc diff --update picked all unrelated changed, sorry... I'll redo it.

Remove unrelated changes pollution

jonathan edited edge metadata.

The cargo bootstrap process is unfortunate, but there's probably not much we can do about that. I had been trying to write a tool to bootstrap Cargo from just the Rust compiler, but it's not hardly working yet.

This revision is now accepted and ready to land.Jun 17 2015, 12:03 AM

I agree, avoiding the need for a bootstrapped cargo binary would be nice. But such a tool would be a simple rewrite of Cargo itself in the end. Now that we have a port, a new bootstrap is easy to recreate: we just need to pick the executable from a previous package.

Thanks for reviewing this port. I will commit it after a similar review of D2798 (lang/rust-nightly) because it is required by this one.

dumbbell edited edge metadata.

Repost diff

This revision now requires review to proceed.Jun 24 2015, 5:20 PM
dumbbell edited edge metadata.

Fix cargo.1 install location

While here, fix the version of the port: it should have been 0.3.0.

Update cargo.1 location in the manifest

devel/cargo/Makefile
8 ↗(On Diff #6499)

Hmm, take maintainership for now until your sure it stable? It is unfortunate that rust doesn't have a active maintainer.

35 ↗(On Diff #6499)

I don't really like this, but I don't see any other way of doing this. So carry on.

40 ↗(On Diff #6499)

euh LOCAL/dumbbell gets translated to people.freebsd.org/~dumbbell . Also can't you move all the distfiles into rust/ to begin with?

61 ↗(On Diff #6499)

Can't you replace this with USES=cmake or does Mk/Uses/cmake.mk do something funny which breaks the build horribly for some unclear reason? (like it does for webkit2-gtk3...)

86 ↗(On Diff #6499)

.include <bsd.port.options.mk> while this port doesn't have options you don't have to hassle with pre.mk/post.mk ..

130 ↗(On Diff #6499)

.include <bsd.port.mk> while this port doesn't have options you don't have to hassle with pre.mk/post.mk ..

devel/cargo/pkg-plist
10 ↗(On Diff #6499)

This line can be removed. Left over from old and incorrect man location.

devel/cargo/Makefile
40 ↗(On Diff #6499)

I added that for the cases I update the files but they are not available right away from the mirrors.

61 ↗(On Diff #6499)

cmake is not the main build tool for Rust, there is a non-autoconf configure script. cmake is used to build a dependency, libgit2.

devel/cargo/pkg-plist
10 ↗(On Diff #6499)

In fact, this line was added by make makeplist after fixing the man page location. Does makeplist need an update?

devel/cargo/Makefile
40 ↗(On Diff #6499)

I was wrong, local/dumbbell gets resolved to the distcache. not people.f.o. Imoa I think it beter not to "abuse" people.f.o for this. And just wait until the new files get pickedup by the distcache.

devel/cargo/pkg-plist
10 ↗(On Diff #6499)

No it means that a useless empty directory is created during install for some reason.

Fix problems reported by @kwm

  • Take maintainership
  • Include bsd.port.options.mk and bsd.port.mk
  • Remove share/man and share/man/man1 from the stage dir

Checkout latest commit

We don't need our own bootstrap, there is now one generated upstream.

While here, add a "gen-registry" target to automate the creation of the
registry. Many Git files are now excluded to reduce its size: it went
down from 28 MiB to 15 MiB.

kwm edited edge metadata.

Didn't spot anything that jumped out to me.

This revision is now accepted and ready to land.Jul 5 2015, 8:58 PM
This revision was automatically updated to reflect the committed changes.