net-im/wemeet: add 3.19.1.400

Also add loong support. It is not currently keyworded though, because
the Chromium sandbox of qtwebengine:5 is crashing right now on statx
calls, preventing successful login.

While at it, also streamline the unbundling process of libraries. It was
discovered that the bundled Qt has a different ABI than the system one,
even on amd64, so the bundled Qt is kept and the RDEPEND got overhauled
because of that.

Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
This commit is contained in:
WANG Xuerui 2024-04-07 18:19:16 +08:00 committed by 梁永祥
parent fccb5a5acc
commit 20dd7d5492
3 changed files with 178 additions and 0 deletions

View File

@ -2,3 +2,6 @@ DIST wemeet-3.15.1.403_amd64.deb 163623140 BLAKE2B f17be6d61aee7684a34e1fb7f0313
DIST wemeet-3.15.1.403_arm64.deb 148128724 BLAKE2B eadc4cc5e33abfd1b0c3b68a04a58df4d557a58dbc49f931906ac1804f90511efa96a0dd67f6be891fc3ab22417bc4844d16d8269e019f752713e6d7103ec708 SHA512 dd568e909de029be39148808a73301b22043ebd2332eb03935bec162b058ab7225318c9aea363ce14698f8e9ddc97ddae5166785369ead6257f57288a61abd75
DIST wemeet-3.19.0.401_amd64.deb 181147056 BLAKE2B 13064ff62464456f08807bd3353e3ede705db77c2e738e548543308c22a68ee1b091dac54acdfa18b7283537780a39cc2e1a8094caa4248a2393a3202534281f SHA512 2814febb1596cb8e6db75a7d71915771a9d6750cf162c3cb9b70379130da41d7fca7b3df1567a8de1d2967d97add4d2fc08764fbf4155a79852c75ea8fed754b
DIST wemeet-3.19.0.401_arm64.deb 164723116 BLAKE2B 0cf5f64a589b20e91e6875ef5e8520f0bcb8b2d05aced840dc7ca98819f4c9156200a70de75de124de0f978e2912e18e3a0197ec13b84a353a872d5246c9e6be SHA512 6099ec383e74dc776a9864743c9a2c624a5bea34e2ffb32b3fb57b66016a60dc1356ad3b58c6142ed2f3d9db83fc38ffd9c9661b282bf895e20d837277a07c76
DIST wemeet-3.19.1.400_amd64.deb 161153760 BLAKE2B 273a9154c16bc693c81eeb46a5fb3b684e97b5c5ed1f4e8764bc50003ac4f283c19481e4f00ec38b99cd2f2dd4596dc12fb04af38b6cd92e9ccea2df3eb9df56 SHA512 5b75fd92a9b3f477cebd791f43d2329e899befca790cc7f3c0970d7c07ad7390a835be91af710f19b5db5a65ab2763e51d1f4f36e222ce6889d7a68d64dce092
DIST wemeet-3.19.1.400_arm64.deb 145309964 BLAKE2B f073543b3c9ef27504a2ac27ae57839776371705fd9fa5bef4dd2688a0ddc32810af70d8289f2d3fea45acc845eab25fb1624d08458b9b3f5ba845568a3a0f8d SHA512 b37963ab911270a1630c1af5cda5a949f01f661f9b8133c3c5f6e241e7037ab7914b3ac69901b05d95edf742332d72494c3c211624622091460b3bbdcfb2b2f9
DIST wemeet-3.19.1.400_loongarch64.deb 136599460 BLAKE2B 8a7e82d857aca00fe04938912f513221dac6816213751563b78b80997721c8bd20520be782cf44f802818f6f3dc62de214887c2e73cecb748b509ae37f192350 SHA512 70c0ff0d4bed129cb1b825f17064e8740cdc87578e12d63e945552640d4837bc876da55be5cc0dfe94efe3c37d514ba6575edee42bffb94855a567e163d8428d

View File

@ -0,0 +1,20 @@
#!/bin/sh
export XDG_SESSION_TYPE=x11
export QT_QPA_PLATFORM=xcb
export QT_AUTO_SCREEN_SCALE_FACTOR=1
export QT_STYLE_OVERRIDE=fusion # 解决使用自带qt情况下字体颜色全白看不到的问题
export IBUS_USE_PORTAL=1 # fix ibus
FONTCONFIG_DIR=$HOME/.config/fontconfig
unset WAYLAND_DISPLAY
# if pipewire-pulse installed
if [ -f /usr/bin/pipewire-pulse ]; then
export PULSE_LATENCY_MSEC=20 # 解决Pipewire播放声音卡顿的问题
fi;
if [ -f "/usr/bin/bwrap" ];then
mkdir -p $FONTCONFIG_DIR
bwrap --dev-bind / / --tmpfs $HOME/.config --ro-bind $FONTCONFIG_DIR $FONTCONFIG_DIR /opt/wemeet/bin/wemeetapp $*;
else
exec /opt/wemeet/bin/wemeetapp $*;
fi;

View File

