Glib documentation is missing

DoneSubmitted by Pierre Neidhardt.
Details
5 participants
  • Alexandros Theodotou
  • Ludovic Courtès
  • Pierre Neidhardt
  • Marius Bakke
  • pelzflorian (Florian Pelz)
Owner
unassigned
Severity
normal
P
P
Pierre Neidhardt wrote on 21 Oct 2019 12:45
(address . bug-guix@gnu.org)(name . Ricardo Wurmus)(address . rekado@elephly.net)
87pniq9y2e.fsf@ambrevar.xyz
Since the last core-update merge, glib 2.58.1+ does not include thedocumentation anymore (it was in the "doc" output).
Documentation for Glib/GTK-based libraries is very useful fordevelopers: it allows offline and contextual access from any texteditor.
This is why it would be nice to include it back.
Commit 6c237a2d7bfa3c7be02c069e5c24a2b401a51864 (June 21st) states
Toggle snippet (3 lines)[outputs]: Remove "doc" as the documentation files are no longer included.
However looking at the source of Glib I cannot find trace of this in theNEWS file nor in the INSTALL.in file. Disclaimer: I haven't triedbuilding glib.
Maybe we miss a compilation flag?
What do you think? Ricardo?
Cheers!
-- Pierre Neidhardthttps://ambrevar.xyz/
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl2tjEkACgkQm9z0l6S7zH+gNQf/WyThZvGKaZsSOcfDmr+sKDvpIciJeoI2WLcRpkl4bW6j15Q1gYWD7r21D5itKLuzbwxn7AAsbOcNnyNSTJtB4oo0p+wfHo4zGnYzWGJApxYIRXsWtNkNAiLfo2ZpxtLwsI8GIaUVbXB4WTi2/ndgHjC/WgdGtao53MFVpLZFyzbbzMs+B1FVWzG6tw64i0YUNqtzqhWRgr8ZA2ODl9hNWc4gbFHIRl2QUVkT0GaOk844EmVe6+Y/4tSdPVrxW9Q5NSKqyIKbRxbcXs7cvFXgU0KN1KAVWHXCXkNYhLQN9Ayg52wb+53qHCmRtF4X9lLZH6QJX/58cli4N5Z2P4cvpw===NaQk-----END PGP SIGNATURE-----
M
M
Marius Bakke wrote on 23 Oct 2019 20:22
8736fjwcd2.fsf@devup.no
Pierre Neidhardt <mail@ambrevar.xyz> writes:
Toggle quote (21 lines)> Since the last core-update merge, glib 2.58.1+ does not include the> documentation anymore (it was in the "doc" output).>> Documentation for Glib/GTK-based libraries is very useful for> developers: it allows offline and contextual access from any text> editor.>> This is why it would be nice to include it back.>> Commit 6c237a2d7bfa3c7be02c069e5c24a2b401a51864 (June 21st) states>> --8<---------------cut here---------------start------------->8---> [outputs]: Remove "doc" as the documentation files are no longer included.> --8<---------------cut here---------------end--------------->8--->> However looking at the source of Glib I cannot find trace of this in the> NEWS file nor in the INSTALL.in file. Disclaimer: I haven't tried> building glib.>> Maybe we miss a compilation flag?
Installing the GLib documentation now requires 'gtk-doc' at build time:
https://gitlab.gnome.org/GNOME/glib/blob/master/meson_options.txt
'gtk-doc' unsurprisingly depends on GLib, so I'm not sure what the bestapproach is.
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl2wmmkACgkQoqBt8qM6VPoxpggA1djnGNf3X48JToNrRlGUP/pFPn9KboUTrfRizxxy2YxIGlKGI8q+Sp2P4jll5S6ygS6+/QyHMYRbNsbCfnJSjPQsn86+KE7a74J+umBuN/v1IzAXBunl5lpLDpaYxr8D5ZbHAfT3/8ZGcjhuOxSBAtU/680weTdgdZlXRXat2tDaxkWVWND86SVqTfNj7u0c9ClfFFn8wEPRD8NcJipTJJHPrUJammUPPW1HL2xV1D3CxOOhIWSZuTmZ9FQQ8+KtfJz9XifMxVijE2kqBKHzsEs0XNBbd8LUMyQ5sfPb5usYVUTZlkk6Eogg6AfP9bu+TLMNZw27oVeyNtD0rWhNxg===a4wM-----END PGP SIGNATURE-----
P
P
Pierre Neidhardt wrote on 23 Oct 2019 20:38
87wocvwbmy.fsf@ambrevar.xyz
Marius Bakke <mbakke@fastmail.com> writes:
Toggle quote (4 lines)> Installing the GLib documentation now requires 'gtk-doc' at build time:>> https://gitlab.gnome.org/GNOME/glib/blob/master/meson_options.txt
Thanks for looking into this!
Toggle quote (3 lines)> 'gtk-doc' unsurprisingly depends on GLib, so I'm not sure what the best> approach is.
What about the following:
1. Turn our current glib into glib-minimal.
2. Build gtk-doc against glib-minimal.
3. Define a new glib package that inherits from glib-minimal and addsgtk-doc as native-inputs so that we can restore the "doc" output.
-- Pierre Neidhardthttps://ambrevar.xyz/
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl2wnhUACgkQm9z0l6S7zH8aOgf/XTmxGdGDs34gOFDdodBhrouYwKug3B/IDNlZ/GxotIaBK5FGv+aP8Vxs8L5fz9vJaWU1HiiPsYeja7B34XPP4jF6J7slfcUt3Hzlf30WR4TogPOSsh5MCbRb/XyGARiWYMB9SDvctX3iwmCLQVsMkxpfu8SaEINnrD+Qemo8sphXNfSJ5dtCD/SNbAH2S/fp0nBQh1hRmPUjs6lKciderxdYK2eHjY5l9K4WaiHyN4w6s6NDF3o9Gp492hEkDl2sjfZnkabopo1PRxF33y8ydt3ZlkjCAGLZ4lbHIGEgyHhwYz+BpbAdx2/5fUU1fFVa0QoMZAE5SXev6ukUk4WcDQ===0uzt-----END PGP SIGNATURE-----
L
L
Ludovic Courtès wrote on 25 Oct 2019 23:23
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)
87pnikldtt.fsf@gnu.org
Hi,
Pierre Neidhardt <mail@ambrevar.xyz> skribis:
Toggle quote (2 lines)> Marius Bakke <mbakke@fastmail.com> writes:
[...]
Toggle quote (12 lines)>> 'gtk-doc' unsurprisingly depends on GLib, so I'm not sure what the best>> approach is.>> What about the following:>> 1. Turn our current glib into glib-minimal.>> 2. Build gtk-doc against glib-minimal.>> 3. Define a new glib package that inherits from glib-minimal and adds> gtk-doc as native-inputs so that we can restore the "doc" output.
Alternately, we could define a new “glib-doc” package that would dependon the current “glib” package, assuming the build system allows us tobuild nothing but documentation.
Ludo’.
P
P
Pierre Neidhardt wrote on 26 Oct 2019 11:04
(name . Ludovic Courtès)(address . ludo@gnu.org)
87v9sbj2ru.fsf@ambrevar.xyz
Ludovic Courtès <ludo@gnu.org> writes:
Toggle quote (4 lines)> Alternately, we could define a new “glib-doc” package that would depend> on the current “glib” package, assuming the build system allows us to> build nothing but documentation.
Some possible drawbacks:
- It's not consistent with the other Glib/GNOME libraries like gtk+ or webkitgtk which have a "doc" output.
- Previously we had glib:doc and no measure can be taken to let the user know that it's now "glib-doc".
So I would got for the glib-minimal route.
This bring me to another problem: "glib:doc" was not deprecated, sousers who installed "glib:doc" cannot update their manifests / profilesafter a guix pull.
Can we actually deprecate single outputs?If not, isn't it a bug?
-- Pierre Neidhardthttps://ambrevar.xyz/
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl20DDUACgkQm9z0l6S7zH8r8gf+KbyFIKiUVX0xDYn56UVGqyUR8s1h8V3GfS//vNzrxkS/lSyaWdTHeaVpOah/GHoGQp2lvROzFOFJm7AZhqOuyR4QaUdS5mFDrvOCh363ZLEGEYak/g8rw76r79rNylydT8HdkggIhXaqoixNbWgHD6OmWlDEp4nXV9ujDu4L16Qh/rzGu/nbAVfl9LInaxZApj54rethAW0gXoPs9B/o5pAFpZnvX3elvz5Cw/jZUzI83nBq6U4D618nazyY682ZVg1gSO231rGVqVxnZUUBH1K6FBT+SiqVsBNXx0uSC+qAD+dqTwZtzAED8AS1KJvl4KVvN73idqJ5N5QI2mPyEA===RxzE-----END PGP SIGNATURE-----
P
P
Pierre Neidhardt wrote on 29 Oct 2019 11:36
(name . Ludovic Courtès)(address . ludo@gnu.org)
87h83ret3a.fsf@ambrevar.xyz
I can send a patch for Glib.
Toggle snippet (4 lines)> guix refresh -l glibBuilding the following 1645 packages would ensure 4428 dependent packages are rebuilt: a
I guess this is going to core-updates.
-- Pierre Neidhardthttps://ambrevar.xyz/
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl24FjkACgkQm9z0l6S7zH9CCwf/ZdObEwtMTRt1mDMb7uv+T89b/rhTU4lVPSqF/fox1pxWWnbp7Ikh1RZk++Q9bxXwtuJ84cf+1oqamDDtsJCx65A9VQejeKf1vcqyB6BeEGb0C9f+pNr85QgDruMQN3h25Vt4JfF5j2m+FYWXTefkhVOe1dMwbqOjhiSgBCT9oojR2ZoE/YF+zOE1HJZEhCVCxpEiopBgV2MXvBFY5zkHxA2zYRWwue+Uugc/3bULG970E4io9jloaqDIgU8zIxRzurcp06QDeBro37/yggbnhCqqhjzQTu6C4hX1H8msF+cv4zsmp4pEATtFvqM49h2KJE7XubFE0jHw+t8j/4YLrg===k1kh-----END PGP SIGNATURE-----
P
P
Pierre Neidhardt wrote on 3 Nov 2019 17:39
(name . Ludovic Courtès)(address . ludo@gnu.org)
87k18gncbn.fsf@ambrevar.xyz
Find a patch attached. What do you think?
-- Pierre Neidhardthttps://ambrevar.xyz/
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl2/AtwACgkQm9z0l6S7zH85dggAriYhCIZQHgFnHyOviFiJ6nHVos8f0LbfGT4MompA81Rm7bh+d3ncXxjdBLOzziUXioiPwhN78qk7nZIcyBSx/fM4nkjR8pvJTvNoiVCwJlnwOM9iutvOvs22TaH01H7fYYmgvSC5DS6xiuNuIHEnjyAJBPzmOnIM0xBpntHxXBSez02laQdJKwnYgJmzGGn88spq/6u3Tp+GGxsc3lpiq9mBXFT5FK1ZTOibkTNlEXhbSwqX2mF7/6bgekOrKD5GsjOcKP/G6JDXniiw3s9QviGiVAQA3/n0OUQ74vHNr0pkz1EETNrl31fzML6Iso/3u0BzyrJDV7mpwzUXIuL0iQ===5pJa-----END PGP SIGNATURE-----
From 893613a3b99c20688cc331d2926dbee28cc143d7 Mon Sep 17 00:00:00 2001From: Pierre Neidhardt <mail@ambrevar.xyz>Date: Sun, 3 Nov 2019 17:36:17 +0100Subject: [PATCH] gnu: Add glib-minimal and build glib doc.
glib documentation must be built with gtk-doc which in turn depends on glib,so we need to define glib-minimal which does not depend on gtk-doc.
* gnu/packages/glib.scm (glib-minimal): New variable.(glib)[source]: Don't use `name'.* gnu/packages/avahi.scm: Use glib-minimal when necessary.* gnu/packages/cups.scm: Use glib-minimal when necessary.* gnu/packages/gnome.scm: Use glib-minimal when necessary.* gnu/packages/graphviz.scm: Use glib-minimal when necessary.* gnu/packages/gtk.scm: Use glib-minimal when necessary.* gnu/packages/inkscape.scm: Use glib-minimal when necessary.* gnu/packages/pdf.scm: Use glib-minimal when necessary.--- gnu/packages/avahi.scm | 4 ++-- gnu/packages/cups.scm | 4 ++-- gnu/packages/glib.scm | 35 ++++++++++++++++++++++++++--------- gnu/packages/gnome.scm | 16 ++++++++-------- gnu/packages/graphviz.scm | 2 +- gnu/packages/gtk.scm | 22 +++++++++++----------- gnu/packages/inkscape.scm | 2 +- gnu/packages/pdf.scm | 4 ++-- 8 files changed, 53 insertions(+), 36 deletions(-)
Toggle diff (342 lines)diff --git a/gnu/packages/avahi.scm b/gnu/packages/avahi.scmindex e84fed6a71..0b577ca990 100644--- a/gnu/packages/avahi.scm+++ b/gnu/packages/avahi.scm@@ -59,14 +59,14 @@ "--enable-compat-libdns_sd"))) (inputs `(("expat" ,expat)- ("glib" ,glib)+ ("glib" ,glib-minimal) ("dbus" ,dbus) ("gdbm" ,gdbm) ("libcap" ,libcap) ;to enable chroot support in avahi-daemon ("libdaemon" ,libdaemon))) (native-inputs `(("intltool" ,intltool)- ("glib" ,glib "bin")+ ("glib" ,glib-minimal "bin") ("pkg-config" ,pkg-config))) (synopsis "Implementation of mDNS/DNS-SD protocols") (descriptiondiff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scmindex 694ed6b039..8a1fe66073 100644--- a/gnu/packages/cups.scm+++ b/gnu/packages/cups.scm@@ -147,7 +147,7 @@ out "/lib/cups/filter"))) #t)))))) (native-inputs- `(("glib" ,glib "bin") ; for gdbus-codegen+ `(("glib" ,glib-minimal "bin") ; for gdbus-codegen ("pkg-config" ,pkg-config))) (inputs `(("avahi" ,avahi)@@ -161,7 +161,7 @@ ("libjpeg" ,libjpeg) ("libpng" ,libpng) ("libtiff" ,libtiff)- ("glib" ,glib)+ ("glib" ,glib-minimal) ("qpdf" ,qpdf) ("poppler" ,poppler) ("cups-minimal" ,cups-minimal)))diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scmindex b3e85f8df9..2ac270f9c9 100644--- a/gnu/packages/glib.scm+++ b/gnu/packages/glib.scm@@ -71,6 +71,7 @@ ;; Export variables up-front to allow circular dependency with the 'xorg' ;; module. #:export (dbus+ glib-minimal glib gobject-introspection dbus-glib@@ -159,15 +160,15 @@ or through unencrypted TCP/IP suitable for use behind a firewall with shared NFS home directories.") (license license:gpl2+))) ; or Academic Free License 2.1 -(define glib+(define glib-minimal (package- (name "glib")+ (name "glib-minimal") (version "2.60.6") (source (origin (method url-fetch)- (uri (string-append "mirror://gnome/sources/"- name "/" (string-take version 4) "/"- name "-" version ".tar.xz"))+ (uri (string-append "mirror://gnome/sources/glib/"+ (string-take version 4) "/"+ "glib-" version ".tar.xz")) (sha256 (base32 "0v7vpx2md1gn0wwiirn7g4bhf2csfvcr03y96q2zv97ain6sp3zz"))@@ -348,6 +349,22 @@ dynamic loading, and an object system.") (home-page "https://developer.gnome.org/glib/") (license license:lgpl2.1+))) +(define glib+ (package+ (inherit glib-minimal)+ (name "glib")+ (outputs (cons "doc" (package-outputs glib-minimal))) ; 20 MiB of GTK-Doc reference+ (native-inputs+ `(("gtk-doc" ,gtk-doc) ; for the doc+ ,@(package-native-inputs glib-minimal)))+ (arguments+ (substitute-keyword-arguments (package-arguments glib-minimal)+ ((#:configure-flags flags)+ `(cons (string-append "--with-html-dir="+ (assoc-ref %outputs "doc")+ "/share/gtk-doc/html")+ ,flags))))))+ (define gobject-introspection (package (name "gobject-introspection")@@ -376,11 +393,11 @@ dynamic loading, and an object system.") (inputs `(("bison" ,bison) ("flex" ,flex)- ("glib" ,glib)+ ("glib" ,glib-minimal) ("python" ,python-wrapper) ("zlib" ,zlib))) (native-inputs- `(("glib" ,glib "bin")+ `(("glib" ,glib-minimal "bin") ("pkg-config" ,pkg-config))) (propagated-inputs `(;; In practice, GIR users will need libffi when using@@ -597,10 +614,10 @@ has an ease of use unmatched by other C++ callback libraries.") "return 77;\n")) #t))))) (native-inputs `(("pkg-config" ,pkg-config)- ("glib" ,glib "bin")))+ ("glib" ,glib-minimal "bin"))) (propagated-inputs `(("libsigc++" ,libsigc++)- ("glib" ,glib)))+ ("glib" ,glib-minimal))) (home-page "https://gtkmm.org/") (synopsis "C++ interface to the GLib library") (descriptiondiff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scmindex cd881b5b87..636c665f21 100644--- a/gnu/packages/gnome.scm+++ b/gnu/packages/gnome.scm@@ -991,7 +991,7 @@ guidelines.") ;; The build system appears not to be parallel-safe. '(#:parallel-build? #f)) (inputs- `(("glib" ,glib)+ `(("glib" ,glib-minimal) ("libxml2" ,libxml2))) (native-inputs `(("intltool" ,intltool)@@ -1282,7 +1282,7 @@ the GNOME desktop environment.") (native-inputs `(("pkg-config" ,pkg-config))) (inputs- `(("glib" ,glib)+ `(("glib" ,glib-minimal) ("libxml2" ,libxml2) ("zlib" ,zlib))) (home-page "https://github.com/GNOME/libcroco")@@ -1318,7 +1318,7 @@ XML/CSS rendering engine.") ("bzip2" ,bzip2))) (propagated-inputs `(("gdk-pixbuf" ,gdk-pixbuf)- ("glib" ,glib)+ ("glib" ,glib-minimal) ("libxml2" ,libxml2))) (home-page "https://www.gnome.org/projects/libgsf") (synopsis "GNOME's Structured File Library")@@ -1375,7 +1375,7 @@ dealing with different structured file formats.") (native-inputs `(("pkg-config" ,pkg-config) ("vala" ,vala)- ("glib" ,glib "bin") ; glib-mkenums, etc.+ ("glib" ,glib-minimal "bin") ; glib-mkenums, etc. ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc. (inputs `(("pango" ,pango)@@ -1387,7 +1387,7 @@ dealing with different structured file formats.") ;; librsvg-2.0.pc refers to all of that. `(("cairo" ,cairo) ("gdk-pixbuf" ,gdk-pixbuf)- ("glib" ,glib)))+ ("glib" ,glib-minimal))) (home-page "https://wiki.gnome.org/LibRsvg") (synopsis "Render SVG files using Cairo") (description@@ -1466,7 +1466,7 @@ library.") ("rust" ,rust-1.34) ("cargo" ,rust-1.34 "cargo") ("vala" ,vala)- ("glib" ,glib "bin") ; glib-mkenums, etc.+ ("glib" ,glib-minimal "bin") ; glib-mkenums, etc. ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc. (inputs `(("pango" ,pango)@@ -1478,7 +1478,7 @@ library.") ;; librsvg-2.0.pc refers to all of that. `(("cairo" ,cairo) ("gdk-pixbuf" ,gdk-pixbuf)- ("glib" ,glib)))+ ("glib" ,glib-minimal))) (home-page "https://wiki.gnome.org/LibRsvg") (synopsis "Render SVG files using Cairo") (description@@ -2304,7 +2304,7 @@ passwords in the GNOME keyring.") (inputs `(("graphviz" ,graphviz))) (propagated-inputs- `(("glib" ,glib))) ; required by libvala-0.40.pc+ `(("glib" ,glib-minimal))) ; required by libvala-0.40.pc (home-page "https://live.gnome.org/Vala/") (synopsis "Compiler for the GObject type system") (descriptiondiff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scmindex f9667e873b..e49579cd0e 100644--- a/gnu/packages/graphviz.scm+++ b/gnu/packages/graphviz.scm@@ -247,7 +247,7 @@ structure and layout algorithms.") `(("pkg-config" ,pkg-config))) (propagated-inputs ;; The gts.pc file has glib-2.0 as required.- `(("glib" ,glib)))+ `(("glib" ,glib-minimal))) (home-page "http://gts.sourceforge.net/") ;; Note: Despite the name, this is not official GNU software.diff --git a/gnu/packages/gtk.scm b/gnu/packages/gtk.scmindex 436018efdb..cc637e7438 100644--- a/gnu/packages/gtk.scm+++ b/gnu/packages/gtk.scm@@ -99,11 +99,11 @@ (base32 "1k4i817bd2w5b9z394f2yyx95591l2746wa40am0vvz4gzdgwhfb")))) (build-system meson-build-system)- (propagated-inputs `(("glib" ,glib))) ; required by atk.pc+ (propagated-inputs `(("glib" ,glib-minimal))) ; required by atk.pc (native-inputs `(("pkg-config" ,pkg-config) ("gettext" ,gettext-minimal)- ("glib" ,glib "bin") ; glib-mkenums, etc.+ ("glib" ,glib-minimal "bin") ; glib-mkenums, etc. ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc. (synopsis "GNOME accessibility toolkit") (description@@ -128,7 +128,7 @@ tools have full access to view and control running applications.") (propagated-inputs `(("fontconfig" ,fontconfig) ("freetype" ,freetype)- ("glib" ,glib)+ ("glib" ,glib-minimal) ("libpng" ,libpng) ("libx11" ,libx11) ("libxext" ,libxext)@@ -197,11 +197,11 @@ affine transformation (scale, rotation, shear, etc.).") `(("cairo" ,cairo))) (propagated-inputs ;; There are all in the Requires or Requires.private field of '.pc'.- `(("glib" ,glib)+ `(("glib" ,glib-minimal) ("graphite2" ,graphite2) ("icu4c" ,icu4c))) (native-inputs- `(("glib:bin" ,glib "bin") ;for glib-mkenums+ `(("glib:bin" ,glib-minimal "bin") ;for glib-mkenums ("gobject-introspection" ,gobject-introspection) ("pkg-config" ,pkg-config) ("python" ,python-wrapper)@@ -237,7 +237,7 @@ affine transformation (scale, rotation, shear, etc.).") ("fribidi" ,fribidi) ("fontconfig" ,fontconfig) ("freetype" ,freetype)- ("glib" ,glib)+ ("glib" ,glib-minimal) ("harfbuzz" ,harfbuzz))) (inputs `(("zlib" ,zlib)@@ -247,7 +247,7 @@ affine transformation (scale, rotation, shear, etc.).") ("libxft" ,libxft))) (native-inputs `(("pkg-config" ,pkg-config)- ("glib" ,glib "bin") ; glib-mkenums, etc.+ ("glib" ,glib-minimal "bin") ; glib-mkenums, etc. ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc. (synopsis "GNOME text and font handling library") (description@@ -507,7 +507,7 @@ highlighting and other features typical of a source code editor.") #t))))) (propagated-inputs `(;; Required by gdk-pixbuf-2.0.pc- ("glib" ,glib)+ ("glib" ,glib-minimal) ("libpng" ,libpng) ;; Used for testing and required at runtime. ("shared-mime-info" ,shared-mime-info)))@@ -518,7 +518,7 @@ highlighting and other features typical of a source code editor.") (native-inputs `(("pkg-config" ,pkg-config) ("gettext" ,gettext-minimal)- ("glib" ,glib "bin") ; glib-mkenums, etc.+ ("glib" ,glib-minimal "bin") ; glib-mkenums, etc. ("gobject-introspection" ,gobject-introspection))) ; g-ir-compiler, etc. (synopsis "GNOME image loading and manipulation library") (description@@ -696,7 +696,7 @@ is part of the GNOME accessibility project.") (native-inputs `(("perl" ,perl) ("gettext" ,gettext-minimal)- ("glib" ,glib "bin")+ ("glib" ,glib-minimal "bin") ("gobject-introspection" ,gobject-introspection) ("pkg-config" ,pkg-config) ("python-wrapper" ,python-wrapper)))@@ -1516,7 +1516,7 @@ information.") ("docbook-xml" ,docbook-xml-4.3) ("docbook-xsl" ,docbook-xsl) ("source-highlight" ,source-highlight)- ("glib" ,glib)+ ("glib" ,glib-minimal) ("python-six" ,python-six))) (home-page "https://www.gtk.org/gtk-doc/") (synopsis "Documentation generator from C source code")diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scmindex 1ad23a92d4..e5d951ae1a 100644--- a/gnu/packages/inkscape.scm+++ b/gnu/packages/inkscape.scm@@ -75,7 +75,7 @@ ("boost" ,boost))) (native-inputs `(("intltool" ,intltool)- ("glib" ,glib "bin")+ ("glib" ,glib-minimal "bin") ("perl" ,perl) ("pkg-config" ,pkg-config))) ;; FIXME: tests require gmockdiff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scmindex f54200a54d..3e4a5100e6 100644--- a/gnu/packages/pdf.scm+++ b/gnu/packages/pdf.scm@@ -119,10 +119,10 @@ ;; As per poppler-cairo and poppler-glib.pc. ;; XXX: Ideally we'd propagate Cairo too, but that would require a ;; different solution to the circular dependency mentioned above.- `(("glib" ,glib)))+ `(("glib" ,glib-minimal))) (native-inputs `(("pkg-config" ,pkg-config)- ("glib" ,glib "bin") ; glib-mkenums, etc.+ ("glib" ,glib-minimal "bin") ; glib-mkenums, etc. ("gobject-introspection" ,gobject-introspection))) (arguments `(#:tests? #f ; no test data provided with the tarball-- 2.23.0
M
M
Marius Bakke wrote on 3 Nov 2019 20:04
(address . 37850@debbugs.gnu.org)
8736f4ok77.fsf@devup.no
Pierre Neidhardt <mail@ambrevar.xyz> writes:
Toggle quote (18 lines)> From 893613a3b99c20688cc331d2926dbee28cc143d7 Mon Sep 17 00:00:00 2001> From: Pierre Neidhardt <mail@ambrevar.xyz>> Date: Sun, 3 Nov 2019 17:36:17 +0100> Subject: [PATCH] gnu: Add glib-minimal and build glib doc.>> glib documentation must be built with gtk-doc which in turn depends on glib,> so we need to define glib-minimal which does not depend on gtk-doc.>> * gnu/packages/glib.scm (glib-minimal): New variable.> (glib)[source]: Don't use `name'.> * gnu/packages/avahi.scm: Use glib-minimal when necessary.> * gnu/packages/cups.scm: Use glib-minimal when necessary.> * gnu/packages/gnome.scm: Use glib-minimal when necessary.> * gnu/packages/graphviz.scm: Use glib-minimal when necessary.> * gnu/packages/gtk.scm: Use glib-minimal when necessary.> * gnu/packages/inkscape.scm: Use glib-minimal when necessary.> * gnu/packages/pdf.scm: Use glib-minimal when necessary.
Please mention all changed variables and inputs here, as we always do.
That said, I'm not certain this is a good solution. Why do somepackages use glib-minimal and others not? What does "necessary" mean inthis context?
What about 'hiding' the normal glib package, and expose a'glib-with-documentation' variant to end users, similar to how the'cmake' package works?
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl2/JLwACgkQoqBt8qM6VPqVyAf/ZAN4NhlQWHAakZkr2TfL/5WrbakRFLC+ejGsXVveJDNlxH1Vzg4AVkRSv2b5gxop1ihqsS1kQAIV0QDP/1NlxRL61HyVutpEbbv7Oax/EOfDNSAHRfqdtlzhAfgXQ4myNyzzAVZIDhSa9guxoiLCB/Uif05c83cSvOy8arhyHXY9YLaTwJYPtjiuZMpuWgd4ahp9jnV3hc90h53UdE+pEBnE33enMhv+cTcOyoGzW1DSqykWkmpb09UP1vH912HH6t85bkULXBuLE5eE8vmjGdWendJpjLDLMKle/t5I0n0dT4e253csaaynEz5D2sE6KHSyNzKfMRDeM919VTMcGA===vmS7-----END PGP SIGNATURE-----
P
P
Pierre Neidhardt wrote on 4 Nov 2019 10:46
(address . 37850@debbugs.gnu.org)
87ftj4m0s0.fsf@ambrevar.xyz
Marius Bakke <mbakke@fastmail.com> writes:
Toggle quote (22 lines)> Pierre Neidhardt <mail@ambrevar.xyz> writes:>>> From 893613a3b99c20688cc331d2926dbee28cc143d7 Mon Sep 17 00:00:00 2001>> From: Pierre Neidhardt <mail@ambrevar.xyz>>> Date: Sun, 3 Nov 2019 17:36:17 +0100>> Subject: [PATCH] gnu: Add glib-minimal and build glib doc.>>>> glib documentation must be built with gtk-doc which in turn depends on glib,>> so we need to define glib-minimal which does not depend on gtk-doc.>>>> * gnu/packages/glib.scm (glib-minimal): New variable.>> (glib)[source]: Don't use `name'.>> * gnu/packages/avahi.scm: Use glib-minimal when necessary.>> * gnu/packages/cups.scm: Use glib-minimal when necessary.>> * gnu/packages/gnome.scm: Use glib-minimal when necessary.>> * gnu/packages/graphviz.scm: Use glib-minimal when necessary.>> * gnu/packages/gtk.scm: Use glib-minimal when necessary.>> * gnu/packages/inkscape.scm: Use glib-minimal when necessary.>> * gnu/packages/pdf.scm: Use glib-minimal when necessary.>> Please mention all changed variables and inputs here, as we always do.
Sure, I didn't because I wasn't sure it was a good idea either :p
Toggle quote (8 lines)> That said, I'm not certain this is a good solution. Why do some> packages use glib-minimal and others not? What does "necessary" mean in> this context?>> What about 'hiding' the normal glib package, and expose a> 'glib-with-documentation' variant to end users, similar to how the> 'cmake' package works?
cmake-minimal builds the doc already, I don't see acmake-with-documentation. Did you mean something else?I see a couple packages with the "-documentation" prefix, so we coulduse "glib-documentation".
In a previous email, I explained that I wanted to put the documentationin the "doc" output of glib for 2 reasons:
- For consistency with the other packages from the GTK family.- To restore the missing "gtk:doc" output. If I understand correctly, we don't have a provision to deprecate outputs, only packages. I think this is a bug.
Now my current patch is admittedly not pretty.If we fix the output deprecation feature, then glib:doc could beforwarded to glib-documentation. And I guess we can live withoutcomplete consistency.
Thoughts?
-- Pierre Neidhardthttps://ambrevar.xyz/
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl2/848ACgkQm9z0l6S7zH+eYQf/XfqZrRT1dUCWX9fHSlWFNVLLXhU87+IUNd9gRMRcnVId2wnYTF8PcU33s0UqyV3ox2bYvv9Yk9fVjqWb1imHexqI2srX6MCUxvlPDHW3PNwKSDTOoije8D+YTYNOHpaHOPMIbOJFQrTKpUIV+WFsT9ekciqCK1HX3NTVbnn6cr7Vy2SA/4Ipz1b/Cq/zs2/ODokCB+HAHfs9hfL15ACso6WLCB1UzauS4RkChrvudtZViCeV5JDuYxLibL1HBA4xfHuhMbhALD7YjxKG2PtLyLjkHhxm4eMJjhXOCZ0ICNSorON/HJqS1BKoSyJWOkAajrA51ASmOUuh2QJUn/ST6w===UOPh-----END PGP SIGNATURE-----
A
A
Alexandros Theodotou wrote on 9 Nov 2019 03:03
Re: Glib documentation is missing
(address . 37850@debbugs.gnu.org)
49c82620e6bd4b6cb477eb353fc0e8f5@posteo.net
I am new to guix so please excuse my ignorance, but is there an issue with just adding a "doc" output to the current glib, as mentioned in the manual?http://guix.gnu.org/manual/en/guix.html#Packages-with-Multiple-Outputs
I find this approach nice and clean and I am personally not too fond of the idea of having "*-minimal" and "*-with-documentation" packages.
A
A
Alexandros Theodotou wrote on 9 Nov 2019 03:10
(address . 37850@debbugs.gnu.org)
b380468477bbccfaaec7e417545805b9@posteo.net
I missed this part.
Toggle quote (4 lines)> glib documentation must be built with gtk-doc which in turn depends on > glib,> so we need to define glib-minimal which does not depend on gtk-doc.
In this case the way I have seen other distros do it is by having a *-bootstrap package (same as the *-minimal that you mention), which doesn't sound like a bad approach.
Toggle quote (2 lines)> What about 'hiding' the normal glib package
Maybe the *-bootstrap package can be hidden. Then the normal glib package can have its "doc" back?
M
M
Marius Bakke wrote on 10 Nov 2019 00:20
Re: bug#37850: Glib documentation is missing
(address . 37850@debbugs.gnu.org)
8736ewmyc1.fsf@devup.no
Pierre Neidhardt <mail@ambrevar.xyz> writes:
Toggle quote (39 lines)> Marius Bakke <mbakke@fastmail.com> writes:>>> Pierre Neidhardt <mail@ambrevar.xyz> writes:>>>>> From 893613a3b99c20688cc331d2926dbee28cc143d7 Mon Sep 17 00:00:00 2001>>> From: Pierre Neidhardt <mail@ambrevar.xyz>>>> Date: Sun, 3 Nov 2019 17:36:17 +0100>>> Subject: [PATCH] gnu: Add glib-minimal and build glib doc.>>>>>> glib documentation must be built with gtk-doc which in turn depends on glib,>>> so we need to define glib-minimal which does not depend on gtk-doc.>>>>>> * gnu/packages/glib.scm (glib-minimal): New variable.>>> (glib)[source]: Don't use `name'.>>> * gnu/packages/avahi.scm: Use glib-minimal when necessary.>>> * gnu/packages/cups.scm: Use glib-minimal when necessary.>>> * gnu/packages/gnome.scm: Use glib-minimal when necessary.>>> * gnu/packages/graphviz.scm: Use glib-minimal when necessary.>>> * gnu/packages/gtk.scm: Use glib-minimal when necessary.>>> * gnu/packages/inkscape.scm: Use glib-minimal when necessary.>>> * gnu/packages/pdf.scm: Use glib-minimal when necessary.>>>> Please mention all changed variables and inputs here, as we always do.>> Sure, I didn't because I wasn't sure it was a good idea either :p>>> That said, I'm not certain this is a good solution. Why do some>> packages use glib-minimal and others not? What does "necessary" mean in>> this context?>>>> What about 'hiding' the normal glib package, and expose a>> 'glib-with-documentation' variant to end users, similar to how the>> 'cmake' package works?>> cmake-minimal builds the doc already, I don't see a> cmake-with-documentation. Did you mean something else?> I see a couple packages with the "-documentation" prefix, so we could> use "glib-documentation".
I meant this part:
(define-public cmake (package (inherit cmake-minimal) (name "cmake") (arguments (substitute-keyword-arguments (package-arguments cmake-minimal) ((#:configure-flags configure-flags ''()) `(append ,configure-flags ;; Extra configure flags used to generate the documentation. '("--sphinx-info" "--sphinx-man" "--sphinx-html")))
Do you think it would make sense to do something similar with GLib,and "hiding" the normal variant?
Toggle quote (7 lines)> In a previous email, I explained that I wanted to put the documentation> in the "doc" output of glib for 2 reasons:>> - For consistency with the other packages from the GTK family.> - To restore the missing "gtk:doc" output. If I understand correctly,> we don't have a provision to deprecate outputs, only packages. I> think this is a bug.
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl3HSa4ACgkQoqBt8qM6VPql9wf7BvCPou3hu5kWaNT+h4w0u5N6FPAKsp0Yq2eildSbBkTVlDepXMy6SVD4IYp8RaINYlR3o+BaefZjrfFWSpHzSyksVR+6Qa0s8EmMr9VDPIp3qcFMp0RrynIlerXPoo9pibhdyPcKXZA5WGGpewPTuI9PKA2N330enzPkphvbZoBFwVwsAw7EifvzoDJPGRjuzajID+HFknWWoiQvDTWoPCts3lyHNESEPP9+DS5GBItNfiNyksxvX0p3/FEMELNhbtO6r1vNxLAaHCdM6E0AvU7l7+nSj+S0pbBMrkqCmKTO2w3JwbnAJlHb0dC4owNmj+eUFtV5iUVIC53+fd0mrg===AE57-----END PGP SIGNATURE-----
P
P
Pierre Neidhardt wrote on 11 Nov 2019 10:29
(address . 37850@debbugs.gnu.org)
87woc6kbhc.fsf@ambrevar.xyz
Hi Marius,
you are right, this seems to be a much saner approach.So I've tried the following:
- add `(properties '((hidden? . #t)) )` to glib.- Add the following new package definition:
Toggle snippet (18 lines)(define-public glib-with-documentation (package (inherit glib) (properties '((hidden? . #f))) (outputs (cons "doc" (package-outputs glib))) ; 20 MiB of GTK-Doc reference (native-inputs `(("gtk-doc" ,gtk-doc) ; for the doc ,@(package-native-inputs glib))) (arguments (substitute-keyword-arguments (package-arguments glib) ((#:configure-flags flags) `(cons "-Dgtk_doc=true" ,flags)) ;; TODO: Fix 1 failing test. ((#:phases phases) `(modify-phases ,phases (delete 'check)))))))
Sadly the above does not build the doc.
Looking at the source, it seems that no provision is taken for buildingthe doc with Meson. I wonder if this is an upstream mistake, but myknowledge of Meson is very limited and I could be wrong.
Any idea, anyone?
-- Pierre Neidhardthttps://ambrevar.xyz/
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl3JKd8ACgkQm9z0l6S7zH+Nswf/RBWIDmet/Vm5KukfiL6Rwn4WF4ga4gWi+1C06sPBrehU0PHTkj+rP6ExOYsuBAk1oeAldJ1a/s2dqWyvlf4gpHj0mc8XpMEO6Dr1C1CnWLb7McsQidlfzpqJXUTbIULsyj5rTDHQ06GcDEbWRT5lp42dw0/96AgN/1GnAmp8/2+qJynWrC3R52ZvLN6ExRkGOhNpgYt8CRRRQLIGeRpPK/UTHYa94SSlL2TIxuF+tI3MoHwV+hCOD9aKwm2KxvG2Rd9Py+YYYhltH0WQz+I7nFfiQOFdwXwZxI15HcZAieUMaQj2BFpGqy0C/pOU6gHMNdEkDfdW87GLM4S3vX4bZQ===u+h8-----END PGP SIGNATURE-----
P
P
pelzflorian (Florian Pelz) wrote on 12 Nov 2019 13:32
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)
20191112123233.jkcevtpkz5i2yut5@pelzflorian.localdomain
On Mon, Nov 11, 2019 at 10:29:03AM +0100, Pierre Neidhardt wrote:
Toggle quote (9 lines)> Sadly the above does not build the doc.> > Looking at the source, it seems that no provision is taken for building> the doc with Meson. I wonder if this is an upstream mistake, but my> knowledge of Meson is very limited and I could be wrong.> > Any idea, anyone?>
I have not checked, but
https://mesonbuild.com/Gnome-module.html
says about gtkdoc
Toggle quote (3 lines)> This creates a $module-doc target that can be ran to build docs and> normally these are only built on install.
Since GNOME is a big supporter of Meson, I believe they make nomistakes in GLib’s meson files.
Regards,Florian
P
P
pelzflorian (Florian Pelz) wrote on 12 Nov 2019 14:22
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 37850@debbugs.gnu.org)
20191112132254.hzqo2zck3btcerdb@pelzflorian.localdomain
Sorry for my past unhelpful email. This module is not used by glib.When I try your package, it seems -Dgtk_doc=true is not applied likewhen manually running meson. I do not understand why. (Manuallyrunning it leads to a crash later.)
Regards,Florian
P
P
Pierre Neidhardt wrote on 12 Nov 2019 17:00
(name . pelzflorian (Florian Pelz))(address . pelzflorian@pelzflorian.de)(address . 37850@debbugs.gnu.org)
87h839gk47.fsf@ambrevar.xyz
Hmmm, you are right, it does not get built during the install phase.
I had a look at the bugtracker:
https://gitlab.gnome.org/GNOME/glib/issues
Could not find anything related to this.
Could our Meson build system be buggy?As a side note, it does not seem to print any command line flags, whichis a bit inconvenient for debugging. Something we could improve at least.

