1 |
commit: a968d7a72f90fa86a9dfc05a28880fba4d941622 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 24 16:27:15 2016 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 24 16:27:56 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a968d7a7 |
7 |
|
8 |
sys-boot/gummiboot: include sysmacros.h |
9 |
|
10 |
Bug: https://bugs.gentoo.org/581714 |
11 |
Package-Manager: portage-2.3.0_p22 |
12 |
|
13 |
sys-boot/gummiboot/files/48-sysmacros.patch | 52 +++++++++++++++++++++++++++++ |
14 |
sys-boot/gummiboot/gummiboot-48.ebuild | 12 ++++++- |
15 |
2 files changed, 63 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/sys-boot/gummiboot/files/48-sysmacros.patch b/sys-boot/gummiboot/files/48-sysmacros.patch |
18 |
new file mode 100644 |
19 |
index 00000000..aceee31 |
20 |
--- /dev/null |
21 |
+++ b/sys-boot/gummiboot/files/48-sysmacros.patch |
22 |
@@ -0,0 +1,52 @@ |
23 |
+From d7904d41506163d07d27dbfab1e514b75d172cee Mon Sep 17 00:00:00 2001 |
24 |
+From: Mike Gilbert <floppym@g.o> |
25 |
+Date: Wed, 24 Aug 2016 12:17:19 -0400 |
26 |
+Subject: [PATCH] setup: conditionally include sysmacros.h for major() |
27 |
+ |
28 |
+--- |
29 |
+ configure.ac | 2 ++ |
30 |
+ src/setup/setup.c | 8 ++++++++ |
31 |
+ 2 files changed, 10 insertions(+) |
32 |
+ |
33 |
+diff --git a/configure.ac b/configure.ac |
34 |
+index 27bbe1d..27552c2 100644 |
35 |
+--- a/configure.ac |
36 |
++++ b/configure.ac |
37 |
+@@ -72,6 +72,8 @@ AS_IF([test x"$cross_compiling" = "xyes"], [], [ |
38 |
+ AC_SUBST([QEMU_BIOS]) |
39 |
+ ]) |
40 |
+ |
41 |
++AC_HEADER_MAJOR |
42 |
++ |
43 |
+ # ------------------------------------------------------------------------------ |
44 |
+ dnl GNU EFI doesn't use relative paths: efi.h includes efibind.h which is in |
45 |
+ dnl ${ARCH} relative to efi.h. I can't find a way to get AC_CHECK_HEADERS to |
46 |
+diff --git a/src/setup/setup.c b/src/setup/setup.c |
47 |
+index 6a4275a..6bf8d86 100644 |
48 |
+--- a/src/setup/setup.c |
49 |
++++ b/src/setup/setup.c |
50 |
+@@ -27,6 +27,7 @@ |
51 |
+ #include <assert.h> |
52 |
+ #include <sys/statfs.h> |
53 |
+ #include <sys/stat.h> |
54 |
++#include <sys/types.h> |
55 |
+ #include <errno.h> |
56 |
+ #include <string.h> |
57 |
+ #include <unistd.h> |
58 |
+@@ -38,6 +39,13 @@ |
59 |
+ #include <stdbool.h> |
60 |
+ #include <blkid.h> |
61 |
+ |
62 |
++#ifdef MAJOR_IN_MKDEV |
63 |
++#include <sys/mkdev.h> |
64 |
++#endif |
65 |
++#ifdef MAJOR_IN_SYSMACROS |
66 |
++#include <sys/sysmacros.h> |
67 |
++#endif |
68 |
++ |
69 |
+ #include "efivars.h" |
70 |
+ |
71 |
+ #define ELEMENTSOF(x) (sizeof(x)/sizeof((x)[0])) |
72 |
+-- |
73 |
+2.9.3 |
74 |
+ |
75 |
|
76 |
diff --git a/sys-boot/gummiboot/gummiboot-48.ebuild b/sys-boot/gummiboot/gummiboot-48.ebuild |
77 |
index a4b017d..bc51e1f 100644 |
78 |
--- a/sys-boot/gummiboot/gummiboot-48.ebuild |
79 |
+++ b/sys-boot/gummiboot/gummiboot-48.ebuild |
80 |
@@ -3,8 +3,9 @@ |
81 |
# $Id$ |
82 |
|
83 |
EAPI=6 |
84 |
+WANT_LIBTOOL=none |
85 |
|
86 |
-inherit linux-info |
87 |
+inherit autotools linux-info |
88 |
|
89 |
DESCRIPTION="Minimalistic UEFI bootloader" |
90 |
HOMEPAGE="https://freedesktop.org/wiki/Software/gummiboot/" |
91 |
@@ -22,8 +23,17 @@ DEPEND="${RDEPEND} |
92 |
dev-libs/libxslt |
93 |
>=sys-boot/gnu-efi-3.0.2" |
94 |
|
95 |
+PATCHES=( |
96 |
+ "${FILESDIR}/48-sysmacros.patch" |
97 |
+) |
98 |
+ |
99 |
pkg_pretend() { |
100 |
# CONFIG_EFI_STUB is required to boot a kernel with gummiboot |
101 |
local CONFIG_CHECK="~EFI_STUB" |
102 |
check_extra_config |
103 |
} |
104 |
+ |
105 |
+src_prepare() { |
106 |
+ default |
107 |
+ eautoreconf |
108 |
+} |