1 |
commit: 95a6d016622b6abfd5be504ea818ea24befb5d90 |
2 |
Author: Hinnerk van Bruinehsen <h.v.bruinehsen <AT> fu-berlin <DOT> de> |
3 |
AuthorDate: Sun Aug 31 21:38:00 2014 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 2 21:13:33 2014 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=95a6d016 |
7 |
|
8 |
version bump to kbd-2.0.2 |
9 |
|
10 |
Signed-of-by: Hinnerk van Bruinehsen <h.v.bruinehsen <AT> fu-berlin.de> |
11 |
|
12 |
--- |
13 |
sys-apps/kbd/files/kbd-2.0.0-tests.patch | 31 +++++ |
14 |
.../kbd/files/kbd-2.0.2-musl-headers-error.patch | 147 +++++++++++++++++++++ |
15 |
sys-apps/kbd/kbd-2.0.2-r99.ebuild | 64 +++++++++ |
16 |
3 files changed, 242 insertions(+) |
17 |
|
18 |
diff --git a/sys-apps/kbd/files/kbd-2.0.0-tests.patch b/sys-apps/kbd/files/kbd-2.0.0-tests.patch |
19 |
new file mode 100644 |
20 |
index 0000000..7a4e186 |
21 |
--- /dev/null |
22 |
+++ b/sys-apps/kbd/files/kbd-2.0.0-tests.patch |
23 |
@@ -0,0 +1,31 @@ |
24 |
+--- configure.ac |
25 |
++++ configure.ac |
26 |
+@@ -11,7 +11,13 @@ |
27 |
+ AC_CONFIG_SRCDIR([src/loadkeys.c]) |
28 |
+ AC_CONFIG_HEADERS(config.h) |
29 |
+ |
30 |
+-PKG_CHECK_MODULES([CHECK], [check >= 0.9.4]) |
31 |
++AC_ARG_ENABLE(tests, |
32 |
++ AS_HELP_STRING(--enable-tests, [build tests]), |
33 |
++ [BUILD_TESTS=$enableval],[BUILD_TESTS=no]) |
34 |
++AM_CONDITIONAL(BUILD_TESTS, test "$BUILD_TESTS" = "yes") |
35 |
++if test "$BUILD_TESTS" = "yes"; then |
36 |
++ PKG_CHECK_MODULES([CHECK], [check >= 0.9.4]) |
37 |
++fi |
38 |
+ |
39 |
+ m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])]) |
40 |
+ AM_SILENT_RULES([yes]) |
41 |
+--- Makefile.am |
42 |
++++ Makefile.am |
43 |
+@@ -8,7 +8,10 @@ |
44 |
+ CREDITS \ |
45 |
+ contrib docs rc |
46 |
+ |
47 |
+-SUBDIRS = src data po tests docs |
48 |
++SUBDIRS = src data po docs |
49 |
++if BUILD_TESTS |
50 |
++SUBDIRS += tests |
51 |
++endif |
52 |
+ |
53 |
+ kbd-$(VERSION).tar.xz: |
54 |
+ make distcheck |
55 |
|
56 |
diff --git a/sys-apps/kbd/files/kbd-2.0.2-musl-headers-error.patch b/sys-apps/kbd/files/kbd-2.0.2-musl-headers-error.patch |
57 |
new file mode 100644 |
58 |
index 0000000..69ac7d0 |
59 |
--- /dev/null |
60 |
+++ b/sys-apps/kbd/files/kbd-2.0.2-musl-headers-error.patch |
61 |
@@ -0,0 +1,147 @@ |
62 |
+diff --git a/src/kbdinfo.c b/src/kbdinfo.c |
63 |
+index e5f122d..dcdcac0 100644 |
64 |
+--- a/src/kbdinfo.c |
65 |
++++ b/src/kbdinfo.c |
66 |
+@@ -1,6 +1,5 @@ |
67 |
+ #include <stdio.h> |
68 |
+ #include <errno.h> |
69 |
+-#include <error.h> |
70 |
+ #include <unistd.h> |
71 |
+ #include <sys/ioctl.h> |
72 |
+ #include <linux/kd.h> |
73 |
+@@ -9,6 +8,10 @@ |
74 |
+ #include "nls.h" |
75 |
+ #include "version.h" |
76 |
+ |
77 |
++#define error(e, n, ...) \ |
78 |
++ fprintf(stderr, ##__VA_ARGS__); \ |
79 |
++ exit(e); |
80 |
++ |
81 |
+ static const char *action = NULL; |
82 |
+ static const char *value = NULL; |
83 |
+ |
84 |
+diff --git a/src/kbdrate.c b/src/kbdrate.c |
85 |
+index 2ab8388..5faff00 100644 |
86 |
+--- a/src/kbdrate.c |
87 |
++++ b/src/kbdrate.c |
88 |
+@@ -74,6 +74,7 @@ beats rebuilding the kernel! |
89 |
+ #include <errno.h> |
90 |
+ #include <sys/file.h> |
91 |
+ #include <sys/ioctl.h> |
92 |
++#include <fcntl.h> |
93 |
+ #include <linux/kd.h> |
94 |
+ |
95 |
+ #ifdef __sparc__ |
96 |
+diff --git a/src/libkeymap/dump.c b/src/libkeymap/dump.c |
97 |
+index 0262e24..606931e 100644 |
98 |
+--- a/src/libkeymap/dump.c |
99 |
++++ b/src/libkeymap/dump.c |
100 |
+@@ -13,6 +13,7 @@ |
101 |
+ #include <string.h> |
102 |
+ #include <ctype.h> |
103 |
+ #include <unistd.h> |
104 |
++#include <sys/types.h> |
105 |
+ |
106 |
+ #include "keymap.h" |
107 |
+ |
108 |
+diff --git a/src/libkeymap/kmap.c b/src/libkeymap/kmap.c |
109 |
+index 67be81e..e13498b 100644 |
110 |
+--- a/src/libkeymap/kmap.c |
111 |
++++ b/src/libkeymap/kmap.c |
112 |
+@@ -1,5 +1,6 @@ |
113 |
+ #include <stdlib.h> |
114 |
+ #include <string.h> |
115 |
++#include <sys/types.h> |
116 |
+ |
117 |
+ #include "nls.h" |
118 |
+ #include "kbd.h" |
119 |
+diff --git a/src/libkeymap/summary.c b/src/libkeymap/summary.c |
120 |
+index 46df90d..0912ae8 100644 |
121 |
+--- a/src/libkeymap/summary.c |
122 |
++++ b/src/libkeymap/summary.c |
123 |
+@@ -9,6 +9,7 @@ |
124 |
+ #include <string.h> |
125 |
+ #include <errno.h> |
126 |
+ #include <sys/ioctl.h> |
127 |
++#include <sys/types.h> |
128 |
+ |
129 |
+ #include "keymap.h" |
130 |
+ |
131 |
+diff --git a/src/openvt.c b/src/openvt.c |
132 |
+index 075136f..49720d7 100644 |
133 |
+--- a/src/openvt.c |
134 |
++++ b/src/openvt.c |
135 |
+@@ -10,6 +10,7 @@ |
136 |
+ #include <sys/vt.h> |
137 |
+ #include <sys/wait.h> |
138 |
+ #include <sys/file.h> |
139 |
++#include <fcntl.h> |
140 |
+ |
141 |
+ #include "version.h" |
142 |
+ #include "xmalloc.h" |
143 |
+@@ -19,6 +20,8 @@ |
144 |
+ #include "compat/linux-limits.h" |
145 |
+ #endif |
146 |
+ |
147 |
++#define NAME_MAX 255 |
148 |
++ |
149 |
+ // There must be a universal way to find these! |
150 |
+ #define TRUE (1) |
151 |
+ #define FALSE (0) |
152 |
+diff --git a/src/setvtrgb.c b/src/setvtrgb.c |
153 |
+index f99badc..f1a631c 100644 |
154 |
+--- a/src/setvtrgb.c |
155 |
++++ b/src/setvtrgb.c |
156 |
+@@ -5,12 +5,15 @@ |
157 |
+ #include <sys/ioctl.h> |
158 |
+ #include <linux/kd.h> |
159 |
+ #include <errno.h> |
160 |
+-#include <error.h> |
161 |
+ #include "kbd.h" |
162 |
+ #include "getfd.h" |
163 |
+ #include "nls.h" |
164 |
+ #include "version.h" |
165 |
+ |
166 |
++#define error(e, n, ...) \ |
167 |
++ fprintf(stderr, ##__VA_ARGS__); \ |
168 |
++ exit(e); |
169 |
++ |
170 |
+ static unsigned char *cmap; |
171 |
+ |
172 |
+ /* Standard VGA terminal colors, matching those hardcoded in the Linux kernel's |
173 |
+diff --git a/src/vlock/auth.c b/src/vlock/auth.c |
174 |
+index da135ce..a3f365b 100644 |
175 |
+--- a/src/vlock/auth.c |
176 |
++++ b/src/vlock/auth.c |
177 |
+@@ -22,7 +22,6 @@ |
178 |
+ */ |
179 |
+ |
180 |
+ #include <errno.h> |
181 |
+-#include <error.h> |
182 |
+ #include <stdio.h> |
183 |
+ #include <string.h> |
184 |
+ #include <stdlib.h> |
185 |
+diff --git a/src/vlock/vlock.c b/src/vlock/vlock.c |
186 |
+index c2c4158..fa2f386 100644 |
187 |
+--- a/src/vlock/vlock.c |
188 |
++++ b/src/vlock/vlock.c |
189 |
+@@ -23,7 +23,6 @@ |
190 |
+ |
191 |
+ #include <stdio.h> |
192 |
+ #include <errno.h> |
193 |
+-#include <error.h> |
194 |
+ #include <string.h> |
195 |
+ #include <stdlib.h> |
196 |
+ #include <unistd.h> |
197 |
+diff --git a/src/vlock/vt.c b/src/vlock/vt.c |
198 |
+index 4e5282b..f3ba85d 100644 |
199 |
+--- a/src/vlock/vt.c |
200 |
++++ b/src/vlock/vt.c |
201 |
+@@ -23,7 +23,6 @@ |
202 |
+ |
203 |
+ #include <stdio.h> |
204 |
+ #include <errno.h> |
205 |
+-#include <error.h> |
206 |
+ #include <string.h> |
207 |
+ #include <stdlib.h> |
208 |
+ #include <unistd.h> |
209 |
|
210 |
diff --git a/sys-apps/kbd/kbd-2.0.2-r99.ebuild b/sys-apps/kbd/kbd-2.0.2-r99.ebuild |
211 |
new file mode 100644 |
212 |
index 0000000..c92bcbb |
213 |
--- /dev/null |
214 |
+++ b/sys-apps/kbd/kbd-2.0.2-r99.ebuild |
215 |
@@ -0,0 +1,64 @@ |
216 |
+# Copyright 1999-2014 Gentoo Foundation |
217 |
+# Distributed under the terms of the GNU General Public License v2 |
218 |
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/kbd/kbd-2.0.2.ebuild,v 1.1 2014/08/01 10:35:43 vapier Exp $ |
219 |
+ |
220 |
+EAPI=5 |
221 |
+ |
222 |
+SCM="" |
223 |
+if [[ ${PV} == "9999" ]] ; then |
224 |
+ SCM="git-r3" |
225 |
+ EGIT_REPO_URI="http://git.kernel.org/cgit/linux/kernel/git/legion/${PN}.git" |
226 |
+ EGIT_BRANCH="master" |
227 |
+else |
228 |
+ SRC_URI="ftp://ftp.kernel.org/pub/linux/utils/kbd/${P}.tar.xz" |
229 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
230 |
+fi |
231 |
+ |
232 |
+inherit autotools eutils ${SCM} |
233 |
+ |
234 |
+DESCRIPTION="Keyboard and console utilities" |
235 |
+HOMEPAGE="http://kbd-project.org/" |
236 |
+ |
237 |
+LICENSE="GPL-2" |
238 |
+SLOT="0" |
239 |
+IUSE="nls pam test" |
240 |
+ |
241 |
+RDEPEND="pam? ( virtual/pam )" |
242 |
+DEPEND="${RDEPEND} |
243 |
+ virtual/pkgconfig |
244 |
+ test? ( dev-libs/check )" |
245 |
+ |
246 |
+src_unpack() { |
247 |
+ if [[ ${PV} == "9999" ]] ; then |
248 |
+ git-r3_src_unpack |
249 |
+ else |
250 |
+ default |
251 |
+ fi |
252 |
+ |
253 |
+ # Rename conflicting keymaps to have unique names, bug #293228 |
254 |
+ cd "${S}"/data/keymaps/i386 || die |
255 |
+ mv dvorak/no.map dvorak/no-dvorak.map || die |
256 |
+ mv fgGIod/trf.map fgGIod/trf-fgGIod.map || die |
257 |
+ mv olpc/es.map olpc/es-olpc.map || die |
258 |
+ mv olpc/pt.map olpc/pt-olpc.map || die |
259 |
+ mv qwerty/cz.map qwerty/cz-qwerty.map || die |
260 |
+} |
261 |
+ |
262 |
+src_prepare() { |
263 |
+ epatch "${FILESDIR}"/${PN}-2.0.0-tests.patch |
264 |
+ epatch "${FILESDIR}"/${PN}-1.15.5-fix-struct_winsize-collision.patch |
265 |
+ epatch "${FILESDIR}"/${PN}-2.0.2-musl-headers-error.patch |
266 |
+ eautoreconf |
267 |
+} |
268 |
+ |
269 |
+src_configure() { |
270 |
+ econf \ |
271 |
+ $(use_enable nls) \ |
272 |
+ $(use_enable pam vlock) \ |
273 |
+ $(use_enable test tests) |
274 |
+} |
275 |
+ |
276 |
+src_install() { |
277 |
+ default |
278 |
+ dohtml docs/doc/*.html |
279 |
+} |