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 crash-fix"
29 appindicator? ( dev-libs/libayatana-appindicator )
30 x11-libs/libXScrnSaver
33 app-accessibility/at-spi2-core:2
37 crash-fix? ( sys-devel/gcc:12 )
40 >=media-libs/vips-8.14.2
44 x11-misc/snapd-xdg-open
45 x11-misc/flatpak-xdg-utils
47 gnome? ( dev-libs/gjs )
62 if use system-vips
; then
63 rm -r "${D}"/opt
/QQ
/resources
/app
/sharp-lib || die
68 doexe
"${FILESDIR}"/start.sh
69 sed -i 's!/opt/QQ/qq!/opt/QQ/start.sh!' "${D}"/usr
/share
/applications
/qq.desktop || die
70 insinto
/opt
/QQ
/workarounds
71 doins
"${FILESDIR}"/{config.json
,xdg-open.sh
}
72 fperms
+x
/opt
/QQ
/workarounds
/xdg-open.sh
74 sed -i 's!/opt/QQ/qq!/usr/bin/qq!' "${D}"/usr
/share
/applications
/qq.desktop || die
78 dosym
-r /opt
/QQ
/start.sh
/usr
/bin
/qq
80 newbin
"$FILESDIR/qq.sh" qq
83 # https://bugs.gentoo.org/898912
84 if use appindicator
; then
85 dosym ..
/..
/usr
/lib64
/libayatana-appindicator3.so
/opt
/QQ
/libappindicator3.so
88 sed -i 's!/usr/share/icons/hicolor/512x512/apps/qq.png!qq!' "${D}"/usr
/share
/applications
/qq.desktop || die
89 gzip -d "${D}"/usr
/share
/doc
/linuxqq
/changelog.gz || die
90 dodoc
"${D}"/usr
/share
/doc
/linuxqq
/changelog
91 rm -rf "${D}"/usr
/share
/doc
/linuxqq
/ || die
93 if use crash-fix
;then
94 sed -i '1 a export LD_PRELOAD=/usr/lib/gcc/x86_64-pc-linux-gnu/12/libstdc++.so.6' -i "${D}"/usr
/bin
/qq || die