net-im/tencent-qq: add 3.2.0_p16605, drop 3.2.0_p16449
[gentoo-zh.git] / net-im / tencent-qq / tencent-qq-3.2.0_p16605.ebuild
blob9f88cac66e5c130cc767fb7f0051429653addeed
1 # Copyright 2019-2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit unpacker xdg
8 MY_PV=${PV/_p/-}
9 DESCRIPTION="The new version of the official linux-qq"
10 HOMEPAGE="https://im.qq.com/linuxqq/index.shtml"
11 LICENSE="Tencent"
12 RESTRICT="strip"
14 _I="1776936e"
16 SRC_URI="
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 )
21 SLOT="0"
22 KEYWORDS="-* ~amd64 ~arm64"
24 IUSE="bwrap +system-vips gnome appindicator crash-fix"
25 RDEPEND="
26 x11-libs/gtk+:3
27 x11-libs/libnotify
28 dev-libs/nss
29 appindicator? ( dev-libs/libayatana-appindicator )
30 x11-libs/libXScrnSaver
31 x11-libs/libXtst
32 x11-misc/xdg-utils
33 app-accessibility/at-spi2-core:2
34 app-crypt/libsecret
35 virtual/krb5
36 sys-apps/keyutils
37 crash-fix? ( sys-devel/gcc:12 )
38 system-vips? (
39 dev-libs/glib
40 >=media-libs/vips-8.14.2
42 bwrap? (
43 sys-apps/bubblewrap
44 x11-misc/snapd-xdg-open
45 x11-misc/flatpak-xdg-utils
47 gnome? ( dev-libs/gjs )
48 media-libs/openslide
51 S=${WORKDIR}
53 src_unpack(){
57 src_install() {
58 dodir /
59 cd "${D}" || die
60 unpacker
62 if use system-vips; then
63 rm -r "${D}"/opt/QQ/resources/app/sharp-lib || die
66 if use bwrap; then
67 exeinto /opt/QQ
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
73 else
74 sed -i 's!/opt/QQ/qq!/usr/bin/qq!' "${D}"/usr/share/applications/qq.desktop || die
77 if use bwrap; then
78 dosym -r /opt/QQ/start.sh /usr/bin/qq
79 else
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