app-text/cmark: use python-any-r1 instead hardcoded, #615908
authorAzamat H. Hackimov <azamat.hackimov@gmail.com>
Tue, 18 Apr 2017 07:49:49 +0000 (12:49 +0500)
committerMichał Górny <mgorny@gentoo.org>
Thu, 20 Apr 2017 16:14:30 +0000 (18:14 +0200)
Bug: https://bugs.gentoo.org/615908
Closes: https://github.com/gentoo/gentoo/pull/4437
Package-Manager: Portage-2.3.3, Repoman-2.3.1

app-text/cmark/cmark-0.27.1.ebuild

index b7ae5b0f010e620b3bf9a8c0745d4f83e6e51b01..a69f2b36f50b5bf8a5221cddb473b6da6b90a0b2 100644 (file)
@@ -3,7 +3,9 @@
 
 EAPI=6
 
-inherit cmake-utils
+PYTHON_COMPAT=( python3_{4,5} )
+
+inherit cmake-utils python-any-r1
 
 DESCRIPTION="CommonMark parsing and rendering library and program in C"
 HOMEPAGE="https://github.com/jgm/cmark"
@@ -15,9 +17,13 @@ KEYWORDS="~amd64 ~x86"
 IUSE="test"
 
 DEPEND="
-       test? ( || ( dev-lang/python:3.4 dev-lang/python:3.5 ) )"
+       test? ( ${PYTHON_DEPS} )"
 RDEPEND=""
 
+pkg_setup() {
+       use test && python-any-r1_pkg_setup
+}
+
 src_prepare() {
        cmake-utils_src_prepare
        # Remove static library from installing