Update gummiboot

Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
Shea Levy 2013-10-09 09:52:08 -04:00
parent 174503945f
commit e521757f21
3 changed files with 13 additions and 91 deletions

View File

@ -1,19 +1,20 @@
{ stdenv, fetchurl, gnu_efi, unzip, pkgconfig, utillinux, libxslt, docbook_xsl, docbook_xml_dtd_42 }:
{ stdenv, fetchurl, gnu-efi, unzip, pkgconfig, utillinux, libxslt, docbook_xsl, docbook_xml_dtd_42 }:
stdenv.mkDerivation rec {
name = "gummiboot-23";
name = "gummiboot-38";
buildInputs = [ unzip pkgconfig utillinux libxslt docbook_xsl docbook_xml_dtd_42 ];
buildInputs = [ gnu-efi pkgconfig libxslt utillinux ];
patches = [ ./no-usr.patch ];
buildFlags = [ "GNU_EFI=${gnu_efi}" ];
makeFlags = [ "PREFIX=$(out)" ];
# Sigh, gummiboot should be able to find this in buildInputs
configureFlags = [
"--with-efi-includedir=${gnu-efi}/include"
"--with-efi-libdir=${gnu-efi}/lib"
"--with-efi-ldsdir=${gnu-efi}/lib"
];
src = fetchurl {
url = "http://cgit.freedesktop.org/gummiboot/snapshot/${name}.zip";
sha256 = "1lmfk4k52ha00ppna5g7h51vhd27i9fipf5k7mc2d9jkm2480z4j";
url = http://pkgs.fedoraproject.org/repo/pkgs/gummiboot/gummiboot-38.tar.xz/0504791387e1998bf2075728c237f27e/gummiboot-38.tar.xz;
sha256 = "1aid2a29ym8dqldxpcihnrls7vrr9ijbla3dad0r8qwkca43d4lm";
};
meta = {

View File

@ -1,79 +0,0 @@
diff -Naur gummiboot-23-orig/Makefile gummiboot-23/Makefile
--- gummiboot-23-orig/Makefile 2013-02-20 00:55:44.000000000 -0500
+++ gummiboot-23/Makefile 2013-02-21 12:00:35.783637645 -0500
@@ -10,7 +10,8 @@
export E Q
ARCH=$(shell $(CC) -dumpmachine | sed "s/\(-\).*$$//")
-LIBDIR=$(shell echo $$(cd /usr/lib/$$(gcc -print-multi-os-directory); pwd))
+PREFIX=/usr
+LIBDIR=$(GNU_EFI)/lib
LIBEFIDIR=$(or $(wildcard $(LIBDIR)/gnuefi), $(LIBDIR))
ifeq ($(ARCH),i686)
@@ -25,13 +26,13 @@
-mno-red-zone
endif
-all: gummiboot$(MACHINE_TYPE_NAME).efi gummiboot
+all: gummiboot$(MACHINE_TYPE_NAME).efi gummiboot man
# ------------------------------------------------------------------------------
CPPFLAGS = \
-I. \
- -I/usr/include/efi \
- -I/usr/include/efi/$(ARCH)
+ -I$(GNU_EFI)/include/efi \
+ -I$(GNU_EFI)/include/efi/$(ARCH)
CFLAGS = \
-DVERSION=$(VERSION) \
@@ -82,6 +83,7 @@
`pkg-config --cflags --libs blkid` \
src/setup/setup.c \
src/setup/efivars.c \
+ -DPREFIX=\"$(PREFIX)\" \
-o $@
# ------------------------------------------------------------------------------
@@ -101,11 +103,11 @@
rm -f src/efi/gummiboot.o src/efi/gummiboot.so gummiboot gummiboot$(MACHINE_TYPE_NAME).efi
install: all
- mkdir -p $(DESTDIR)/usr/bin/
- cp gummiboot $(DESTDIR)/usr/bin
- mkdir -p $(DESTDIR)/usr/lib/gummiboot/
- cp gummiboot$(MACHINE_TYPE_NAME).efi $(DESTDIR)/usr/lib/gummiboot/
- [ -e gummiboot.1 ] && mkdir -p $(DESTDIR)/usr/share/man/man1/ && cp gummiboot.1 $(DESTDIR)/usr/share/man/man1/ || :
+ mkdir -p $(DESTDIR)$(PREFIX)/bin/
+ cp gummiboot $(DESTDIR)$(PREFIX)/bin
+ mkdir -p $(DESTDIR)$(PREFIX)/lib/gummiboot/
+ cp gummiboot$(MACHINE_TYPE_NAME).efi $(DESTDIR)$(PREFIX)/lib/gummiboot/
+ [ -e gummiboot.1 ] && mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1/ && cp gummiboot.1 $(DESTDIR)$(PREFIX)/share/man/man1/ || :
tar:
git archive --format=tar --prefix=gummiboot-$(VERSION)/ $(VERSION) | xz > gummiboot-$(VERSION).tar.xz
diff -Naur gummiboot-23-orig/src/setup/setup.c gummiboot-23/src/setup/setup.c
--- gummiboot-23-orig/src/setup/setup.c 2013-02-20 00:55:44.000000000 -0500
+++ gummiboot-23/src/setup/setup.c 2013-02-21 11:57:43.295324700 -0500
@@ -736,7 +736,7 @@
char *p = NULL, *q = NULL, *v = NULL;
int r;
- if (asprintf(&p, "/usr/lib/gummiboot/%s", name) < 0) {
+ if (asprintf(&p, PREFIX "/lib/gummiboot/%s", name) < 0) {
fprintf(stderr, "Out of memory.\n");
r = -ENOMEM;
goto finish;
@@ -791,9 +791,9 @@
return r;
}
- d = opendir("/usr/lib/gummiboot");
+ d = opendir(PREFIX "/lib/gummiboot");
if (!d) {
- fprintf(stderr, "Failed to open /usr/lib/gummiboot: %m\n");
+ fprintf(stderr, "Failed to open " PREFIX "/lib/gummiboot: %m\n");
return -errno;
}

View File

@ -1044,7 +1044,7 @@ let
gtmess = callPackage ../applications/networking/instant-messengers/gtmess { };
gummiboot = callPackage ../tools/misc/gummiboot { };
gummiboot = callPackage ../tools/misc/gummiboot { stdenv = overrideGCC stdenv gcc47; };
gupnp = callPackage ../development/libraries/gupnp {
inherit (gnome) libsoup;
@ -4320,7 +4320,7 @@ let
gnet = callPackage ../development/libraries/gnet { };
gnu_efi = callPackage ../development/libraries/gnu-efi {
gnu-efi = callPackage ../development/libraries/gnu-efi {
stdenv = overrideInStdenv stdenv [gnumake381];
};