dev-python/conda-libmamba-solver: bump version to 24.11.1
[gentoo-zh.git] / net-im / weixin-uos / weixin-uos-2.1.8.ebuild
blob94c8f91d420322e8f8559d748ca109c458b2de35
1 # Copyright 2020-2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit unpacker desktop xdg
8 DESCRIPTION="UOS weixin"
9 HOMEPAGE="https://www.chinauos.com/resource/download-professional"
11 KEYWORDS="-* ~amd64 ~arm64"
13 SRC_URI="
14         amd64? ( https://home-store-packages.uniontech.com/appstore/pool/appstore/c/com.qq.weixin/com.tencent.weixin_${PV}_amd64.deb )
15         loong? ( https://home-store-packages.uniontech.com/appstore/pool/appstore/c/com.qq.weixin/com.tencent.weixin_${PV}_loongarch64.deb )
16         arm64? ( https://home-store-packages.uniontech.com/appstore/pool/appstore/c/com.qq.weixin/com.tencent.weixin_${PV}_arm64.deb )"
18 SLOT="0"
19 RESTRICT="bindist strip mirror"
20 LICENSE="ISC"
22 # the sonames are gathered with the following trick
24 # objdump -p /path/weixin | grep NEEDED | awk '{print $2}' | xargs equery b | sort | uniq
26 RDEPEND="
27         dev-libs/nss
28         media-libs/alsa-lib
29         media-libs/mesa
30         net-print/cups
31         sys-apps/dbus
32         x11-libs/cairo
33         x11-libs/gdk-pixbuf:2
34         x11-libs/gtk+:3[X]
35         x11-libs/libX11
36         x11-libs/libXcomposite
37         x11-libs/libXrandr
38         x11-libs/libdrm
39         x11-libs/libxkbcommon
40         x11-libs/libxshmfence
41         x11-libs/pango
42         sys-apps/lsb-release
43         sys-apps/bubblewrap
44         || (
45                 dev-libs/openssl-compat:1.1.1
46                 =dev-libs/openssl-1.1.1*
47         )
49 BDEPEND="dev-util/patchelf"
51 S="${WORKDIR}"
53 QA_PREBUILT="*"
55 src_prepare() {
56         default
58         sed -i 's,Name=微信,Name=Wexin uos,' \
59                 "${S}/usr/share/applications/weixin.desktop" || die
60         sed -i 's,Categories=Utility,Categories=Network,' \
61                 "${S}/usr/share/applications/weixin.desktop" || die
62         sed -i 's,/opt/apps/com.tencent.weixin/files/weixin/weixin.sh,/usr/bin/weixin-uos,' \
63                 "${S}/usr/share/applications/weixin.desktop" || die
64         sed -i 's,/opt/apps/com.tencent.weixin/files/weixin/weixin,/opt/weixin-uos/weixin "$@",g' \
65                 "${S}/opt/apps/com.tencent.weixin/files/weixin/weixin.sh" || die
67         # fix rpath
68         patchelf --set-rpath /opt/weixin-uos/resources/app/packages/main/dist/bin/scrot\
69                 "${S}/opt/apps/com.tencent.weixin/files/weixin/resources/app/packages/main/dist/bin/scrot/scrot" || die
72 src_install() {
73         newmenu "${S}/usr/share/applications/weixin.desktop" weixin-uos.desktop
74         dobin "${FILESDIR}/weixin-uos"
76         for size in 16 32 48 64 128 256; do
77                 doicon -s ${size} usr/share/icons/hicolor/${size}x${size}/apps/weixin.png
78         done
80         insinto /opt/weixin-uos
81         doins -r "${S}"/opt/apps/com.tencent.weixin/files/weixin/*
82         fperms +x /opt/weixin-uos/weixin{,.sh}
83         fperms +x /opt/weixin-uos/resources/app/packages/main/dist/bin/scrot/scrot
85         insinto /opt/weixin-uos/crap
86         doins "${FILESDIR}"/uos-{lsb,release}
88         insinto /opt/weixin-uos/crap/usr/lib/license
89         doins "${S}/usr/lib/license/libuosdevicea.so"
90         keepdir /usr/lib/license
92         insinto /opt/weixin-uos/crap/var/uos
93         newins "${FILESDIR}/license.key" .license.key
95         insinto /opt/weixin-uos/crap/var/lib/uos-license
96         newins "${FILESDIR}/license.json" .license.json