mhw pushed a commit to branch wip-loongson2f in repository guix. commit da65c28aeba79cfa59fdac647ceff5bba42d0e50 Author: Mark H Weaver <m...@netris.org> Date: Sun Aug 16 00:59:11 2015 -0400
gnu: grub: Update to 2.02-beta2-500-gba218c1. * gnu/packages/patches/grub-freetype.patch, gnu/packages/patches/grub-gets-undeclared.patch: Delete files. * gnu-system.am (dist_patch_DATA): Remove them. * gnu/packages/grub.scm (grub): Update to 2.02-beta2-500-gba218c1. [source]: Change to use git-fetch. Remove patches. [arguments]: Patch Makefile.am instead of Makefile.in in 'phase-stuff' phase. Add 'autogen' phase. [native-inputs]: Add python, autoconf, and automake. --- gnu-system.am | 2 - gnu/packages/grub.scm | 32 +++++++++++------ gnu/packages/patches/grub-freetype.patch | 24 ------------- gnu/packages/patches/grub-gets-undeclared.patch | 42 ----------------------- 4 files changed, 21 insertions(+), 79 deletions(-) diff --git a/gnu-system.am b/gnu-system.am index ac3793c..f9a43f3 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -479,8 +479,6 @@ dist_patch_DATA = \ gnu/packages/patches/gobject-introspection-cc.patch \ gnu/packages/patches/gobject-introspection-girepository.patch \ gnu/packages/patches/grep-CVE-2015-1345.patch \ - gnu/packages/patches/grub-gets-undeclared.patch \ - gnu/packages/patches/grub-freetype.patch \ gnu/packages/patches/gsl-poly-test-fix-pt1.patch \ gnu/packages/patches/gsl-poly-test-fix-pt2.patch \ gnu/packages/patches/guile-1.8-cpp-4.5.patch \ diff --git a/gnu/packages/grub.scm b/gnu/packages/grub.scm index 7875a64..c76fa22 100644 --- a/gnu/packages/grub.scm +++ b/gnu/packages/grub.scm @@ -19,12 +19,14 @@ (define-module (gnu packages grub) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix packages) #:use-module ((guix licenses) #:select (gpl3+)) #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages flex) #:use-module (gnu packages bison) + #:use-module (gnu packages autotools) #:use-module (gnu packages gettext) #:use-module (gnu packages fontutils) #:use-module (gnu packages linux) @@ -33,6 +35,7 @@ #:use-module (gnu packages texinfo) #:use-module (gnu packages ncurses) #:use-module (gnu packages cdrom) + #:use-module (gnu packages python) #:use-module (srfi srfi-1)) (define qemu-for-tests @@ -74,16 +77,15 @@ (define-public grub (package (name "grub") - (version "2.00") + (version "2.02-beta2-500-gba218c1") (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/grub/grub-" - version ".tar.xz")) - (sha256 - (base32 - "0n64hpmsccvicagvr0c6v0kgp2yw0kgnd3jvsyd26cnwgs7c6kkq")) - (patches (list (search-patch "grub-gets-undeclared.patch") - (search-patch "grub-freetype.patch"))))) + (method git-fetch) + (uri (git-reference + (url "git://git.savannah.gnu.org/grub.git") + (commit (last (string-split version #\g))))) + (sha256 + (base32 + "0g7kg4286w84ib31fb52jxpljn345wl3i91xsfizh9b5adcpi9fq")))) (build-system gnu-build-system) (arguments '(#:configure-flags '("--disable-werror") @@ -91,7 +93,7 @@ (add-after 'unpack 'patch-stuff (lambda* (#:key inputs #:allow-other-keys) - (substitute* "grub-core/Makefile.in" + (substitute* "grub-core/Makefile.am" (("/bin/sh") (which "sh"))) ;; Make the font visible. @@ -102,7 +104,11 @@ (substitute* "tests/partmap_test.in" (("set -e") "exit 77")) - #t))))) + #t)) + (add-after + 'patch-stuff 'autogen + (lambda _ + (zero? (system* "bash" "autogen.sh"))))))) (inputs `(;; ("lvm2" ,lvm2) ("gettext" ,gnu-gettext) @@ -117,6 +123,10 @@ ("texinfo" ,texinfo) ("help2man" ,help2man) + ("python" ,python-2) + ("autoconf" ,autoconf) + ("automake" ,automake) + ;; Dependencies for the test suite. The "real" QEMU is needed here, ;; because several targets are used. ("qemu" ,qemu-for-tests) diff --git a/gnu/packages/patches/grub-freetype.patch b/gnu/packages/patches/grub-freetype.patch deleted file mode 100644 index 286830c..0000000 --- a/gnu/packages/patches/grub-freetype.patch +++ /dev/null @@ -1,24 +0,0 @@ -commit fd0df6d098b1e6a4f60275c48a3ec88d15ba1fbb -Author: Colin Watson <cjwat...@ubuntu.com> -Date: Fri Nov 29 12:19:36 2013 +0000 - - Fix build with FreeType 2.5.1 - - * util/grub-gen-asciih.c: Include FT_SYNTHESIS_H rather than - <freetype/ftsynth.h>, fixing build with FreeType 2.5.1. - * util/grub-gen-widthspec.c: Likewise. - * util/grub-mkfont.c: Likewise. - -diff --git a/util/grub-mkfont.c b/util/grub-mkfont.c -index 0d8eb78..242dd01 100644 ---- a/util/grub-mkfont.c -+++ b/util/grub-mkfont.c -@@ -43,7 +43,7 @@ - #include FT_FREETYPE_H - #include FT_TRUETYPE_TAGS_H - #include FT_TRUETYPE_TABLES_H --#include <freetype/ftsynth.h> -+#include FT_SYNTHESIS_H - - #undef __FTERRORS_H__ - #define FT_ERROR_START_LIST const char *ft_errmsgs[] = { diff --git a/gnu/packages/patches/grub-gets-undeclared.patch b/gnu/packages/patches/grub-gets-undeclared.patch deleted file mode 100644 index 41dddbd..0000000 --- a/gnu/packages/patches/grub-gets-undeclared.patch +++ /dev/null @@ -1,42 +0,0 @@ -This patch is needed to allow builds with newer versions of -the GNU libc (2.16+). - - -commit 66712c23388e93e5c518ebc8515140fa0c807348 -Author: Eric Blake <ebl...@redhat.com> -Date: Thu Mar 29 13:30:41 2012 -0600 - - stdio: don't assume gets any more - - Gnulib intentionally does not have a gets module, and now that C11 - and glibc have dropped it, we should be more proactive about warning - any user on a platform that still has a declaration of this dangerous - interface. - - * m4/stdio_h.m4 (gl_STDIO_H, gl_STDIO_H_DEFAULTS): Drop gets - support. - * modules/stdio (Makefile.am): Likewise. - * lib/stdio-read.c (gets): Likewise. - * tests/test-stdio-c++.cc: Likewise. - * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Fix comment. - * lib/stdio.in.h (gets): Make warning occur in more places. - * doc/posix-functions/gets.texi (gets): Update documentation. - Reported by Christer Solskogen. - - Signed-off-by: Eric Blake <ebl...@redhat.com> - ---- grub-2.00/grub-core/gnulib/stdio.in.h 2013-02-10 16:17:09.000000000 +0100 -+++ grub-2.00/grub-core/gnulib/stdio.in.h 2013-02-10 16:17:11.000000000 +0100 -@@ -137,12 +137,6 @@ _GL_WARN_ON_USE (fflush, "fflush is not - "use gnulib module fflush for portable POSIX compliance"); - #endif - --/* It is very rare that the developer ever has full control of stdin, -- so any use of gets warrants an unconditional warning. Assume it is -- always declared, since it is required by C89. */ --#undef gets --_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -- - #if @GNULIB_FOPEN@ - # if @REPLACE_FOPEN@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE)