From 32f13dc9e4d6a8643ef98cc5f4fb6b45532dd7fd Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Wed, 9 Sep 2020 13:12:50 +0200 Subject: app-misc/g15daemon: Revbumps / ebuild overhauls - EAPI-7 bump - Added workaround for successful build with gcc-10 (#706712) - Fixed default config (#481454) - Fixed docdir - Attempt to fix direct call of CC (#729294) - Removed bashisms from configure Bug: https://bugs.gentoo.org/729294 Bug: https://bugs.gentoo.org/741382 Closes: https://bugs.gentoo.org/481454 Closes: https://bugs.gentoo.org/706712 Package-Manager: Portage-3.0.6, Repoman-3.0.1 Signed-off-by: Lars Wendler --- app-misc/g15daemon/g15daemon-9999.ebuild | 54 +++++++++++++++++--------------- 1 file changed, 28 insertions(+), 26 deletions(-) (limited to 'app-misc/g15daemon/g15daemon-9999.ebuild') diff --git a/app-misc/g15daemon/g15daemon-9999.ebuild b/app-misc/g15daemon/g15daemon-9999.ebuild index c7300da76d08..23fb3430ee40 100644 --- a/app-misc/g15daemon/g15daemon-9999.ebuild +++ b/app-misc/g15daemon/g15daemon-9999.ebuild @@ -1,13 +1,13 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 GENTOO_DEPEND_ON_PERL="no" ESVN_PROJECT=${PN}/trunk ESVN_REPO_URI="https://svn.code.sf.net/p/${PN}/code/trunk/${PN}-wip" -inherit eutils linux-info perl-module base subversion autotools +inherit autotools flag-o-matic linux-info perl-module subversion toolchain-funcs udev DESCRIPTION="Takes control of the G15 keyboard, through the linux kernel uinput device driver" HOMEPAGE="https://sourceforge.net/projects/g15daemon/" @@ -30,9 +30,9 @@ RDEPEND="${DEPEND}" PATCHES=( "${FILESDIR}/${PN}-1.9.5.3-g510-keys.patch" + "${FILESDIR}/${PN}-1.9.5.3-docdir.patch" + "${FILESDIR}/${PN}-1.9.5.3-avoid_bashisms.patch" ) -# "${FILESDIR}/${PN}-1.9.5.3-forgotten-open-mode.patch" -# "${FILESDIR}/${PN}-1.9.5.3-overflow-fix.patch" uinput_check() { ebegin "Checking for uinput support" @@ -40,7 +40,7 @@ uinput_check() { linux_config_exists && linux_chkconfig_present INPUT_UINPUT rc=$? - if [[ $rc -ne 0 ]] ; then + if [[ ${rc} -ne 0 ]] ; then eerror "To use g15daemon, you need to compile your kernel with uinput support." eerror "Please enable uinput support in your kernel config, found at:" eerror @@ -52,46 +52,49 @@ uinput_check() { } pkg_setup() { + export CC="$(tc-getCC)" #729294 + linux-info_pkg_setup uinput_check } src_unpack() { - if [[ ${PV} = *9999* ]]; then + if [[ ${PV} = *9999* ]] ; then subversion_src_unpack else unpack ${A} fi - if use perl; then + if use perl ; then unpack "./${P}/lang-bindings/perl-G15Daemon-0.2.tar.gz" fi } src_prepare() { - if [[ ${PV} = *9999* ]]; then + if [[ ${PV} = *9999* ]] ; then subversion_wc_info fi - if use perl; then + if use perl ; then perl-module_src_prepare sed -i \ -e '1i#!/usr/bin/perl' \ - "${S}"/contrib/testbindings.pl + "${S}"/contrib/testbindings.pl || die else # perl-module_src_prepare always calls base_src_prepare - base_src_prepare + default fi - if [[ ${PV} = *9999* ]]; then + if [[ ${PV} = *9999* ]] ; then + mv configure.{in,ac} || die eautoreconf fi } src_configure() { - econf \ - --docdir="${EPREFIX}/usr/share/doc/${PF}" \ - $(use_enable static-libs static) + append-cflags -fcommon #706712 + + econf $(use_enable static-libs static) - if use perl; then - cd "${WORKDIR}/G15Daemon-0.2" + if use perl ; then + cd "${WORKDIR}/G15Daemon-0.2" || die perl-module_src_configure fi } @@ -99,8 +102,8 @@ src_configure() { src_compile() { default - if use perl; then - cd "${WORKDIR}/G15Daemon-0.2" + if use perl ; then + cd "${WORKDIR}/G15Daemon-0.2" || die perl-module_src_compile fi } @@ -108,23 +111,22 @@ src_compile() { src_install() { default - find "${ED}" -name '*.la' -exec rm -f {} + + find "${ED}" -type f -name '*.la' -delete || die # remove odd docs installed my make - rm "${ED}/usr/share/doc/${PF}/"{LICENSE,README.usage} + rm "${ED}"/usr/share/doc/${PF}/README.usage || die insinto /usr/share/${PN}/contrib doins contrib/xmodmaprc doins contrib/xmodmap.sh - if use perl; then + if use perl ; then doins contrib/testbindings.pl fi newconfd "${FILESDIR}/${PN}-1.2.7.confd" ${PN} newinitd "${FILESDIR}/${PN}-1.9.5.3.initd" ${PN} dobin "${FILESDIR}/g15daemon-hotplug" - insinto /lib/udev/rules.d - doins "${FILESDIR}/99-g15daemon.rules" + udev_dorules "${FILESDIR}/99-g15daemon.rules" insinto /etc doins "${FILESDIR}"/g15daemon.conf @@ -133,9 +135,9 @@ src_install() { exeinto /usr/lib/pm-utils/sleep.d doexe "${FILESDIR}"/20g15daemon - if use perl; then + if use perl ; then ebegin "Installing Perl Bindings (G15Daemon.pm)" - cd "${WORKDIR}/G15Daemon-0.2" + cd "${WORKDIR}/G15Daemon-0.2" || die docinto perl perl-module_src_install fi -- cgit v1.2.3-65-gdbad