summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolic <jakov.smolic@sartura.hr>2021-02-20 20:31:02 +0100
committerDavid Seifert <soap@gentoo.org>2021-02-20 20:31:02 +0100
commitab86d9dd587996be6ff3ee5d201aa536da9fb755 (patch)
tree6757afc4e37ca472c37f733542b9ce0d36056bd2 /app-laptop/pbbuttonsd
parentapp-admin/radmind: Drop libressl support (diff)
downloadgentoo-ab86d9dd587996be6ff3ee5d201aa536da9fb755.tar.gz
gentoo-ab86d9dd587996be6ff3ee5d201aa536da9fb755.tar.bz2
gentoo-ab86d9dd587996be6ff3ee5d201aa536da9fb755.zip
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>
Diffstat (limited to 'app-laptop/pbbuttonsd')
-rw-r--r--app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1a-fno-common.patch12
-rw-r--r--app-laptop/pbbuttonsd/pbbuttonsd-0.8.1a.ebuild51
2 files changed, 36 insertions, 27 deletions
diff --git a/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1a-fno-common.patch b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1a-fno-common.patch
new file mode 100644
index 000000000000..5cb7e30ce021
--- /dev/null
+++ b/app-laptop/pbbuttonsd/files/pbbuttonsd-0.8.1a-fno-common.patch
@@ -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 {
diff --git a/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1a.ebuild b/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1a.ebuild
index f2e26d756df4..042a48b7bbfe 100644
--- a/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1a.ebuild
+++ b/app-laptop/pbbuttonsd/pbbuttonsd-0.8.1a.ebuild
@@ -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() {