Skip site navigation (1)Skip section navigation (2)
Date:      Sat,  2 Dec 2006 23:18:31 -0800 (PST)
From:      Nick Barkas <snb@threerings.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/106252: [patch] can't account for partially translated man pages with just MANLANG and MAN[N]
Message-ID:  <20061203071831.D09B117042@maguro.moduli.net>
Resent-Message-ID: <200612030720.kB37KLBE036986@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         106252
>Category:       ports
>Synopsis:       [patch] can't account for partially translated man pages with just MANLANG and MAN[N]
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 03 07:20:20 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Nick Barkas
>Release:        FreeBSD 7.0-CURRENT i386
>Organization:
Three Rings Design
>Environment:
FreeBSD freebsd-current.sea.earth.threerings.net 7.0-CURRENT FreeBSD
7.0-CURRENT #0: Sat Dec  2 22:31:31 PST 2006
root@freebsd-current.sea.earth.threerings.net:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
When installing a port with only a subset of the man pages translated into other
languages, it is not currently possible to account for those translated pages
using MANLANG and the MAN[N] variables in the port's Makefile. If you set
MANLANG, it expects *all* man pages listed in MAN[N] to be installed for every
language. 

The attached patch to bsd.ports.mk allows a port maintainer to set 
MAN_PARTIAL_TRANSLATIONS to a list of two character languages codes that only 
have some of their man pages translated. Then, MAN[N]_[LANG] can be set for each
section N and each language specified in MAN_PARTIAL_TRANSLATIONS LANG to list
the man pages specific to that language which the port installs.

See also
http://lists.freebsd.org/pipermail/freebsd-ports/2006-November/036836.html

Note that this patch doesn't provide any sort of MLINKS functionality for
partially translated man pages.
>How-To-Repeat:
Create a port that installs english man pages foo.1 and bar.1, and the German
man page foo.1. Set MANLANG= "" de and set MAN1= foo.1 bar.1, and make will
complain that the German version of bar.1 was not installed.
>Fix:
--- bsd.port.mk.patch begins here ---
--- bsd.port.mk.orig	Sat Sep 30 12:25:45 2006
+++ bsd.port.mk	Thu Nov 16 21:52:23 2006
@@ -621,6 +621,20 @@
 #				  Default: "yes" if USE_IMAKE is set and NO_INSTALL_MANPAGES
 #				  is not set, and "no" otherwise.
 #
+# MAN_PARTIAL_TRANSLATIONS 
+#				- Use this to define a list of two letter codes for langauges 
+#				  your port has one or more man page translations for, but not 
+#				  every page that is defined in the MAN<sect> variables.
+# MAN<sect>_<lang>
+#				- These variables define the man pages your port only installs 
+#				  some pages for. For example, if you have English man pages 
+#				  foo.1 and bar.1, and and only the foo.1 man page in German, 
+#				  you would set 
+#					MANLANG=	""
+#				  	MAN1=		foo.1 bar.1
+#					MAN_PARTIAL_TRANSLATIONS=	de 
+#					MAN1_DE=	foo.1
+#
 # Set the following to specify all .info files your port installs.
 #
 # INFO			- A list of .info files (omitting the trailing ".info");
@@ -2959,6 +2973,14 @@
 .endif
 .endfor
 
+.endfor
+
+.for mantrans in ${MAN_PARTIAL_TRANSLATIONS}
+.for sect in 1 2 3 4 5 6 7 8 9 L N
+.if defined(MAN${sect}_${mantrans:U})
+_MANPAGES+=	${MAN${sect}_${mantrans:U}:S%^%${MAN${sect}PREFIX}/man/${mantrans}/man${sect:L}/%}
+.endif
+.endfor
 .endfor
 
 .if !defined(_TMLINKS)
--- bsd.port.mk.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061203071831.D09B117042>