unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Federico Beffa <beffa@ieee.org>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH 3/4] gnu: libcanberra: Add propagated-input.
Date: Mon, 12 Jan 2015 10:22:40 +0100	[thread overview]
Message-ID: <87fvbgxsin.fsf@gnu.org> (raw)
In-Reply-To: <CAKrPhPMo0TcvQQ9KzR_dCQ_TM+KXfUkb8t7Pva9Vrt1A73mXHg@mail.gmail.com> (Federico Beffa's message of "Sun, 11 Jan 2015 14:34:09 +0100")

Federico Beffa <beffa@ieee.org> skribis:

> From 14abfc26e7b45aa5644104fa661f34f3a70323ae Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Thu, 18 Dec 2014 21:32:34 +0100
> Subject: [PATCH 3/4] gnu: libcanberra: Add default sounds support.
>
> * gnu/packages/libcanberra.scm (libcanberra): Add input
>   'sound-theme-freedesktop'.  Add "libcanberra-sound-theme-freedesktop.patch"
>   and related phase 'patch-default-sounds-directory to patch the default
>   sounds directory.

[...]

> diff --git a/gnu/packages/patches/libcanberra-sound-theme-freedesktop.patch b/gnu/packages/patches/libcanberra-sound-theme-freedesktop.patch
> new file mode 100644
> index 0000000..10bfbdf
> --- /dev/null
> +++ b/gnu/packages/patches/libcanberra-sound-theme-freedesktop.patch
> @@ -0,0 +1,19 @@
> +--- src/sound-theme-spec.c.orig	2015-01-11 13:13:29.520527358 +0100
> ++++ src/sound-theme-spec.c	2015-01-11 14:27:23.035046849 +0100
> +@@ -321,9 +321,13 @@
> +         const char *g;
> + 
> +         if (!(g = getenv("XDG_DATA_DIRS")) || *g == 0)
> +-                return "/usr/local/share:/usr/share";
> +-
> +-        return g;
> ++                return "@SOUND_THEME_DIRECTORY@";
> ++        else {
> ++                const char *stp = ":@SOUND_THEME_DIRECTORY@";
> ++                size_t len = strlen(stp) + strlen(g) + 1;
> ++                char *g2 = (char*) malloc(len);
> ++                return strcat(strcpy(g2, g), stp);
> ++        }
> + }
> + 
> + static int load_theme_dir(ca_theme_data *t, const char *name) {

Nice, much more readable IMO.  :-)

Before committing, could you just add a short description at the top of
the patch?

Thanks!

Ludo’.

      reply	other threads:[~2015-01-12  9:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-18 21:14 [PATCH 3/4] gnu: libcanberra: Add propagated-input Federico Beffa
2014-12-21 11:06 ` Ludovic Courtès
2014-12-21 15:33   ` Federico Beffa
2015-01-07 17:20     ` Federico Beffa
2015-01-07 20:11     ` Ludovic Courtès
2015-01-08 17:08       ` Federico Beffa
2015-01-08 20:39         ` Ludovic Courtès
2015-01-10 11:15           ` Federico Beffa
2015-01-10 21:13             ` Ludovic Courtès
2015-01-11  8:34               ` Federico Beffa
2015-01-11 10:59                 ` Ludovic Courtès
2015-01-11 13:04                   ` Federico Beffa
2015-01-11 13:34                     ` Federico Beffa
2015-01-12  9:22                       ` Ludovic Courtès [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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87fvbgxsin.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=beffa@ieee.org \
    --cc=guix-devel@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).