all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Move pkg-config to native inputs.
@ 2015-11-23 10:15 Mathieu Lirzin
  2015-11-23 14:55 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Mathieu Lirzin @ 2015-11-23 10:15 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 188 bytes --]

Hi,

Thanks to Ludo's work on Guix lint online.  I have made a patch but I
don't know if this is safe to push it on master so I prefer requesting
advices before.

TIA,

--
Mathieu Lirzin


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Move-pkg-config-to-native-inputs.patch --]
[-- Type: text/x-diff, Size: 4309 bytes --]

From 6a8f2286e307d5b77af3a546d5113c44bac13804 Mon Sep 17 00:00:00 2001
From: Mathieu Lirzin <mthl@gnu.org>
Date: Mon, 23 Nov 2015 10:44:53 +0100
Subject: [PATCH] gnu: Move pkg-config to native inputs.

* gnu/packages/glib.scm (gobject-introspection)[native-inputs]: Move
pkg-config from inputs.
* gnu/packages/pulseaudio.scm (libsndfile, libsamplerate)
(pulseaudio)[native-inputs]: Likewise.
* gnu/packages/xiph.scm (ao)[native-inputs]: Likewise.
* gnu/packages/xorg.scm (xf86-video-geode)[native-inputs]: Likewise.
---
 gnu/packages/glib.scm       |  4 ++--
 gnu/packages/pulseaudio.scm | 11 +++++++----
 gnu/packages/xiph.scm       |  8 +++++---
 gnu/packages/xorg.scm       |  4 ++--
 4 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm
index 146d3f5..c5eea22 100644
--- a/gnu/packages/glib.scm
+++ b/gnu/packages/glib.scm
@@ -251,10 +251,10 @@ dynamic loading, and an object system.")
        ("cairo" ,cairo)
        ("flex" ,flex)
        ("glib" ,glib)
-       ("pkg-config" ,pkg-config)
        ("python-2" ,python-2)))
     (native-inputs
-     `(("glib" ,glib "bin")))
+     `(("glib" ,glib "bin")
+       ("pkg-config" ,pkg-config)))
     (propagated-inputs
      `(;; In practice, GIR users will need libffi when using
        ;; gobject-introspection.
diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm
index d5e8aba..fe976a9 100644
--- a/gnu/packages/pulseaudio.scm
+++ b/gnu/packages/pulseaudio.scm
@@ -58,8 +58,9 @@
     (inputs
      `(("libvorbis" ,libvorbis)
        ("libogg" ,libogg)
-       ("flac" ,flac)
-       ("pkg-config" ,pkg-config)))
+       ("flac" ,flac)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
     (home-page "http://www.mega-nerd.com/libsndfile/")
     (synopsis "Reading and writing files containing sampled sound")
     (description
@@ -87,7 +88,8 @@ for reading and writing new sound file formats.")
               (base32
                "01hw5xjbjavh412y63brcslj5hi9wdgkjd3h9csx5rnm8vglpdck"))))
     (build-system gnu-build-system)
-    (inputs `(("pkg-config" ,pkg-config)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
     (propagated-inputs
      `(("libsndfile" ,libsndfile)
        ("fftw" ,fftw)))
@@ -162,13 +164,14 @@ rates.")
        ("dbus" ,dbus)
        ("glib" ,glib)
        ("intltool" ,intltool)
-       ("pkg-config" ,pkg-config)
        ("m4" ,m4)
        ("libltdl" ,libltdl)
        ("fftwf" ,fftwf)
        ("avahi" ,avahi)
        ("eudev" ,eudev)           ;for the detection of hardware audio devices
        ("check" ,check)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
     (propagated-inputs
      ;; 'libpulse*.la' contain `-lgdbm' and `-lcap', so propagate them.
      `(("libcap" ,libcap)
diff --git a/gnu/packages/xiph.scm b/gnu/packages/xiph.scm
index 705ebe1..930fbfd 100644
--- a/gnu/packages/xiph.scm
+++ b/gnu/packages/xiph.scm
@@ -165,9 +165,11 @@ stereo encoding, and voice activity detection.")
     ;; XXX: Should back-ends be pushed to different outputs?  For instance,
     ;; "out" would include only the ALSA back-end, while "pulse" would
     ;; contain 'lib/ao/plugins-4/libpulse.*'.
-    (inputs `(("pkg-config" ,pkg-config)
-              ("alsa-lib" ,alsa-lib)
-              ("pulseaudio" ,pulseaudio)))
+    (inputs
+     `(("alsa-lib" ,alsa-lib)
+       ("pulseaudio" ,pulseaudio)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
     (synopsis "Cross platform audio library")
     (description
      "Libao is a cross-platform audio library that allows programs to
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 54c15dd..42422a3 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -2710,8 +2710,8 @@ framebuffer device.")
            "19y13xl7yfrgyis92rmxi0ld95ajgr5il0n9j1dridwzw9aizz1q"))
         (patches (list (search-patch "xf86-video-geode-glibc-2.20.patch")))))
     (build-system gnu-build-system)
-    (inputs `(("pkg-config" ,pkg-config)
-              ("xorg-server" ,xorg-server)))
+    (inputs `(("xorg-server" ,xorg-server)))
+    (native-inputs `(("pkg-config" ,pkg-config)))
     (supported-systems
      ;; This driver is only supported on i686 systems.
      (filter (lambda (system) (string-prefix? "i686-" system))
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gnu: Move pkg-config to native inputs.
  2015-11-23 10:15 [PATCH] gnu: Move pkg-config to native inputs Mathieu Lirzin
@ 2015-11-23 14:55 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-11-23 14:55 UTC (permalink / raw)
  To: Mathieu Lirzin; +Cc: guix-devel

Mathieu Lirzin <mthl@gnu.org> skribis:

> Thanks to Ludo's work on Guix lint online.

Note that, for this particular checker, you may find it more convenient
to use M-x guix or M-x compile guix lint -c inputs-should-be-native RET
(runs in 1.5 second on my laptop.)

> I have made a patch but I don't know if this is safe to push it on
> master so I prefer requesting advices before.

Such changes usually require rebuilds, and a lot of them in the case of
GLib and PulseAudio.

There are some cases where such a change requires zero rebuilds though.
You can check by running, say,

  guix build glib -n

after making the change, and see if the thing would be rebuilt or if it
would be downloaded/is already on disk.  In the latter case, this means
that the change does not entail any rebuild and is safe.

> From 6a8f2286e307d5b77af3a546d5113c44bac13804 Mon Sep 17 00:00:00 2001
> From: Mathieu Lirzin <mthl@gnu.org>
> Date: Mon, 23 Nov 2015 10:44:53 +0100
> Subject: [PATCH] gnu: Move pkg-config to native inputs.
>
> * gnu/packages/glib.scm (gobject-introspection)[native-inputs]: Move
> pkg-config from inputs.
> * gnu/packages/pulseaudio.scm (libsndfile, libsamplerate)
> (pulseaudio)[native-inputs]: Likewise.
> * gnu/packages/xiph.scm (ao)[native-inputs]: Likewise.
> * gnu/packages/xorg.scm (xf86-video-geode)[native-inputs]: Likewise.

[...]

> -       ("pkg-config" ,pkg-config)
>         ("python-2" ,python-2)))
>      (native-inputs
> -     `(("glib" ,glib "bin")))
> +     `(("glib" ,glib "bin")
> +       ("pkg-config" ,pkg-config)))

