设为首页
收藏本站
用户名
Email
自动登录
找回密码
密码
登录
注册
快捷导航
平台
Portal
论坛
BBS
文库
项目
群组
Group
我的博客
Space
搜索
搜索
热搜:
shell
linux
mysql
本版
用户
LinuxSir.cn,穿越时空的Linuxsir!
»
论坛
›
Linux 发行版讨论区 —— LinuxSir.cn
›
Gentoo Linux
›
ibus-9999 ebuild for gnome-shell
返回列表
查看:
813
|
回复:
4
ibus-9999 ebuild for gnome-shell
[复制链接]
LiYanrui
LiYanrui
当前离线
积分
340
IP卡
狗仔卡
发表于 2011-4-10 13:12:35
|
显示全部楼层
|
阅读模式
由于 gnome shell 的底栏是隐藏的,不适合放置 ibus 的图标,因此便出现了一个可以将 ibus 图标放置于 gnome shell 顶栏的 patch,详见:
http://desktopi18n.wordpress.com ... hell-for-gnome-3-0/
github 上有一个 ibus 的 fork 版本,打上了那个补丁,见
http://github.com/fujiwarat/ibus
我将 gentoo-china overlay 里的 ibus-9999.ebuild 修改了一下,现在可以装上那个打了补丁的 ibus,并开启了 gtk 3.0 的 im 支持。有需要的可以尝试一下,不过我只能保证这个 ebuild 可以在我的机器上工作
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI="2"
PYTHON_DEPEND="python? 2:2.7"
inherit eutils gnome2-utils multilib python git autotools
EGIT_REPO_URI="git://github.com/fujiwarat/${PN}.git"
DESCRIPTION="Intelligent Input Bus for Linux / Unix OS"
HOMEPAGE="http://code.google.com/p/ibus/"
SRC_URI=""
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS=""
IUSE="doc nls gtk +gconf +python vala"
RDEPEND=">=dev-libs/glib-2.18
gconf? ( >=gnome-base/gconf-2.12.0 )
>=gnome-base/librsvg-2
app-text/iso-codes
dev-libs/dbus-glib
gtk? (
x11-libs/libX11
x11-libs/gtk+:2
x11-libs/gtk+:3
)
python? (
dev-python/notify-python
>=dev-python/dbus-python-0.83
)
nls? ( virtual/libintl )
vala? ( dev-lang/vala )"
DEPEND="${RDEPEND}
>=dev-lang/perl-5.8.1
dev-perl/XML-Parser
dev-util/pkgconfig
>=dev-util/gtk-doc-1.9
dev-vcs/cvs
>=dev-libs/gobject-introspection-0.6.8
nls? ( >=sys-devel/gettext-0.16.1 )"
RDEPEND="${RDEPEND}
python? (
dev-python/pygtk
dev-python/pyxdg
)"
RESTRICT="test"
pkg_setup() {
python_set_active_version 2
}
src_prepare() {
echo "AM_GNU_GETTEXT_VERSION(0.16.1)" >> "${S}"/configure.ac
autopoint || die "autopoint failed"
intltoolize --copy --force || die "intltoolize failed"
gtkdocize --copy || die "gtkdocize failed"
eautoreconf
}
src_configure() {
econf \
$(use_enable doc gtk-doc) \
$(use_enable nls) \
$(use_enable gconf) \
$(use_enable gtk gtk2) \
$(use_enable gtk gtk3) \
$(use_enable gtk xim) \
$(use_enable nls) \
$(use_enable python) \
$(use_enable vala) || die
}
src_install() {
emake DESTDIR="${D}" install || die
# bug 289547
keepdir /usr/share/ibus/{engine,icons}
dodoc AUTHORS NEWS README
rmdir "${S}"/usr/share/ibus/engine
}
update_gtk_immodules() {
if [ -x /usr/bin/gtk-query-immodules-2.0 ] ; then
GTK2_CONFDIR="/etc/gtk-2.0"
# An arch specific config directory is used on multilib systems
has_multilib_profile && GTK2_CONFDIR="${GTK2_CONFDIR}/${CHOST}"
mkdir -p "${ROOT}${GTK2_CONFDIR}"
gtk-query-immodules-2.0 > "${ROOT}${GTK2_CONFDIR}/gtk.immodules"
fi
if [ -x /usr/bin/gtk-query-immodules-3.0 ] ; then
GTK3_CONFDIR="/etc/gtk-3.0"
# An arch specific config directory is used on multilib systems
has_multilib_profile && GTK3_CONFDIR="${GTK3_CONFDIR}/${CHOST}"
mkdir -p "${ROOT}${GTK3_CONFDIR}"
gtk-query-immodules-3.0 > "${ROOT}${GTK3_CONFDIR}/gtk.immodules"
fi
}
pkg_postinst() {
ewarn "This package is very experimental, please report your bugs to"
ewarn "http://ibus.googlecode.com/issues/list"
elog "1. Setup ibus:"
elog
elog " $ ibus-setup"
elog
elog "2. Set the following in your user startup scripts"
elog " such as .xinitrc, .xsession or .xprofile:"
elog
elog " export XMODIFIERS="@im=ibus""
elog " export GTK_IM_MODULE="ibus""
elog " export QT_IM_MODULE="xim""
elog "3. ibus-daemon -d -x"
use gtk && update_gtk_immodules
use python && python_mod_optimize /usr/share/${PN} "$(python_get_sitedir)"/${PN}
gnome2_icon_cache_update
}
pkg_postrm() {
use gtk && update_gtk_immodules
use python && python_mod_cleanup /usr/share/${PN} "$(python_get_sitedir)"/${PN}
gnome2_icon_cache_update
}
复制代码
本帖子中包含更多资源
您需要
登录
才可以下载或查看,没有帐号?
注册
x
回复
使用道具
举报
提升卡
置顶卡
沉默卡
喧嚣卡
变色卡
显身卡
hezhit
hezhit
当前离线
积分
94
IP卡
狗仔卡
发表于 2011-4-10 14:55:36
|
显示全部楼层
update gtk modules 不太对,我也写了一个。
http://pastebin.com/vgdRj7xb
添加gentoo-china overlay后,最简单不用自制 ebuild 的方法是用 portage 的 ECONF_EXTRA 变量,再手动更新 gtk3 的im模块信息,参考:
# layman -a gentoo-china
# autounmask app-i18n/ibus-9999
# ECONF_EXTRA="--enable-gtk3" emerge -av1 ibus
# gtk-query-immodules-3.0 --update-cache
回复
支持
反对
使用道具
举报
显身卡
LiYanrui
LiYanrui
当前离线
积分
340
IP卡
狗仔卡
楼主
|
发表于 2011-4-10 15:12:31
|
显示全部楼层
嗯,换成了你那个,tks。
回复
支持
反对
使用道具
举报
显身卡
hezhit
hezhit
当前离线
积分
94
IP卡
狗仔卡
发表于 2011-4-10 15:19:49
|
显示全部楼层
Post by
LiYanrui;2134383
嗯,换成了你那个,tks。
奇怪的是我直接用官方源编译(看pastebin的ebuild),没打什么补丁,而图标也在右上方。。
回复
支持
反对
使用道具
举报
显身卡
LiYanrui
LiYanrui
当前离线
积分
340
IP卡
狗仔卡
楼主
|
发表于 2011-4-10 15:41:01
|
显示全部楼层
昨天用 ibus 官方 git 仓库代码编译还没有。今天上午试了那个 fork 版本才出现。可能现在 ibus git 仓库已经合并了 gjs 代码。
回复
支持
反对
使用道具
举报
显身卡
返回列表
高级模式
B
Color
Image
Link
Quote
Code
Smilies
您需要登录后才可以回帖
登录
|
注册
本版积分规则
发表回复
回帖后跳转到最后一页
Copyright © 2002-2023
LinuxSir.cn
(http://www.linuxsir.cn/) 版权所有 All Rights Reserved.
Powered by
RedflagLinux!
技术支持:
中科红旗
|
京ICP备19024520号
快速回复
返回顶部
返回列表