public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-vcs/cli/
Date: Thu, 12 Mar 2020 19:53:53 +0000 (UTC)	[thread overview]
Message-ID: <1584042788.8ce09c2ea369a9eb9973e02dfec64dfc9cc7d1dd.robbat2@gentoo> (raw)

commit:     8ce09c2ea369a9eb9973e02dfec64dfc9cc7d1dd
Author:     Lucian Poston <lucianposton <AT> pm <DOT> me>
AuthorDate: Sun Mar  8 20:08:01 2020 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Thu Mar 12 19:53:08 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ce09c2e

dev-vcs/cli: Add 9999 and misc cleanups

- Added 9999 live ebuild
- Removed unused eclass
- Added missing licenses
- Use default src_test since it is sufficient
- Add "v" prefix to GH_VERSION to be consistent with upstream builds
- Fix --version by setting LDFLAGS env var instead of Makefile var

Closes: https://bugs.gentoo.org/711998
Closes: https://github.com/gentoo/gentoo/pull/14870
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Lucian Poston <lucianposton <AT> pm.me>
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

 dev-vcs/cli/cli-0.6.1.ebuild                      | 35 ++++++++++++++++-------
 dev-vcs/cli/{cli-0.6.1.ebuild => cli-9999.ebuild} | 35 ++++++++++++++++-------
 2 files changed, 48 insertions(+), 22 deletions(-)

diff --git a/dev-vcs/cli/cli-0.6.1.ebuild b/dev-vcs/cli/cli-0.6.1.ebuild
index 0f4c7fd08d0..7deea7cf7bf 100644
--- a/dev-vcs/cli/cli-0.6.1.ebuild
+++ b/dev-vcs/cli/cli-0.6.1.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-inherit bash-completion-r1 go-module
+inherit go-module
 
 DESCRIPTION="GitHub CLI"
 HOMEPAGE="https://github.com/cli/cli"
@@ -250,24 +250,37 @@ EGO_SUM=(
 	"gopkg.in/yaml.v3 v3.0.0-20200121175148-a6ecf24a6d71/go.mod"
 	"honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod"
 	)
-go-module_set_globals
-SRC_URI="https://github.com/cli/cli/archive/v${PV}.tar.gz -> ${P}.tar.gz
-		${EGO_SUM_SRC_URI}"
 
-LICENSE="MIT"
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/cli/cli.git"
+	PROPERTIES="live"
+else
+	go-module_set_globals
+	SRC_URI="https://github.com/cli/cli/archive/v${PV}.tar.gz -> ${P}.tar.gz
+			${EGO_SUM_SRC_URI}"
+	KEYWORDS="~amd64"
+fi
+
+LICENSE="MIT Apache-2.0 BSD BSD-2 MPL-2.0"
 SLOT="0"
-KEYWORDS="~amd64"
 
 RDEPEND=">=dev-vcs/git-1.7.3"
 BDEPEND=">=dev-lang/go-1.13"
 
-src_compile() {
-	# Golang LDFLAGS are not the same as GCC/Binutils LDFLAGS
-	emake bin/gh GH_VERSION=${PV} LDFLAGS=""
+src_unpack() {
+	if has live "${PROPERTIES}"; then
+		git-r3_src_unpack
+		go-module_live_vendor
+	else
+		go-module_src_unpack
+	fi
 }
 
-src_test() {
-	emake test
+src_compile() {
+	has live "${PROPERTIES}" || export GH_VERSION="v${PV}"
+	# Golang LDFLAGS are not the same as GCC/Binutils LDFLAGS
+	LDFLAGS="" emake bin/gh
 }
 
 src_install() {

diff --git a/dev-vcs/cli/cli-0.6.1.ebuild b/dev-vcs/cli/cli-9999.ebuild
similarity index 96%
copy from dev-vcs/cli/cli-0.6.1.ebuild
copy to dev-vcs/cli/cli-9999.ebuild
index 0f4c7fd08d0..7deea7cf7bf 100644
--- a/dev-vcs/cli/cli-0.6.1.ebuild
+++ b/dev-vcs/cli/cli-9999.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
-inherit bash-completion-r1 go-module
+inherit go-module
 
 DESCRIPTION="GitHub CLI"
 HOMEPAGE="https://github.com/cli/cli"
@@ -250,24 +250,37 @@ EGO_SUM=(
 	"gopkg.in/yaml.v3 v3.0.0-20200121175148-a6ecf24a6d71/go.mod"
 	"honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod"
 	)
-go-module_set_globals
-SRC_URI="https://github.com/cli/cli/archive/v${PV}.tar.gz -> ${P}.tar.gz
-		${EGO_SUM_SRC_URI}"
 
-LICENSE="MIT"
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/cli/cli.git"
+	PROPERTIES="live"
+else
+	go-module_set_globals
+	SRC_URI="https://github.com/cli/cli/archive/v${PV}.tar.gz -> ${P}.tar.gz
+			${EGO_SUM_SRC_URI}"
+	KEYWORDS="~amd64"
+fi
+
+LICENSE="MIT Apache-2.0 BSD BSD-2 MPL-2.0"
 SLOT="0"
-KEYWORDS="~amd64"
 
 RDEPEND=">=dev-vcs/git-1.7.3"
 BDEPEND=">=dev-lang/go-1.13"
 
-src_compile() {
-	# Golang LDFLAGS are not the same as GCC/Binutils LDFLAGS
-	emake bin/gh GH_VERSION=${PV} LDFLAGS=""
+src_unpack() {
+	if has live "${PROPERTIES}"; then
+		git-r3_src_unpack
+		go-module_live_vendor
+	else
+		go-module_src_unpack
+	fi
 }
 
-src_test() {
-	emake test
+src_compile() {
+	has live "${PROPERTIES}" || export GH_VERSION="v${PV}"
+	# Golang LDFLAGS are not the same as GCC/Binutils LDFLAGS
+	LDFLAGS="" emake bin/gh
 }
 
 src_install() {


             reply	other threads:[~2020-03-12 19:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12 19:53 Robin H. Johnson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-05-18 15:48 [gentoo-commits] repo/gentoo:master commit in: dev-vcs/cli/ Mike Gilbert
2020-05-16 20:38 William Hubbs
2020-05-16 20:30 William Hubbs
2020-05-03 16:26 William Hubbs
2020-04-04 16:35 William Hubbs
2020-04-04 15:29 William Hubbs
2020-03-21 19:29 William Hubbs
2020-03-08 18:49 William Hubbs
2020-03-08 18:49 William Hubbs
2020-03-07 20:02 Robin H. Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1584042788.8ce09c2ea369a9eb9973e02dfec64dfc9cc7d1dd.robbat2@gentoo \
    --to=robbat2@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox