[GRASS-dev] wingrass: etc/fontcap contains fonts from dist. directory not installed directory

Moritz Lennert mlennert at club.worldonline.be
Fri Oct 26 10:34:34 EDT 2007


On 25/10/07 23:28, Glynn Clements wrote:
> Moritz Lennert wrote:
> 
>>>> The grass-6.3.cvs/etc/fontcap file in wingrass contains a series of
>>>> entries of the sorts:
>>>>
>>>> cyrilc|Cyrillic|0|c:\grasssrc\grass6\dist.i686-pc-mingw32\fonts\cyrilc.hmp|0|utf-8|
>>>>
>>>> This should be
>>>>
>>>> cyrilc|Cyrillic|0|c:\grass\grass-6.3.cvs\fonts\cyrilc.hmp|0|utf-8|
>>>>
>>>> IIUC, the line that deals with this in the Makefile is (277):
>>>>
>>>> -sed 's#'${GISBASE}'#'${INST_DIR}'#g' ${GISBASE}/etc/fontcap >
>>>> ${INST_DIR}/etc/fontcap
>>>>
>>>>
>>>> Do we need an equivalent line for wingrass with WINGISBASE ?
>>> WINGISBASE doesn't exist during compilation. AFAICT, it's only used
>>> within grass63.bat and init.bat.
>> Duh, obviously it has nothing to do with WINGISBASE. The problem is path
>> syntax:
>>
>> content of dist.i686-pc-mingw32/etc/fontcap:
>> cyrilc|Cyrillic|0|c:\grasssrc\grass-6.3.0RC1\dist.i686-pc-mingw32\fonts\cyrilc.h
>> mp|0|utf-8|
> 
> It's sort of related to WINGISBASE; if you run the installation
> in-place, WINGISBASE would be set to:
> 
> 	c:\grasssrc\grass-6.3.0RC1\dist.i686-pc-mingw32
> 
> which would work. But WINGISBASE isn't set while building, only when
> actually running GRASS.
> 
>> sed command in the Makefile:
>>
>>         -sed 's#'${GISBASE}'#'${INST_DIR}'#g' ${GISBASE}/etc/fontcap >
>> ${INST_DIR}/etc/fontcap
>>
>> which during install translates to
>>
>> sed
>> 's#'/c/grasssrc/grass-6.3.0RC1/dist.i686-pc-mingw32'#'c:/grass63RC1/grass-6.3.0RC1'#g'
>> /c/grasssrc/grass-6.3.0RC1/dist.i686-pc-mingw32/etc/fontcap >
>> c:/grass63RC1/grass-6.3.0RC1/etc/fontcap
>>
>> fontcap entries need to use windows syntax under windows for gis.m to see
>> the font.
> 
> It's more than just gis.m; C functions (e.g. fopen()) only understand
> Windows syntax, not MinGW/MSys syntax. Forward slashes work in most
> places (but not in the command interpreter), so either c:/grass63RC1
> or c:\grass63RC1 will work, but /c/grass63RC1 won't.
> 
>> So, we need a specific sed command for windows, but do we have a variable
>> for GISBASE in windows path syntax ? If not how to create it ?
>>
>>> Or, you can always regenerate the fontcap file after installation.
>> That's what I'm doing manually now for the binaries, but it would be great
>> to have this to happen automatically. Is this possible in the Makefile ?
> 
> g.dirseps will convert the separators, but not the /c/ -> c:/ for the
> drive letter.
> 
> Does $(RUN_GISBASE) have the correct syntax?
> 

It has c:/ (forward-slash) style syntax. So, windows usable, but not for 
the above sed command.

Moritz




More information about the grass-dev mailing list