dev-libs/light: fix multiple bugs

* Add patch to fix meaning of USE udev
* Fix file collisions
* Fix fno-fcommon build issue

Closes: https://bugs.gentoo.org/673520
Closes: https://bugs.gentoo.org/709636
Closes: https://bugs.gentoo.org/739896

Reported-by: Petr Zima <zima@matfyz.cz>
Signed-off-by: Aaron Bauman <bman@gentoo.org>
This commit is contained in:
Aaron Bauman 2020-09-02 16:56:31 -04:00
parent edcd02ef0a
commit 05d1a1775a
No known key found for this signature in database
GPG Key ID: E32A797FB1D0CB70
3 changed files with 56 additions and 0 deletions

View File

@ -1 +1,2 @@
DIST light-1.2.2.tar.gz 33009 BLAKE2B 6e23d7f89c1dbf412943f2b60a09f9189c5420649397a286fa964d249adb57cafb2943ef610dd13470e486d9dfb51ca40289d9974760e907f794baa27963821d SHA512 5815394fb1545d1e06234c261d475e1836e4c43e47e7707b8628891d20b70db04f1661b78ca1d236d549c734430b606498fa46de060c854791b13cf49de07b59
DIST light-1.2.tar.gz 32592 BLAKE2B 86d2bf4a88cf61ec1b7af16510db3d26698397d5cc3ddee7f663c1f501ca6b5bf238e5f29f17142d6196908e1d444795abed41a12560c9411214d4a874c96ddb SHA512 3f876262a730ef34219e0d596065c725376218ca88a2e9f56f62a25956b9ba505168f32c5877715abf746090c053873322a3292680055cc2f5b77ec8c0d466a4

View File

@ -0,0 +1,22 @@
--- a/src/helpers.c
+++ b/src/helpers.c
@@ -9,6 +9,8 @@
#include <errno.h> // errno
#include <libgen.h> // dirname
+light_loglevel_t light_loglevel;
+
bool light_file_read_uint64(char const *filename, uint64_t *val)
{
--- a/src/helpers.h
+++ b/src/helpers.h
@@ -21,7 +21,7 @@
LIGHT_NOTE_LEVEL
} light_loglevel_t;
-light_loglevel_t light_loglevel;
+extern light_loglevel_t light_loglevel;
#define LIGHT_LOG(lvl, fp, fmt, args...)\
if (light_loglevel >= lvl)\

View File

@ -0,0 +1,33 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools eutils flag-o-matic
DESCRIPTION="A program to control backlights (and other hardware lights)"
HOMEPAGE="https://github.com/haikarainen/light"
SRC_URI="https://github.com/haikarainen/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="udev"
RDEPEND=""
DEPEND="udev? ( virtual/libudev:= )
${RDEPEND}"
src_prepare() {
eapply "${FILESDIR}/${P}-fcommon.patch"
eapply_user
eautoreconf
}
src_configure() {
local myeconfargs=(
$(usex udev --with-udev="/lib/udev/rules.d" "")
)
econf "${myeconfargs[@]}"
}