1 # Copyright 2023-2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit desktop unpacker xdg
8 DESCRIPTION
="Wemeet - Tencent Video Conferencing"
9 HOMEPAGE
="https://wemeet.qq.com"
12 arm64? ( https://updatecdn.meeting.qq.com/cos/\
13 206c30da5545dba38a29ccbc752dec94/TencentMeeting_0300000000_${PV}_arm64_default.publish.deb -> ${P}_arm64.deb )
14 loong? ( https://updatecdn.meeting.qq.com/cos/\
15 23810840e7e8bb38536b2a59ae811343/TencentMeeting_0300000000_${PV}_loongarch64_default.publish.deb -> ${P}_loongarch64.deb )
19 LICENSE
="wemeet_license"
22 RESTRICT
="bindist test mirror"
26 # * qtwebengine sandbox crashes on statx (may have to somehow port qtwebengine:5)
27 # * provide libcurl-gnutls.so.4 compat symlink
49 x11-libs/libXcomposite
58 x11-libs/xcb-util-image
59 x11-libs/xcb-util-keysyms
60 x11-libs/xcb-util-renderutil
64 virtual/loong-ow-compat
67 BDEPEND
="dev-util/patchelf"
69 QA_PREBUILT
="opt/${PN}/*"
74 einfo
"Unbundling libraries"
75 pushd opt
/${PN}/lib
> /dev
/null
78 desktop
*|ImSDK
*|nxui
*|qt
*|service_manager
*|tms
*|ui
*|wemeet
*|xcast
*|xnn
*|yuv
*|TencentSM
*)
79 # keep components of $PN itself
83 # * the bundled icu ABI is too old (soname is 60) for us to source
85 # * jpeg-compat is not packaged in ::gentoo (it is in ::steam-overlay
86 # but we shouldn't force users to pull in other overlays anyway)
90 # we have to keep the entirety of Qt, because of an alarming error
91 # seen with libQt5Widgets.so.5 unbundled:
93 # /opt/wemeet/bin/wemeetapp: symbol lookup error: /opt/wemeet/lib/libwemeet_framework.so: undefined symbol: _ZN7QWidget11eventFilterEP7QObjectP6QEvent, version Qt_5
95 # which means the Qt ABI is different in the Tencent build env than
96 # ours, and that it is unsafe for us to swap the libraries.
105 einfo
"Unbundling plugins to fix libqxcb-glx-integration SIGSEGV"
106 rm -r opt
/wemeet
/plugins
/xcbglintegrations || die
112 # Fix RPATHs to ensure the libraries can be found
113 for f
in $
(find "opt/${PN}/bin" "opt/${PN}/plugins") ; do
114 [[ -f ${f} && $
(od -t x1
-N 4 "${f}") == *"7f 45 4c 46"* ]] ||
continue
115 patchelf
--set-rpath "/opt/${PN}/lib" ${f} || die "patchelf failed on ${f}"
117 for f
in $
(find "opt/${PN}/lib") ; do
118 [[ -f ${f} && $
(od -t x1
-N 4 "${f}") == *"7f 45 4c 46"* ]] ||
continue
119 patchelf
--set-rpath '$ORIGIN' ${f} || die
"patchelf failed on ${f}"
124 doins
-r opt
/"${PN}"/*
127 # If wayland is used, wemeet will just die:
128 # /opt/wemeet/bin/wemeetapp: symbol lookup error:
129 # /usr/lib64/libwayland-cursor.so.0: undefined symbol: wl_proxy_marshal_flags
130 # tested with 2.8.0.3 and dev-libs/wayland-1.20.0
131 newexe
"${FILESDIR}/wemeetapp-1.sh" wemeetapp.sh
133 fperms
+x
"/opt/${PN}/bin/wemeetapp"
134 fperms
+x
"/opt/${PN}/bin/QtWebEngineProcess"
136 # put launcher into PATH
137 dosym
"../../opt/${PN}/wemeetapp.sh" /usr
/bin
/wemeetapp
139 sed -i "s/^Icon=.*/Icon=wemeetapp/g" "usr/share/applications/wemeetapp.desktop" || die
140 sed -i "s/^Exec=.*/Exec=wemeetapp %u/g" "usr/share/applications/wemeetapp.desktop" || die
141 sed -i -e '$a Comment=Tencent Meeting Linux Client\n\' \
142 -e 'Comment
[zh_CN
]=腾讯会议Linux客户端
\n\' \
143 -e 'Keywords=wemeet;tencent;meeting;\n' \
144 "usr/share/applications/wemeetapp.desktop" || die
145 domenu
"usr/share/applications/wemeetapp.desktop"
146 newicon
-s scalable
"opt/${PN}/wemeet.svg" "wemeetapp.svg"
147 for i
in 16 32 64 128 256; do
148 png_file
="opt/${PN}/icons/hicolor/${i}x${i}/mimetypes/wemeetapp.png"
149 if [ -e "${png_file}" ]; then
150 newicon
-s "${i}" -c mimetypes
"${png_file}" "wemeetapp.png"