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? ( https://updatecdn.meeting.qq.com/cos/\
13 fb7464ffb18b94a06868265bed984007/TencentMeeting_0300000000_3.19.2.400_x86_64_default.publish.officialwebsite.deb -> ${P}_amd64.deb )
17 LICENSE
="wemeet_license"
20 RESTRICT
="bindist test mirror"
24 # * qtwebengine sandbox crashes on statx (may have to somehow port qtwebengine:5)
25 # * provide libcurl-gnutls.so.4 compat symlink
47 x11-libs/libXcomposite
56 x11-libs/xcb-util-image
57 x11-libs/xcb-util-keysyms
58 x11-libs/xcb-util-renderutil
62 virtual/loong-ow-compat
65 BDEPEND
="dev-util/patchelf"
67 QA_PREBUILT
="opt/${PN}/*"
72 einfo
"Unbundling libraries"
73 pushd opt
/${PN}/lib
> /dev
/null
76 desktop
*|ImSDK
*|nxui
*|qt
*|service_manager
*|tms
*|ui
*|wemeet
*|xcast
*|xnn
*|yuv
*|TencentSM
*)
77 # keep components of $PN itself
81 # * the bundled icu ABI is too old (soname is 60) for us to source
83 # * jpeg-compat is not packaged in ::gentoo (it is in ::steam-overlay
84 # but we shouldn't force users to pull in other overlays anyway)
88 # we have to keep the entirety of Qt, because of an alarming error
89 # seen with libQt5Widgets.so.5 unbundled:
91 # /opt/wemeet/bin/wemeetapp: symbol lookup error: /opt/wemeet/lib/libwemeet_framework.so: undefined symbol: _ZN7QWidget11eventFilterEP7QObjectP6QEvent, version Qt_5
93 # which means the Qt ABI is different in the Tencent build env than
94 # ours, and that it is unsafe for us to swap the libraries.
103 einfo
"Unbundling plugins to fix libqxcb-glx-integration SIGSEGV"
104 rm -r opt
/wemeet
/plugins
/xcbglintegrations || die
110 # Fix RPATHs to ensure the libraries can be found
111 for f
in $
(find "opt/${PN}/bin" "opt/${PN}/plugins") ; do
112 [[ -f ${f} && $
(od -t x1
-N 4 "${f}") == *"7f 45 4c 46"* ]] ||
continue
113 patchelf
--set-rpath "/opt/${PN}/lib" ${f} || die "patchelf failed on ${f}"
115 for f
in $
(find "opt/${PN}/lib") ; do
116 [[ -f ${f} && $
(od -t x1
-N 4 "${f}") == *"7f 45 4c 46"* ]] ||
continue
117 patchelf
--set-rpath '$ORIGIN' ${f} || die
"patchelf failed on ${f}"
122 doins
-r opt
/"${PN}"/*
125 # If wayland is used, wemeet will just die:
126 # /opt/wemeet/bin/wemeetapp: symbol lookup error:
127 # /usr/lib64/libwayland-cursor.so.0: undefined symbol: wl_proxy_marshal_flags
128 # tested with 2.8.0.3 and dev-libs/wayland-1.20.0
129 newexe
"${FILESDIR}/wemeetapp-1.sh" wemeetapp.sh
131 fperms
+x
"/opt/${PN}/bin/wemeetapp"
132 fperms
+x
"/opt/${PN}/bin/QtWebEngineProcess"
134 # put launcher into PATH
135 dosym
"../../opt/${PN}/wemeetapp.sh" /usr
/bin
/wemeetapp
137 sed -i "s/^Icon=.*/Icon=wemeetapp/g" "usr/share/applications/wemeetapp.desktop" || die
138 sed -i "s/^Exec=.*/Exec=wemeetapp %u/g" "usr/share/applications/wemeetapp.desktop" || die
139 sed -i -e '$a Comment=Tencent Meeting Linux Client\n\' \
140 -e 'Comment
[zh_CN
]=腾讯会议Linux客户端
\n\' \
141 -e 'Keywords=wemeet;tencent;meeting;\n' \
142 "usr/share/applications/wemeetapp.desktop" || die
143 domenu
"usr/share/applications/wemeetapp.desktop"
144 newicon
-s scalable
"opt/${PN}/wemeet.svg" "wemeetapp.svg"
145 for i
in 16 32 64 128 256; do
146 png_file
="opt/${PN}/icons/hicolor/${i}x${i}/mimetypes/wemeetapp.png"
147 if [ -e "${png_file}" ]; then
148 newicon
-s "${i}" -c mimetypes
"${png_file}" "wemeetapp.png"