glfs/general/genutils/ibus.xml
Xi Ruoyao 9e9d5ac509
ibus: Remove overridden "-u" switch
"-u" means "only update the file if the zip archive contains the file
with the same name and newer timestamp", but "-o" means "always update
it regardless the timestamp".  So "-u" has no effect with "-o" and it
should be removed.
2024-01-21 16:34:01 +08:00

383 lines
12 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY ibus-download-http "https://github.com/ibus/ibus/archive/refs/tags/&ibus-version;/ibus-&ibus-version;.tar.gz">
<!ENTITY ibus-download-ftp " ">
<!ENTITY ibus-md5sum "2e29a7fb0f8c5ffcf42462fda45348fd">
<!ENTITY ibus-size "1.4 MB">
<!ENTITY ibus-buildsize "54 MB (add 3 MB for tests)">
<!ENTITY ibus-time "0.3 SBU (Using parallelism=4; add 0.6 SBU for tests)">
<!-- Since UCD.zip can be used by gucharmap too, let's use the same version:
This prevents version mismatches, since UCD.zip filename is not versioned.
-->
<!ENTITY ucd-download-http "https://www.unicode.org/Public/zipped/&gucharmap-major-version;.0/UCD.zip">
]>
<sect1 id="ibus" xreflabel="ibus-&ibus-version;">
<?dbhtml filename="ibus.html"?>
<title>ibus-&ibus-version;</title>
<indexterm zone="ibus">
<primary sortas="a-ibus">ibus</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to ibus</title>
<para>
<application>ibus</application> is an Intelligent Input Bus. It is a new
input framework for the Linux OS. It provides a fully featured and user
friendly input method user interface.
</para>
&lfs120_checked;
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Download (HTTP): <ulink url="&ibus-download-http;"/>
</para>
</listitem>
<listitem>
<para>
Download (FTP): <ulink url="&ibus-download-ftp;"/>
</para>
</listitem>
<listitem>
<para>
Download MD5 sum: &ibus-md5sum;
</para>
</listitem>
<listitem>
<para>
Download size: &ibus-size;
</para>
</listitem>
<listitem>
<para>
Estimated disk space required: &ibus-buildsize;
</para>
</listitem>
<listitem>
<para>
Estimated build time: &ibus-time;
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Unicode Character Database:
<ulink url="&ucd-download-http;"> &ucd-download-http;</ulink>
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">ibus Dependencies</bridgehead>
<bridgehead renderas="sect4">Required</bridgehead>
<para role="required">
<xref linkend="dconf"/>,
<!-- needed since we're using autogen.sh -->
<xref linkend="iso-codes"/>, and
<xref linkend="vala"/>
</para>
<bridgehead renderas="sect4">Recommended</bridgehead>
<para role="recommended">
<xref linkend="gobject-introspection"/>,
<xref linkend="gtk3"/>, and
<xref linkend="libnotify"/>
</para>
<bridgehead renderas="sect4">Optional</bridgehead>
<para role="optional">
<xref linkend="gtk4"/> (to build IM module for it),
<xref linkend="gtk-doc"/> (for generating API documentation),
<xref linkend="dbus-python"/> and
<xref linkend="pygobject3"/> (both to build the Python support library),
<!--<xref linkend="pyxdg" role="runtime"/>
(runtime, for the <command>ibus-setup</command>), and
NOTE: The reference to the 'xdg' python module is commented out in the source -->
<xref linkend="libxkbcommon"/>,
<xref linkend="wayland"/> (both to build the Wayland support programs),
<ulink url="https://www.joypixels.com/">EmojiOne</ulink>, and
<ulink url="https://github.com/AyatanaIndicators/libdbusmenu">libdbusmenu</ulink>
</para>
</sect2>
<sect2 role="installation">
<title>Installation of ibus</title>
<!--
<para>
If the optional Unicode Character Database was downloaded, install it
now as the <systemitem class="username">root</systemitem> user:
</para>
-->
<para>
First, install the Unicode Character Database as the &root; user:
</para>
<screen role="root"><userinput>mkdir -p /usr/share/unicode/ucd &amp;&amp;
unzip -o ../UCD.zip -d /usr/share/unicode/ucd</userinput></screen>
<!--
<note>
<para>
Be sure to also remove the - -disable-unicode-dict in
the configure step below.
</para>
</note>
-->
<para>
Fix an issue with deprecated schema entries:
</para>
<screen><userinput>sed -e 's@/desktop/ibus@/org/freedesktop/ibus@g' \
-i data/dconf/org.freedesktop.ibus.gschema.xml</userinput></screen>
<para>
If <xref linkend='gtk-doc'/> is not installed, remove the references
to it:
</para>
<screen><userinput>if ! [ -e /usr/bin/gtkdocize ]; then
sed '/docs/d;/GTK_DOC/d' -i Makefile.am configure.ac
fi</userinput></screen>
<para>
Install <application>ibus</application> by running the following
commands:
</para>
<screen revision='sysv'><userinput>SAVE_DIST_FILES=1 NOCONFIGURE=1 ./autogen.sh &amp;&amp;
PYTHON=python3 \
./configure --prefix=/usr \
--sysconfdir=/etc \
--disable-python2 \
--disable-appindicator \
--disable-emoji-dict \
--disable-gtk2 \
--disable-systemd-services &amp;&amp;
make</userinput></screen>
<screen revision='systemd'><userinput>SAVE_DIST_FILES=1 NOCONFIGURE=1 ./autogen.sh &amp;&amp;
PYTHON=python3 \
./configure --prefix=/usr \
--sysconfdir=/etc \
--disable-python2 \
--disable-appindicator \
--disable-gtk2 \
--disable-emoji-dict &amp;&amp;
make</userinput></screen>
<para>
To test the results, issue: <command>make -k check</command>.
The test named ibus-compose fails because it uses some locales
not installed in LFS.
<!-- The log says "No idea to simulate key events in Wayland"
in a Mutter wayland session. DO NOT REMOVE UNLESS TESTED
IN WAYLAND. -->
The test named ibus-keypress will fail if running in a Wayland
session.
</para>
<para>
Now, as the &root; user:
</para>
<screen role="root"><userinput>make install</userinput></screen>
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
<para>
<parameter>--disable-appindicator</parameter>: This switch disables
use of libdbusmenu. Omit if you installed the optional dependency.
</para>
<para>
<parameter>--disable-emoji-dict</parameter>: This switch disables the
use of emoticon dictionaries. Omit if you installed the optional
package.
</para>
<para>
<parameter>--disable-gtk2</parameter>: This switch removes the dependency
on <application>GTK+-2</application>.
</para>
<para>
<option>--enable-gtk4</option>: This switch enables building
the <application>GTK 4</application> immodule. Use it if
you have installed <application>GTK 4</application>.
</para>
<para>
<option>--enable-python-library</option>: This switch enables
building the <application>Python</application> support
library. Use it if you have installed the optional Python modules.
</para>
<para>
<option>--enable-wayland</option>: This switch enables building
the <application>Wayland</application> support programs.
It's automatically enabled if both <xref linkend='libxkbcommon'/> and
<xref linkend='wayland'/> are installed.
</para>
<para>
<envar>NOCONFIGURE=1</envar>: Prevent <command>autogen.sh</command>
from running the generated <command>configure</command> script. We'll
run the script manually instead of relying on
<command>autogen.sh</command> to run it, because
<command>autogen.sh</command> would set <option>-fsanitize=address
-fsanitize=leak</option> in <envar>CFLAGS</envar> running
<command>configure</command>, but those compiler options are not
suitable for productive use and they may also cause a build failure.
<!-- GCC security policy: "Libraries like libvtv and the sanitizers
are intended to be used in diagnostic cases and not intended for
use in sensitive environments." In my build it also causes
"compose/sequences-little-endian" bail out with a sanitizer
warning and the package to FTBFS. -->
</para>
<para>
<envar>PYTHON=python3</envar>: This environment variable makes
the <command>configure</command> script look for
<application>Python 3</application>. Use it if you want
to build the <application>Python 3</application> support
library.
</para>
<para>
<envar>SAVE_DIST_FILES=1</envar>: This environment variable makes
the <command>autogen.sh</command> script save some pre-generated
header files instead of overwriting them when it is run. This prevents
build failures when generating <filename>ibusemojigen.h</filename>.
<!-- This is needed because we do not have the Emoji dictionary.-->
</para>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="../../xincludes/gtk-doc-rebuild.xml"/>
<!--
<para>
<command>gzip -dfv ...</command>: Decompress installed man pages
in accordance with other man pages.
</para>
-->
</sect2>
<sect2 role="configuration">
<title>Configuring Ibus</title>
<para>
If GTK+-3 or GTK+-2 are installed and
<option>--disable-gtk{3,2}</option> are not used, the ibus IM module
for GTK+-3 or GTK+-2 will be installed. As the &root; user,
update a cache file of GTK+-3 or GTK+-2 so the GTK-based applications
can find the newly installed IM module and use ibus as an input
method:
</para>
<screen role='nodump'><userinput>gtk-query-immodules-3.0 --update-cache</userinput></screen>
<para>
The command above updates the cache file for GTK+-3. For GTK+-2,
use <command>gtk-query-immodules-2.0</command> instead of
<command>gtk-query-immodules-3.0</command>. GTK-4 does not require
a cache file for IM modules.
</para>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Library</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>
ibus,
ibus-daemon, and
ibus-setup
</seg>
<seg>
libibus-1.0.so and
im-ibus.so (<application>GTK+ Immodule</application>)
</seg>
<seg>
/etc/dconf/db/ibus.d,
/usr/include/ibus-1.0,
/usr/share/gtk-doc/html/ibus, and
/usr/share/ibus
</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="ibus-daemon">
<term><command>ibus-daemon</command></term>
<listitem>
<para>
is the Intelligent Input Bus Daemon
</para>
<indexterm zone="ibus ibus-daemon">
<primary sortas="b-ibus-daemon">ibus-daemon</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="ibus-setup">
<term><command>ibus-setup</command></term>
<listitem>
<para>
is the <application>GTK+</application> program used to configure
the <command>ibus-daemon</command>
</para>
<indexterm zone="ibus ibus-setup">
<primary sortas="b-ibus-setup">ibus-setup</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="libibus-1.0">
<term><filename class="libraryfile">libibus-1.0.so</filename></term>
<listitem>
<para>
contains the <application>ibus</application> API functions
</para>
<indexterm zone="ibus libibus-1.0">
<primary sortas="c-libibus-1.0">libibus-1.0.so</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>