Version 0.0.52 of opencode is an upstream fork. This divergence stems from the original opencode project, formerly managed by the opencode-ai organization, having transitioned into a commercial entity. The current challenge lies with sst's new iteration of opencode, which has undergone a significant rewrite utilizing Bun, leaving only the TUI component in Go. This revised version is presently quite deficient and introduces an unwelcome dependency on Bun. For these reasons, I find it preferable to continue using the original version. Signed-off-by: Leo Douglas <douglarek@gmail.com>
35 lines
938 B
Bash
35 lines
938 B
Bash
# Copyright 2025 Gentoo Authors
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
EAPI=8
|
|
|
|
inherit go-module optfeature
|
|
|
|
DESCRIPTION="AI coding agent, built for the terminal"
|
|
HOMEPAGE="https://github.com/opencode-ai/opencode"
|
|
SRC_URI="
|
|
https://github.com/opencode-ai/opencode/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz
|
|
https://github.com/douglarek/gentoo-deps/releases/download/${P}/${P}-vendor.tar.xz
|
|
"
|
|
S="${WORKDIR}"/${P}
|
|
|
|
LICENSE="MIT"
|
|
SLOT="0"
|
|
KEYWORDS="-* ~amd64 ~arm64"
|
|
|
|
src_compile() {
|
|
local ldflags="\
|
|
-X github.com/opencode-ai/opencode/internal/version.Version=${PV}"
|
|
ego build -o ${PN} -trimpath -ldflags "${ldflags}"
|
|
}
|
|
|
|
src_install() {
|
|
dobin ${PN}
|
|
}
|
|
|
|
pkg_postinst() {
|
|
optfeature_header "Some features may be limited or slower without the following optional dependencies:"
|
|
optfeature "improved search functionality" sys-apps/ripgrep
|
|
optfeature "enhanced command line interaction" app-shells/fzf
|
|
}
|