mirror of
https://github.com/gentoo-mirror/gentoo-zh.git
synced 2025-04-17 23:18:49 -04:00
net-im/wechat: covering up for the authorities
handling input method, resolution, and wayland issues Signed-off-by: Leo Douglas <douglarek@gmail.com>
This commit is contained in:
parent
8771978a26
commit
7b083fdd82
@ -5,4 +5,8 @@
|
||||
<email>douglarek@gmail.com</email>
|
||||
<name>Leo Douglas</name>
|
||||
</maintainer>
|
||||
<use>
|
||||
<flag name="fcitx">Enable support for <pkg>app-i18n/fcitx</pkg></flag>
|
||||
<flag name="ibus">Enable support for <pkg>app-i18n/ibus</pkg></flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
|
@ -14,6 +14,8 @@ LICENSE="all-rights-reserved"
|
||||
|
||||
SLOT="0"
|
||||
KEYWORDS="-* ~amd64"
|
||||
IUSE="+fcitx ibus"
|
||||
REQUIRED_USE="^^ ( fcitx ibus )"
|
||||
|
||||
RESTRICT="strip mirror bindist"
|
||||
BDEPEND="
|
||||
@ -57,9 +59,17 @@ src_prepare() {
|
||||
|
||||
find "${S}/opt/wechat/vlc_plugins" -type f | xargs -I {} patchelf --set-rpath '$ORIGIN:$ORIGIN/../..' {} || die
|
||||
|
||||
local env_vars="QT_AUTO_SCREEN_SCALE_FACTOR=1 \"QT_QPA_PLATFORM=wayland;xcb\""
|
||||
if use fcitx; then
|
||||
env_vars="QT_IM_MODULE=fcitx ${env_vars}"
|
||||
elif use ibus; then
|
||||
env_vars="QT_IM_MODULE=ibus ${env_vars}"
|
||||
fi
|
||||
|
||||
sed -i \
|
||||
-e "s|^Icon=.*|Icon=wechat|" \
|
||||
-e "s|^Categories=.*|Categories=Network;InstantMessaging;Chat;|" \
|
||||
-e "/^Exec=/s|Exec=|Exec=env ${env_vars} |" \
|
||||
"${S}/usr/share/applications/wechat.desktop" || die
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user