Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 145252 - app-i18n/fcitx-3.4 (version bump)
Summary: app-i18n/fcitx-3.4 (version bump)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement
Assignee: CJK Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-27 05:51 UTC by Hauser Wong
Modified: 2006-11-05 17:38 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hauser Wong 2006-08-27 05:51:30 UTC
Fcitx ebuild has not been updated for quite a while. The the stable version is 3.3. I have tried the following ebuild, which is essentially the same as fcitx-3.1.1.ebuild:

# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-i18n/fcitx/fcitx-3.1.1.ebuild,v 1.5 2006/02/21 20:27:41 liquidx Exp $

DESCRIPTION="Free Chinese Input Toy for X. Another Chinese XIM Input Method"
HOMEPAGE="http://www.fcitx.org/"
# The HOMEPAGE and SRC_URI cannot be accessed from outside China :-(
SRC_URI="http://www.fcitx.org/download/${P}.tar.bz2"
#SRC_URI="http://bsdchat.com/dist/dryice/${P}.tar.bz2"
RESTRICT="nomirror"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~ppc x86"
IUSE="truetype"

RDEPEND="|| ( ( x11-libs/libX11 x11-libs/libXrender x11-libs/libXt )
                     virtual/x11 )
        truetype? ( || ( x11-libs/libXft virtual/xft ) )"

DEPEND="${RDEPEND}"
src_compile() {
        myconf=
        if use truetype ; then
                myconf=" --with-xft "
        else
                myconf=" --disable-xft "
        fi
        econf ${myconf} || die "configure failed"
        emake || die "make failed"
}

