1 # Copyright 2019-2021 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit desktop unpacker xdg
10 DESCRIPTION
="The new version of the official linux-qq"
11 HOMEPAGE
="https://im.qq.com/linuxqq/download.html"
16 amd64? ( https://dldir1.qq.com/qqfile/qq/QQNT/4691a571/QQ-v${MY_PV}_x64.deb )
22 IUSE
="+bwrap split-usr"
27 x11-libs/libXScrnSaver
30 app-accessibility/at-spi2-core:2
32 bwrap? ( sys-apps/bubblewrap )
41 fperms
+x
/opt
/QQ
/{qq
,chrome_crashpad_handler
,chrome-sandbox
,libEGL.so
,libffmpeg.so
,libGLESv2.so
,libvk_swiftshader.so
,libvulkan.so
.1}
42 printf "#!/bin/bash\ncd /opt/QQ\n./qq \$@\n" > qq || die
44 if use split-usr
;then
45 sed -i 's!symlink!ro-bind!' "${FILESDIR}"/start.sh || die
46 sed -i 's!usr/!/!' "${FILESDIR}"/start.sh || die
48 sed -i 's!./qq!/opt/QQ/start.sh!' qq || die
54 doexe
"${FILESDIR}"/start.sh
55 sed -i 's!/opt/QQ/qq!/opt/QQ/start.sh!' usr
/share
/applications
/qq.desktop || die
57 sed -i 's!/opt/QQ/qq!/usr/bin/qq!' usr
/share
/applications
/qq.desktop || die
60 sed -i 's!/opt/QQ/resources/app/512x512.png!qq!' usr
/share
/applications
/qq.desktop || die
61 domenu usr
/share
/applications
/qq.desktop
62 doicon
-s 512 usr
/share
/icons
/hicolor
/0x0/apps
/qq.png
63 gzip -d usr
/share
/doc
/linuxqq
/changelog.gz || die
64 dodoc usr
/share
/doc
/linuxqq
/changelog