commit:     87538dbfc9960d7b766279cea625f86d6add843c
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  1 06:03:51 2017 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Oct  1 06:04:17 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87538dbf

sci-electronics/klayout: Add python scripting support

Package-Manager: Portage-2.3.10, Repoman-2.3.3

 sci-electronics/klayout/klayout-9999.ebuild | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/sci-electronics/klayout/klayout-9999.ebuild 
b/sci-electronics/klayout/klayout-9999.ebuild
index a23a11d67fb..c7e32ad87f9 100644
--- a/sci-electronics/klayout/klayout-9999.ebuild
+++ b/sci-electronics/klayout/klayout-9999.ebuild
@@ -3,12 +3,13 @@
 
 EAPI=6
 
+RUBY_OPTIONAL=no
 USE_RUBY="ruby22"
 # note: define maximally ONE implementation here
 
-RUBY_OPTIONAL=no
+PYTHON_COMPAT=( python{2_7,3_{4,5,6}} )
 
-inherit eutils multilib toolchain-funcs ruby-ng
+inherit eutils multilib toolchain-funcs python-single-r1 ruby-ng
 
 if [[ ${PV} = 9999* ]]; then
        EGIT_REPO_URI="https://github.com/klayoutmatthias/${PN}.git";
@@ -31,6 +32,7 @@ RDEPEND="
        dev-qt/qtgui:5
        dev-qt/qtwidgets:5
        sys-libs/zlib
+       ${PYTHON_DEPS}
        $(ruby_implementations_depend)
 "
 DEPEND="${RDEPEND}"
@@ -39,6 +41,11 @@ PATCHES=(
        "${FILESDIR}/${PN}-9999-expert.patch"
 )
 
+pkg_setup() {
+       python-single-r1_pkg_setup
+       ruby-ng_pkg_setup
+}
+
 each_ruby_configure() {
        tc-export CC CXX AR LD RANLIB
        export CFLAGS CXXFLAGS
@@ -47,7 +54,7 @@ each_ruby_configure() {
                -dry-run \
                -qmake /usr/lib64/qt5/bin/qmake \
                -ruby "${RUBY}" \
-               -nopython \
+               -python "${PYTHON}" \
                -build . \
                -bin "${T}/bin" \
                -rpath "/usr/$(get_libdir)/klayout" \

Reply via email to