app-text/vale - 3.26.0 (vklimovs)

Search

Install

Install this version:

emerge -a =app-text/vale-3.26.0

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =app-text/vale-3.26.0

Or alternatively:

emerge --autounmask-write -a =app-text/vale-3.26.0

Package Information

Description:
Markup-aware linter for prose
Homepage:
https://vale.sh/ https://github.com/vale-cli/vale
License:
MIT Apache-2.0 BSD BSD-2 ISC

Ebuild Details

Version EAPI Keywords Slot
3.26.0 8 ~amd64 0
View Raw Ebuild
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{12..15} )

inherit go-module optfeature python-any-r1

DESCRIPTION="Markup-aware linter for prose"
HOMEPAGE="https://vale.sh/ https://github.com/vale-cli/vale"

# go mod vendor skips directories without Go files, and php's tree-sitter
# scanner includes headers from one.
# To generate the vendor tarball:
#   tar -xf ${P}.tar.gz
#   cd ${P}
#   go mod vendor
#   cp -r --no-preserve=mode "$(go list -mod=mod -m -f '{{.Dir}}' \
#       github.com/smacker/go-tree-sitter)"/php/tree_sitter \
#       vendor/github.com/smacker/go-tree-sitter/php
#   cd ..
#   tar --sort=name --mtime=@0 --owner=0 --group=0 --numeric-owner \
#       -cf - ${P}/vendor | xz -9e >"${P}-vendor.tar.xz"
SRC_URI="
	https://github.com/vale-cli/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
	https://github.com/vklimovs/portage-overlay/releases/download/${P}-vendor.tar.xz/${P}-vendor.tar.xz
"

# vale itself
LICENSE="MIT"
# Vendored package licenses
LICENSE+=" Apache-2.0 BSD BSD-2 ISC"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"
RESTRICT="!test? ( test )"

BDEPEND="
	>=dev-lang/go-1.25.7
	test? (
		$(python_gen_any_dep 'dev-python/docutils[${PYTHON_USEDEP}]')
		dev-libs/libxslt
		dev-ruby/asciidoctor
	)
"

python_check_deps() {
	python_has_version "dev-python/docutils[${PYTHON_USEDEP}]"
}

pkg_setup() {
	use test && python-any-r1_pkg_setup
}

src_compile() {
	ego build \
		-mod=vendor \
		-trimpath \
		-ldflags "-X main.version=${PV}" \
		-o "${PN}" ./cmd/vale
}

src_test() {
	# Vale reads rst2html's shebang to find the Python with Docutils, and
	# python-exec's wrapper names none. TestSymlinkFixture runs `vale` by name.
	local -x PATH="${EPREFIX}/usr/lib/python-exec/${EPYTHON}:${S}:${PATH}"
	# These fetch from GitHub.
	ego test -mod=vendor \
		-skip '^TestLibrary$|^TestNoPkgFound$|^TestScenarios$/^pkg$' \
		./...
}

src_install() {
	dobin "${PN}"
	einstalldocs
}

pkg_postinst() {
	optfeature "AsciiDoc support" dev-ruby/asciidoctor
	optfeature "reStructuredText support" dev-python/docutils
	optfeature "XML support" dev-libs/libxslt
}

USE Flags

Manage flags for this package: euse -i <flag> -p app-text/vale | euse -E <flag> -p app-text/vale | euse -D <flag> -p app-text/vale

Global/Standard Flags

Inherited Eclasses

Dependencies

BDEPEND

	>=dev-lang/go-1.25.7
	test? (
		$(python_gen_any_dep 'dev-python/docutils[${PYTHON_USEDEP}]')
		dev-libs/libxslt
		dev-ruby/asciidoctor
	)

Manifest for 3.26.0

Type File Size Source URLs
DIST vale-3.26.0-vendor.tar.xz 14718980 bytes https://github.com/vklimovs/portage-overlay/releases/download/vale-3.26.0-vendor.tar.xz/vale-3.26.0-vendor.tar.xz
DIST vale-3.26.0.tar.gz 10207568 bytes https://github.com/vale-cli/vale/archive/v3.26.0.tar.gz