sys-fs/ocfs2-tools: python-single-r1, EAPI=6
authorMichał Górny <mgorny@gentoo.org>
Mon, 20 Feb 2017 08:36:50 +0000 (09:36 +0100)
committerMichał Górny <mgorny@gentoo.org>
Mon, 20 Feb 2017 09:14:48 +0000 (10:14 +0100)
sys-fs/ocfs2-tools/files/ocfs2-tools-1.6.4-asneeded.patch
sys-fs/ocfs2-tools/ocfs2-tools-1.8.2-r2.ebuild [moved from sys-fs/ocfs2-tools/ocfs2-tools-1.8.2-r1.ebuild with 75% similarity]

index c382522f14ed8b690433651349553eb2c4fa5896..8920e773004b55b64f11517ea7d4dbc914ab494c 100644 (file)
@@ -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
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 dbc30d9c272d71f15886d51f4680bfc8d476725d..48fb07ac4b86bd256ac1c2c13dcc4342603cfcbe 100644 (file)
@@ -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
 }