[MacPorts] #50776: PortGroup/"base" extension suggestion : locale_select
MacPorts
noreply at macports.org
Wed Mar 2 09:41:18 PST 2016
#50776: PortGroup/"base" extension suggestion : locale_select
-------------------------+--------------------------------
Reporter: rjvbertin@… | Owner: macports-tickets@…
Type: submission | Status: new
Priority: Normal | Milestone:
Component: base | Version:
Keywords: | Port:
-------------------------+--------------------------------
As suggested elsewhere (https://trac.macports.org/ticket/49051#comment:17)
I propose a new PortGroup which might inspire an extension of "base".
The aim is to allow users who don't like or cannot afford to waste disk
space (on things they don't use) to reduce the number of translations
installed by ports. A good example is port:VLC : this one consists for
over 50% of translations, most of which will never be used by the (vast)
majority of users. That may be "only" around 37Mb, which is why I've
hesitated a bit to make this proposal. Still, leaving only the en_GB, fr
and nl translations that overhead shrinks to about 1.2Mb .
The principle of this PortGroup is simple: if adds a variant (tentatively
called `langselect`) which adds a post-destroot block that prunes
translations from ${destroot}${prefix}/share/locale, leaving only
translations the user is interested in.
This happens only when the variant is active, of course, but also requires
the user to list the translation(s) s/he is interested in. Those desired
translations are read from a list assignment to a variable
called`keep_languages` in ${prefix}/etc/macports/locales.tcl. A
locales.conf file would be nicer but I didn't want to spend too much time
figuring out how to write a parser for that kind of file.
Currently the code only removes translations from the share/locale
directory, but one could extend the principle to prune unwanted .lproj
directories too.
--
Ticket URL: <https://trac.macports.org/ticket/50776>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list