I present an initial ebuild file that creates a standalone version of the Electronic English-Japanese Dictionary Program by Jim Breen. Suggestions for improvements are very welcome.
Created attachment 202538 [details] xjdic-24.ebuild
> xjdic-24.ebuild I have tried this ebuild and it fails to emerge due to lack of .patch Here is the error: * Cannot find $EPATCH_SOURCE! Value for $EPATCH_SOURCE is: * * /usr/local/portage/app-dicts/xjdic/files/xjdic-24.patch * ( xjdic-24.patch ) * ERROR: app-dicts/xjdic-24 failed: * Cannot find $EPATCH_SOURCE! * * Call stack: * ebuild.sh, line 54: Called src_unpack * environment, line 2337: Called epatch '/usr/local/portage/app-dicts/xjdic/files/xjdic-24.patch' * environment, line 1049: Called die * The specific snippet of code: * die "Cannot find \$EPATCH_SOURCE!"; * I suppose there should not be any .patch..?
After removing the corresponding line from .ebuild, the xjdic24 still does not emerge. I somehow cannot attach build.log, so I will put it here: http://material.karlov.mff.cuni.cz/people/hajek/gentoo/xjdic/
(In reply to comment #2) > > xjdic-24.ebuild > > I have tried this ebuild and it fails to emerge due to lack of .patch > Here is the error: > > * Cannot find $EPATCH_SOURCE! Value for $EPATCH_SOURCE is: > * > * /usr/local/portage/app-dicts/xjdic/files/xjdic-24.patch > * ( xjdic-24.patch ) > * ERROR: app-dicts/xjdic-24 failed: > * Cannot find $EPATCH_SOURCE! > * > * Call stack: > * ebuild.sh, line 54: Called src_unpack > * environment, line 2337: Called epatch > '/usr/local/portage/app-dicts/xjdic/files/xjdic-24.patch' > * environment, line 1049: Called die > * The specific snippet of code: > * die "Cannot find \$EPATCH_SOURCE!"; > * > > > I suppose there should not be any .patch..? Sorry, I missed to also add the patch as an attachment.
Created attachment 283547 [details, diff] xjdic-24.patch The patch is at least influenced by the FreeBSD port japanese/edict.
Created attachment 283549 [details] build.log
(In reply to comment #5) hm, does not work here. See attachment.
Created attachment 283551 [details] environment my environment (for the build.log)
Aha, it looks like one needs to add #include <errno.h> into xjdsa.c file.
(In reply to comment #9) > Aha, it looks like one needs to add > #include <errno.h> into xjdsa.c file. unfortunately, this is not the case. I tried to add "include <errno.h>" to every .c file which originaly does not have it. But no use. Still the same error.
(In reply to comment #10) > (In reply to comment #9) > > Aha, it looks like one needs to add > > #include <errno.h> into xjdsa.c file. > > unfortunately, this is not the case. I tried to add "include <errno.h>" to > every .c file which originaly does not have it. But no use. Still the same > error. My guess is that a change in xjdservcomm.c is needed: -unsigned long jindex(unsigned long it) +unsigned long jindex(__thread unsigned long it) But I am currently trying to find out why your gcc reports an error while mine doesn't... After I found the reason I am able to verify my guess.
(In reply to comment #11) > My guess is that a change in xjdservcomm.c is needed: > > -unsigned long jindex(unsigned long it) > +unsigned long jindex(__thread unsigned long it) I have tried this suggestion, unfortunately, here is the result: >>> Compiling source in /var/tmp/portage/app-dicts/xjdic-24/work ... make -j1 gcc -c -DXJDFRONTEND -DXJDDIC -DMMAP xjdsa.c gcc -c -DXJDFRONTEND -DXJDDIC -DMMAP xjdcomm.c -o xjdcomm_sa.o gcc -c -DXJDFRONTEND -DXJDDIC -DMMAP xjdservcomm.c -o xjdservcomm_sa.o xjdservcomm.c:58:45: error: storage class specified for parameter ‘xit’ make: *** [xjdservcomm_sa.o] Error 1 emake failed
(In reply to comment #12) > (In reply to comment #11) > > > My guess is that a change in xjdservcomm.c is needed: > > > > -unsigned long jindex(unsigned long it) > > +unsigned long jindex(__thread unsigned long it) > > I have tried this suggestion, unfortunately, here is the result: > > >>> Compiling source in /var/tmp/portage/app-dicts/xjdic-24/work ... > make -j1 > gcc -c -DXJDFRONTEND -DXJDDIC -DMMAP xjdsa.c > gcc -c -DXJDFRONTEND -DXJDDIC -DMMAP xjdcomm.c -o xjdcomm_sa.o > gcc -c -DXJDFRONTEND -DXJDDIC -DMMAP xjdservcomm.c -o xjdservcomm_sa.o > xjdservcomm.c:58:45: error: storage class specified for parameter ‘xit’ > make: *** [xjdservcomm_sa.o] Error 1 > emake failed Michal, could you please try the new patch? It read that the non-TLS problem reported by gcc can be solved by including errno.h instead of defining errno.
Created attachment 283683 [details, diff] New patch correcting errno usage.
great, thank you very much. This time I was able to install xjdic smoothly. Now I only need to try using it :) If you need the build log, please let me know.
oh,... when running it I get: $ xjdic XJDIC Version 2.4 (Japanese Dictionary) Copyright J.W.Breen 2003. Stand-alone mode No control file detected! Loading Dictionary and Index files. Please wait... Unable to open: vconj
Aha, one needs to do "make xjdxgen" and than download edict.gz and kanjidic.gz from http://ftp.monash.edu.au/pub/nihongo/00INDEX.html#dic_fil , unpack it, run xjdxgen /path/to/edict xjdxgen /path/to/kanjidict optionaly create $HOME/.xjdicrc and only than one can use xjdic :D Anyway, please note, that japanese EUC or Shift-JIS encoding anabled terminal (e.g. kterm) is necessary. That is, UTF-8 xterm will _not_ work out of the box. Unfortunately, I have never written any .ebuild file, but I suggest it would be a good idea to add the above mentioned steps.
(In reply to comment #15) > great, thank you very much. This time I was able to install xjdic smoothly. > Now I only need to try using it :) If you need the build log, please let me > know. OK, thanks for your problem report. With my initial patch I have been on a completely wrong track to solve the non-TLS problem.
(In reply to comment #17) > Aha, one needs to do "make xjdxgen" and than download edict.gz and kanjidic.gz > from > http://ftp.monash.edu.au/pub/nihongo/00INDEX.html#dic_fil , > > unpack it, run > xjdxgen /path/to/edict > xjdxgen /path/to/kanjidict > > optionaly create $HOME/.xjdicrc and only than one can use xjdic :D > > Anyway, please note, that japanese EUC or Shift-JIS encoding anabled terminal > (e.g. kterm) is necessary. That is, UTF-8 xterm will _not_ work out of the box. > > Unfortunately, I have never written any .ebuild file, but I suggest it would be > a good idea to add the above mentioned steps. Hmm, could you please send the output of `equery files xjdic'? Mine looks as follows, i.e. eveything needed is installed. * Searching for xjdic ... * Contents of x11-apps/xjdic-24: /usr /usr/bin /usr/bin/xjdic /usr/share /usr/share/xjdic /usr/share/xjdic/edict /usr/share/xjdic/edict.xjdx /usr/share/xjdic/kanjidic /usr/share/xjdic/kanjidic.xjdx /usr/share/xjdic/kanjstroke /usr/share/xjdic/radicals.tm /usr/share/xjdic/radkfile /usr/share/xjdic/romkana.cnv /usr/share/xjdic/vconj Yes, I realize that kterm is needed for xjdic. Will add a dependency shortly. I will also provide an updated patch that deals with the mass of warnings during compilation. One thing that I also dislike is that xjdic does not know UTF...
(In reply to comment #19) > One thing that I also dislike is that xjdic does not know UTF... ...which means that you cannot just cut-and-paste a kanji to get its reading/meaning if you are using an UTF-8 environment.
(In reply to comment #19) (EDITED by Michal) > Hmm, could you please send the output of `equery files xjdic'? > * Searching for xjdic ... > * Contents of x11-apps/xjdic-24: > /usr > /usr/bin > /usr/bin/xjdic > /usr/share > /usr/share/xjdic > /usr/share/xjdic/edict > /usr/share/xjdic/edict.xjdx > /usr/share/xjdic/kanjidic > /usr/share/xjdic/kanjidic.xjdx > /usr/share/xjdic/kanjstroke > /usr/share/xjdic/radicals.tm > /usr/share/xjdic/radkfile > /usr/share/xjdic/romkana.cnv > /usr/share/xjdic/vconj # equery files xjdic * Searching for xjdic ... * Contents of app-dicts/xjdic-24: /usr /usr/bin /usr/bin/xjdic /usr/share /usr/share/xjdic /usr/share/xjdic/edict /usr/share/xjdic/edict.xjdx /usr/share/xjdic/kanjidic /usr/share/xjdic/kanjidic.xjdx /usr/share/xjdic/kanjstroke /usr/share/xjdic/radicals.tm /usr/share/xjdic/radkfile /usr/share/xjdic/romkana.cnv /usr/share/xjdic/vconj # hm, this is identical, so the problem was my .xjdicrc file (or the initial absense of it). Now I have included 'dicdir /usr/share/xjdic/' directive and all is fine.
(In reply to comment #20) > (In reply to comment #19) > > > One thing that I also dislike is that xjdic does not know UTF... > > ...which means that you cannot just cut-and-paste a kanji to get its > reading/meaning if you are using an UTF-8 environment. exactly! It would be wonderfull to have utf aware xjdic. (xjdic is the only reason for kterm on my machine).
Created attachment 283745 [details, diff] Patch with path to dictianories and without warnings. My fault, I forgot the default search path for the dictionaries in the patch. The new one also deals with the mass of warnings, so it would be nice if you could show me your build log.
regarding utf support, there seems to be a patch of some sort - see here for a reference: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=230695
Created attachment 283747 [details] Added dependency kterm. This ebuild also installs kterm as a dependency.
Created attachment 283749 [details] emerge output After successfull installation, I do not know where I can find the build.log. However, in the attachment is what I see in the terminal after "emerge..."
Created attachment 283751 [details] build.log aha, I just found a way to preserve my build.log - so here it is.
(In reply to comment #28) > Created attachment 283751 [details] > build.log > > aha, I just found a way to preserve my build.log - so here it is. Thanks, the build-log looks good. No warnings or other uncool stuff ;-) And thanks for the link concerning the UTF-8 question. I will see if I can find useful additions for the ebuild.