You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
112 lines
2.2 KiB
112 lines
2.2 KiB
3 years ago
|
# Copyright 1999-2021 Gentoo Authors
|
||
11 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
3 years ago
|
EAPI=7
|
||
|
|
||
|
inherit desktop linux-info systemd
|
||
11 years ago
|
|
||
7 years ago
|
DESCRIPTION="Manage screen and keyboard backlight on Apple MacBook Pro/PowerBook"
|
||
11 years ago
|
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"
|
||
11 years ago
|
KEYWORDS="amd64 ppc x86"
|
||
11 years ago
|
IUSE="gtk X"
|
||
|
|
||
3 years ago
|
DEPEND="
|
||
|
media-libs/alsa-lib
|
||
|
media-libs/audiofile
|
||
11 years ago
|
dev-libs/confuse
|
||
|
dev-libs/dbus-glib
|
||
3 years ago
|
sys-apps/dbus
|
||
11 years ago
|
sys-libs/zlib
|
||
3 years ago
|
amd64? ( sys-apps/pciutils )
|
||
|
x86? ( sys-apps/pciutils )
|
||
11 years ago
|
gtk? ( x11-libs/gtk+:2 )
|
||
3 years ago
|
X? (
|
||
|
x11-libs/libX11
|
||
11 years ago
|
x11-libs/libXext
|
||
3 years ago
|
x11-libs/libXpm
|
||
|
)"
|
||
|
RDEPEND="${DEPEND}
|
||
11 years ago
|
media-sound/alsa-utils
|
||
3 years ago
|
sys-apps/util-linux"
|
||
3 years ago
|
BDEPEND="virtual/pkgconfig"
|
||
|
|
||
|
PATCHES=(
|
||
|
"${FILESDIR}"/${P}.patch
|
||
|
"${FILESDIR}"/${P}-fno-common.patch
|
||
|
)
|
||
11 years ago
|
|
||
|
pkg_setup() {
|
||
|
if ! use ppc; then
|
||
|
linux-info_pkg_setup
|
||
|
|
||
|
CONFIG_CHECK="~DMIID"
|
||
|
check_extra_config
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
3 years ago
|
cd "${S}"/pommed || die
|
||
4 years ago
|
emake CC="$(tc-getCC)" OFLIB=1
|
||
11 years ago
|
|
||
|
if use gtk; then
|
||
3 years ago
|
cd "${S}"/gpomme || die
|
||
11 years ago
|
local POFILES=""
|
||
|
for LANG in ${LINGUAS}; do
|
||
|
if [ -f po/${LANG}.po ]; then
|
||
|
POFILES="${POFILES} po/${LANG}.po"
|
||
|
fi
|
||
|
done
|
||
4 years ago
|
emake CC="$(tc-getCC)" POFILES="${POFILES}"
|
||
11 years ago
|
fi
|
||
|
if use X; then
|
||
3 years ago
|
cd "${S}"/wmpomme || die
|
||
4 years ago
|
emake CC="$(tc-getCC)"
|
||
11 years ago
|
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
|
||
|
}
|