commit:     cbac4836a6739c0e1b333b7b1738267cd420cbb6
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 21 19:06:26 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sun Apr 21 19:10:48 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cbac4836

dev-vcs/git-remote-hg: Bump to version 1.0.0

Package-Manager: Portage-2.3.64, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 dev-vcs/git-remote-hg/Manifest                     |  1 +
 ...-remote-hg-1.0.0-get_version_from_release.patch | 34 +++++++++++++++
 dev-vcs/git-remote-hg/git-remote-hg-1.0.0.ebuild   | 50 ++++++++++++++++++++++
 3 files changed, 85 insertions(+)

diff --git a/dev-vcs/git-remote-hg/Manifest b/dev-vcs/git-remote-hg/Manifest
index 61922278598..499de489bac 100644
--- a/dev-vcs/git-remote-hg/Manifest
+++ b/dev-vcs/git-remote-hg/Manifest
@@ -1,2 +1,3 @@
 DIST git-remote-hg-0.2.tar.gz 30397 BLAKE2B 
9c96c420a9e38fb3e0a223f12343834abdb742d15140330b1f5a12b68da924466106a279802a525c085c176d706cce427e73b1f86eeb99a6a413ab6de5954b18
 SHA512 
eb08a90b786593602510fef6210bb381a605d6c4cfda7e0c1051162d0a9929c077081f530dcdfb95f6fd8f0114ed44ea2c8f267e0e7ac110f9445941c9dd8546
 DIST git-remote-hg-0.3.tar.gz 30995 BLAKE2B 
c65918a985459149df85b1519f4d4b15be53c26d28a32cb660d85fa386a488668e2d042c7687fd4ea0928237d3098d5d3bcd77f8a0e78742b530b7cc2dff1195
 SHA512 
33ff1874909c0ce4d8b44d1dfd6ae706df44b36ead566e09be0f4e94e3b2a5c8603bd2f2fd50e8faa99d6aeb44a7792d7118c4413f8c9a8b8c29108b534bb4f4
+DIST git-remote-hg-1.0.0.tar.gz 57611 BLAKE2B 
f46ca860bd7c46985ef53d5adfb949290208e351425a31fbfd33e6cf632c40b043397d398a5c378c653ab2b303d427c4b5bf29250fb51631f87cb2dbb0b541b5
 SHA512 
344349b8c64db5ad629176c664713773b4e8fe5ddf6bd13e7f3cac421f82eeb93fdd8aa59a2baab4b36b533cd6721adf8d31c69d4cc761e43c093c4d531c1a7d

diff --git 
a/dev-vcs/git-remote-hg/files/git-remote-hg-1.0.0-get_version_from_release.patch
 
b/dev-vcs/git-remote-hg/files/git-remote-hg-1.0.0-get_version_from_release.patch
new file mode 100644
index 00000000000..7226e33aa43
--- /dev/null
+++ 
b/dev-vcs/git-remote-hg/files/git-remote-hg-1.0.0-get_version_from_release.patch
@@ -0,0 +1,34 @@
+From bad5ec1a42d6c1ffae3ac94a5bacc95ffdbe3626 Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomia...@gentoo.org>
+Date: Sun, 21 Apr 2019 20:34:41 +0200
+Subject: [PATCH] Don't try to fetch version via git from a release
+
+Signed-off-by: Lars Wendler <polynomia...@gentoo.org>
+---
+ setup.py | 10 +---------
+ 1 file changed, 1 insertion(+), 9 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 26afd17..6c84c99 100644
+--- a/setup.py
++++ b/setup.py
+@@ -5,15 +5,7 @@ import subprocess
+ import sys
+ import os
+ 
+-# derive version from git repo
+-cmd = ["git", "describe", "--tags"]
+-commit = os.environ.get('REV', None)
+-if commit:
+-  cmd.append(commit)
+-process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
+-version = process.communicate()[0].strip()
+-# strip leading v
+-version = version[1:]
++version = os.environ['PV']
+ 
+ # check for released version
+ assert (len(version) > 0)
+-- 
+2.21.0
+

diff --git a/dev-vcs/git-remote-hg/git-remote-hg-1.0.0.ebuild 
b/dev-vcs/git-remote-hg/git-remote-hg-1.0.0.ebuild
new file mode 100644
index 00000000000..be29b35c4e6
--- /dev/null
+++ b/dev-vcs/git-remote-hg/git-remote-hg-1.0.0.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+PYTHON_COMPAT=( python2_7 )
+
+inherit distutils-r1
+
+DESCRIPTION="Semi-official Mercurial bridge from Git project"
+HOMEPAGE="https://github.com/mnauw/git-remote-hg";
+SRC_URI="https://github.com/mnauw/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+CDEPEND="
+       ${PYTHON_DEPEND}
+"
+RDEPEND="
+       ${CDEPEND}
+       dev-vcs/git
+       dev-vcs/mercurial
+"
+DEPEND="${CDEPEND}"
+BDEPEND="
+       app-text/asciidoc
+"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-1.0.0-get_version_from_release.patch"
+)
+
+# Some tests fail:
+RESTRICT="test"
+
+src_compile() {
+       distutils-r1_src_compile
+       emake doc
+}
+
+src_install() {
+       distutils-r1_src_install
+       emake DESTDIR="${D}" prefix="${EPREFIX}/usr" install-doc
+}
+
+src_test() {
+       pushd test &>/dev/null || die
+       default
+}

Reply via email to