# man pages in ports/packages - install & manpath



## Erichans (Dec 30, 2021)

After a package installation, when the package contains documentation in man page format, shouldn't this be—automatically—installed to be callable via `man`?

More specifically, installing _Meta-port for the FreeBSD Documentation Project_ (textproc/docproj) and attempting `man asciidoctor` : 

```
% pkg install docproj
 <snip>
% pkg info -l rubygem-asciidoctor-2.0.16 | grep man
	/usr/local/lib/ruby/gems/2.7/gems/asciidoctor-2.0.16/lib/asciidoctor/converter/manpage.rb
	/usr/local/lib/ruby/gems/2.7/gems/asciidoctor-2.0.16/man/asciidoctor.1
	/usr/local/lib/ruby/gems/2.7/gems/asciidoctor-2.0.16/man/asciidoctor.adoc
% man asciidoctor
No manual entry for asciidoctor
% man /usr/local/lib/ruby/gems/2.7/gems/asciidoctor-2.0.16/man/asciidoctor.1
<display of asciidoctor man page>
```

(The output of `manpath` does not contain the path for asciidoctor.1 after the installation of textproc/docproj)


----------



## SirDice (Dec 30, 2021)

Those are specific ruby gem man pages. You're going to need devel/rubygem-manpages for those.


----------



## grahamperrin@ (Dec 30, 2021)

```
% man asciidoctor
No manual entry for asciidoctor
% pkg info --list devel/rubygem-manpages | grep asciidoctor
%
```

<https://www.freebsd.org/cgi/man.cgi?asciidoctor> finds nothing, what am I missing?


----------



## Erichans (Dec 30, 2021)

After installing devel/rubygem-manpages and referencing Installation:

```
% gem install manpages && gem manpages --update-all
Fetching manpages-0.6.1.gem
/usr/local/lib/ruby/site_ruby/2.7/rubygems/package.rb:509: warning: Using the last argument as keyword parameters is deprecated
Successfully installed manpages-0.6.1
Parsing documentation for manpages-0.6.1
Installing ri documentation for manpages-0.6.1
Done installing documentation for manpages after 0 seconds
1 gem installed
Installing man pages for asciidoctor 2.0.16
% man asciidoctor
<displays the man page of asciidoctor>
```

This construction to "link-in" ruby gem manpages is probably also the reason why there isn't a asciidoctor(1) on the FreeBSD man page website.

Being part of the FreeBSD documentation project, it would seem prudent to include devel/rubygem-manpages in the _Meta-port for the FreeBSD Documentation Project_ (textproc/docproj) _and_ at least mention this in the port description:



> For  man asciidoctor  to work, execute:
> gem install manpages && gem manpages --update-all



___
EDIT: with `pkg info --list devel/rubygem-manpages | grep asciidoctor` your search is in the wrong package. asciidoctor (and its man page) is part of rubygem-asciidoctor, see my OP; it _*is*_ included in textproc/docproj.
devel/rubygem-manpages is used to "link-in" ruby gem man pages (in this case: asciidoctor) into the "normal" man pages; it _*is not*_ included in textproc/docproj


----------

