Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 670248

Summary: media-libs/libsdl2: Support app-i18n/fcitx and app-i18n/ibus
Product: Gentoo Linux Reporter: Arfrever Frehtes Taifersar Arahesis <arfrever.fta>
Component: Current packagesAssignee: Gentoo Games <games>
Status: CONFIRMED ---    
Severity: normal CC: O01eg
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch

Description Arfrever Frehtes Taifersar Arahesis 2018-11-04 06:51:25 UTC
SDL 2 library contains support for Fcitx and IBus input method frameworks.
Ebuild currently unconditionally passes --disable-ibus option, but does not pass any Fcitx-related option, so support for Fcitx is automagic.

If Fcitx is installed, then:
...
checking for pkg-config... (cached) /usr/bin/pkg-config
checking dbus/dbus.h usability... yes
checking dbus/dbus.h presence... no
configure: WARNING: dbus/dbus.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: dbus/dbus.h: proceeding with the compiler's result
checking for dbus/dbus.h... yes
checking for pkg-config... (cached) /usr/bin/pkg-config
checking fcitx/frontend.h usability... yes
checking fcitx/frontend.h presence... yes
checking for fcitx/frontend.h... yes
...
SDL2 Configure Summary:
Building Shared Libraries
Enabled modules : atomic audio video render events joystick sensor power filesystem threads timers file loadso cpuinfo assembly
Assembly Math   : mmx sse sse2 sse3
Audio drivers   : disk dummy alsa
Video drivers   : dummy x11 kmsdrm opengl opengl_es2 vulkan wayland
X11 libraries   : xcursor xdbe xinput2 xinput2_multitouch xrandr xscrnsaver xshape xvidmode
Input drivers   : linuxev linuxkd
Using libsamplerate : YES
Using libudev       : YES
Using dbus          : YES
Using ime           : YES
Using ibus          : NO
Using fcitx         : YES
>>> Source configured.
...


In case of support for both Fcitx and IBus, SDL 2 library would use only their headers at build time.
There is no linking against Fcitx / IBus libraries.
At run time, communication with Fcitx / IBus occurs through DBus.
Support for Fcitx / IBus requires enabled support for DBus:
...
                elif test x$enable_dbus != xyes; then
                    AC_MSG_WARN([DBus support is required for IBus.])
                    have_ibus_ibus_h_hdr=no
...
                elif test x$enable_dbus != xyes; then
                    AC_MSG_WARN([DBus support is required for fcitx.])
                    have_fcitx_frontend_h_hdr=no
...


Headers of IBus use headers of GLib 2.
glibconfig.h header is ABI-specific, so GLib 2 for matching ABIs is required at build time.
Comment 1 Arfrever Frehtes Taifersar Arahesis 2018-11-04 06:55:25 UTC
Created attachment 554006 [details, diff]
Patch