<Begasus>
hm .. going through the PR for ocr fonts with a post-install script, maybe a POST_INSTALL_REQUIRES could be added (like TEST_REQUIRES)?
freddietilley has joined #haiku
<nephele>
why?
<nephele>
how would that be different from normal requires?
<Begasus>
It's not required at runtime or build time
<Begasus>
post-install script needs fc-cache, but only after install, so not during build or runtime
<nephele>
> The fc-cache command in Linux scans the font directories and build font cache for applications which use fontconfig for their font handling.
<Not>
[haikuports/haikuports] threedeyes c172434 - kstars: bump version
<nephele>
shebang on haiku can be #!sh also
<Begasus>
minor detail :)
<nephele>
If fc-cache produces cache files for font files why are they not part of the package for example?
<Begasus>
I included it in REQUIRES now, was just thinking out loud
<nephele>
Yes, my line needs fc-cache but using type like that is the wrong way imo, command -v is specified by posix to check for command existance
<Begasus>
Easy fix (don't know the details so I trust your word on that
<Begasus>
but having fc-cache in REQUIRES is actually not right, because the fonts "don't" require it
<nephele>
I fail to see why updating the fontcincig cache would be required if it isnt installed
<Begasus>
I found out what the problem was: xetex uses system fonts and finds them using fontconfig. For fontconfig to find the fonts, its cache needs to be current. The cache needs to be rebuilt with fc-cache -f.
<Begasus>
as in the comment?
<nephele>
I don't think its a good idea to keep a cache around /always/ because some apps may need it
<nephele>
I would keep the optional cache rebuild with checking for the command
<nephele>
plus an explicit rebuild when ibstalling fontconfig
<Not>
[haikuports/haikuports] threedeyes 96925ab - kwave: bump version
<nephele>
then just make apps that need fontconfig depend on it
<nephele>
there is no need to make fonts depend on an optional component
<nephele>
so, add fontconfig as a dep for xetex if it needs it
<nephele>
and add a forced cache rebuild in fontconfigs post install if it isnt there already
<Begasus>
Maybe I'm missing the point here, but from jmairboeck's comment the cache isn't updated after installing a new font
<nephele>
If fontconfig is not installed there is no need tp update the cache
<nephele>
so just use the line that optionally updates the cache, either the one in the comment or the one I provided with command -v
<nephele>
no need to add a dependency, it will sinply skip updating the cache if fontconfig is not installed
<Begasus>
yeah, but does the new font get picked up after install?
<Begasus>
wanted to try earlier with LO (but that seems broken atm?)
<Begasus>
should also check with a different font (new) to check this
<nephele>
Yes, aslong as every app that needs fontconfig depends on it
<Begasus>
OK, seems Pe does, I can see the OCR fonts in there
Vitto has joined #haiku
<Begasus>
nope, not in the recipe ...
<nephele>
jnarrboeck also mentioned it on github: "The post-install script should check whether fontconfig is installed and do nothing in case of it missing."
<Begasus>
yeah, changed that the the line that is in current for that