Sorry for double-posting but I again forgot to sent it to the gentoo-user list.

2016-01-07 13:28 GMT+02:00 Stroller <strol...@stellar.eclipse.co.uk>:
>
>> On Wed, 6 January 2016, at 8:58 p.m., gevisz <gev...@gmail.com> wrote:
>> ...
>>> If you run `sudo ebuild /usr/portage/app-misc/gtypist/gtypist-2.9.5.ebuild 
>>> unpack`
>>> you should be able to find the file with that line.
>>
>> I did it, and the ebuild has been unpacked to
>> /var/tmp/portage/app-misc/gtypist-2.9.5/work
>>
>>> The "/*" and "*/" make that line into a comment, so "uncomment" it [3] by 
>>> removing them. Save the file.
>>
>> Did it in the file
>> /var/tmp/portage/app-misc/gtypist-2.9.5/work/gtypist-2.9.5/src/gtypist.c.
>>
>>> Now you should be able to run `sudo ebuild 
>>> /usr/portage/app-misc/gtypist/gtypist-2.9.5.ebuild install`
>>> to install gtypist with the modified code.
>>
>> Did it as well, though without understanding why this command should
>> take into account the changes I had done  in the file
>> /var/tmp/portage/app-misc/gtypist-2.9.5/work/gtypist-2.9.5/src/gtypist.c
>
> To address where you say "without understanding" - when you emerge a package,
> Portage downloads a tarball of the program's source code, unpacks the source 
> into
> a temporary working directory (/var/tmp/portage/...) and, assuming the 
> program is
> written in a compiled language like C or C++, runs `make` [1] before 
> compiling it
> and copying the compiled executable(s) into the right place on the live 
> filesystem.
>
> Using `ebuild /path/to/some.ebuild command` breaks down this process into 
> stages.
> So you have unpacked it (with `ebuild unpack`), modified the source code and 
> then
> told emerge to continue the compilation process.

Thank you for your explanation.

>> There was nothing in the output from the uncommented line (/encoding
>> finds nothing).
>
> In fact, I have just checked `man ebuild` and you need to run
> `sudo ebuild /usr/portage/app-misc/gtypist/gtypist-2.9.5.ebuild merge`
> to complete the emerge process (by merging the changed package into
> the live filesystem). I apologise - that is the command I should have told
> you to finish with in the first place.

I have unpacked the ebuild, uncommented the line
printf("encoding is %s, UTF8=%d\n", locale_encoding, isUTF8Locale);
in the /var/tmp/portage/app-misc/gtypist-2.9.5/work/gtypist-2.9.5/src/gtypist.c
and merged it with the command you mentioned.

Everything went smooth, except that the screen output contains no word
"encoding"
though it should. So, I am still puzzled.

Reply via email to