sys-cluster/heartbeat: python-single-r1, EAPI=6
authorMichał Górny <mgorny@gentoo.org>
Mon, 20 Feb 2017 09:49:58 +0000 (10:49 +0100)
committerMichał Górny <mgorny@gentoo.org>
Mon, 20 Feb 2017 09:51:11 +0000 (10:51 +0100)
sys-cluster/heartbeat/files/3.0.4-docs.patch
sys-cluster/heartbeat/files/3.0.4-fix_configure.patch
sys-cluster/heartbeat/files/3.0.4-python_tests.patch
sys-cluster/heartbeat/heartbeat-3.0.5-r3.ebuild [moved from sys-cluster/heartbeat/heartbeat-3.0.5-r2.ebuild with 68% similarity]

index 9297c31cb037a0659dffd449351f3ffb335e91ab..a558dd36f5a31a0349f86fe6ceb6d12a088376d2 100644 (file)
@@ -1,5 +1,5 @@
---- configure.in
-+++ configure.in
+--- a/configure.in
++++ b/configure.in
 @@ -505,8 +505,15 @@
  AC_PATH_PROGS(TEST, test)
  AC_PATH_PROGS(PKGCONFIG, pkg-config)
@@ -18,8 +18,8 @@
  
  dnl ************************************************************************
  dnl Check whether non-root user can chown.
---- doc/Makefile.am
-+++ doc/Makefile.am
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
 @@ -33,11 +33,12 @@
  
  doc_DATA              = $(OTHER_DOCS)
index c747592b7baa301defcea05c72827370cd26ddf8..1df22b337c5a09cc4630ddeacd477d5e2aaa6864 100644 (file)
@@ -1,5 +1,5 @@
---- work/Heartbeat-3-0-STABLE-3.0.4/configure.in       2010-12-09 21:09:47.000000000 +0100
-+++ work2/Heartbeat-3-0-STABLE-3.0.4/configure.in      2010-12-28 17:37:45.080773140 +0100
+--- Heartbeat-3-0-STABLE-3.0.4/configure.in    2010-12-09 21:09:47.000000000 +0100
++++ Heartbeat-3-0-STABLE-3.0.4/configure.in    2010-12-28 17:37:45.080773140 +0100
 @@ -243,9 +243,9 @@
  mandir=`var "$mandir" "$exec_prefix/man"`
  dnl docdir is available in autoconf 2.60+, for older versions preseed
@@ -97,8 +97,8 @@
  
  dnl *************************************************************************
  PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin"
---- work/Heartbeat-3-0-STABLE-3.0.5/configure.in       2011-12-28 11:51:05.601673071 +0100
-+++ work2/Heartbeat-3-0-STABLE-3.0.5/configure.in      2011-12-28 11:54:34.223094385 +0100
+--- Heartbeat-3-0-STABLE-3.0.5/configure.in    2011-12-28 11:51:05.601673071 +0100
++++ Heartbeat-3-0-STABLE-3.0.5/configure.in    2011-12-28 11:54:34.223094385 +0100
 @@ -2002,7 +2002,7 @@
  fi
  
index a91c7ec3fe2a94f034ea5c268a48503a66225979..e6e1071573a9c0a0cfcfc1f3c14f6237274e960e 100644 (file)
@@ -1,5 +1,5 @@
---- cts/Makefile.am
-+++ cts/Makefile.am
+--- a/cts/Makefile.am
++++ b/cts/Makefile.am
 @@ -21,7 +21,7 @@
  
  ctsdir                = @HA_NOARCHDATAHBDIR@/cts
similarity index 68%
rename from sys-cluster/heartbeat/heartbeat-3.0.5-r2.ebuild
rename to sys-cluster/heartbeat/heartbeat-3.0.5-r3.ebuild
index 21537846a1d1208ff7876944bb215fb6f17a0640..e6b5a83467b626face2ff60f9171288d9d88fd87 100644 (file)
@@ -1,11 +1,11 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI="2"
+EAPI="6"
 
-PYTHON_DEPEND="2"
-inherit python autotools multilib eutils base
+PYTHON_COMPAT=( python2_7 )
+inherit autotools python-single-r1
 
 DESCRIPTION="Heartbeat high availability cluster manager"
 HOMEPAGE="http://www.linux-ha.org/wiki/Heartbeat"
@@ -21,6 +21,7 @@ RDEPEND="sys-cluster/cluster-glue
        virtual/ssh
        net-libs/gnutls
        snmp? ( net-analyzer/net-snmp )
+       ${PYTHON_DEPS}
 "
 DEPEND="${RDEPEND}
        virtual/pkgconfig
@@ -29,6 +30,8 @@ DEPEND="${RDEPEND}
 
 PDEPEND="sys-cluster/resource-agents"
 
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
 S=${WORKDIR}/Heartbeat-3-0-STABLE-${PV}
 
 PATCHES=(
@@ -39,49 +42,46 @@ PATCHES=(
 )
 
 pkg_setup() {
-       python_set_active_version 2
-       python_pkg_setup
+       python-single-r1_pkg_setup
 
        ewarn "If you're upgrading from heartbeat-2.x please follow:"
        ewarn "https://www.gentoo.org/proj/en/cluster/ha-cluster/heartbeat-upgrade.xml"
 }
 
 src_prepare() {
-       base_src_prepare
+       default
        eautoreconf
 
-       cp "${FILESDIR}"/heartbeat-init "${T}" || die
+       cp "${FILESDIR}"/heartbeat-init "${WORKDIR}" || die
        sed -i \
                -e "/ResourceManager/ s/lib/share/" \
                -e "s:lib:$(get_libdir):g" \
-               "${T}"/heartbeat-init || die
+               "${WORKDIR}"/heartbeat-init || die
 }
 
 src_configure() {
        econf \
-               --disable-dependency-tracking \
                --disable-fatal-warnings \
                $(use_enable static-libs static) \
                $(use_enable doc) \
                --disable-tipc \
                --enable-dopd \
-               --libdir=/usr/$(get_libdir) \
-               --localstatedir=/var \
-               --docdir=/usr/share/doc/${PF} \
                $(use_enable snmp)
 }
 
 src_install() {
-       base_src_install
+       default
 
-       newinitd "${T}/heartbeat-init" heartbeat || die
+       newinitd "${WORKDIR}/heartbeat-init" heartbeat
 
        # fix collisions
-       rm -rf "${D}"/usr/include/heartbeat/{compress,ha_msg}.h
+       rm -rf "${D}"/usr/include/heartbeat/{compress,ha_msg}.h || die
 
-       use static-libs || find "${D}"/usr/$(get_libdir) -name "*.la" -delete
+       if ! use static-libs; then
+               find "${D}" -name "*.la" -delete || die
+       fi
 
        if use doc ; then
-               dodoc README doc/*.txt doc/AUTHORS  || die
+               dodoc README doc/*.txt doc/AUTHORS || die
        fi
 }