Most likely entails a rebuild so I’d push it to core-updates.

> --- a/gnu/packages/pulseaudio.scm
> +++ b/gnu/packages/pulseaudio.scm
> @@ -58,8 +58,9 @@
>      (inputs
>       `(("libvorbis" ,libvorbis)
>         ("libogg" ,libogg)
> -       ("flac" ,flac)
> -       ("pkg-config" ,pkg-config)))
> +       ("flac" ,flac)))
> +    (native-inputs
> +     `(("pkg-config" ,pkg-config)))

This one might not entail a rebuild.  Please double-check, and send to
master if there’s no rebuild, core-updates otherwise.

> @@ -87,7 +88,8 @@ for reading and writing new sound file formats.")
>                (base32
>                 "01hw5xjbjavh412y63brcslj5hi9wdgkjd3h9csx5rnm8vglpdck"))))
>      (build-system gnu-build-system)
> -    (inputs `(("pkg-config" ,pkg-config)))
> +    (native-inputs
> +     `(("pkg-config" ,pkg-config)))
>      (propagated-inputs

Most likely no rebuilds, so same story here.

> @@ -162,13 +164,14 @@ rates.")
>         ("dbus" ,dbus)
>         ("glib" ,glib)
>         ("intltool" ,intltool)
> -       ("pkg-config" ,pkg-config)
>         ("m4" ,m4)
>         ("libltdl" ,libltdl)
>         ("fftwf" ,fftwf)
>         ("avahi" ,avahi)
>         ("eudev" ,eudev)           ;for the detection of hardware audio devices
>         ("check" ,check)))
> +    (native-inputs
> +     `(("pkg-config" ,pkg-config)))

Most likely a rebuild, so core-updates.

> --- a/gnu/packages/xiph.scm
> +++ b/gnu/packages/xiph.scm
> @@ -165,9 +165,11 @@ stereo encoding, and voice activity detection.")
>      ;; XXX: Should back-ends be pushed to different outputs?  For instance,
>      ;; "out" would include only the ALSA back-end, while "pulse" would
>      ;; contain 'lib/ao/plugins-4/libpulse.*'.
> -    (inputs `(("pkg-config" ,pkg-config)
> -              ("alsa-lib" ,alsa-lib)
> -              ("pulseaudio" ,pulseaudio)))
> +    (inputs
> +     `(("alsa-lib" ,alsa-lib)
> +       ("pulseaudio" ,pulseaudio)))
> +    (native-inputs
> +     `(("pkg-config" ,pkg-config)))
>      (synopsis "Cross platform audio library")

OK for master because only 19 packages depend on ao.

> --- a/gnu/packages/xorg.scm
> +++ b/gnu/packages/xorg.scm
> @@ -2710,8 +2710,8 @@ framebuffer device.")
>             "19y13xl7yfrgyis92rmxi0ld95ajgr5il0n9j1dridwzw9aizz1q"))
>          (patches (list (search-patch "xf86-video-geode-glibc-2.20.patch")))))
>      (build-system gnu-build-system)
> -    (inputs `(("pkg-config" ,pkg-config)
> -              ("xorg-server" ,xorg-server)))
> +    (inputs `(("xorg-server" ,xorg-server)))
> +    (native-inputs `(("pkg-config" ,pkg-config)))
>      (supported-systems
>       ;; This driver is only supported on i686 systems.
>       (filter (lambda (system) (string-prefix? "i686-" system))

OK for master.

Thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-23 14:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-23 10:15 [PATCH] gnu: Move pkg-config to native inputs Mathieu Lirzin
2015-11-23 14:55 ` 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.