dev-libs/libinput: implement usage of python-any-r1.eclass
authorArfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com>
Tue, 16 Oct 2018 09:41:54 +0000 (11:41 +0200)
committerLars Wendler <polynomial-c@gentoo.org>
Tue, 16 Oct 2018 09:44:56 +0000 (11:44 +0200)
Closes: https://bugs.gentoo.org/665722
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

dev-libs/libinput/libinput-1.12.1-r1.ebuild

index 6da9ac2bd8d64cc7ee739045d57197105c39eb37..f62f6c75ec66f59c55021f3ecd96c95930b9d805 100644 (file)
@@ -2,7 +2,9 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
-inherit meson udev
+PYTHON_COMPAT=( python{2_7,3_{4,5,6,7}} )
+
+inherit meson python-any-r1 udev
 
 DESCRIPTION="Library to handle input devices in Wayland"
 HOMEPAGE="https://www.freedesktop.org/wiki/Software/libinput/"
@@ -26,9 +28,11 @@ RDEPEND="
 DEPEND="${RDEPEND}
        virtual/pkgconfig
        doc? (
-               dev-python/CommonMark
-               dev-python/recommonmark
-               dev-python/sphinx
+               $(python_gen_any_dep '
+                       dev-python/CommonMark[${PYTHON_USEDEP}]
+                       dev-python/recommonmark[${PYTHON_USEDEP}]
+                       dev-python/sphinx[${PYTHON_USEDEP}]
+               ')
                >=app-doc/doxygen-1.8.3
                >=media-gfx/graphviz-2.38.0
        )
@@ -38,6 +42,12 @@ DEPEND="${RDEPEND}
 #              dev-util/valgrind
 #              sys-libs/libunwind )
 
+python_check_deps() {
+       has_version "dev-python/CommonMark[${PYTHON_USEDEP}]" && \
+       has_version "dev-python/recommonmark[${PYTHON_USEDEP}]" && \
+       has_version "dev-python/sphinx[${PYTHON_USEDEP}]"
+}
+
 src_configure() {
        # gui can be built but will not be installed
        local emesonargs=(