1 |
commit: bbf303a2bd691cc0c9165b5435db1a8f6f19a32a |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 29 06:07:23 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 29 06:27:09 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbf303a2 |
7 |
|
8 |
app-misc/evtest: fix musl build (upstream patch) |
9 |
|
10 |
Closes: https://bugs.gentoo.org/716876 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
app-misc/evtest/evtest-1.34.ebuild | 13 ++++++----- |
14 |
.../evtest/files/evtest-1.34-musl-include.patch | 26 ++++++++++++++++++++++ |
15 |
2 files changed, 34 insertions(+), 5 deletions(-) |
16 |
|
17 |
diff --git a/app-misc/evtest/evtest-1.34.ebuild b/app-misc/evtest/evtest-1.34.ebuild |
18 |
index a78f06daa8ee..dd74ba04b33a 100644 |
19 |
--- a/app-misc/evtest/evtest-1.34.ebuild |
20 |
+++ b/app-misc/evtest/evtest-1.34.ebuild |
21 |
@@ -1,4 +1,4 @@ |
22 |
-# Copyright 1999-2020 Gentoo Authors |
23 |
+# Copyright 1999-2021 Gentoo Authors |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
|
26 |
EAPI=7 |
27 |
@@ -13,13 +13,16 @@ LICENSE="GPL-2" |
28 |
SLOT="0" |
29 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" |
30 |
|
31 |
-BDEPEND="virtual/pkgconfig" |
32 |
- |
33 |
-DEPEND="app-text/asciidoc |
34 |
- app-text/xmlto" |
35 |
+BDEPEND="app-text/asciidoc |
36 |
+ app-text/xmlto |
37 |
+ virtual/pkgconfig" |
38 |
|
39 |
S="${WORKDIR}/${PN}-${P}" |
40 |
|
41 |
+PATCHES=( |
42 |
+ "${FILESDIR}"/${P}-musl-include.patch |
43 |
+) |
44 |
+ |
45 |
src_prepare() { |
46 |
default |
47 |
eautoreconf |
48 |
|
49 |
diff --git a/app-misc/evtest/files/evtest-1.34-musl-include.patch b/app-misc/evtest/files/evtest-1.34-musl-include.patch |
50 |
new file mode 100644 |
51 |
index 000000000000..7bf7f044c684 |
52 |
--- /dev/null |
53 |
+++ b/app-misc/evtest/files/evtest-1.34-musl-include.patch |
54 |
@@ -0,0 +1,26 @@ |
55 |
+https://bugs.gentoo.org/716876 |
56 |
+https://cgit.freedesktop.org/evtest/commit/?id=049396aab18849eef257af1116951a83416339e6 |
57 |
+ |
58 |
+From: Mateusz Piotrowski <0mp@×××××××.org> |
59 |
+Date: Fri, 13 Nov 2020 13:41:41 +0100 |
60 |
+Subject: Remove PATH_MAX |
61 |
+ |
62 |
+This makes evtest more portable. We could try to use ifdefs to include |
63 |
+sys/syslimits.h on FreeBSD to get PATH_MAX but it feels to be an |
64 |
+overkill for evtest. Let's keep it simple as just replace PATH_MAX with |
65 |
+4096. |
66 |
+ |
67 |
+NB: it's fine to leave linux/input.h there, because this header is |
68 |
+actually available on FreeBSD via the devel/evdev-proto port. |
69 |
+--- a/evtest.c |
70 |
++++ b/evtest.c |
71 |
+@@ -888,7 +888,7 @@ static char* scan_devices(void) |
72 |
+ |
73 |
+ for (i = 0; i < ndev; i++) |
74 |
+ { |
75 |
+- char fname[PATH_MAX]; |
76 |
++ char fname[4096]; |
77 |
+ int fd = -1; |
78 |
+ char name[256] = "???"; |
79 |
+ |
80 |
+cgit v1.2.1 |