因为这些包的授权或是禁止再散布软件本体、或是禁止对散布收取费用、或是要求授权方书面同意,而它们的 `RESTRICT` 缺少 `bindist`(`app- misc/bcompare` 缺 `mirror`),构建出的二进制包与 distfile 会被当作可以散布,所以按各自的条款补齐。 Signed-off-by: Zakk <zakk@gentoozh.org>
56 lines
1.4 KiB
Bash
56 lines
1.4 KiB
Bash
# Copyright 2025-2026 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
inherit desktop xdg
|
|
|
|
DESCRIPTION="Cherry Studio is a desktop client that supports for multiple LLM providers"
|
|
HOMEPAGE="https://github.com/CherryHQ/cherry-studio"
|
|
URL_PREFIX="https://github.com/CherryHQ/cherry-studio/releases/download/v${PV}/Cherry-Studio-${PV}"
|
|
SRC_URI="
|
|
amd64? ( ${URL_PREFIX}-x86_64.AppImage -> ${P}-x86_64.AppImage )
|
|
arm64? ( ${URL_PREFIX}-arm64.AppImage -> ${P}-arm64.AppImage )
|
|
"
|
|
|
|
S="${WORKDIR}"
|
|
LICENSE="Cherry-Studio"
|
|
|
|
SLOT="0"
|
|
KEYWORDS="~amd64 ~arm64"
|
|
|
|
RDEPEND="
|
|
sys-fs/fuse:0
|
|
virtual/zlib
|
|
"
|
|
|
|
BDEPEND="arm64? ( dev-util/patchelf )"
|
|
|
|
RESTRICT="strip bindist mirror"
|
|
|
|
src_unpack() {
|
|
if use amd64; then
|
|
cp "${DISTDIR}/${P}-x86_64.AppImage" cherry-studio || die
|
|
elif use arm64; then
|
|
cp "${DISTDIR}/${P}-arm64.AppImage" cherry-studio || die
|
|
fi
|
|
}
|
|
|
|
src_prepare() {
|
|
default
|
|
|
|
# The arm64 AppImage runtime is linked against the libz.so linker symlink
|
|
# rather than the libz.so.1 SONAME, so its dependency never resolves.
|
|
# The squashfs payload sits after the ELF headers and patchelf keeps it
|
|
# there, so rewriting the entry leaves the image itself untouched.
|
|
if use arm64; then
|
|
patchelf --replace-needed libz.so libz.so.1 cherry-studio || die
|
|
fi
|
|
}
|
|
|
|
src_install() {
|
|
dobin cherry-studio
|
|
domenu "${FILESDIR}/cherry-studio.desktop"
|
|
doicon -s scalable "${FILESDIR}/cherry-studio.svg"
|
|
}
|