@ -0,0 +1,155 @@
# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop unpacker xdg
DESCRIPTION="Wemeet - Tencent Video Conferencing"
HOMEPAGE="https://wemeet.qq.com"
SRC_URI="
amd64? ( mirror+https://updatecdn.meeting.qq.com/cos/\
fcdc2a010a25561a4d23e168b677b493/TencentMeeting_0300000000_${PV}_x86_64_default.publish.deb -> ${P}_amd64.deb )
arm64? ( mirror+https://updatecdn.meeting.qq.com/cos/\
73805834f20680c804310bd0e80f269d/TencentMeeting_0300000000_${PV}_arm64_default.publish.deb -> ${P}_arm64.deb )
loong? ( mirror+https://updatecdn.meeting.qq.com/cos/\
bc71f68ac41d78667c10b10913949b88/TencentMeeting_0300000000_${PV}_loongarch64_default.publish.deb -> ${P}_loongarch64.deb )
"
S="${WORKDIR}"
LICENSE="wemeet_license"
SLOT="0"
KEYWORDS="-* ~amd64 ~arm64"
RESTRICT="bindist test"
# ~loong TODO:
#
# * qtwebengine sandbox crashes on statx (may have to somehow port qtwebengine:5)
# * provide libcurl-gnutls.so.4 compat symlink
RDEPEND="
dev-libs/expat
dev-libs/glib:2
dev-libs/nspr
dev-libs/nss
dev-libs/wayland
media-libs/alsa-lib
media-libs/fontconfig
media-libs/freetype
media-libs/harfbuzz
media-libs/libglvnd
media-libs/libpulse
sys-apps/dbus
sys-libs/zlib
virtual/udev
x11-libs/libdrm
x11-libs/libICE
x11-libs/libSM
x11-libs/libX11
x11-libs/libxcb
x11-libs/libXcomposite
x11-libs/libXdamage
x11-libs/libXext
x11-libs/libXfixes
x11-libs/libXinerama
x11-libs/libxkbcommon
x11-libs/libXrandr
x11-libs/libXrender
x11-libs/libXtst
x11-libs/xcb-util-image
x11-libs/xcb-util-keysyms
x11-libs/xcb-util-renderutil
x11-libs/xcb-util-wm
loong? (
net-misc/curl[gnutls]
virtual/loong-ow-compat
)
"
BDEPEND="dev-util/patchelf"
QA_PREBUILT="opt/${PN}/*"
src_prepare() {
local f
einfo "Unbundling libraries"
pushd opt/${PN}/lib > /dev/null
for f in lib*; do
case "${f#lib}" in
desktop*|ImSDK*|nxui*|qt*|service_manager*|tms*|ui*|wemeet*|xcast*|xnn*|yuv*|TencentSM*)
# keep components of $PN itself
continue
;;
icu*|jpeg.so.8*)
# * the bundled icu ABI is too old (soname is 60) for us to source
# from system
# * jpeg-compat is not packaged in ::gentoo (it is in ::steam-overlay
# but we shouldn't force users to pull in other overlays anyway)
continue
;;
Qt5*)
# we have to keep the entirety of Qt, because of an alarming error
# seen with libQt5Widgets.so.5 unbundled:
#
# /opt/wemeet/bin/wemeetapp: symbol lookup error: /opt/wemeet/lib/libwemeet_framework.so: undefined symbol: _ZN7QWidget11eventFilterEP7QObjectP6QEvent, version Qt_5
#
# which means the Qt ABI is different in the Tencent build env than
# ours, and that it is unsafe for us to swap the libraries.
continue
;;
esac
einfo " $f"
rm "$f" || die
done
popd > /dev/null
einfo "Unbundling plugins to fix libqxcb-glx-integration SIGSEGV"
rm -r opt/wemeet/plugins/xcbglintegrations || die
default
}
src_install() {
# Fix RPATHs to ensure the libraries can be found
for f in $(find "opt/${PN}/bin" "opt/${PN}/plugins") ; do
[[ -f ${f} && $(od -t x1 -N 4 "${f}") == *"7f 45 4c 46"* ]] || continue
patchelf --set-rpath "/opt/${PN}/lib" ${f} || die "patchelf failed on ${f}"
done
for f in $(find "opt/${PN}/lib") ; do
[[ -f ${f} && $(od -t x1 -N 4 "${f}") == *"7f 45 4c 46"* ]] || continue
patchelf --set-rpath '$ORIGIN' ${f} || die "patchelf failed on ${f}"
done
insinto "/opt/${PN}"
exeinto "/opt/${PN}"
doins -r opt/"${PN}"/*
# Force X11
# If wayland is used, wemeet will just die:
# /opt/wemeet/bin/wemeetapp: symbol lookup error:
# /usr/lib64/libwayland-cursor.so.0: undefined symbol: wl_proxy_marshal_flags
# tested with 2.8.0.3 and dev-libs/wayland-1.20.0
newexe "${FILESDIR}/wemeetapp-1.sh" wemeetapp.sh
fperms +x "/opt/${PN}/bin/wemeetapp"
fperms +x "/opt/${PN}/bin/QtWebEngineProcess"
# put launcher into PATH
dosym "../../opt/${PN}/wemeetapp.sh" /usr/bin/wemeetapp
sed -i "s/^Icon=.*/Icon=wemeetapp/g" "usr/share/applications/wemeetapp.desktop" || die
sed -i "s/^Exec=.*/Exec=wemeetapp %u/g" "usr/share/applications/wemeetapp.desktop" || die
sed -i -e '$a Comment=Tencent Meeting Linux Client\n\' \
-e 'Comment[zh_CN]=腾讯会议Linux客户端\n\' \
-e 'Keywords=wemeet;tencent;meeting;\n' \
"usr/share/applications/wemeetapp.desktop" || die
domenu "usr/share/applications/wemeetapp.desktop"
newicon -s scalable "opt/${PN}/wemeet.svg" "wemeetapp.svg"
for i in 16 32 64 128 256; do
png_file="opt/${PN}/icons/hicolor/${i}x${i}/mimetypes/wemeetapp.png"
if [ -e "${png_file}" ]; then
newicon -s "${i}" -c mimetypes "${png_file}" "wemeetapp.png"
fi
done
}