# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           golang 1.0

go.setup            github.com/alibaba/open-code-review 1.13.4 v
set git-commit      76ab46a
go.offline_build    no
go.toolchain_min    1.26.10

categories          llm
maintainers         @oytech @wu21-web openmaintainer
license             Apache-2

homepage            https://open-codereview.ai/
description         Open Code Review is an AI-powered code review CLI tool.
long_description    Open Code Review is an AI-powered code review CLI tool. \
                    It reads Git diffs, sends changed files to a configurable LLM via an agent with tool-use capabilities, \
                    and generates structured review comments with line-level precision. \
                    The agent can read full file contents, search the codebase, inspect other changed files for context, \
                    and produce deep reviews — not just surface-level diff feedback.

checksums           rmd160  dd773cd657d1310c90ed33fa4ad119a469c2a569 \
                    sha256  0710bb01ad93dc59cc83f4357d8c02b22375a47c4de2093c643b66fc03a34811 \
                    size    6733787

build.pre_args      -ldflags '-s -w -X main.Version=v${version} -X main.GitCommit=${git-commit}'
build.args          ./cmd/opencodereview

destroot {
    xinstall -m 0755 ${worksrcpath}/opencodereview ${destroot}${prefix}/bin/ocr
}
