Emerging daemonshogi dies with the following: make[2]: Entering directory `/var/tmp/portage/daemonshogi-0.1.3/work/daemonshogi-0.1.3/po' PATH=../src:$PATH /usr/bin/xgettext --default-domain=daemonshogi --directory=.. \ --add-comments --keyword=_ --keyword=N_ \ --files-from=./POTFILES.in \ && test ! -f daemonshogi.po \ || ( rm -f ./daemonshogi.pot \ && mv daemonshogi.po ./daemonshogi.pot ) file=./`echo ja | sed 's,.*/,,'`.gmo \ && rm -f $file && PATH=../src:$PATH /usr/bin/msgfmt -o $file ja.po /usr/bin/xgettext: Non-ASCII string at src/canvas.c:1564. Please specify the source encoding through --from-code. /usr/bin/msgfmt: ja.po: warning: Charset "CHARSET" is not a portable encoding name. Message conversion to user's charset might not work. mv: cannot stat `daemonshogi.po': No such file or directory make[2]: *** [daemonshogi.pot] Error 1 make[2]: Leaving directory `/var/tmp/portage/daemonshogi-0.1.3/work/daemonshogi-0.1.3/po' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/daemonshogi-0.1.3/work/daemonshogi-0.1.3' make: *** [all-recursive-am] Error 2 !!! ERROR: games-board/daemonshogi-0.1.3 failed. !!! Function src_compile, Line 21, Exitcode 2 !!! (no error message)
Created attachment 20661 [details, diff] Patch to add "--from-code euc-jp" to Makefile.in.in
Interesting. What version of gettext do you have installed? It merges fine for me with gettext-0.11.5-r1 with USE=nls.
When I add your patch the merge fails with /usr/bin/xgettext: unrecognized option `--from-code' so some other work around is going to have to be done.
I have gettext-0.12.1. Hmm. I didn't test it with prior versions. msgfmt complains about CHARSET being an unrecognized character set in the line: "Content-Type: text/plain; charset=CHARSET\n" from ja.po. I don't know much about how i18n works with apps programming so I just fixed the error being reported to me. Maybe fixing the above will help?
Try the latest version in portage. I did a little sed work on the .po file and maybe gettext-12 will like it better.
I got almost exactly the same as before. The only difference is that the lines relating to the CHARSET are missing: make[2]: Entering directory `/var/tmp/portage/daemonshogi-0.1.3/work/daemonshogi-0.1.3/po' PATH=../src:$PATH /usr/bin/xgettext --default-domain=daemonshogi --directory=.. \ --add-comments --keyword=_ --keyword=N_ \ --files-from=./POTFILES.in \ && test ! -f daemonshogi.po \ || ( rm -f ./daemonshogi.pot \ && mv daemonshogi.po ./daemonshogi.pot ) file=./`echo ja | sed 's,.*/,,'`.gmo \ && rm -f $file && PATH=../src:$PATH /usr/bin/msgfmt -o $file ja.po /usr/bin/xgettext: Non-ASCII string at src/canvas.c:1564. Please specify the source encoding through --from-code. mv: cannot stat `daemonshogi.po': No such file or directory make[2]: *** [daemonshogi.pot] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory `/var/tmp/portage/daemonshogi-0.1.3/work/daemonshogi-0.1.3/po' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/daemonshogi-0.1.3/work/daemonshogi-0.1.3' make: *** [all-recursive-am] Error 2 !!! ERROR: games-board/daemonshogi-0.1.3 failed. !!! Function src_compile, Line 34, Exitcode 2 !!! emake failed Any way to put an "if then else" into a Makefile.in.in?
Can I get some help from the cjk crowd please? I'm not too familiar with the gettext stuff and I'm looking for solution that works with both gettext 11 and 12 without having to do silly thing in the ebuild. Thanks.
I can emerge it without problems with gettext-0.11.5-r1 here too. I'll try gettext-0.12.1 later but as at least it seems the included po file is CHARSET=ISO-2022-JP and ENCODING=7bit (while you sed it to CHARSET=EUC-JP and ENCODING=8bit in daemonshogi-0.1.3.ebuild).
Well, I'm not 100% kuwashiku (familiar) with encodings. What I did was load a file with Japanese text into kwrite and changed the encoding until I could read the Japanese text. Then I put the working encoding (euc-jp) in the ebuild with the parameter that was asked for in the error message. I've got it installed now so personally I'm not too worried. It's much better than xshogi, though, so I'd just like other people that are running ~arch to be able to play it as well...
Created attachment 20788 [details, diff] a patch for daemonshogi-0.1.3.ebuild
Oh, I'm sorry. I misunderstood po file's encoding (--JE: in Emacs modeline indicates "iso-2022-jp" for terminal and "EUC-JP" for buffer... I thought the other way because I set my rxvt to EUC-JP, but the fact is rxvt can display iso-2022-jp encoding even though its terminal coding is set to EUC-JP). I made a patch to emerge daemonshogi cleanly with gettext-0.12.1. It merges well on my box with sys-devel/gettext-0.12.1. I used to play shogi when I went to highschool (I wasn't so strong that I was able to become a professional shogi player, but I wished I could ;p) and it reminds me of my youth. The program is not so wise but enough playing ;-) Enjoy!
Great, thanks for the patch. I've fixed the ebuild and it should work for everyone now.