It seems octave depends of readline-4.2 so the dependancy in the ebuild is incorrect. It seems too that the building involves tex so tetex is necessary too. Furthemore the compilation of the docs might give sandbox violations (on my system it did) when creating the pixmaps. This is all the more stupid than 1) all the docs are already compiled (info, dvi and ps) as far as I can tell in the tarball sources 2) only the infos get installed... Quickest fix is to add tetex in DEPEND (definitely not needed in RDEPEND) and add the necessary env variables to prevent sandbox violations. It's what included in the ebuild I'll attach.
Created attachment 2290 [details] Slightly modified octave-2.1.36 ebuild.
Hum, readline-4.2 and newer is masked on default-1.0... Don't know why.. (not on default-1.0-gcc3) Perhaps octave-2.1.36 should be masked on this profile too ?
I added the tetex fixes about a week ago. today I updated the profiles to reflect the proper octave version building on the installed gcc version.