installing partially translated man pages

Nick Barkas snb at
Fri Nov 17 01:32:09 PST 2006

I've been working on an update to the archivers/dpkg port (see PR  
105560) and am having some trouble with installing translated man  
pages. The latest version of dpkg includes and installs translations  
of *some* manual pages to several languages, but not all of the pages  
are translated. Using MANLANG and MAN<section> in the port's Makefile  
doesn't work so well for the partially translated languages, as make  
will try to compress or remove the man pages that are still  
untranslated, and hence didn't ever get installed.

Currently my updated port uses the default MANLANG of "" to only  
track the English versions of the man pages using various MAN  
variables, and simply notes the translated man pages in the pkg-plist  
file. This is less than optimal since the non-English man pages do  
not get compressed. Portlint -A will complain, too.

I looked through the list archives and saw that this sort of problem  
has been brought up a couple of times before. One potential solution  
was presented here: 
ports/2005-May/023688.html. I decided to go ahead and implement  
something like that, and it seems to have worked out ok. In addition  
to using MANLANG and MAN<section> to specify a group of man pages  
installed for all languages, I added a MAN_PARTIAL_TRANSLATIONS  
variable which can be used to list languages for which you have some  
man pages, but not all those listed in MAN<section>. Also, I added  
support for using MAN<section>_<language variables to list the man  
pages the port does install for a given language. Here's an example:  
if you have English man pages foo.1 and bar.1, and only foo.1 in  
German, you could do this:

MAN1=		foo.1 bar.1
MAN1_DE=	foo.1

I've tested this change with the partially translated man pages  
provided with dpkg, and it seems to work. Attached is a patch to that makes this work. It should be completely backwards  
compatible. I have not (yet) added any support for MLINKS in the  
partially translated man pages. Also, there is currently no support  
for installing English man pages with MAN_PARTIAL_TRANSLATIONS, but  
this can be worked around by just using MANLANG and MAN<section> for  
English translations and MAN_PARTIAL_TRANSLATIONS for whatever your  
port's primary man page language is, if that isn't English.

Any thoughts on whether this would be a good change? I will file a PR  
with my patch tomorrow unless someone has a better solution.


-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/octet-stream
Size: 1268 bytes
Desc: not available
Url :

More information about the freebsd-ports mailing list