This patch adds glibc-hurd-headers so I can use them to bootstrap
build libihash which needs glibc.
Take notice that it needs the patch "glibc-make-4.0.patch" for the
configure check to pass. I should bring up this issue to the hurd
guys.
From 8b828821c6b79a461ef067e9ae6a768c0df6378b Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis...@gmail.com>
Date: Tue, 15 Apr 2014 00:45:19 +0000
Subject: [PATCH] gnu: Add glibc-hurd-headers.

* gnu/packages/base.scm (glibc/hurd-headers): New variable.
---
 gnu/packages/base.scm | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index e6a2242..9546d92 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -32,10 +32,13 @@
   #:use-module (gnu packages multiprecision)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages hurd)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages perl)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix git-download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system trivial)
   #:use-module (guix utils)
@@ -508,6 +511,56 @@ with the Linux kernel.")
    (license lgpl2.0+)
    (home-page "http://www.gnu.org/software/libc/";)))
 
+(define-public glibc/hurd-headers
+  (package (inherit glibc)
+           (name "glibc-hurd-headers")
+           (source (origin
+                     (method git-fetch)
+                     (uri (git-reference
+                           (url "git://git.sv.gnu.org/hurd/glibc")
+                           (commit "14258ada6a678171a59b1e095863e83b47f9d21c")))
+                     (sha256
+                      (base32
+                       "016x7fz5500rlgwxi9dpwm6971c3xl3jkgllgjfk5s5czwvx5yh2"))
+                     (patches (list (search-patch "glibc-make-4.0.patch")))))
+
+           (propagated-inputs `(("gnumach-headers" ,gnumach-headers)
+                                ("hurd-headers" ,hurd-headers)))
+           (native-inputs `(("mig" ,mig)
+                            ("perl" ,perl)))
+           
+           (arguments
+            (substitute-keyword-arguments
+                `(#:strip-binaries? #f
+                  #:out-of-source? #t
+                  #:tests? #f 
+                  #:configure-flags (list 
+                                     "--host=i686-pc-gnu"
+                                     "--enable-addons"
+                                     ;;"--disable-sanity-checks"
+                                     (string-append "libc_cv_localedir="
+                                                    (assoc-ref %outputs "locales")
+                                                    "/share/locale")
+                                     (string-append "--with-headers="
+                                                    (assoc-ref %build-inputs "gnumach-headers")
+                                                    "/include:"
+                                                    (assoc-ref %build-inputs "hurd-headers")
+                                                    "/include")
+                                     
+                                     ;; Use our Bash instead of /bin/sh.
+                                     (string-append "BASH_SHELL="
+                                                    (assoc-ref %build-inputs "bash")
+                                                    "/bin/bash"))
+                  ,@(package-arguments glibc))
+              ((#:phases phases)
+               `(alist-replace
+                 'install
+                 (lambda _
+                   (zero? (system* "make" "install-headers")))
+                 (alist-delete
+                 'build
+                 ,phases)))))))
+
 (define-public tzdata
   (package
     (name "tzdata")
-- 
1.9.0

Reply via email to