From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1180832-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 4EB821382C5
	for <garchives@archives.gentoo.org>; Sat, 20 Jun 2020 00:26:14 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id DE204E0833;
	Sat, 20 Jun 2020 00:26:11 +0000 (UTC)
Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id EEBAFE0843
	for <gentoo-commits@lists.gentoo.org>; Sat, 20 Jun 2020 00:26:07 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 996DB34F267
	for <gentoo-commits@lists.gentoo.org>; Sat, 20 Jun 2020 00:26:06 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 30A772A9
	for <gentoo-commits@lists.gentoo.org>; Sat, 20 Jun 2020 00:26:02 +0000 (UTC)
From: "Aaron Bauman" <bman@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Aaron Bauman" <bman@gentoo.org>
Message-ID: <1592612555.131ece7fff304dae10e8efb0fb600c5751092900.bman@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/subliminal/
X-VCS-Repository: repo/gentoo
X-VCS-Files: media-video/subliminal/subliminal-2.1.0.ebuild media-video/subliminal/subliminal-9999.ebuild
X-VCS-Directories: media-video/subliminal/
X-VCS-Committer: bman
X-VCS-Committer-Name: Aaron Bauman
X-VCS-Revision: 131ece7fff304dae10e8efb0fb600c5751092900
X-VCS-Branch: master
Date: Sat, 20 Jun 2020 00:26:02 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: d4a5d831-4de5-4fc7-b200-eec18aae8363
X-Archives-Hash: 698607a131de80fa36cf63f85162b2be

commit:     131ece7fff304dae10e8efb0fb600c5751092900
Author:     Sam James (sam_c) <sam <AT> cmpct <DOT> info>
AuthorDate: Wed Jun 17 20:44:06 2020 +0000
Commit:     Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Sat Jun 20 00:22:35 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=131ece7f

media-video/subliminal: rewrite live ebuild to be agnostic

Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Sam James (sam_c) <sam <AT> cmpct.info>
Closes: https://github.com/gentoo/gentoo/pull/16084
Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>

 media-video/subliminal/subliminal-2.1.0.ebuild | 26 ++++++++++++++++++++-----
 media-video/subliminal/subliminal-9999.ebuild  | 27 ++++++++++++++++++--------
 2 files changed, 40 insertions(+), 13 deletions(-)

diff --git a/media-video/subliminal/subliminal-2.1.0.ebuild b/media-video/subliminal/subliminal-2.1.0.ebuild
index 9b14d3b3016..48473f15489 100644
--- a/media-video/subliminal/subliminal-2.1.0.ebuild
+++ b/media-video/subliminal/subliminal-2.1.0.ebuild
@@ -9,12 +9,19 @@ DISTUTILS_USE_SETUPTOOLS=rdepend
 
 inherit distutils-r1
 
+SRC_URI=""
+
+if [[ ${PV} == 9999 ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/Diaoul/${PN}.git"
+	EGIT_BRANCH="develop"
+else
+        SRC_URI="https://github.com/Diaoul/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
 DESCRIPTION="Python library to search and download subtitles"
 HOMEPAGE="https://github.com/Diaoul/subliminal https://pypi.org/project/subliminal/"
-SRC_URI="
-	https://github.com/Diaoul/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz
-	test? ( mirror://sourceforge/matroska/test_files/matroska_test_w1_1.zip )
-"
+SRC_URI+=" test? ( mirror://sourceforge/matroska/test_files/matroska_test_w1_1.zip )"
 
 LICENSE="MIT"
 SLOT="0"
@@ -53,6 +60,15 @@ PATCHES=(
 
 distutils_enable_tests pytest
 
+src_unpack() {
+	# Needed to unpack the test data
+	default
+
+	if [[ ${PV} == 9999 ]] ; then
+		git-r3_src_unpack
+	fi
+}
+
 python_prepare_all() {
 	# Disable code checkers as they require unavailable dependencies.
 	sed -i -e 's/--\(pep8\|flakes\)//g' pytest.ini || die
@@ -60,7 +76,7 @@ python_prepare_all() {
 	# Disable unconditional dependency on dev-python/pytest-runner.
 	sed -i -e "s|'pytest-runner'||g" setup.py || die
 
-	if use test; then
+	if use test ; then
 		mkdir -p tests/data/mkv || die
 		ln -s "${WORKDIR}"/test*.mkv tests/data/mkv/ || die
 	fi

diff --git a/media-video/subliminal/subliminal-9999.ebuild b/media-video/subliminal/subliminal-9999.ebuild
index 3043809fda4..54ade49d622 100644
--- a/media-video/subliminal/subliminal-9999.ebuild
+++ b/media-video/subliminal/subliminal-9999.ebuild
@@ -7,17 +7,24 @@ PYTHON_COMPAT=( python3_{6,7} )
 PYTHON_REQ_USE='xml(+)'
 DISTUTILS_USE_SETUPTOOLS=rdepend
 
-inherit distutils-r1 git-r3
+inherit distutils-r1
+
+SRC_URI=""
+
+if [[ ${PV} == 9999 ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/Diaoul/${PN}.git"
+	EGIT_BRANCH="develop"
+else
+	SRC_URI="https://github.com/Diaoul/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+fi
 
 DESCRIPTION="Python library to search and download subtitles"
 HOMEPAGE="https://github.com/Diaoul/subliminal https://pypi.org/project/subliminal/"
-EGIT_REPO_URI="https://github.com/Diaoul/${PN}.git"
-EGIT_BRANCH="develop"
-SRC_URI="test? ( mirror://sourceforge/matroska/test_files/matroska_test_w1_1.zip )"
+SRC_URI+=" test? ( mirror://sourceforge/matroska/test_files/matroska_test_w1_1.zip )"
 
 LICENSE="MIT"
 SLOT="0"
-KEYWORDS=""
 IUSE="test"
 RESTRICT="!test? ( test )"
 
@@ -53,8 +60,12 @@ PATCHES=(
 distutils_enable_tests pytest
 
 src_unpack() {
-	default_src_unpack
-	git-r3_src_unpack
+	# Needed to unpack the test data
+	default
+
+	if [[ ${PV} == 9999 ]] ; then
+		git-r3_src_unpack
+	fi
 }
 
 python_prepare_all() {
@@ -64,7 +75,7 @@ python_prepare_all() {
 	# Disable unconditional dependency on dev-python/pytest-runner.
 	sed -i -e "s|'pytest-runner'||g" setup.py || die
 
-	if use test; then
+	if use test ; then
 		mkdir -p tests/data/mkv || die
 		ln -s "${WORKDIR}"/test*.mkv tests/data/mkv/ || die
 	fi