all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Cc: guix-devel@gnu.org
Subject: Re: RFC: Build system hacks for Guix do not belong in 'source'
Date: Tue, 10 Mar 2015 12:23:29 -0400	[thread overview]
Message-ID: <87egow254u.fsf@netris.org> (raw)
In-Reply-To: <87vbi96yoe.fsf@mango.localdomain> (Ricardo Wurmus's message of "Tue, 10 Mar 2015 09:31:45 +0100")

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes:

> Mark H Weaver writes:
>
>> I think that both the 'ldconfig -> true' hack and the LIBDIR
>> substitution should be moved to a build phase for both of these
>> packages.
>
> Attached are updated patches, moving the build hacks from snippets to a
> build phase.
>
> ~~ Ricardo
>
> From abdbfec11164c61cfdb6fc88ddf9abd2e58aa027 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <rekado@elephly.net>
> Date: Wed, 4 Mar 2015 11:50:26 +0100
> Subject: [PATCH 1/2] gnu: zita-alsa-pcmi: set LIBDIR to "lib".
>
> * gnu/packages/audio.scm (zita-alsa-pcmi)[source, arguments]: Set LIBDIR to
>   "lib" in build phase.  Remove snippet.

I wouldn't write [source, arguments] here when the first sentence that
follows doesn't relate to 'source' at all.  Also, instead of "Remove
snippet", how about "Move snippet to build phase"?  Maybe something like
this:

--8<---------------cut here---------------start------------->8---
gnu: zita-alsa-pcmi: Move snippet to build phase and set LIBDIR.

* gnu/packages/audio.scm (zita-alsa-pcmi): Move snippet to build phase
  and set LIBDIR.
--8<---------------cut here---------------end--------------->8---

> @@ -1044,8 +1040,12 @@ interface.")
>         #:phases
>         (alist-cons-after
>          'unpack
> -        'enter-directory
> -        (lambda _ (chdir "libs"))
> +        'fix-makefile
> +        (lambda _
> +          (substitute* "libs/Makefile"
> +            (("ldconfig") "true")
> +            (("^LIBDIR =.*") "LIBDIR = lib\n"))
> +          (chdir "libs"))

It still enters the directory, so 'fix-makefile' doesn't quite cover it.
How about 'patch-Makefile-and-enter-directory' ?

Also, 'chdir' returns an unspecified value, but phases must return a
true value to indicate success.  So please add #t after the chdir,
maybe something like this:

--8<---------------cut here---------------start------------->8---
       (alist-cons-after
        'unpack 'patch-makefile-and-enter-directory
        (lambda _
          (substitute* "libs/Makefile"
            (("ldconfig") "true")
            (("^LIBDIR =.*") "LIBDIR = lib\n"))
          (chdir "libs")
          #t)
--8<---------------cut here---------------end--------------->8---

(It is true that in Guile, "an unspecified value" is normally a true
value, but it's bad practice to write code that depends on that).

All of these comments apply to the other patch as well.
After considering these suggestions, okay to push.

    Thanks!
      Mark

      reply	other threads:[~2015-03-10 16:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-21 20:54 [PATCH 1/2] gnu: Add zita-alsa-pcmi Ricardo Wurmus
2015-02-21 20:54 ` [PATCH 2/2] gnu: Add AlsaModularSynth Ricardo Wurmus
2015-02-21 21:09   ` Ricardo Wurmus
2015-02-22 20:54     ` Ricardo Wurmus
2015-02-25 14:00       ` Ludovic Courtès
2015-02-25 22:03         ` Ricardo Wurmus
2015-02-26 17:08           ` Ludovic Courtès
2015-03-01 13:49             ` Ricardo Wurmus
2015-03-01 14:59               ` Ludovic Courtès
2015-03-02  6:14               ` Mark H Weaver
2015-03-04  7:08                 ` Ricardo Wurmus
2015-03-04  7:14                   ` Ricardo Wurmus
2015-03-04 11:09                     ` Ricardo Wurmus
2015-03-05 18:38                       ` RFC: Build system hacks for Guix do not belong in 'source' Mark H Weaver
2015-03-05 19:30                         ` Thompson, David
2015-03-05 22:05                         ` Ludovic Courtès
2015-03-05 23:10                           ` Ricardo Wurmus
2015-03-10  8:31                         ` Ricardo Wurmus
2015-03-10 16:23                           ` Mark H Weaver [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87egow254u.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=guix-devel@gnu.org \
    --cc=ricardo.wurmus@mdc-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.