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 amd64? ( mirror+https://updatecdn.meeting.qq.com/cos/\
13 fcdc2a010a25561a4d23e168b677b493/TencentMeeting_0300000000_${PV}_x86_64_default.publish.deb -> ${P}_amd64.deb )
14 arm64? ( mirror+https://updatecdn.meeting.qq.com/cos/\
15 73805834f20680c804310bd0e80f269d/TencentMeeting_0300000000_${PV}_arm64_default.publish.deb -> ${P}_arm64.deb )
16 loong? ( mirror+https://updatecdn.meeting.qq.com/cos/\
17 bc71f68ac41d78667c10b10913949b88/TencentMeeting_0300000000_${PV}_loongarch64_default.publish.deb -> ${P}_loongarch64.deb )
21 LICENSE
="wemeet_license"
23 KEYWORDS
="-* ~amd64 ~arm64"
24 RESTRICT
="bindist test"
28 # * qtwebengine sandbox crashes on statx (may have to somehow port qtwebengine:5)
29 # * provide libcurl-gnutls.so.4 compat symlink
51 x11-libs/libXcomposite
60 x11-libs/xcb-util-image
61 x11-libs/xcb-util-keysyms
62 x11-libs/xcb-util-renderutil
66 virtual/loong-ow-compat
69 BDEPEND
="dev-util/patchelf"
71 QA_PREBUILT
="opt/${PN}/*"
76 einfo
"Unbundling libraries"
77 pushd opt
/${PN}/lib
> /dev
/null
80 desktop
*|ImSDK
*|nxui
*|qt
*|service_manager
*|tms
*|ui
*|wemeet
*|xcast
*|xnn
*|yuv
*|TencentSM
*)
81 # keep components of $PN itself
85 # * the bundled icu ABI is too old (soname is 60) for us to source
87 # * jpeg-compat is not packaged in ::gentoo (it is in ::steam-overlay
88 # but we shouldn't force users to pull in other overlays anyway)
92 # we have to keep the entirety of Qt, because of an alarming error
93 # seen with libQt5Widgets.so.5 unbundled:
95 # /opt/wemeet/bin/wemeetapp: symbol lookup error: /opt/wemeet/lib/libwemeet_framework.so: undefined symbol: _ZN7QWidget11eventFilterEP7QObjectP6QEvent, version Qt_5
97 # which means the Qt ABI is different in the Tencent build env than
98 # ours, and that it is unsafe for us to swap the libraries.
107 einfo
"Unbundling plugins to fix libqxcb-glx-integration SIGSEGV"
108 rm -r opt
/wemeet
/plugins
/xcbglintegrations || die
114 # Fix RPATHs to ensure the libraries can be found
115 for f
in $
(find "opt/${PN}/bin" "opt/${PN}/plugins") ; do
116 [[ -f ${f} && $
(od -t x1
-N 4 "${f}") == *"7f 45 4c 46"* ]] ||
continue
117 patchelf
--set-rpath "/opt/${PN}/lib" ${f} || die "patchelf failed on ${f}"
119 for f
in $
(find "opt/${PN}/lib") ; do
120 [[ -f ${f} && $
(od -t x1
-N 4 "${f}") == *"7f 45 4c 46"* ]] ||
continue
121 patchelf
--set-rpath '$ORIGIN' ${f} || die
"patchelf failed on ${f}"
126 doins
-r opt
/"${PN}"/*
129 # If wayland is used, wemeet will just die:
130 # /opt/wemeet/bin/wemeetapp: symbol lookup error:
131 # /usr/lib64/libwayland-cursor.so.0: undefined symbol: wl_proxy_marshal_flags
132 # tested with 2.8.0.3 and dev-libs/wayland-1.20.0
133 newexe
"${FILESDIR}/wemeetapp-1.sh" wemeetapp.sh
135 fperms
+x
"/opt/${PN}/bin/wemeetapp"
136 fperms
+x
"/opt/${PN}/bin/QtWebEngineProcess"
138 # put launcher into PATH
139 dosym
"../../opt/${PN}/wemeetapp.sh" /usr
/bin
/wemeetapp
141 sed -i "s/^Icon=.*/Icon=wemeetapp/g" "usr/share/applications/wemeetapp.desktop" || die
142 sed -i "s/^Exec=.*/Exec=wemeetapp %u/g" "usr/share/applications/wemeetapp.desktop" || die
143 sed -i -e '$a Comment=Tencent Meeting Linux Client\n\' \
144 -e 'Comment
[zh_CN
]=腾讯会议Linux客户端
\n\' \
145 -e 'Keywords=wemeet;tencent;meeting;\n' \
146 "usr/share/applications/wemeetapp.desktop" || die
147 domenu
"usr/share/applications/wemeetapp.desktop"
148 newicon
-s scalable
"opt/${PN}/wemeet.svg" "wemeetapp.svg"
149 for i
in 16 32 64 128 256; do
150 png_file
="opt/${PN}/icons/hicolor/${i}x${i}/mimetypes/wemeetapp.png"
151 if [ -e "${png_file}" ]; then
152 newicon
-s "${i}" -c mimetypes
"${png_file}" "wemeetapp.png"