From 5ea84db82149b4303f1281e175d8c7ae9fde517d Mon Sep 17 00:00:00 2001 From: Leo Douglas Date: Thu, 26 Dec 2024 13:26:50 +0800 Subject: [PATCH] net-im/wechat: add 4.0.1.11-r1, drop 4.0.1.11 1. remove unnecessary patchelf files and add them as needed through QA scanelf; 2. no need to doins & fperms, use cp -r instead; 3. use bash list instead of string concatenation Signed-off-by: Leo Douglas --- ...t-4.0.1.11.ebuild => wechat-4.0.1.11-r1.ebuild} | 42 +++++++++------------- 1 file changed, 17 insertions(+), 25 deletions(-) rename net-im/wechat/{wechat-4.0.1.11.ebuild => wechat-4.0.1.11-r1.ebuild} (63%) diff --git a/net-im/wechat/wechat-4.0.1.11.ebuild b/net-im/wechat/wechat-4.0.1.11-r1.ebuild similarity index 63% rename from net-im/wechat/wechat-4.0.1.11.ebuild rename to net-im/wechat/wechat-4.0.1.11-r1.ebuild index b9d8de9c9..3da99487f 100644 --- a/net-im/wechat/wechat-4.0.1.11.ebuild +++ b/net-im/wechat/wechat-4.0.1.11-r1.ebuild @@ -47,6 +47,7 @@ QA_PREBUILT="*" src_prepare() { default + # add any QA scanelf alert files here. local so_files=( "RadiumWMPF/runtime/libilink2.so" "RadiumWMPF/runtime/libilink_network.so" @@ -55,43 +56,34 @@ src_prepare() { "libconfService.so" "libvoipChannel.so" "libvoipCodec.so" - "libwxtrans.so" ) for file in "${so_files[@]}"; do - patchelf --set-rpath '$ORIGIN' "${S}/opt/wechat/${file}" || die + patchelf --set-rpath '$ORIGIN' "opt/wechat/${file}" || die done +} + +src_install() { + dodir /opt/wechat + cp -r opt/wechat/. "${D}/opt/wechat/" || die - find "${S}/opt/wechat/vlc_plugins" -type f | xargs -I {} patchelf --set-rpath '$ORIGIN:$ORIGIN/../..' {} || die + dosym ../wechat/wechat /opt/bin/wechat - local env_vars="QT_AUTO_SCREEN_SCALE_FACTOR=1 \"QT_QPA_PLATFORM=wayland;xcb\"" + local exec_envs=( "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}" + exec_envs+=( "QT_IM_MODULE=fcitx" ) + fi + if use ibus; then + exec_envs+=( "QT_IM_MODULE=ibus" ) 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 -} + -e "s|^Exec=.*|Exec=env ${exec_envs[*]} wechat %U|" \ + usr/share/applications/wechat.desktop || die + domenu usr/share/applications/wechat.desktop -src_install() { insinto /usr/share - doins -r "${S}/usr/share/icons" - - insinto /opt - doins -r "${S}/opt/wechat" - - fperms 755 /opt/wechat/crashpad_handler - fperms 755 /opt/wechat/RadiumWMPF/runtime/WeChatAppEx - fperms 755 /opt/wechat/RadiumWMPF/runtime/WeChatAppEx_crashpad_handler - fperms 755 /opt/wechat/wechat - fperms 755 /opt/wechat/wxocr - fperms 755 /opt/wechat/wxplayer - - dosym -r /opt/wechat/wechat /usr/bin/wechat - domenu "${S}/usr/share/applications/wechat.desktop" + doins -r usr/share/icons } -- 2.11.4.GIT