dev-util/topiary: new package, add 0.6.1

Signed-off-by: Jonas Frei <freijon@pm.me>
This commit is contained in:
Jonas Frei
2025-06-25 20:39:12 +02:00
parent 55519d017d
commit 610613462f
3 changed files with 79 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
DIST topiary-0.6.1-crates.tar.xz 32670876 BLAKE2B 11f34cc0ea749ebd99de276af5bab5e8b49bd826e9346ae0cb372ded2170dec82d7e5b4cddb546f5f1ab1753d968561d1cf7e1be36a8403d83662384217028e6 SHA512 973b4a3704c790710af31052131b6636be97ab8e06692532d447a4fe19da5654d0ed829b1b424d6a8008d04613dc7c4c40cc48ccf1c007a4352719ece48d6402
DIST topiary-0.6.1.tar.gz 2775747 BLAKE2B 688e0d6ce4860f7e8ee26ffeaa1fbfa1a0ff8b856cfc66fb9c2064a6163e47abd3f4f9c15872e23b925a054cc7cdeb69252ef26f34fcda35bb915aad354f7c54 SHA512 94bd32f631c4cf75816cb61217221556ade590b24e2d70f986950a65162197e3279dfdf4a99ab8070f35114ddc02ae3f432b0063f99c5b7d620d8485c303ae14

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<name>Jonas Frei</name>
<email>freijon@pm.me</email>
</maintainer>
<upstream>
<remote-id type="github">tweag/topiary</remote-id>
<bugs-to>https://github.com/tweag/topiary/issues</bugs-to>
</upstream>
</pkgmetadata>

View File

@@ -0,0 +1,65 @@
# Copyright 2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Autogenerated by pycargoebuild 0.15.0
EAPI=8
CRATES=""
inherit cargo shell-completion
DESCRIPTION="CLI app for Topiary, the universal code formatter."
HOMEPAGE="https://topiary.tweag.io"
SRC_URI="https://github.com/tweag/topiary/releases/download/v${PV}/source.tar.gz -> ${P}.tar.gz"
SRC_URI+=" https://github.com/freijon/${PN}/releases/download/v${PV}/${P}-crates.tar.xz"
S="${WORKDIR}/${PN}-cli-${PV}"
LICENSE="MIT"
# Dependent crate licenses
LICENSE+="
Apache-2.0 BSD CDLA-Permissive-2.0 ISC LGPL-3 MIT MPL-2.0 MPL-2.0
Unicode-3.0 ZLIB
"
SLOT="0"
KEYWORDS="~amd64"
DEPEND="
dev-libs/openssl:0=
"
RDEPEND="${DEPEND}"
BDEPEND="
virtual/pkgconfig
"
src_configure() {
# high magic to allow system-libs
export OPENSSL_NO_VENDOR=true
export RUSTONIG_SYSTEM_LIBONIG=1
export LIBSSH2_SYS_USE_PKG_CONFIG=1
export PKG_CONFIG_ALLOW_CROSS=1
cargo_src_configure
}
src_compile() {
cargo_src_compile
TOPIARY_BIN="$(cargo_target_dir)/${PN}"
# Prepare shell completion generation
mkdir completions || die
local shell
for shell in bash fish zsh; do
"${TOPIARY_BIN}" completion ${shell} > "completions/${PN}.${shell}" || die
done
}
src_install() {
dobin "$(cargo_target_dir)/${PN}"
newbashcomp "completions/${PN}.bash" "${PN}"
dofishcomp "completions/${PN}.fish"
newzshcomp "completions/${PN}.zsh" "_${PN}"
}