* [PATCH] gnu: Add glibc-hurd-headers
@ 2014-04-14 22:00 Manolis Ragkousis
2014-04-14 22:20 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Manolis Ragkousis @ 2014-04-14 22:00 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 240 bytes --]
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.
[-- Attachment #2: gnu_add_glibc_hurd_headers.patch --]
[-- Type: text/x-patch, Size: 3728 bytes --]
From 8b828821c6b79a461ef067e9ae6a768c0df6378b Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: Add glibc-hurd-headers
2014-04-14 22:00 [PATCH] gnu: Add glibc-hurd-headers Manolis Ragkousis
@ 2014-04-14 22:20 ` Ludovic Courtès
2014-04-14 22:31 ` Manolis Ragkousis
[not found] ` <CAFtzXzM3yy-WJ7EpmKBK8Vf4FnwQhG3gs1+bw5T=+Wmz_qZJXA@mail.gmail.com>
0 siblings, 2 replies; 5+ messages in thread
From: Ludovic Courtès @ 2014-04-14 22:20 UTC (permalink / raw)
To: Manolis Ragkousis; +Cc: Guix-devel
Manolis Ragkousis <manolis837@gmail.com> skribis:
> 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.
That’s a sign that the Hurd’s libc should be rebased on top of libc 2.19.
> +(define-public glibc/hurd-headers
> + (package (inherit glibc)
> + (name "glibc-hurd-headers")
The indentation is wrong (see this file for examples.)
> + (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)))))))
This looks good to me, but unnecessarily complex: get rid of
‘substitute-keyword-arguments’:
(arguments
'(#:out-of-source? #t
#:tests? #f
#:configure-flags ...
#:phases (alist-replace ... %standard-phases)))
HTH,
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: Add glibc-hurd-headers
2014-04-14 22:20 ` Ludovic Courtès
@ 2014-04-14 22:31 ` Manolis Ragkousis
[not found] ` <CAFtzXzM3yy-WJ7EpmKBK8Vf4FnwQhG3gs1+bw5T=+Wmz_qZJXA@mail.gmail.com>
1 sibling, 0 replies; 5+ messages in thread
From: Manolis Ragkousis @ 2014-04-14 22:31 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Guix-devel
> This looks good to me, but unnecessarily complex: get rid of
> ‘substitute-keyword-arguments’:
The problem is that we need the phases from the glibc package except the
two I changed.
I would end up just copying them. Is there a better way to use the
inherited phases and just change the ones we need to?
Manolis
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: Add glibc-hurd-headers
[not found] ` <87d2gjat2d.fsf@gnu.org>
@ 2014-04-15 14:00 ` Manolis Ragkousis
2014-04-15 19:39 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Manolis Ragkousis @ 2014-04-15 14:00 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 19 bytes --]
The updated patch.
[-- Attachment #2: gnu_add_glibc_hurd_headers.patch --]
[-- Type: text/x-patch, Size: 3615 bytes --]
From 4f78389df586fd15c84248fe96743b4fb308edea Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Tue, 15 Apr 2014 16:54:46 +0000
Subject: [PATCH] gnu: Add glibc-hurd-headers.
* gnu/packages/base.scm (glibc/hurd-headers): New variable.
---
gnu/packages/base.scm | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index e6a2242..2656faf 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -32,10 +32,12 @@
#: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 (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 +510,63 @@ 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")
+ (version "2.18")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "git://git.sv.gnu.org/hurd/glibc")
+ (commit "14258ada6a678171a59b1e095863e83b47f9d21c")))
+ (sha256
+ (base32
+ "016x7fz5500rlgwxi9dpwm6971c3xl3jkgllgjfk5s5czwvx5yh2"))
+ (file-name (string-append name "-" version))
+ (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)))
+
+ (outputs '("out"))
+
+ (arguments
+ `(#:strip-binaries? #f
+ #:out-of-source? #t
+ #:tests? #f
+ #:configure-flags
+ (list "--host=i686-pc-gnu"
+ "--enable-addons"
+
+ ;; Installs NIS and RPC related headers that
+ ;; are not installed by default
+ "--enable-obsolete-rpc"
+
+ (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"))
+ #:phases (alist-replace
+ 'install
+ (lambda _
+ (zero? (system* "make" "install-headers")))
+ (alist-delete
+ 'build
+ (alist-cons-before
+ 'configure 'pre-configure
+ (lambda _
+ (substitute* "configure"
+ (("/bin/pwd") "pwd")))
+ %standard-phases)))))))
+
(define-public tzdata
(package
(name "tzdata")
--
1.9.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] gnu: Add glibc-hurd-headers
2014-04-15 14:00 ` Manolis Ragkousis
@ 2014-04-15 19:39 ` Ludovic Courtès
0 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2014-04-15 19:39 UTC (permalink / raw)
To: Manolis Ragkousis; +Cc: Guix-devel
Manolis Ragkousis <manolis837@gmail.com> skribis:
> +(define-public glibc/hurd-headers
> + (package (inherit glibc)
> + (name "glibc-hurd-headers")
Indentation still wrong.
> + (arguments
> + `(#:strip-binaries? #f
> + #:out-of-source? #t
> + #:tests? #f
> + #:configure-flags
> + (list "--host=i686-pc-gnu"
> + "--enable-addons"
> +
> + ;; Installs NIS and RPC related headers that
> + ;; are not installed by default
> + "--enable-obsolete-rpc"
> +
> + (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"))
> + #:phases (alist-replace
> + 'install
> + (lambda _
> + (zero? (system* "make" "install-headers")))
> + (alist-delete
> + 'build
> + (alist-cons-before
> + 'configure 'pre-configure
> + (lambda _
> + (substitute* "configure"
> + (("/bin/pwd") "pwd")))
> + %standard-phases)))))))
Sorry, I didn’t get initially that it needed this much of the initial
arguments. #:phases is the only thing that differs, right?
If that is the case, then indeed something like this is enough:
(arguments
`(#:tests? #f
,@(substitute-keyword-arguments (package-arguments glibc/hurd)
((#:phases _)
'(alist-replace ...)))))
In general the guideline is to keep things as simple and concise as
possible. In some cases, making things more concise will actually make
them more difficult to understand, which is not desirable.
HTH!
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-04-15 19:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-14 22:00 [PATCH] gnu: Add glibc-hurd-headers Manolis Ragkousis
2014-04-14 22:20 ` Ludovic Courtès
2014-04-14 22:31 ` Manolis Ragkousis
[not found] ` <CAFtzXzM3yy-WJ7EpmKBK8Vf4FnwQhG3gs1+bw5T=+Wmz_qZJXA@mail.gmail.com>
[not found] ` <87d2gjat2d.fsf@gnu.org>
2014-04-15 14:00 ` Manolis Ragkousis
2014-04-15 19:39 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.