1 # Copyright 1999-2023 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 DEB_PN="com.qq.weixin.deepin"
11 DESCRIPTION="Tencent WeChat on Deepin Wine For Gentoo"
12 HOMEPAGE="https://aur.archlinux.org/packages/deepin-wine-wechat"
15 https://github.com/vufa/deepin-wine-wechat-arch/releases/download/v${PV}-${MY_RV}/${P}-${MY_RV}-x86_64.pkg.tar.zst
16 fake-simsun? ( https://github.com/oatiz/lyraile-overlay/releases/download/tempfile/fake_simsun.ttc )
19 RESTRICT="mirror strip"
24 IUSE="+wqy-microhei fake-simsun reg-patch"
25 REQUIRED_USE="wqy-microhei? ( !fake-simsun )"
28 app-emulation/deepin-wine-helper
29 app-emulation/deepin-wine6-stable
30 media-libs/alsa-lib[abi_x86_32]
31 media-libs/libpulse[abi_x86_32]
32 media-libs/openal[abi_x86_32]
33 media-plugins/alsa-plugins[abi_x86_32]
34 media-sound/mpg123[abi_x86_32]
35 >=net-nds/openldap-2.4.0[abi_x86_32]
37 wqy-microhei? ( media-fonts/wqy-microhei )
53 7z x -aoa "${S}/opt/apps/${DEB_PN}/files/files.7z" -o"${S}/deepinwechatdir" || die
54 unlink "${S}/deepinwechatdir/drive_c/windows/Fonts/wqy-microhei.ttc" || die
55 if use wqy-microhei ; then
56 ln -sf "/usr/share/fonts/wqy-microhei/wqy-microhei.ttc" \
57 "${S}/deepinwechatdir/drive_c/windows/Fonts/wqy-microhei.ttc" || die
58 elif use fake-simsun ; then
59 # https://bbs.deepin.org/en/post/213530
60 cp "${DISTDIR}/fake_simsun.ttc" "${S}/deepinwechatdir/drive_c/windows/Fonts/" || die
62 if use reg-patch ; then
63 patch -p1 -d "${S}/deepinwechatdir/" < "${FILESDIR}/reg.patch" || die
65 7z a -t7z -r "${S}"/files.7z "${S}"/deepinwechatdir/* || die
66 md5sum "${S}/files.7z" | awk '{ print $1 }' > "${S}/opt/apps/${DEB_PN}/files/files.md5sum" || die
67 mv "${S}/files.7z" "${S}/opt/apps/${DEB_PN}/files/files.7z" || die
73 fperms +x /opt/apps/com.qq.weixin.deepin/files/run.sh
77 ewarn "Because deepin changed DeployApp, WeChat will be reinstalled after"
78 ewarn "upgrading from the old version."
79 find /home -maxdepth 2 -name ".deepinwine" -exec rm -f "{}/Deepin-WeChat/reinstalled" \; || die
83 find /home -maxdepth 2 -name ".deepinwine" -exec rm -rf "{}/Deepin-WeChat/" \; || die