commit:     d5953de62fb146ca9b90c0e91127d24f8c1fe46b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 20 08:36:50 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Feb 20 09:14:48 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5953de6

sys-fs/ocfs2-tools: python-single-r1, EAPI=6

 .../files/ocfs2-tools-1.6.4-asneeded.patch         |  8 +++---
 ...1.8.2-r1.ebuild => ocfs2-tools-1.8.2-r2.ebuild} | 31 +++++++++++++---------
 2 files changed, 22 insertions(+), 17 deletions(-)

diff --git a/sys-fs/ocfs2-tools/files/ocfs2-tools-1.6.4-asneeded.patch 
b/sys-fs/ocfs2-tools/files/ocfs2-tools-1.6.4-asneeded.patch
index c382522f14..8920e77300 100644
--- a/sys-fs/ocfs2-tools/files/ocfs2-tools-1.6.4-asneeded.patch
+++ b/sys-fs/ocfs2-tools/files/ocfs2-tools-1.6.4-asneeded.patch
@@ -1,5 +1,5 @@
---- configure.in.orig  2011-01-19 20:43:35.000000000 +0100
-+++ configure.in       2012-02-21 11:14:51.047974999 +0100
+--- a/configure.in     2011-01-19 20:43:35.000000000 +0100
++++ b/configure.in     2012-02-21 11:14:51.047974999 +0100
 @@ -265,7 +265,6 @@
          cpg_package=openais
      fi
@@ -65,8 +65,8 @@
  fi
  AC_SUBST(AIS_LDFLAGS)
 
---- ocfs2_controld/Makefile.orig       2012-02-21 11:49:36.248974932 +0100
-+++ ocfs2_controld/Makefile    2012-02-21 11:49:47.943974980 +0100
+--- a/ocfs2_controld/Makefile  2012-02-21 11:49:36.248974932 +0100
++++ b/ocfs2_controld/Makefile  2012-02-21 11:49:47.943974980 +0100
 @@ -14,7 +14,7 @@
  ifneq ($(BUILD_PCMK_SUPPORT),)
  SBIN_PROGRAMS += ocfs2_controld.pcmk

diff --git a/sys-fs/ocfs2-tools/ocfs2-tools-1.8.2-r1.ebuild 
b/sys-fs/ocfs2-tools/ocfs2-tools-1.8.2-r2.ebuild
similarity index 75%
rename from sys-fs/ocfs2-tools/ocfs2-tools-1.8.2-r1.ebuild
rename to sys-fs/ocfs2-tools/ocfs2-tools-1.8.2-r2.ebuild
index dbc30d9c27..48fb07ac4b 100644
--- a/sys-fs/ocfs2-tools/ocfs2-tools-1.8.2-r1.ebuild
+++ b/sys-fs/ocfs2-tools/ocfs2-tools-1.8.2-r2.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI=4
-PYTHON_DEPEND="gtk? 2"
-inherit autotools eutils python
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+inherit autotools python-single-r1
 
 DESCRIPTION="Support programs for the Oracle Cluster Filesystem 2"
 HOMEPAGE="http://oss.oracle.com/projects/ocfs2-tools/";
@@ -16,25 +16,29 @@ KEYWORDS="~amd64 ~x86"
 IUSE="debug external gtk"
 
 RDEPEND="
-       dev-libs/libaio
-       sys-apps/util-linux
+       dev-libs/libaio:=
+       sys-apps/util-linux:=
        sys-cluster/libcman
        external? (
                sys-cluster/libdlm
                sys-cluster/pacemaker[-heartbeat]
                )
        sys-fs/e2fsprogs
-       sys-libs/ncurses
-       sys-libs/readline
+       sys-libs/e2fsprogs-libs:=
+       sys-libs/ncurses:0=
+       sys-libs/readline:0=
        sys-process/psmisc
        gtk? (
-               dev-python/pygtk
+               ${PYTHON_DEPS}
+               dev-python/pygtk[${PYTHON_USEDEP}]
        )
 "
 # 99% of deps this thing has is automagic
 # specialy cluster things corosync/pacemaker
 DEPEND="${RDEPEND}"
 
+REQUIRED_USE="gtk? ( ${PYTHON_REQUIRED_USE} )"
+
 DOCS=(
        "${S}/documentation/samples/cluster.conf"
        "${S}/documentation/users_guide.txt"
@@ -48,8 +52,7 @@ PATCHES=(
 )
 
 pkg_setup() {
-       python_set_active_version 2
-       python_pkg_setup
+       use gtk && python-single-r1_pkg_setup
 }
 
 src_prepare() {
@@ -58,9 +61,10 @@ src_prepare() {
        sed -e 's:"/dlm/":"/sys/kernel/dlm":g' \
                -i libo2dlm/o2dlm_test.c \
                -i libocfs2/dlm.c || die "sed failed"
-       epatch "${PATCHES[@]}"
-       rm -f aclocal.m4
+       default
+       rm -f aclocal.m4 || die
        AT_M4DIR=. eautoreconf
+       use gtk && python_fix_shebang .
 }
 
 src_configure() {
@@ -74,6 +78,7 @@ src_configure() {
 
 src_install() {
        default
+       use gtk && python_optimize
        newinitd "${FILESDIR}/ocfs2.initd" ocfs2
        newconfd "${FILESDIR}/ocfs2.confd" ocfs2
 }

Reply via email to