-- Pierre Neidhardthttps://ambrevar.xyz/
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl3K1ygACgkQm9z0l6S7zH9thQf9EhN1xDgIqvsC2NeCGgNmHeEedi++fU/MjgspP9g0muQjk3nOQcaehv57m7DEfhu6djrX8HToad/TYCZWLjZYy8IseYhhBiGACvoyUi2f9dTwxHIUB7RNDc1s6EZd513znICIkTZuc5FP+1muAOVaiv28Vr0FFI30xtHUMTx6rtIBvtWY3V2bPmF+DYEEMouACAKSJwC373k6vhNuveW+W7HObcolskn2sVzOIfDFFA+ZyWlM9F97FfqsbZismxKXTCoUSy95d2rkRqO58bPqBD8KtKDgkrklmSnrtFjU3gIdp+sW54uZTN1vYpCEemWYCP9sKVr9obZ83+6VUasydg===/Lnp-----END PGP SIGNATURE-----
P
P
pelzflorian (Florian Pelz) wrote on 12 Nov 2019 19:34
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)(address . 37850@debbugs.gnu.org)
20191112183458.fmlullhdc65bp2am@pelzflorian.localdomain
On Tue, Nov 12, 2019 at 05:00:40PM +0100, Pierre Neidhardt wrote:
Toggle quote (13 lines)> Hmmm, you are right, it does not get built during the install phase.> > I had a look at the bugtracker:> > https://gitlab.gnome.org/GNOME/glib/issues> > Could not find anything related to this.> > Could our Meson build system be buggy?> As a side note, it does not seem to print any command line flags, which> is a bit inconvenient for debugging. Something we could improve at least.>
Moving a call to the “error” procedure in various places in thepackage and Guix’ meson-build-system.scm reveals (I think) that thepackage arguments are correctly rewritten bysubstitute-keyword-arguments, but the meson-build procedure frommeson-build-system.scm is called with the original package’s args.
Regards,Florian
P
P
Pierre Neidhardt wrote on 15 Nov 2019 12:17
(name . pelzflorian (Florian Pelz))(address . pelzflorian@pelzflorian.de)
87tv752xth.fsf@ambrevar.xyz
You are right, something is wrong with substitute-keyword-arguments.
If I copy-paste the arguments from glib, then add the stuff to build thedoc, everything is fine.
Peter, Ricardo, Marius, any clue what's going on?
Here follows a working definition for glib-with-documentation.Obviously the copy-pasting of arguments is less than ideal.
Toggle snippet (153 lines)(define-public glib-with-documentation (package (inherit glib) (properties '((hidden? . #f))) (outputs (cons "doc" (package-outputs glib))) ; 20 MiB of GTK-Doc reference (native-inputs `(("gtk-doc" ,gtk-doc) ; for the doc ("docbook-xml" ,docbook-xml) ,@(package-native-inputs glib))) (arguments `( ;; TODO: Uncomment on the next rebuild cycle. ;; #:disallowed-references (,tzdata-for-tests)
#:configure-flags (list "-Dgtk_doc=true") #:phases (modify-phases %standard-phases (add-before 'build 'pre-build (lambda* (#:key inputs outputs #:allow-other-keys) ;; For tests/gdatetime.c. (setenv "TZDIR" (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))
;; Some tests want write access there. (setenv "HOME" (getcwd)) (setenv "XDG_CACHE_HOME" (getcwd)) #t)) (add-after 'unpack 'disable-failing-tests (lambda _ (let ((disable (lambda (test-file test-paths) (define pattern+procs (map (lambda (test-path) (cons ;; XXX: only works for single line statements. (format #f "g_test_add_func.*\"~a\".*" test-path) (const ""))) test-paths)) (substitute test-file pattern+procs))) (failing-tests '(("glib/tests/thread.c" ( ;; prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64 ;; as found on hydra.gnu.org, and strace(1) doesn't ;; recognize it. "/thread/thread4"))
;; This tries to find programs in FHS directories. ("glib/tests/utils.c" ("/utils/find-program"))
;; This fails because "glib/tests/echo-script" cannot be ;; found. ("glib/tests/spawn-singlethread.c" ("/gthread/spawn-script"))
("glib/tests/timer.c" ( ;; fails if compiler optimizations are enabled, which they ;; are by default. "/timer/stop"))
("gio/tests/gapplication.c" ( ;; XXX: proven to be unreliable. See: ;; <https://bugs.debian.org/756273> ;; <http://bugs.gnu.org/18445> "/gapplication/quit"
;; XXX: fails randomly for unknown reason. See: ;; <https://lists.gnu.org/archive/html/guix-devel/2016-04/msg00215.html> "/gapplication/local-actions"))
("gio/tests/contenttype.c" ( ;; XXX: requires shared-mime-info. "/contenttype/guess" "/contenttype/guess_svg_from_data" "/contenttype/subtype" "/contenttype/list" "/contenttype/icon" "/contenttype/symbolic-icon" "/contenttype/tree"))
("gio/tests/appinfo.c" ( ;; XXX: requires update-desktop-database. "/appinfo/associations"))
("gio/tests/desktop-app-info.c" ( ;; XXX: requires update-desktop-database. "/desktop-app-info/delete" "/desktop-app-info/default" "/desktop-app-info/fallback" "/desktop-app-info/lastused" "/desktop-app-info/search"))
("gio/tests/gdbus-peer.c" ( ;; Requires /etc/machine-id. "/gdbus/codegen-peer-to-peer"))
("gio/tests/gdbus-unix-addresses.c" ( ;; Requires /etc/machine-id. "/gdbus/x11-autolaunch"))
("gio/tests/gsocketclient-slow.c" ( ;; These tests tries to resolve "localhost", and fails. "/socket-client/happy-eyeballs/slow" "/socket-client/happy-eyeballs/cancellation/delayed"))))) (for-each (lambda (x) (apply disable x)) failing-tests) #t))) (replace 'check (lambda _ (setenv "MESON_TESTTHREADS" (number->string (parallel-job-count))) ;; Do not run tests marked as "flaky". (invoke "meson" "test" "--no-suite" "flaky"))) ;; TODO: meson does not permit the bindir to be outside of prefix. ;; See https://github.com/mesonbuild/meson/issues/2561 ;; We can remove this once meson is patched. (add-after 'install 'move-executables (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) (bin (assoc-ref outputs "bin"))) (mkdir-p bin) (rename-file (string-append out "/bin") (string-append bin "/bin")) ;; Do not refer to "bindir", which points to "${prefix}/bin". ;; We don't patch "bindir" to point to "$bin/bin", because that ;; would create a reference cycle between the "out" and "bin" ;; outputs. (substitute* (list (string-append out "/lib/pkgconfig/gio-2.0.pc") (string-append out "/lib/pkgconfig/glib-2.0.pc")) (("bindir=\\$\\{prefix\\}/bin") "") (("=\\$\\{bindir\\}/") "=")) #t))) (add-after 'unpack 'make-local-docbook-xml (lambda* (#:key inputs #:allow-other-keys) (let ((replace-http (lambda (file) (substitute* file ;; Warning: gio.xml uses docbook 4.2. (("http://www.oasis-open.org/docbook/xml/4../docbookx.dtd") (string-append (assoc-ref inputs "docbook-xml") "/xml/dtd/docbook/docbookx.dtd")))) )) (replace-http "gio/gdbus-2.0/codegen/codegen_docbook.py") (for-each replace-http (find-files "." "\\.xml$")) #t))) (add-after 'install 'move-doc (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out")) (doc (assoc-ref outputs "doc")) (html (string-append "/share/gtk-doc"))) (copy-recursively (string-append out html) (string-append doc html)) (delete-file-recursively (string-append out html)) #t))))))))
-- Pierre Neidhardthttps://ambrevar.xyz/
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl3OiUoACgkQm9z0l6S7zH8LpggAm6fBISS9M8aQGmov6sdHBcl9LJZBgqKsOLMnsahNYRwTBJUvZ+tqHXNp37DJsUjXioVfDGjVHxKtWJnpDNHT1tl/IxzuuFyOcmcaBttBsXv5Yq9yq79Tm0sPVUPOxOoTPR6nBRIwo2knxwZBmkQCmNfgJuAGV44jRjgXY+J3u3nE+1wI7qo/nPo1jtwBITUaI8IYPscgKWBRCI77DrQLP/g1AcxVc1cyD2wr9kjbOgZr3hVwvRJOstyzguNFtEpDzMnS95Cuf0si7JMj8SKzeOrJw4NQIGPo4h6nzYV8KCgu+8fhlKkTAGLSI3S5BbWspzsbWPNKWFhMGke3rwDoqw===7w+n-----END PGP SIGNATURE-----
P
P
pelzflorian (Florian Pelz) wrote on 15 Nov 2019 13:14
(name . Pierre Neidhardt)(address . mail@ambrevar.xyz)
20191115121408.efmbw33m3d5k6er4@pelzflorian.localdomain
On Fri, Nov 15, 2019 at 12:17:30PM +0100, Pierre Neidhardt wrote:
Toggle quote (3 lines)> You are right, something is wrong with substitute-keyword-arguments.>
No, I did not say that, I said that despitesubstitute-keyword-arguments returning the correct arguments – as isvisible by enclosing the args with a call to (error …) –, meson buildswith the old arguments. However now you say it works when copying thearguments from Glib, which is strange.
Regards,Florian
M
M
Marius Bakke wrote on 15 Nov 2019 15:10
(address . 37850@debbugs.gnu.org)
87d0dtgri5.fsf@devup.no
Pierre Neidhardt <mail@ambrevar.xyz> writes:
Toggle quote (2 lines)> You are right, something is wrong with substitute-keyword-arguments.
The problem is that GLib has no configure-flags from before. I'm notsure why we get no error from substitute-keyword-arguments (is itswallowed? never run?), but if you change this part:
(substitute-keyword-arguments (package-arguments glib) ((#:configure-flags flags) `(cons "-Dgtk_doc=true" ,flags)))
...to read like this:
(substitute-keyword-arguments (package-arguments glib) ((#:configure-flags flags ''()) `(cons "-Dgtk_doc=true" ,flags)))
Then it should work. The difference is that "flags" gets initialized asthe empty list when not already set.
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl3OscIACgkQoqBt8qM6VPprXAgAqF71yhS5mb2oAteKp+jkDigLgwgR0vd9x5wrNfO0A34XocV48ZBKck6e5V65z7twfSwtIZu4Ui5R8QABecuURz2nbMEHYCRD0NvjdFezIP+NzBqWhFL1dtUWat0mojfViFiXmVBrCSsckEq9e6p/yFrvII7Ay0wnUnVBlEFaP13vUl5BDImJ4j9Z5XncuO3see3sLojLDkSfnqqzN5jpdYjQgKTyYS/exQSt1gyBTB1wWl2iPoR5pXI/PMcPUu8qp12hV/jqrz5htoqMdhDHHIvYs41kNGia7ixuNbSsEfd8e6c67ynnUXUdly9/qoB9QHGk4s6asPFpy5nBEGTeVA===uu2t-----END PGP SIGNATURE-----
P
P
Pierre Neidhardt wrote on 15 Nov 2019 16:06
(address . 37850@debbugs.gnu.org)
87h8352n88.fsf@ambrevar.xyz
Oh, that makes total sense, thanks for the explanation Marius!
Alright, final patch attached.Let me know if I should merge on master.
-- Pierre Neidhardthttps://ambrevar.xyz/
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl3OvucACgkQm9z0l6S7zH8OnAgArCqfKfeY2fQsXNzk8uXqElZ1Y5Zr9aSOkGC5BlYHVPaRjXa+z/lwiN1ptnCFVu0Si96Cm0MoAYrZlQHYDM9p91kZKDlj+etYj4vLefAh4FQuuC4T0+VhmY6tFq4Cz/2s0vsCWspYuB9tETw3pp34vah7h0yYLAhsuqQDAJluuciyUzaB7/Hz7TPxzbGjqOWJyVBMPUrf8pg/5B1HJmSdD5vpovzD3PdpFK9d2OLOL2RqlT+US5JqJN3B/oldtK13w0vDs/teVbfcFMEXj064lJNMgrw99RXnWqrzaA6dXY3UA1PJV6dMcQ4G9pf+fzPr8/tYu/o+mukeh2qxCWNIIQ===BhAJ-----END PGP SIGNATURE-----
From 29d27b64fb7bbf96a2ed59a3e1c4179717770f5c Mon Sep 17 00:00:00 2001From: Pierre Neidhardt <mail@ambrevar.xyz>Date: Mon, 11 Nov 2019 15:38:11 +0100Subject: [PATCH] gnu: Add glib-with-documentation.
* gnu/packages/glib.scm (glib-with-documentation): New variable.(glib): Hide package.--- gnu/packages/glib.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+)
Toggle diff (60 lines)diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scmindex b3e85f8df9..47e4f7006a 100644--- a/gnu/packages/glib.scm+++ b/gnu/packages/glib.scm@@ -339,6 +339,7 @@ shared NFS home directories.") (variable "GIO_EXTRA_MODULES") (files '("lib/gio/modules"))))) (search-paths native-search-paths)+ (properties '((hidden? . #t)) ) (synopsis "Thread-safe general utility library; basis of GTK+ and GNOME") (description@@ -348,6 +349,45 @@ dynamic loading, and an object system.") (home-page "https://developer.gnome.org/glib/") (license license:lgpl2.1+))) +(define-public glib-with-documentation+ ;; glib's doc must be built in a separate package since it requires gtk-doc,+ ;; which in turn depends on glib.+ (package+ (inherit glib)+ (properties '((hidden? . #f)))+ (outputs (cons "doc" (package-outputs glib))) ; 20 MiB of GTK-Doc reference+ (native-inputs+ `(("gtk-doc" ,gtk-doc) ; for the doc+ ("docbook-xml" ,docbook-xml)+ ,@(package-native-inputs glib)))+ (arguments+ (substitute-keyword-arguments (package-arguments glib)+ ((#:configure-flags flags ''())+ `(cons "-Dgtk_doc=true" ,flags))+ ((#:phases phases)+ `(modify-phases ,phases+ (add-after 'unpack 'make-local-docbook-xml+ (lambda* (#:key inputs #:allow-other-keys)+ (let ((replace-http+ (lambda (file)+ (substitute* file+ ;; Warning: gio.xml uses docbook 4.2, hence the "4.." pattern.+ (("http://www.oasis-open.org/docbook/xml/4../docbookx.dtd")+ (string-append (assoc-ref inputs "docbook-xml")+ "/xml/dtd/docbook/docbookx.dtd"))))))+ (replace-http "gio/gdbus-2.0/codegen/codegen_docbook.py")+ (for-each replace-http (find-files "." "\\.xml$"))+ #t)))+ (add-after 'install 'move-doc+ (lambda* (#:key outputs #:allow-other-keys)+ (let ((out (assoc-ref outputs "out"))+ (doc (assoc-ref outputs "doc"))+ (html (string-append "/share/gtk-doc")))+ (copy-recursively (string-append out html)+ (string-append doc html))+ (delete-file-recursively (string-append out html))+ #t)))))))))+ (define gobject-introspection (package (name "gobject-introspection")-- 2.23.0
M
M
Marius Bakke wrote on 21 Nov 2019 20:50
(address . 37850@debbugs.gnu.org)
87d0dl80w7.fsf@devup.no
Pierre Neidhardt <mail@ambrevar.xyz> writes:
Toggle quote (5 lines)> Oh, that makes total sense, thanks for the explanation Marius!>> Alright, final patch attached.> Let me know if I should merge on master.
Looks good!
Toggle quote (8 lines)> From 29d27b64fb7bbf96a2ed59a3e1c4179717770f5c Mon Sep 17 00:00:00 2001> From: Pierre Neidhardt <mail@ambrevar.xyz>> Date: Mon, 11 Nov 2019 15:38:11 +0100> Subject: [PATCH] gnu: Add glib-with-documentation.>> * gnu/packages/glib.scm (glib-with-documentation): New variable.> (glib): Hide package.
This should say (glib)[properties]: ...
[...]
Toggle quote (7 lines)> +(define-public glib-with-documentation> + ;; glib's doc must be built in a separate package since it requires gtk-doc,> + ;; which in turn depends on glib.> + (package> + (inherit glib)> + (properties '((hidden? . #f)))
Using (alist-delete 'hidden? (package-properties glib)) is more futureproof. :-)
Toggle quote (24 lines)> + (outputs (cons "doc" (package-outputs glib))) ; 20 MiB of GTK-Doc reference> + (native-inputs> + `(("gtk-doc" ,gtk-doc) ; for the doc> + ("docbook-xml" ,docbook-xml)> + ,@(package-native-inputs glib)))> + (arguments> + (substitute-keyword-arguments (package-arguments glib)> + ((#:configure-flags flags ''())> + `(cons "-Dgtk_doc=true" ,flags))> + ((#:phases phases)> + `(modify-phases ,phases> + (add-after 'unpack 'make-local-docbook-xml> + (lambda* (#:key inputs #:allow-other-keys)> + (let ((replace-http> + (lambda (file)> + (substitute* file> + ;; Warning: gio.xml uses docbook 4.2, hence the "4.." pattern.> + (("http://www.oasis-open.org/docbook/xml/4../docbookx.dtd")> + (string-append (assoc-ref inputs "docbook-xml")> + "/xml/dtd/docbook/docbookx.dtd"))))))> + (replace-http "gio/gdbus-2.0/codegen/codegen_docbook.py")> + (for-each replace-http (find-files "." "\\.xml$"))> + #t)))
Can this phase be removed if you add 'libxml2' to inputs (for the$XML_CATALOG_FILES search path)?
Otherwise LGTM!
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl3W6ngACgkQoqBt8qM6VPpeuQf+MpHD6VPO5GoJoZGwMYAgDtztPOJMbzl45I+60ZrvSz8Xlkx9Wh6gESCQypqQBhWi0EN+F+QL+qF9dDJ/bWDqCjBB0dLSvrhLUjPicA3z5jKWDWi7yXdkXlqShdg8bm6QbbExL+izuXkHr6k7Lbk841ut97t6jYeOO/gHuExr3zSZyXO1A6DM7WOK90P+2n2tg7qbPfMxq9WUeRps4Bpu+zduGRn5Msw3+o0E7XpprCl6fWlRfH0bH6HVOIIGqOVjHp+CQP1L8ydD+iYR2rIKeKSibHBaoHCia3hej8y4vp0znWv5QGjKiVSL0nvJoepK2OvruHqph5TKlbIm23hqbA===CNx9-----END PGP SIGNATURE-----
P
P
Pierre Neidhardt wrote on 27 Nov 2019 13:37
(address . 37850@debbugs.gnu.org)
87d0dda41n.fsf@ambrevar.xyz
Marius Bakke <mbakke@fastmail.com> writes:
Toggle quote (2 lines)> This should say (glib)[properties]: ...
Fixed.
Toggle quote (3 lines)> Using (alist-delete 'hidden? (package-properties glib)) is more future> proof. :-)
Done.
Toggle quote (3 lines)> Can this phase be removed if you add 'libxml2' to inputs (for the> $XML_CATALOG_FILES search path)?
It worked, thanks!
Merged!
-- Pierre Neidhardthttps://ambrevar.xyz/
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl3ebgQACgkQm9z0l6S7zH8diQgAi2HEzW8VeHjXLFozN+ofQE1AJt0oOfNRfFPLquiN382IXqe0mmAIsaCwHO/DUJ0RqP64sRbE/OWu5B4V8PCQwjpQj1XUyUHZSLfwbt/VFYsgDjsLzEFG5Dg8OdktUwDqmeb/Lsh8D4Cyh4Q2e8Eq1CEWvUle1vkSB+eOnd3ijbtpAcvgAzNkm4LofOdvukcDUZua9XFjhbLTntU980IH0ZLwSigCWLITIs0yGEmcMcXJQ0cZWt02GWB+zQ3uqtZ5GGs9FuZngBk17EZNCRk0lGa8jnOOjPfGrsv1sz4S9yEkHOnIZQatQAgsBK0a2bXNwidiGyN35ErvPEZ7+q0Agw===AEBw-----END PGP SIGNATURE-----
P
P
Pierre Neidhardt wrote on 27 Nov 2019 13:37
control message for bug #37850
(address . control@debbugs.gnu.org)
87blsxa41b.fsf@ambrevar.xyz
close 37850 quit
?
Your comment

This issue is archived.

To comment on this conversation send email to 37850@debbugs.gnu.org