This is an ebuild and patch for lahelper a gnome/gtk front end for latex.
Created attachment 17247 [details] lahelper ebuild Here is the ebuild I have it in app-text Scott
Created attachment 17248 [details] patch for lahelper on gentoo
Scott, on the whole your ebuild seems quite nice. You don't need toadd trailing backslashes for each package in (R)DEPEND. I'm readyto commit it but I want to ask you one question. Do you really need media-gfx/eog and media-gfx/imagemagick as its dependencies?It looks lahelper could use any image previewer if you set it properly,so I think you don't have to write it.
sed and make will be in the default profile, so there's no need to include them in the dependency list. and is tetex really only a compile time dependency ? or is it required at runtime (i havent checked the source sorry to confirm either way). probably take out the commented 'einstall' line, and you dont really need to || die with dodoc. and lastly, usata this is you/me/text-markup, so ill take gnome off.
I checked the code and it actually uses latex, eog and imagemagick in lahelper-mini-preview (not in lahelper). So tetex should be in both DEPEND and RDEPEND. And I suggest you write virtual/tetex instead of app-text/tetex ;)
You need to add find . -type f | xargs sed -i -e "s%/usr/local/share%/usr/share%g" in src_unpack() section. Otherwise you leave out many functions from lahelper. However, even though I added sed line to the ebuild, I couldn't start lahelper-mini-preview (for example, click [Math] -> [Equation] on menubar, and then press Refresh button on the right of "Mini-Print Preview"). I got: mv: cannot stat `my.lahelpertmp.png.0': No such file or directory Gtk-CRITICAL **: file gtkwidget.c: line 1387 (gtk_widget_destroy): assertion `widget != NULL' failed. ** WARNING **: Filename : '/home/usata/my.lahelpertmp.png' ** WARNING **: Stream extender: 'file:/home/usata/my.lahelpertmp.png' ** WARNING **: Attempt activate object satisfying 'bonobo:supported_mime_types.has_one (['image/x-png', 'image/*']) AND repo_ids.has ('IDL:Bonobo/Control:1.0') AND repo_ids.has ('IDL:Bonobo/PersistStream:1.0')': (nil) Bonobo-WARNING **: Activation exception 'Unknown CORBA exception id: 'IDL:OAF/GeneralError:1.0'' Gtk-CRITICAL **: file gtkwidget.c: line 1427 (gtk_widget_show): assertion `widget != NULL' failed. Gtk-CRITICAL **: file gtkbox.c: line 331 (gtk_box_pack_start): assertion `child != NULL' failed. I have no idea about the error message :(
and the gtk gnome deps need to be 1 only.
I cannot solve ``preview'' not working problem. It works almost fine, but one of the main features isn't available. Hum.
Created attachment 26181 [details] lahelper-0.6.3.ebuild (preview window not functioning)
Created attachment 26183 [details] lahelper-mini-preview-gentoo.diff Use it with lahelper-0.6.3.ebuild. lahelper-0.6.3-gentoo.diff is the same as the patch posted above. Just remane it and compile will be successful. (but no preview window working)
Not discounting that there are probably bugs in lahelper (e.g. Gdk, Gtk errors) the problem w.r.t. the mini print preview appears to be with the lahelper-mini-preview script. Rather the commands that get run. When I run them individually they do not work as expected. For example. cp /usr/local/share/lahelper/my.lahelpertmp.tex . latex -interaction=nonstopmode my.lahelpertmp.tex results in latex -interaction=nonstopmode my.lahelpertmp.tex This is TeX, Version 3.14159 (Web2C 7.4.5) (./my.lahelpertmp.tex LaTeX2e <2001/06/01> Babel <v3.7h> and hyphenation patterns for american, french, german, ngerman, n ohyphenation, loaded. (/usr/share/texmf/tex/latex/base/report.cls Document Class: report 2001/04/21 v1.4e Standard LaTeX document class (/usr/share/texmf/tex/latex/base/size12.clo)) (/usr/share/texmf/tex/latex/graphics/color.sty (/usr/share/texmf/tex/latex/config/color.cfg) (/usr/share/texmf/tex/latex/graphics/dvips.def) (/usr/share/texmf/tex/latex/graphics/dvipsnam.def)) (/usr/share/texmf/tex/generic/misc/epsf.tex This is `epsf.tex' v2.7k <10 July 1997> ) (/usr/share/texmf/tex/latex/graphics/graphicx.sty (/usr/share/texmf/tex/latex/graphics/keyval.sty) (/usr/share/texmf/tex/latex/graphics/graphics.sty (/usr/share/texmf/tex/latex/graphics/trig.sty) (/usr/share/texmf/tex/latex/config/graphics.cfg))) (/usr/share/texmf/tex/latex/base/latexsym.sty) (/usr/share/texmf/tex/latex/tools/longtable.sty) (/usr/share/texmf/tex/latex/misc/psfrag.sty) (./my.lahelpertmp.aux) ! LaTeX Error: File `my.currenttxt.tex' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: currenttxt.tex) Enter file name: ! Emergency stop. <read *> l.15 \input{my.currenttxt.tex} ^^M No pages of output. Transcript written on my.lahelpertmp.log.
Whoops - pressed commit too soon. The lahelper error mv: cannot stat `my.lahelpertmp.png.0': No such file or directory appears to be related to the fact that the script is silently failing. Why would latex not find a file in the current directory?
It's not clear where my.lahelpertmp.png.0 would be coming from. also... After looking at the code a little the problem is simply that lahelper is not gnome-2 ready. It is trying to use a bonobo object to render the png file. But as anyone can see the widget is never created in the first place. The EOG_Control is not registered with the old interfaces anymore. If you manually query for EOG_Control it shows up.
So does that mean we need GNOME-1 environment to run lahelper? (In other words, having gnomelibs-1.4* is not enough to run it and we need to run it inside GNOME-1?) lahelper is handy to refer to tex command even though without preview, but definitely it's much better to have that feature.
I am not sure but I do not think that is enough. The problem is really that eog (eye of gnome) needs to register itself with the old gnorba/object activation framework. That I think would require an older version of eog - no? It appears that things *are* working it's just that the current eog works with the new gnome-2 bonobo activation stuff.
Just to be a little more specific. After looking at the lahelper code the errors that it spits out come from a single line in the code. This line is where it's trying to activate an object to render an image - the png file the lahelper-mini-preview creates. The problem is that the eog control is not registered with the old bonobo/gnorba/gnome1 stuff. It is registered with the new gnome2 activation system (I checked). The lahelper code is pretty simple so it appears that the best thing would be to rework the configure/make stuff to use the new gnome2 libraries instead of the old stuff. I do not believe any code changes are necessary. What is needed is a automake/autoconf guru who can rework that stuff.
hum... I see. After I emerged media-gfx/eog-0.6-r4 lahelper works fine. Does it make sense if I add "=media-gfx/eog-0.6*" or "<media-gfx/eog-2" to DEPEND and leave users to decide he/she installs lahelper? Currently these ebuilds seem to be broken because eog-0.6-r4 and eog-2* conflict with each other even though they have different SLOT (so some files will be destroyed if you emerge them at the same time). Moreover, >=gnome/gnome-2.2 requires >=media-gfx/eog-2 so you cannot use lahelper if you want to use gnome-2.
Sorry for the delay. Finally I added the ebuild with ~eog-0.6, so it runs at least on GNOME 1 environment. lahelper site at sf.net says that they plan to port lahelper to GNOME 2 gets stable (but they wrote it in 2002), so I suppose this is a bug in upstream. Thanks for your continuing support to get this package into Portage tree.