1 # Copyright 2019-2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
9 DESCRIPTION
="The new version of the official linux-qq"
10 HOMEPAGE
="https://im.qq.com/linuxqq/index.shtml"
17 amd64? ( https://dldir1.qq.com/qqfile/qq/QQNT/$_I/linuxqq_${MY_PV}_amd64.deb )
18 arm64? ( https://dldir1.qq.com/qqfile/qq/QQNT/$_I/linuxqq_${MY_PV}_arm64.deb )
22 KEYWORDS
="-* ~amd64 ~arm64"
24 IUSE
="+bwrap system-vips gnome appindicator"
29 appindicator? ( dev-libs/libayatana-appindicator )
30 x11-libs/libXScrnSaver
33 app-accessibility/at-spi2-core:2
39 >=media-libs/vips-8.14.2[-pdf]
43 x11-misc/snapd-xdg-open
44 x11-misc/flatpak-xdg-utils
46 gnome? ( dev-libs/gjs )
61 if use system-vips
; then
62 rm -r "${D}"/opt
/QQ
/resources
/app
/sharp-lib || die
67 doexe
"${FILESDIR}"/start.sh
68 sed -i 's!/opt/QQ/qq!/opt/QQ/start.sh!' "${D}"/usr
/share
/applications
/qq.desktop || die
69 insinto
/opt
/QQ
/workarounds
70 doins
"${FILESDIR}"/{config.json
,xdg-open.sh
}
71 fperms
+x
/opt
/QQ
/workarounds
/xdg-open.sh
73 sed -i 's!/opt/QQ/qq!/usr/bin/qq!' "${D}"/usr
/share
/applications
/qq.desktop || die
77 dosym
-r /opt
/QQ
/start.sh
/usr
/bin
/qq
78 elif use system-vips
; then
79 newbin
"$FILESDIR/qq.sh" qq
81 dosym
-r /opt
/QQ
/qq
/usr
/bin
/qq
84 # https://bugs.gentoo.org/898912
85 if use appindicator
; then
86 dosym ..
/..
/usr
/lib64
/libayatana-appindicator3.so
/opt
/QQ
/libappindicator3.so
89 sed -i 's!/usr/share/icons/hicolor/512x512/apps/qq.png!qq!' "${D}"/usr
/share
/applications
/qq.desktop || die
90 gzip -d "${D}"/usr
/share
/doc
/linuxqq
/changelog.gz || die
91 dodoc
"${D}"/usr
/share
/doc
/linuxqq
/changelog
92 rm -rf "${D}"/usr
/share
/doc
/linuxqq
/ || die
98 elog
"If you want to download files in QQ"
99 elog
"Please set the QQ download path to ~/Download"