summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--x11-misc/xbattbar/ChangeLog8
-rw-r--r--x11-misc/xbattbar/files/xbattbar-1.4.5.patch40
-rw-r--r--x11-misc/xbattbar/xbattbar-1.4.5.ebuild49
3 files changed, 96 insertions, 1 deletions
diff --git a/x11-misc/xbattbar/ChangeLog b/x11-misc/xbattbar/ChangeLog
index 7a12220d67cc..fefb0668af5b 100644
--- a/x11-misc/xbattbar/ChangeLog
+++ b/x11-misc/xbattbar/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for x11-misc/xbattbar
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/xbattbar/ChangeLog,v 1.17 2014/02/05 15:17:27 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/xbattbar/ChangeLog,v 1.18 2014/05/12 17:42:27 jer Exp $
+
+*xbattbar-1.4.5 (12 May 2014)
+
+ 12 May 2014; Jeroen Roovers <jer@gentoo.org> +xbattbar-1.4.5.ebuild,
+ +files/xbattbar-1.4.5.patch:
+ Version bump.
*xbattbar-1.4.4 (05 Feb 2014)
diff --git a/x11-misc/xbattbar/files/xbattbar-1.4.5.patch b/x11-misc/xbattbar/files/xbattbar-1.4.5.patch
new file mode 100644
index 000000000000..2602bb91187a
--- /dev/null
+++ b/x11-misc/xbattbar/files/xbattbar-1.4.5.patch
@@ -0,0 +1,40 @@
+--- a/Makefile
++++ b/Makefile
+@@ -11,16 +11,16 @@
+ all: $(TARGET) $(APM_CHECK)
+
+ $(TARGET): obj/xbattbar.o
+- gcc -o $@ $< -lX11 $(LDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(shell $(PKG_CONFIG) --libs x11)
+
+ obj/xbattbar.o: xbattbar.c obj/stamp
+- gcc -MMD -o $@ -c $< $(CFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -MMD -o $@ -c $<
+
+ $(APM_CHECK): obj/xbattbar-check-apm.o
+- gcc -o $@ $< $(LDFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
+
+ obj/xbattbar-check-apm.o: xbattbar-check-apm.c obj/stamp
+- gcc -MMD -D$(OS_TYPE) -o $@ -c $< $(CFLAGS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -MMD -D$(OS_TYPE) -o $@ -c $<
+
+ obj/stamp:
+ mkdir obj
+@@ -32,12 +32,12 @@
+
+
+ install: $(TARGET) $(APM_CHECK)
+- install -d -m 0755 $(DESTDIR)/usr/lib/$(PROJECT)
++ install -d -m 0755 $(DESTDIR)/usr/$(LIBDIR)/$(PROJECT)
+ install -d -m 0755 $(DESTDIR)/usr/bin
+ install -d -m 0755 $(DESTDIR)/usr/share/man/man1
+- install -m 0755 $(APM_CHECK) $(DESTDIR)/usr/lib/$(PROJECT)/
+- install -m 0755 xbattbar-check-acpi $(DESTDIR)/usr/lib/$(PROJECT)/
+- install -m 0755 xbattbar-check-sys $(DESTDIR)/usr/lib/$(PROJECT)/
++ install -m 0755 $(APM_CHECK) $(DESTDIR)/usr/$(LIBDIR)/$(PROJECT)/
++ install -m 0755 xbattbar-check-acpi $(DESTDIR)/usr/$(LIBDIR)/$(PROJECT)/
++ install -m 0755 xbattbar-check-sys $(DESTDIR)/usr/$(LIBDIR)/$(PROJECT)/
+ install -m 0755 $(TARGET) $(DESTDIR)/usr/bin/
+ install -m 0644 xbattbar.man $(DESTDIR)/usr/share/man/man1/$(PROJECT).1
+
diff --git a/x11-misc/xbattbar/xbattbar-1.4.5.ebuild b/x11-misc/xbattbar/xbattbar-1.4.5.ebuild
new file mode 100644
index 000000000000..f93fce1f1f79
--- /dev/null
+++ b/x11-misc/xbattbar/xbattbar-1.4.5.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/xbattbar/xbattbar-1.4.5.ebuild,v 1.1 2014/05/12 17:42:27 jer Exp $
+
+EAPI=5
+PYTHON_COMPAT=( python2_{6,7} )
+inherit eutils flag-o-matic multilib python-single-r1 toolchain-funcs
+
+DESCRIPTION="Advanced Power Management battery status display for X"
+HOMEPAGE="http://packages.qa.debian.org/x/xbattbar.html"
+SRC_URI="mirror://debian/pool/main/x/${PN}/${PN}_${PV}.orig.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+DEPEND="
+ dev-lang/perl
+ x11-libs/libX11
+"
+RDEPEND="
+ ${DEPEND}
+ ${PYTHON_DEPS}
+ !ppc? ( >=sys-power/acpi-1.5 )
+" # ppc has APM
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.4.5.patch
+
+ sed -i \
+ -e "s:usr/lib:usr/$(get_libdir):" \
+ xbattbar.c || die
+
+ tc-export PKG_CONFIG
+}
+
+src_compile() {
+ use kernel_linux && append-flags -Dlinux
+ emake \
+ CC=$(tc-getCC) \
+ LIBDIR="$(get_libdir)" \
+ LDFLAGS="${LDFLAGS}"
+ python_fix_shebang ${PN}-check-sys
+}
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" install
+ dodoc README
+}