1 # Copyright 2023 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 bb4001c715553579a8b3e496233331d4/TencentMeeting_0300000000_${PV}_x86_64_default.publish.deb -> ${P}_amd64.deb )
14 arm64? ( mirror+https://updatecdn.meeting.qq.com/cos/\
15 0f96a97b0aaea9b9d5d2c2b912ede656/TencentMeeting_0300000000_${PV}_arm64_default.publish.deb -> ${P}_arm64.deb )
18 LICENSE
="wemeet_license"
20 KEYWORDS
="-* ~amd64 ~arm64"
22 RESTRICT
="bindist test"
31 dev-qt/qtpositioning:5
32 dev-qt/qtprintsupport:5
33 dev-qt/qtwayland:5[compositor(+)]
42 media-libs/tiff-compat:4
47 BDEPEND
="dev-util/patchelf"
50 QA_PREBUILT
="opt/${PN}/*"
53 # To fix bug, remove unused lib, use system lib instead
54 mv opt
/${PN}/lib opt
/${PN}/lib.orig || die
55 mkdir opt
/${PN}/lib || die
56 cp -rf opt
/${PN}/lib.orig
/lib
*.so opt
/${PN}/lib
/ || die
57 # Remove libQt5*, use system QT5 instead
58 rm -rf opt
/${PN}/lib
/libQt5
* || die
59 # Add libQt5Pdf* to fix bug
60 cp -rf opt
/${PN}/lib.orig
/libQt5Pdf
* opt
/${PN}/lib
/ || die
62 rm -r opt
/${PN}/lib.orig || die
63 # Fix SEGFAULT with libqxcb-glx-integration
64 rm -r opt
/wemeet
/plugins
/xcbglintegrations || die
65 # Fix RPATHs to ensure the libraries can be found
66 for f
in $
(find "opt/${PN}/bin" "opt/${PN}/plugins") ; do
67 [[ -f ${f} && $
(od -t x1
-N 4 "${f}") == *"7f 45 4c 46"* ]] ||
continue
68 patchelf
--set-rpath "/opt/${PN}/lib" ${f} || die "patchelf failed on ${f}"
70 for f
in $
(find "opt/${PN}/lib") ; do
71 [[ -f ${f} && $
(od -t x1
-N 4 "${f}") == *"7f 45 4c 46"* ]] ||
continue
72 patchelf
--set-rpath '$ORIGIN' ${f} || die
"patchelf failed on ${f}"
76 # If wayland is used, wemeet will just die:
77 # /opt/wemeet/bin/wemeetapp: symbol lookup error:
78 # /usr/lib64/libwayland-cursor.so.0: undefined symbol: wl_proxy_marshal_flags
79 # tested with 2.8.0.3 and dev-libs/wayland-1.20.0
80 cat > "opt/${PN}/wemeetapp.sh" <<- EOF || die
82 export XDG_SESSION_TYPE=x11
83 export QT_QPA_PLATFORM=xcb
84 export QT_AUTO_SCREEN_SCALE_FACTOR=1
85 export QT_STYLE_OVERRIDE=fusion # 解决使用自带qt情况下,字体颜色全白看不到的问题
86 export IBUS_USE_PORTAL=1 # fix ibus
87 FONTCONFIG_DIR=\$HOME/.config/fontconfig
90 # if pipewire-pulse installed
91 if [ -f /usr/bin/pipewire-pulse ]; then
92 export PULSE_LATENCY_MSEC=20 # 解决Pipewire播放声音卡顿的问题
95 if [ -f "/usr/bin/bwrap" ];then
96 mkdir -p \$FONTCONFIG_DIR
97 bwrap --dev-bind / / --tmpfs \$HOME/.config --ro-bind \$FONTCONFIG_DIR \$FONTCONFIG_DIR /opt/wemeet/bin/wemeetapp \$*;
99 exec /opt/wemeet/bin/wemeetapp \$*;
105 doins
-r opt
/"${PN}"/*
106 doexe
"opt/${PN}/wemeetapp.sh"
107 fperms
+x
"/opt/${PN}/bin/wemeetapp"
108 fperms
+x
"/opt/${PN}/bin/QtWebEngineProcess"
110 # put launcher into PATH
111 dosym
"../../opt/${PN}/wemeetapp.sh" /usr
/bin
/wemeetapp
113 sed -i "s/^Icon=.*/Icon=wemeetapp/g" "usr/share/applications/wemeetapp.desktop" || die
114 sed -i "s/^Exec=.*/Exec=wemeetapp %u/g" "usr/share/applications/wemeetapp.desktop" || die
115 sed -i -e '$a Comment=Tencent Meeting Linux Client\n\' \
116 -e 'Comment
[zh_CN
]=腾讯会议Linux客户端
\n\' \
117 -e 'Keywords=wemeet;tencent;meeting;\n' \
118 "usr/share/applications/wemeetapp.desktop" || die
119 domenu
"usr/share/applications/wemeetapp.desktop"
120 newicon
-s scalable
"opt/${PN}/wemeet.svg" "wemeetapp.svg"
121 for i
in 16 32 64 128 256; do
122 png_file
="opt/${PN}/icons/hicolor/${i}x${i}/mimetypes/wemeetapp.png"
123 if [ -e "${png_file}" ]; then
124 newicon
-s "${i}" -c mimetypes
"${png_file}" "wemeetapp.png"