app-laptop/pbbuttonsd: Port to EAPI 7

Closes: https://bugs.gentoo.org/771093
Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
Signed-off-by: David Seifert <soap@gentoo.org>
This commit is contained in:
Jakov Smolic 2021-02-20 20:31:02 +01:00 committed by David Seifert
parent cf63dd7bd5
commit ab86d9dd58
No known key found for this signature in database
GPG Key ID: CE36E117202E3842
2 changed files with 36 additions and 27 deletions

View File

@ -0,0 +1,12 @@
https://bugs.gentoo.org/771093
--- a/src/driver_mixer_alsa.c
+++ b/src/driver_mixer_alsa.c
@@ -32,7 +32,7 @@
#define SECTION "MODULE MIXER ALSA"
-struct driver_alsamixer {
+extern struct driver_alsamixer {
char *card; /* name of the soundcard (usually "default" is fine) */
GString *channels; /* channel names to use */
struct {

View File

@ -1,7 +1,8 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EAPI=7
inherit autotools flag-o-matic toolchain-funcs
DESCRIPTION="Handles power management and special keys on laptops"
@ -11,36 +12,31 @@ SRC_URI="mirror://sourceforge/pbbuttons/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ppc ~x86"
IUSE="acpi alsa doc ibam macbook oss static-libs"
IUSE="acpi alsa doc ibam macbook oss"
RDEPEND="
>=dev-libs/glib-2.6
alsa? ( >=media-libs/alsa-lib-1.0 )
dev-libs/glib
alsa? ( media-libs/alsa-lib )
macbook? (
sys-apps/pciutils
sys-libs/libsmbios
)
"
DEPEND="
${RDEPEND}
doc? ( app-doc/doxygen )
"
)"
DEPEND="${RDEPEND}"
BDEPEND="doc? ( app-doc/doxygen )"
PATCHES=(
"${FILESDIR}/${PN}-0.8.1-cpufreq.patch"
"${FILESDIR}/${PN}-0.8.1-fnmode.patch"
"${FILESDIR}/${PN}-0.8.1-laptopmode.sh.patch"
"${FILESDIR}/${PN}-0.8.1-lm.patch"
"${FILESDIR}/${PN}-0.8.1-lz.patch"
"${FILESDIR}"/${PN}-0.8.1-cpufreq.patch
"${FILESDIR}"/${PN}-0.8.1-fnmode.patch
"${FILESDIR}"/${PN}-0.8.1-laptopmode.sh.patch
"${FILESDIR}"/${PN}-0.8.1-lm.patch
"${FILESDIR}"/${PN}-0.8.1-lz.patch
"${FILESDIR}"/${P}-fno-common.patch
)
src_prepare() {
### Don't link with g++ if we don't use ibam
if ! use ibam; then
eapply "${FILESDIR}/${PN}-0.8.1-g++.patch"
fi
# Don't link with g++ if we don't use ibam
use ibam || eapply "${FILESDIR}"/${PN}-0.8.1-g++.patch
default
eautoconf
}
@ -48,6 +44,7 @@ src_configure() {
# Fix crash bug on some systems
replace-flags -O? -O1
local laptop
if use macbook; then
laptop=macbook
elif use x86 || use amd64; then
@ -61,12 +58,12 @@ src_configure() {
laptop=powerbook
fi
laptop=$laptop \
econf \
econf \
$(use_with alsa) \
$(use_with doc doxygen_docs) \
$(use_with ibam) \
$(use_with oss)
$(use_with oss) \
laptop="${laptop}"
}
@ -89,9 +86,9 @@ src_install() {
default
use static-libs || rm "${D}"/usr/$(get_libdir)/libpbb.a
rm "${ED}"/usr/$(get_libdir)/libpbb.a || die
newinitd "${FILESDIR}/pbbuttonsd.rc6" pbbuttonsd
newinitd "${FILESDIR}"/pbbuttonsd.rc6 pbbuttonsd
dodoc README
use doc && dodoc -r doc/
@ -101,7 +98,7 @@ src_install() {
keepdir /etc/power/suspend.d
exeinto /etc/power/scripts.d
doexe "${FILESDIR}"/wireless
ln -s "${D}"/etc/power/scripts.d/wireless "${D}"/etc/power/resume.d/wireless
dosym ../scripts.d/wireless /etc/power/resume.d/wireless
}
pkg_postinst() {