Skip to content

Allow setting --docdir #49

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Allow setting --docdir #49

wants to merge 1 commit into from

Conversation

orbea
Copy link

@orbea orbea commented Sep 9, 2016

This will allow setting --docdir during configure, this is useful because not all linux distributions install documentation to /usr/share/doc. For example in Slackware documentation is installed to /usr/doc/$PRGNAM-$VERSION and /usr/share/doc is a symlink to /usr/doc.

To use this ./configure --docdir=/usr/doc/$PRGNAM-$VERSION can be used.

Here is the PR for the main rust repo. rust-lang/rust#36360

@giannicic
Copy link

Just to inform that currently "rust make install" isn't working due to
install: error: Option '--docdir=/usr/local/share/doc/rust' is not recognized

Not sure but I think that this PR is intended to handle the docdir option used in rust make install

@orbea
Copy link
Author

orbea commented Sep 13, 2016

I am under the impression for --docdir to work both this PR and the one that was already merged (Linked in the op) are needed, I haven't tested it with just the merged PR yet though. At the very least it was working with both of them applied locally.

@brson
Copy link
Contributor

brson commented Sep 13, 2016

Thanks for the PR.

As written, this is hard-coded to work with the rustc package produced by the rustc build, because it specifies "share/doc/rust". This is sufficient to work with make install for the main-repo because all of its docs are installed to "share/doc/rust", but it will not, e.g. work for the combined installer on the website, which additionally includes (I believe) cargo docs in "share/doc/cargo", nor would it work for make install from the cargo repo. There is generally no rust-specific behavior encoded in the install script, as in this patch.

A simple solution would be to omit the "/rust" directory when doing the rewriting here, with the consequence that changing --docdir will preserve the "rust" subdirectory. If that's not sufficient for your purposes then a suitable solution may require some more consideration.

@orbea
Copy link
Author

orbea commented Sep 13, 2016

The "/rust" directory was included in this as in Slackware it would be named "$PRGNAM-$VERSION" where $PRGNAM = rustc to match the source tarballs at the main rust site.

I think ideally a more complete solution will have to be found, but I am unfortunately not in that great of a position to test the combined installed on the website or the make install in the cargo repo.

Copy link

@ncihnegn ncihnegn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't just copy the string from mandir.

valopt_nosave mandir "${CFG_PREFIX}/share/man" "install man pages in PATH"
+valopt_nosave docdir "${CFG_PREFIX}/share/doc/rust" "install man pages in PATH"

@orbea
Copy link
Author

orbea commented Sep 15, 2016

Should be fixed.

@orbea orbea mentioned this pull request Sep 15, 2016
MJDSys pushed a commit to MJDSys/rust-installer that referenced this pull request Oct 2, 2016
Now any files installed into /share/doc/.*/ will be installed in the path specified by
--docdir.

This is based on the work by orbea in rust-lang#49.
MJDSys added a commit to MJDSys/rust-installer that referenced this pull request Oct 2, 2016
Now any files installed into /share/doc/.*/ will be installed in the path specified by
--docdir.

This is based on the work by orbea in rust-lang#49.
@brson brson mentioned this pull request Oct 5, 2016
@brson
Copy link
Contributor

brson commented Oct 5, 2016

Closing in favor of #54. Thanks <3

@brson brson closed this Oct 5, 2016
@orbea
Copy link
Author

orbea commented Oct 5, 2016

Thanks!

@orbea orbea deleted the docdir branch October 5, 2016 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants