summaryrefslogtreecommitdiff
path: root/app-laptop/pommed
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-laptop/pommed
reinit the tree, so we can have metadata
Diffstat (limited to 'app-laptop/pommed')
-rw-r--r--app-laptop/pommed/Manifest8
-rw-r--r--app-laptop/pommed/files/pommed-1.39.patch89
-rw-r--r--app-laptop/pommed/files/pommed.rc19
-rw-r--r--app-laptop/pommed/files/pommed.service10
-rw-r--r--app-laptop/pommed/metadata.xml13
-rw-r--r--app-laptop/pommed/pommed-1.39-r1.ebuild107
6 files changed, 246 insertions, 0 deletions
diff --git a/app-laptop/pommed/Manifest b/app-laptop/pommed/Manifest
new file mode 100644
index 000000000000..006daec385a9
--- /dev/null
+++ b/app-laptop/pommed/Manifest
@@ -0,0 +1,8 @@
+AUX pommed-1.39.patch 3024 SHA256 04a19e476daa7bdaeddd4527065c10872eb7add2a30e7ba9e966f542c068586a SHA512 c048643afe0de01a161515963fc11fa330b39cd6304f139ab831032f51e2722d30c7e9b93e1de7d1150283bef570e44772e226f8c13e512d66b1ebe08a7892be WHIRLPOOL 099ae3a39f58db7c71a4968f4e5e54b2c036754d3b07215e4a27cb5742a2ca331ba716b0770fd938b115ed78fcab487646e130d840b15e47c9c90b0171d44269
+AUX pommed.rc 383 SHA256 70453fcc86b854ba415c777261279c33ec2f36e7179d54cdcaa41b02d8f15dc9 SHA512 54c3ee9242ab68f7a162e5892f4b5ee1064328f4b23c9da05f75acdb5c8c93245533af1320b6fa20f026f62060b5a0558eab1215c9c8491086545b7733c6c87b WHIRLPOOL 44b0a8df193d4c6c947eb4ffecc8a98993db7170cad69b76f1fff0a383d57a4d80a5f9d3549ca9d06ba1f835fb016adf1b69e73f71b7af469e8fc70e6cadb6b0
+AUX pommed.service 155 SHA256 251847c346b4802df7a4f2299201e9a2929c1f5e87f3d3ac2ba39363ed392b15 SHA512 00cfd3417ec09cef62e478ac7b5483b1857de2061106c8ae368dbaf0ff5c7b06e974ea85bba411601e76e5bbef53e4ab5b743aa7366c9d717d865a7fd3cd604d WHIRLPOOL 3ac5e6141e7d3b2b3429d20c8565ed4ed04107885cf0b6ec54b68703eb1fe031bfe24baf6bc3460ccfc5815b08027b977eab14bfff2bbe5b2f0d861958a9a49b
+DIST pommed-1.39.tar.gz 995020 SHA256 d715cf1f85525a62bb18a3f9ebd229a2f586906ab8c9306fc9d2aa192bf79da2 SHA512 26568e359d8ef853710b1d86f397981e87245a84b2ff006964035ea8643e97df44fe52b01841d085eb8dd1aee586e1c8b60c44089f463e2a64b2b95c010a9d10 WHIRLPOOL cdb214162f87e24f8add4023d126a8a0fe2db0714a29dc43ec844dc4eb8b02edecc6866ba41555fea13881c30e6fb5439c99b452ee5f2240db9969e9504ab298
+EBUILD pommed-1.39-r1.ebuild 2306 SHA256 e99173c475c4888fb6fa4eb1cf1af34972c08d372fc765c7dd46bac6b67d9ac7 SHA512 451d30a5c7b18c5f035cd1d3009d55ff5575616c9195e6977b15ba5762786af10c6dd0081fd36ae887f7320a60ee578d54832da7b8deaea877914aa7a8912a15 WHIRLPOOL 4dab649a1ecadc27dcb15519ce77664c53a799b0f3176a96797a480bba3b070de2d4f92e201d2c191163c0a2caef4466672a428ed1bacc8b2b8398a69d249040
+MISC ChangeLog 2796 SHA256 2b3ca09160a3705188f88bc8aa5488d9815a41e37e6596c4aa6d6b3fcd6abb33 SHA512 13c9210dc60081e4ccbabed7862557d7489b288e0360e1725b52ea20f0136e95ead86c35ac377133e6725897b5e914de7cbe1f805d6d56f41f645f6db824a6d2 WHIRLPOOL d210ecf0fe087fcf21bd7991ec077e7198f94bd6b904034db9acdcefabbb8916c111a24dbbbf8b0f56da36dfa7347c1d0f1e5a179ee5afe069309fce7a00d76c
+MISC ChangeLog-2015 9508 SHA256 739c7d6e37ccececebbca61e2c0aafd224ac58da154e34f06d051c55207e6fe2 SHA512 725cb77047e49f55fbe2185ce0b962c2f4ba89097547310ae0a86dcdb233266c2252fe8240844b2207c81634d42db6889cf0b991cb483022f10fccb95ba51218 WHIRLPOOL 0f2766017cd172bdb51a7af8216d9bed6fdadbc39f674c0d7633dc8da20d84be7375abb2b848c450fb6a75ddf7773d6e7eff93b8371ac6dcac064e75faae147a
+MISC metadata.xml 644 SHA256 43a9d91f0029aa98b248c65aa6786854c9062a7605f4b664e0843c199ea46318 SHA512 3e31c0588847153aa548d8b09eb5a896f372f6c2c70deb5ac5efbd0f6401877fcf38fb8d04d5cfc718ec228157da86229eefb8101be5bdca0c6e5e540e48aa01 WHIRLPOOL 24e8b792e4c3bb984f6d3a7eed2499dfaf3ff569b283b80ca91b47d8496398d443635ba903be83d1ffaf044ac5c1ac7d08e8a5414517622f0d702cee6966fcef
diff --git a/app-laptop/pommed/files/pommed-1.39.patch b/app-laptop/pommed/files/pommed-1.39.patch
new file mode 100644
index 000000000000..1215606c35cb
--- /dev/null
+++ b/app-laptop/pommed/files/pommed-1.39.patch
@@ -0,0 +1,89 @@
+diff --git a/gpomme/Makefile b/gpomme/Makefile
+index 0874b48..a3ab64a 100644
+--- a/gpomme/Makefile
++++ b/gpomme/Makefile
+@@ -1,5 +1,3 @@
+-CC = gcc
+-
+ GTK_CFLAGS = $(shell pkg-config --cflags gtk+-2.0)
+ GTK_LIBS = $(shell pkg-config --libs gtk+-2.0)
+
+@@ -14,7 +12,7 @@ CONFUSE_LIBS = $(shell pkg-config libconfuse --libs)
+
+ INOTIFY_CFLAGS = $(shell test -e /usr/include/sys/inotify.h || echo -DNO_SYS_INOTIFY_H)
+
+-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS)
++CFLAGS += -Wall $(DBUS_CFLAGS) $(DBUSGLIB_CFLAGS) $(GTK_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS)
+ LDLIBS = -lpthread -lX11 $(DBUS_LIBS) $(DBUSGLIB_LIBS) $(GTK_LIBS) $(CONFUSE_LIBS)
+
+ SOURCES = gpomme.c theme.c conffile.c \
+@@ -30,6 +28,7 @@ all: gpomme mo
+ mo: $(MOFILES)
+
+ gpomme: $(OBJS)
++ ${CC} -o $@ ${OBJS} ${LDLIBS} ${LDFLAGS}
+
+ gpomme.o: gpomme.c gpomme.h theme.h ../client-common/dbus-client.h ../client-common/video-client.h
+
+diff --git a/pommed/Makefile b/pommed/Makefile
+index 5f3cbf9..3425a2a 100644
+--- a/pommed/Makefile
++++ b/pommed/Makefile
+@@ -1,7 +1,5 @@
+ ARCH ?= $(shell uname -m)
+
+-CC = gcc
+-
+ DBUS_CFLAGS = $(shell pkg-config dbus-1 --cflags) -DDBUS_API_SUBJECT_TO_CHANGE
+ DBUS_LIBS = $(shell pkg-config dbus-1 --libs)
+
+@@ -18,7 +16,7 @@ INOTIFY_CFLAGS = $(shell test -e /usr/include/sys/inotify.h || echo -DNO_SYS_INO
+
+ TIMERFD_CFLAGS = $(shell test -e /usr/include/sys/timerfd.h || echo -DNO_SYS_TIMERFD_H)
+
+-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(ALSA_CFLAGS) $(AUDIOFILE_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS) $(TIMERFD_CFLAGS)
++CFLAGS += -Wall $(DBUS_CFLAGS) $(ALSA_CFLAGS) $(AUDIOFILE_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS) $(TIMERFD_CFLAGS)
+
+ LDLIBS = -pthread -lrt $(DBUS_LIBS) $(ALSA_LIBS) $(AUDIOFILE_LIBS) $(CONFUSE_LIBS)
+
+@@ -54,6 +52,7 @@ ifeq ($(LIBPCI_SHARED), true)
+
+ CFLAGS += $(LIBPCI_CFLAGS)
+ LDLIBS += $(LIBPCI_LIBS)
++ LIBS = $(LIBPCI_LIBS)
+ else
+ LIB_OBJS += /usr/lib/libpci.a
+ LDLIBS += -lz
+@@ -73,6 +72,7 @@ OBJS = $(SOURCES:%.c=%.o)
+
+
+ pommed: $(OBJS) $(LIB_OBJS)
++ ${CC} -o $@ ${OBJS} ${LDLIBS} ${LDFLAGS}
+
+ pommed.o: pommed.c pommed.h evloop.h kbd_backlight.h lcd_backlight.h cd_eject.h evdev.h conffile.h audio.h dbus.h beep.h
+
+diff --git a/wmpomme/Makefile b/wmpomme/Makefile
+index cc7a438..6c4bee1 100644
+--- a/wmpomme/Makefile
++++ b/wmpomme/Makefile
+@@ -1,11 +1,9 @@
+-CC = gcc
+-
+ DBUS_CFLAGS = $(shell pkg-config dbus-1 --cflags) -DDBUS_API_SUBJECT_TO_CHANGE
+ DBUS_LIBS = $(shell pkg-config dbus-1 --libs)
+
+ TIMERFD_CFLAGS = $(shell test -e /usr/include/sys/timerfd.h || echo -DNO_SYS_TIMERFD_H)
+
+-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(TIMERFD_CFLAGS)
++CFLAGS += -Wall $(DBUS_CFLAGS) $(TIMERFD_CFLAGS)
+ LDLIBS = -lrt -lXpm -lXext -lX11 $(DBUS_LIBS)
+
+ SOURCES = wmgeneral.c wmpomme.c \
+@@ -15,6 +13,7 @@ SOURCES = wmgeneral.c wmpomme.c \
+ OBJS = $(SOURCES:%.c=%.o)
+
+ wmpomme: $(OBJS)
++ ${CC} -o $@ ${OBJS} ${LDLIBS} ${LDFLAGS}
+
+ wmpomme.o: wmpomme.c wmgeneral.h wmpomme-master.xpm ../client-common/dbus-client.h
+
diff --git a/app-laptop/pommed/files/pommed.rc b/app-laptop/pommed/files/pommed.rc
new file mode 100644
index 000000000000..23904fc7d3a0
--- /dev/null
+++ b/app-laptop/pommed/files/pommed.rc
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need dbus alsasound
+}
+
+start() {
+ ebegin "Running pommed daemon"
+ start-stop-daemon --start --quiet --exec /usr/bin/pommed
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping pommed daemon"
+ start-stop-daemon --stop --pidfile /var/run/pommed.pid
+ eend $?
+}
diff --git a/app-laptop/pommed/files/pommed.service b/app-laptop/pommed/files/pommed.service
new file mode 100644
index 000000000000..8407c1db9550
--- /dev/null
+++ b/app-laptop/pommed/files/pommed.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=MacBook Hotkey Event Handler
+
+[Service]
+Type=dbus
+BusName=org.pommed
+ExecStart=/usr/bin/pommed -f
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-laptop/pommed/metadata.xml b/app-laptop/pommed/metadata.xml
new file mode 100644
index 000000000000..03eedeaa5399
--- /dev/null
+++ b/app-laptop/pommed/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>naota@gentoo.org</email>
+</maintainer>
+<longdescription> pommed handles the hotkeys found on the Apple MacBook Pro,
+MacBook and PowerBook laptops and adjusts the LCD backlight, sound volume,
+keyboard backlight or ejects the CD-ROM drive accordingly.
+pommed also monitors the ambient light sensors to automatically light up the
+keyboard backlight on the MacBook Pro and the latest PowerBook.
+Optional support for the Apple Remote control is available.</longdescription>
+</pkgmetadata>
diff --git a/app-laptop/pommed/pommed-1.39-r1.ebuild b/app-laptop/pommed/pommed-1.39-r1.ebuild
new file mode 100644
index 000000000000..e915f399b70d
--- /dev/null
+++ b/app-laptop/pommed/pommed-1.39-r1.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils toolchain-funcs linux-info systemd
+
+DESCRIPTION="Manage screen and keyboard backlight on Apple MacBook Pro/PowerBook"
+HOMEPAGE="http://technologeek.org/projects/pommed/index.html"
+ALIOTH_NUMBER="3583"
+SRC_URI="http://alioth.debian.org/frs/download.php/${ALIOTH_NUMBER}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="gtk X"
+
+COMMON_DEPEND="media-libs/alsa-lib
+ x86? ( sys-apps/pciutils )
+ amd64? ( sys-apps/pciutils )
+ dev-libs/confuse
+ >=sys-apps/dbus-1.1
+ dev-libs/dbus-glib
+ sys-libs/zlib
+ media-libs/audiofile
+ gtk? ( x11-libs/gtk+:2 )
+ X? ( x11-libs/libX11
+ x11-libs/libXext
+ x11-libs/libXpm )"
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig"
+RDEPEND="${COMMON_DEPEND}
+ media-sound/alsa-utils
+ virtual/eject"
+
+pkg_setup() {
+ if ! use ppc; then
+ linux-info_pkg_setup
+
+ CONFIG_CHECK="~DMIID"
+ check_extra_config
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}.patch"
+}
+
+src_compile() {
+ cd "${S}"/pommed
+ emake CC="$(tc-getCC)" OFLIB=1 || die "emake pommed failed"
+
+ if use gtk; then
+ cd "${S}"/gpomme
+ local POFILES=""
+ for LANG in ${LINGUAS}; do
+ if [ -f po/${LANG}.po ]; then
+ POFILES="${POFILES} po/${LANG}.po"
+ fi
+ done
+ emake CC="$(tc-getCC)" POFILES="${POFILES}" || die "emake gpomme failed"
+ fi
+ if use X; then
+ cd "${S}"/wmpomme
+ emake CC="$(tc-getCC)" || die "emake wmpomme failed"
+ fi
+}
+
+src_install() {
+ insinto /etc
+ if use x86 || use amd64; then
+ newins pommed.conf.mactel pommed.conf
+ elif use ppc; then
+ newins pommed.conf.pmac pommed.conf
+ fi
+
+ insinto /etc/dbus-1/system.d
+ newins dbus-policy.conf pommed.conf
+
+ insinto /usr/share/pommed
+ doins pommed/data/*.wav
+
+ dobin pommed/pommed
+
+ newinitd "${FILESDIR}"/pommed.rc pommed
+ systemd_dounit "${FILESDIR}"/${PN}.service
+
+ dodoc AUTHORS ChangeLog README TODO
+
+ if use gtk ; then
+ dobin gpomme/gpomme
+ for LANG in ${LINGUAS}; do
+ if [ -f gpomme/po/${LANG}.mo ]; then
+ einfo "Installing lang ${LANG}"
+ insinto /usr/share/locale/${LANG}/LC_MESSAGES/
+ doins gpomme/po/${LANG}.mo
+ fi
+ done
+
+ domenu gpomme/gpomme.desktop gpomme/gpomme-c.desktop
+ insinto /usr/share/gpomme/
+ doins -r gpomme/themes
+ fi
+
+ if use X ; then
+ dobin wmpomme/wmpomme
+ fi
+}