From 373d4d774e238deb76a0c9552065f6b12d225dbb Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 14 Jun 2021 22:31:33 -0700 Subject: app-misc/jp: Bump to version 0.1.3.1 and switch to my jpp "fork" I've forked the package since upstream has been unresponsive to jp merge requests for some time, though JMESPath lives on. I intend to keep the original jp command as-is, while adding extensions to the new jpp command. Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Zac Medico --- app-misc/jp/Manifest | 2 +- app-misc/jp/jp-0.1.3.1.ebuild | 50 +++++++++++++++++++++++++++++++++++++++++++ app-misc/jp/jp-0.1.3.ebuild | 38 -------------------------------- app-misc/jp/metadata.xml | 14 +++++++++--- 4 files changed, 62 insertions(+), 42 deletions(-) create mode 100644 app-misc/jp/jp-0.1.3.1.ebuild delete mode 100644 app-misc/jp/jp-0.1.3.ebuild diff --git a/app-misc/jp/Manifest b/app-misc/jp/Manifest index d2350ffe51fc..4cbdc511c695 100644 --- a/app-misc/jp/Manifest +++ b/app-misc/jp/Manifest @@ -1 +1 @@ -DIST jp-0.1.3.tar.gz 62719 BLAKE2B cb7783cc5e23c279237a12284e7be2e6af25477d89a087dc5b5717e3aece7325fd7f056310ed79dead578425177df96911df092ecf82e3e75c935db1137a0341 SHA512 bf7c5ad2889404145b2e5e9e3e30f7e136fc81b7026114801bdd8ea65b78609d91c20f35c4717aff1bfb9750cdf5a8d9f405177ac8716851cbf391ee8c7e1e04 +DIST jpp-0.1.3.1.tar.gz 64129 BLAKE2B a3663ee0a6b212a455dbe4c01f83fb450a5d17ff8f2173becc970133ed9a29b102280fbeb13730eebe69ebf481703e382df8456d030abbff695a5cc72a0faa36 SHA512 65844497d988645717363f812c14886e1a5befa925085527029145c4b5c7a3466c193bb6a8f1bc47c66e5cd616ae87eee25077278a48abcc4980dda08d3fc6bb diff --git a/app-misc/jp/jp-0.1.3.1.ebuild b/app-misc/jp/jp-0.1.3.1.ebuild new file mode 100644 index 000000000000..2d61bd19fce0 --- /dev/null +++ b/app-misc/jp/jp-0.1.3.1.ebuild @@ -0,0 +1,50 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit go-module + +MY_PN=jpp +MY_P=${MY_PN}-${PV} + +DESCRIPTION="Command line interface to JMESPath" +HOMEPAGE="https://github.com/pipebus/jpp https://github.com/jmespath/jp http://jmespath.org" +SRC_URI="https://github.com/pipebus/jpp/archive/refs/tags/v${PV}.tar.gz -> ${MY_P}.tar.gz" + +LICENSE="Apache-2.0 MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+jp +jpp" +RESTRICT+=" test" +REQUIRED_USE="|| ( jp jpp )" + +S=${WORKDIR}/${MY_P} + +src_prepare() { + if [[ -e $S/go.mod ]]; then + die "found unexpected $S/go.mod" + fi + cat <<-EOF > "$S/go.mod" + module github.com/jmespath/jp + replace github.com/jmespath/jp => ./ + EOF + + sed -e 's|except Exception, e|except Exception as e|' -i test/jp-compliance || die + + default +} + +src_compile() { + if use jp; then + go build -mod=readonly -o ./jp ./jp.go || die + fi + if use jpp; then + go build -mod=readonly -o ./jpp ./cmd/jpp/main.go || die + fi +} + +src_install() { + use jp && dobin "./jp" + use jpp && dobin "./jpp" + dodoc README.md +} diff --git a/app-misc/jp/jp-0.1.3.ebuild b/app-misc/jp/jp-0.1.3.ebuild deleted file mode 100644 index 9370bd2d418f..000000000000 --- a/app-misc/jp/jp-0.1.3.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -inherit go-module - -DESCRIPTION="Command line interface to JMESPath" -HOMEPAGE="https://github.com/jmespath/jp http://jmespath.org" -SRC_URI="https://github.com/jmespath/jp/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" - -LICENSE="Apache-2.0 MIT" -SLOT="0" -KEYWORDS="~amd64" -IUSE="" -RESTRICT+=" test" - -src_prepare() { - if [[ -e $S/go.mod ]]; then - die "found unexpected $S/go.mod" - fi - cat <<-EOF > "$S/go.mod" - module github.com/jmespath/jp - replace github.com/jmespath/jp => ./ - EOF - - sed -e 's|except Exception, e|except Exception as e|' -i test/jp-compliance || die - - default -} - -src_compile() { - go build -mod=readonly -o ./jp ./jp.go || die -} - -src_install() { - dobin "./jp" - dodoc README.md -} diff --git a/app-misc/jp/metadata.xml b/app-misc/jp/metadata.xml index ef594962c7b6..8a0623114292 100644 --- a/app-misc/jp/metadata.xml +++ b/app-misc/jp/metadata.xml @@ -6,8 +6,16 @@ Zac Medico - https://github.com/jmespath/jp/issues - https://github.com/jmespath/jp/commits/master - jmespath/jp + https://github.com/pipebus/jpp/issues + https://github.com/pipebus/jpp/commits/master + pipebus/jpp + + + Install jp which is the official jp CLI for JMESPath + + + Install jpp which is an extended superset of the jp CLI for JMESPath + + -- cgit v1.2.3-65-gdbad