# ChangeLog for sys-power/pm-utils
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/pm-utils/ChangeLog,v 1.29 2010/01/24 21:49:56 eva Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/pm-utils/ChangeLog,v 1.30 2010/04/04 16:10:25 scarabeus Exp $
+
+*pm-utils-1.3.0 (04 Apr 2010)
+
+ 04 Apr 2010; Tomáš Chvátal <scarabeus@gentoo.org>
+ +files/1.3.0-fix_autotools.patch, +pm-utils-1.3.0.ebuild, metadata.xml:
+ Version bump per bug #311059.
*pm-utils-1.2.6.1 (24 Jan 2010)
--- /dev/null
+diff -urN pm-utils-1.3.0.old//configure.ac pm-utils-1.3.0/configure.ac
+--- pm-utils-1.3.0.old//configure.ac 2010-03-15 04:44:45.000000000 +0100
++++ pm-utils-1.3.0/configure.ac 2010-04-04 17:00:13.000000000 +0200
+@@ -8,28 +8,28 @@
+ AC_PROG_LN_S
+
+ dnl ---------------------------------------------------------------------------
+-dnl - Extra verbose warning switches
+-dnl ---------------------------------------------------------------------------
+-CPPFLAGS="$CPPFLAGS -Wall -Werror"
+-
+-dnl ---------------------------------------------------------------------------
+-dnl - Debugging switches
+-dnl ---------------------------------------------------------------------------
+-CPPFLAGS="$CPPFLAGS -g"
+-
+-dnl ---------------------------------------------------------------------------
+ dnl - Manual page build
+ dnl ---------------------------------------------------------------------------
+-AC_PATH_PROG(XMLTO, xmlto, no)
+-AM_CONDITIONAL(HAVE_XMLTO, [test "x$XMLTO" != xno])
+-
+-dnl ---------------------------------------------------------------------------
+-dnl - Make paths available for source files
+-dnl ---------------------------------------------------------------------------
+-AC_SUBST(SYSCONFDIR, $sysconfdir)
+-AC_SUBST(DATADIR, $datadir)
+-AC_SUBST(BINDIR, $bindir)
+-AC_SUBST(SBINDIR, $sbindir)
++AC_ARG_ENABLE([doc],
++ AC_HELP_STRING([--disable-docs],
++ [Disable manpage generating via xmlto [[default=auto]]]),
++ [MAN="$enableval"],
++ [MAN=auto])
++ AC_PATH_PROG(XMLTO, xmlto, no)
++ AS_IF([test "x$MAN" = "xyes"],
++ [
++ AS_IF([test "x$XMLTO" != "xyes"],
++ [AC_MSG_ERROR([Manpage generating requested but xmlto not found.])
++ ])
++ ],
++ [test "x${MAN}" != "xno"],
++ [
++ AS_IF([test "x$XMLTO" = "xyes"],
++ [MAN="yes"],
++ [MAN="no"])
++ ])
++AM_CONDITIONAL(HAVE_XMLTO, [test "x$MAN" != xno])
++AC_MSG_RESULT([checking whether to build manpages... $MAN])
+
+ dnl ---------------------------------------------------------------------------
+ dnl - Makefiles, etc.
--- /dev/null
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/pm-utils/pm-utils-1.3.0.ebuild,v 1.1 2010/04/04 16:10:25 scarabeus Exp $
+
+EAPI="2"
+
+inherit autotools base
+
+DESCRIPTION="Suspend and hibernation utilities for HAL"
+HOMEPAGE="http://pm-utils.freedesktop.org/"
+SRC_URI="http://pm-utils.freedesktop.org/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="alsa debug doc networkmanager ntp video_cards_intel video_cards_radeon"
+
+RDEPEND="
+ !sys-power/powermgmt-base
+ sys-apps/dbus
+ >=sys-apps/util-linux-2.13
+ sys-power/pm-quirks
+ alsa? ( media-sound/alsa-utils )
+ networkmanager? ( net-misc/networkmanager )
+ ntp? ( net-misc/ntp )
+"
+DEPEND="doc? ( app-text/xmlto )"
+
+PATCHES=(
+ "${FILESDIR}/${PV}-fix_autotools.patch"
+)
+
+src_prepare() {
+ local ignore="01grub"
+ use networkmanager || ignore+=" 55NetworkManager"
+ use ntp || ignore+=" 90clock"
+
+ use debug && echo 'PM_DEBUG="true"' > "${S}/gentoo"
+ echo "HOOK_BLACKLIST=\"${ignore}\"" >> "${S}/gentoo"
+
+ # write makefile patch
+ base_src_prepare
+
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ $(use_enable doc)
+}
+
+src_install() {
+ base_src_install
+
+ dodoc AUTHORS ChangeLog NEWS README* TODO || die "dodoc failed"
+
+ insinto /etc/pm/config.d/
+ doins "${S}/gentoo" || die "doins failed"
+}