src_install()
{
        dobin src/fcitx
        insinto /usr/share/fcitx/data
        doins data/*.mb
        doins data/*.dat
        doins data/*.conf
        insinto /usr/share/fcitx/xpm
        doins xpm/*.xpm
        insinto /usr/share/fcitx/doc
        doins doc/*.txt
        doins doc/*.htm
}

pkg_postinst()
{
        einfo "You should export the following variables to use fcitx"
        einfo " export XMODIFIERS=\"@im=fcitx\""
        einfo " export XIM=fcitx"
        einfo " export XIM_PROGRAM=fcitx"
        einfo ""
        einfo "If you want to use WuBi or ErBi"
        einfo " cp /usr/share/fcitx/data/wbx.mb ~/.fcitx"
        einfo " cp /usr/share/fcitx/data/erbi.mb ~/.fcitx"
        einfo " cp /usr/share/fcitx/data/tables.conf ~/.fcitx"
        einfo ""
        einfo "Note that fcitx only works in the zh_CN locale."
}
Comment 1 Hauser Wong 2006-08-27 06:17:51 UTC
Fcitx works in all zh_CN.* locales. It also works in the en_US.utf8 locale, but you need to edit /etc/gtk-2.0/gtk.immodules. Find the following lines:

"/usr/lib/gtk-2.0/2.4.0/immodules/im-xim.so"
"xim" "X Input Method" "gtk20" "/usr/share/locale" "ko:ja:th:zh"

Change the 2nd one to:

"xim" "X Input Method" "gtk20" "/usr/share/locale" "en:ko:ja:th:zh"
Comment 2 Hauser Wong 2006-08-30 08:36:23 UTC
Since every time I tried to create a new attachment I got an Internal Error message, I just post the updated ebuild here:

# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-i18n/fcitx/fcitx-3.3.ebuild,v 1.5 2006/08/30 Exp $

DESCRIPTION="Free Chinese Input Toy for X. Another Chinese XIM Input Method"
HOMEPAGE="http://www.fcitx.org/"
# The HOMEPAGE and SRC_URI cannot be accessed from outside China :-(
SRC_URI="http://www.fcitx.org/download/${P}.tar.bz2"
#SRC_URI="http://bsdchat.com/dist/dryice/${P}.tar.bz2"
RESTRICT="nomirror"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~ppc x86"
IUSE="truetype"

RDEPEND="|| ( ( x11-libs/libX11 x11-libs/libXrender x11-libs/libXt )
                     virtual/x11 )
        truetype? ( || ( x11-libs/libXft virtual/xft ) )"

DEPEND="${RDEPEND}"
src_compile() {
        myconf=
        if use truetype ; then
                myconf=" --with-xft "
        else
                myconf=" --disable-xft "
        fi
        econf ${myconf} || die "configure failed"
        emake || die "make failed"
}

src_install()
{
        dobin src/fcitx
        insinto /usr/share/fcitx/data
        doins data/*.mb
        doins data/*.dat
        doins data/*.conf
        insinto /usr/share/fcitx/xpm
        doins xpm/*.xpm
        insinto /usr/share/fcitx/doc
        doins doc/*.txt
        doins doc/*.htm
}

pkg_postinst()
{
        einfo "You should export the following variables to use fcitx"
        einfo " export XMODIFIERS=\"@im=fcitx\""
        einfo " export XIM=fcitx"
        einfo " export XIM_PROGRAM=fcitx"
        einfo ""
        einfo "While fcitx works in the zh_CN locales, some people may want to use it in the"
        einfo "en_US.utf8 locale. For this, you need to edit /etc/gtk-2.0/gtk.immodules, find"
        einfo "the following line:"
        einfo ""
        einfo " \"xim\" \"X Input Method\" \"gtk20\" \"/usr/share/locale\" \"ko:ja:th:zh\""
        einfo ""
        einfo "change it to:"
        einfo ""
        einfo " \"xim\" \"X Input Method\" \"gtk20\" \"/usr/share/locale\" \"en:ko:ja:th:zh\""
        einfo ""
}
Comment 3 Hauser Wong 2006-08-30 10:48:00 UTC
There're some problems with the above ebuilds: some files won't be installed properly. The following one should work ok:

# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-i18n/fcitx/fcitx-3.3.ebuild,v 1.5 2006/08/30 Exp $

DESCRIPTION="Free Chinese Input Toy for X. Another Chinese XIM Input Method"
HOMEPAGE="http://www.fcitx.org/"
# The HOMEPAGE and SRC_URI cannot be accessed from outside China :-(
SRC_URI="http://www.fcitx.org/download/${P}.tar.bz2"
#SRC_URI="http://bsdchat.com/dist/dryice/${P}.tar.bz2"
RESTRICT="nomirror"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~ppc x86"
IUSE="truetype"

RDEPEND="|| ( ( x11-libs/libX11 x11-libs/libXrender x11-libs/libXt )
                     virtual/x11 )
        truetype? ( || ( x11-libs/libXft virtual/xft ) )"

DEPEND="${RDEPEND}"
src_compile() {
        myconf=
        if use truetype ; then
                myconf=" --with-xft "
        else
                myconf=" --disable-xft "
        fi
        econf ${myconf} || die "configure failed"
        emake || die "make failed"
}

src_install()
{
        dobin src/fcitx
        dobin tools/mb2txt
        dobin tools/txt2mb
        dobin tools/createPYMB
        dobin tools/jd2fcitx
        dobin tools/pyjj2fcitx
        dobin tools/win2fcitx
        dobin tools/readPYMB
        dobin tools/readPYBase
        dobin tools/mb2org
        insinto /usr/share/fcitx/data
        doins data/*.mb
        doins data/*.dat
        doins data/*.conf
        doins data/*.tab
        insinto /usr/share/fcitx/xpm
        doins xpm/*.xpm
        insinto /usr/share/fcitx/doc
        doins doc/*.txt
        doins doc/*.htm
        doins doc/*.pdf
}

pkg_postinst()
{
        einfo ""
        einfo "You should export the following variables to use fcitx"
        einfo " export XMODIFIERS=\"@im=fcitx\""
        einfo " export XIM=fcitx"
        einfo " export XIM_PROGRAM=fcitx"
        einfo ""
        einfo "While fcitx works in the zh_CN locales, some people may want to use it in the"
        einfo "en_US.utf8 locale. For this, you need to edit /etc/gtk-2.0/gtk.immodules, find"
        einfo "the following line:"
        einfo ""
        einfo " \"xim\" \"X Input Method\" \"gtk20\" \"/usr/share/locale\" \"ko:ja:th:zh\""
        einfo ""
        einfo "change it to:"
        einfo ""
        einfo " \"xim\" \"X Input Method\" \"gtk20\" \"/usr/share/locale\" \"en:ko:ja:th:zh\""
        einfo ""
}
Comment 4 Alastair Tse (RETIRED) gentoo-dev 2006-09-02 03:51:06 UTC
can you please attach the ebuild as an attachment rather than putting it inline in the comment? thanks! it will help us test the ebuild easier.
Comment 5 Yuan MEI 2006-10-02 23:25:33 UTC
It has been over one month, why this ebuild is still out of the main tree?

fcitx 3.3 actually has a very useful new feature---the triditional chinese input,
so please embrace this new one.

(In reply to comment #3)
> There're some problems with the above ebuilds: some files won't be installed
> properly. The following one should work ok:
> 
> # Copyright 1999-2006 Gentoo Foundation
> # Distributed under the terms of the GNU General Public License v2
> # $Header: /var/cvsroot/gentoo-x86/app-i18n/fcitx/fcitx-3.3.ebuild,v 1.5
> 2006/08/30 Exp $
> 
> DESCRIPTION="Free Chinese Input Toy for X. Another Chinese XIM Input Method"
> HOMEPAGE="http://www.fcitx.org/"
> # The HOMEPAGE and SRC_URI cannot be accessed from outside China :-(
> SRC_URI="http://www.fcitx.org/download/${P}.tar.bz2"
> #SRC_URI="http://bsdchat.com/dist/dryice/${P}.tar.bz2"
> RESTRICT="nomirror"
> 
> LICENSE="GPL-2"
> SLOT="0"
> KEYWORDS="~ppc x86"
> IUSE="truetype"
> 
> RDEPEND="|| ( ( x11-libs/libX11 x11-libs/libXrender x11-libs/libXt )
>                      virtual/x11 )
>         truetype? ( || ( x11-libs/libXft virtual/xft ) )"
> 
> DEPEND="${RDEPEND}"
> src_compile() {
>         myconf=
>         if use truetype ; then
>                 myconf=" --with-xft "
>         else
>                 myconf=" --disable-xft "
>         fi
>         econf ${myconf} || die "configure failed"
>         emake || die "make failed"
> }
> 
> src_install()
> {
>         dobin src/fcitx
>         dobin tools/mb2txt
>         dobin tools/txt2mb
>         dobin tools/createPYMB
>         dobin tools/jd2fcitx
>         dobin tools/pyjj2fcitx
>         dobin tools/win2fcitx
>         dobin tools/readPYMB
>         dobin tools/readPYBase
>         dobin tools/mb2org
>         insinto /usr/share/fcitx/data
>         doins data/*.mb
>         doins data/*.dat
>         doins data/*.conf
>         doins data/*.tab
>         insinto /usr/share/fcitx/xpm
>         doins xpm/*.xpm
>         insinto /usr/share/fcitx/doc
>         doins doc/*.txt
>         doins doc/*.htm
>         doins doc/*.pdf
> }
> 
> pkg_postinst()
> {
>         einfo ""
>         einfo "You should export the following variables to use fcitx"
>         einfo " export XMODIFIERS=\"@im=fcitx\""
>         einfo " export XIM=fcitx"
>         einfo " export XIM_PROGRAM=fcitx"
>         einfo ""
>         einfo "While fcitx works in the zh_CN locales, some people may want to
> use it in the"
>         einfo "en_US.utf8 locale. For this, you need to edit
> /etc/gtk-2.0/gtk.immodules, find"
>         einfo "the following line:"
>         einfo ""
>         einfo " \"xim\" \"X Input Method\" \"gtk20\" \"/usr/share/locale\"
> \"ko:ja:th:zh\""
>         einfo ""
>         einfo "change it to:"
>         einfo ""
>         einfo " \"xim\" \"X Input Method\" \"gtk20\" \"/usr/share/locale\"
> \"en:ko:ja:th:zh\""
>         einfo ""
> }
> 

Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-10-21 03:23:16 UTC
It would be simpler if you attached the file rather than pasting it in the comment, as it makes almost impossible to get it preserving whitespaces (and bugzilla comments usually screw up long lines too).
Comment 7 Mamoru KOMACHI (RETIRED) gentoo-dev 2006-11-05 09:57:08 UTC
Matsuu put fcitx-3.4 to the tree now. (It looks he just copied existing ebuild to make a new one) Does this suffice?
Comment 8 MATSUU Takuto (RETIRED) gentoo-dev 2006-11-05 17:38:59 UTC
in cvs fcitx-3.4