fc-cache and fc-list output usage messages that include the GNU-style long
options, even when those options are not available (e.g. all non-Linux platforms).
That's confusing for someone that's trying to figure out how to execute the
programs the cheap way, especially in concert with the issue I reported earlier
about the man pages not getting installed by default because of an automake issue.
Also, fc-cache advertises the `-s' option, but it's not included in the call to
getopt_long or getopt, so it's not accepted on platforms that don't have the
Patch to not advertise long options if they're not available is attached. It
also fixes up the call to getopt (and getopt_long) to include s.
If you would like me to tweak the man pages to say something like
Note: GNU-style long options, e.g. --force, may not be available on all
let me know and I'll include a subsequent patch.
Alternately, you could do as many other packages do and just include the GNU
getopts as an optionally-built part of fontconfig. It increases the size of the
source package, but there are no other downsides that I can see.
Created attachment 45 [details] [review]
fix up -s for getopts, don't advertise long options if they're not available
Thanks for the patch.