* bug#37850: Glib documentation is missing @ 2019-10-21 10:45 Pierre Neidhardt 2019-10-23 18:22 ` Marius Bakke 2019-11-09 2:03 ` Alexandros Theodotou 0 siblings, 2 replies; 23+ messages in thread From: Pierre Neidhardt @ 2019-10-21 10:45 UTC (permalink / raw) To: 37850 [-- Attachment #1: Type: text/plain, Size: 885 bytes --] 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? What do you think? Ricardo? Cheers! -- Pierre Neidhardt https://ambrevar.xyz/ [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-10-21 10:45 bug#37850: Glib documentation is missing Pierre Neidhardt @ 2019-10-23 18:22 ` Marius Bakke 2019-10-23 18:38 ` Pierre Neidhardt 2019-11-09 2:03 ` Alexandros Theodotou 1 sibling, 1 reply; 23+ messages in thread From: Marius Bakke @ 2019-10-23 18:22 UTC (permalink / raw) To: Pierre Neidhardt, 37850 [-- Attachment #1: Type: text/plain, Size: 1080 bytes --] Pierre Neidhardt <mail@ambrevar.xyz> writes: > 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 best approach is. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-10-23 18:22 ` Marius Bakke @ 2019-10-23 18:38 ` Pierre Neidhardt 2019-10-25 21:23 ` Ludovic Courtès 0 siblings, 1 reply; 23+ messages in thread From: Pierre Neidhardt @ 2019-10-23 18:38 UTC (permalink / raw) To: Marius Bakke, 37850 [-- Attachment #1: Type: text/plain, Size: 625 bytes --] Marius Bakke <mbakke@fastmail.com> writes: > 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! > '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. -- Pierre Neidhardt https://ambrevar.xyz/ [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-10-23 18:38 ` Pierre Neidhardt @ 2019-10-25 21:23 ` Ludovic Courtès 2019-10-26 9:04 ` Pierre Neidhardt 0 siblings, 1 reply; 23+ messages in thread From: Ludovic Courtès @ 2019-10-25 21:23 UTC (permalink / raw) To: Pierre Neidhardt; +Cc: 37850 Hi, Pierre Neidhardt <mail@ambrevar.xyz> skribis: > Marius Bakke <mbakke@fastmail.com> writes: [...] >> '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 depend on the current “glib” package, assuming the build system allows us to build nothing but documentation. Ludo’. ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-10-25 21:23 ` Ludovic Courtès @ 2019-10-26 9:04 ` Pierre Neidhardt 2019-10-29 10:36 ` Pierre Neidhardt 0 siblings, 1 reply; 23+ messages in thread From: Pierre Neidhardt @ 2019-10-26 9:04 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 37850 [-- Attachment #1: Type: text/plain, Size: 815 bytes --] Ludovic Courtès <ludo@gnu.org> writes: > 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, so users who installed "glib:doc" cannot update their manifests / profiles after a guix pull. Can we actually deprecate single outputs? If not, isn't it a bug? -- Pierre Neidhardt https://ambrevar.xyz/ [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-10-26 9:04 ` Pierre Neidhardt @ 2019-10-29 10:36 ` Pierre Neidhardt 2019-11-03 16:39 ` Pierre Neidhardt 0 siblings, 1 reply; 23+ messages in thread From: Pierre Neidhardt @ 2019-10-29 10:36 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 37850 [-- Attachment #1: Type: text/plain, Size: 370 bytes --] I can send a patch for Glib. --8<---------------cut here---------------start------------->8--- > guix refresh -l glib Building the following 1645 packages would ensure 4428 dependent packages are rebuilt: a --8<---------------cut here---------------end--------------->8--- I guess this is going to core-updates. -- Pierre Neidhardt https://ambrevar.xyz/ [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-10-29 10:36 ` Pierre Neidhardt @ 2019-11-03 16:39 ` Pierre Neidhardt 2019-11-03 19:04 ` Marius Bakke 0 siblings, 1 reply; 23+ messages in thread From: Pierre Neidhardt @ 2019-11-03 16:39 UTC (permalink / raw) To: Ludovic Courtès; +Cc: 37850 [-- Attachment #1.1: Type: text/plain, Size: 92 bytes --] Find a patch attached. What do you think? -- Pierre Neidhardt https://ambrevar.xyz/ [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-gnu-Add-glib-minimal-and-build-glib-doc.patch --] [-- Type: text/x-patch, Size: 14460 bytes --] 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. --- 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(-) diff --git a/gnu/packages/avahi.scm b/gnu/packages/avahi.scm index 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") (description diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm index 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.scm index 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") (description diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 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") (description diff --git a/gnu/packages/graphviz.scm b/gnu/packages/graphviz.scm index 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.scm index 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.scm index 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 gmock diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 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 ^ permalink raw reply related [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-11-03 16:39 ` Pierre Neidhardt @ 2019-11-03 19:04 ` Marius Bakke 2019-11-04 9:46 ` Pierre Neidhardt 0 siblings, 1 reply; 23+ messages in thread From: Marius Bakke @ 2019-11-03 19:04 UTC (permalink / raw) To: Pierre Neidhardt, Ludovic Courtès; +Cc: 37850 [-- Attachment #1: Type: text/plain, Size: 1311 bytes --] 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. 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? [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-11-03 19:04 ` Marius Bakke @ 2019-11-04 9:46 ` Pierre Neidhardt 2019-11-09 23:20 ` Marius Bakke 0 siblings, 1 reply; 23+ messages in thread From: Pierre Neidhardt @ 2019-11-04 9:46 UTC (permalink / raw) To: Marius Bakke, Ludovic Courtès; +Cc: 37850 [-- Attachment #1: Type: text/plain, Size: 2318 bytes --] 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". 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. Now my current patch is admittedly not pretty. If we fix the output deprecation feature, then glib:doc could be forwarded to glib-documentation. And I guess we can live without complete consistency. Thoughts? -- Pierre Neidhardt https://ambrevar.xyz/ [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-11-04 9:46 ` Pierre Neidhardt @ 2019-11-09 23:20 ` Marius Bakke 2019-11-11 9:29 ` Pierre Neidhardt 0 siblings, 1 reply; 23+ messages in thread From: Marius Bakke @ 2019-11-09 23:20 UTC (permalink / raw) To: Pierre Neidhardt, Ludovic Courtès; +Cc: 37850 [-- Attachment #1: Type: text/plain, Size: 2658 bytes --] Pierre Neidhardt <mail@ambrevar.xyz> writes: > 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? > 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. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-11-09 23:20 ` Marius Bakke @ 2019-11-11 9:29 ` Pierre Neidhardt 2019-11-12 12:32 ` pelzflorian (Florian Pelz) 0 siblings, 1 reply; 23+ messages in thread From: Pierre Neidhardt @ 2019-11-11 9:29 UTC (permalink / raw) To: Marius Bakke, Ludovic Courtès; +Cc: 37850 [-- Attachment #1: Type: text/plain, Size: 1238 bytes --] 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: --8<---------------cut here---------------start------------->8--- (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))))))) --8<---------------cut here---------------end--------------->8--- 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? -- Pierre Neidhardt https://ambrevar.xyz/ [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-11-11 9:29 ` Pierre Neidhardt @ 2019-11-12 12:32 ` pelzflorian (Florian Pelz) 2019-11-12 13:22 ` pelzflorian (Florian Pelz) 0 siblings, 1 reply; 23+ messages in thread From: pelzflorian (Florian Pelz) @ 2019-11-12 12:32 UTC (permalink / raw) To: Pierre Neidhardt; +Cc: 37850 On Mon, Nov 11, 2019 at 10:29:03AM +0100, Pierre Neidhardt wrote: > 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 > 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 no mistakes in GLib’s meson files. Regards, Florian ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-11-12 12:32 ` pelzflorian (Florian Pelz) @ 2019-11-12 13:22 ` pelzflorian (Florian Pelz) 2019-11-12 16:00 ` Pierre Neidhardt 0 siblings, 1 reply; 23+ messages in thread From: pelzflorian (Florian Pelz) @ 2019-11-12 13:22 UTC (permalink / raw) To: Pierre Neidhardt; +Cc: 37850 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 like when manually running meson. I do not understand why. (Manually running it leads to a crash later.) Regards, Florian ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-11-12 13:22 ` pelzflorian (Florian Pelz) @ 2019-11-12 16:00 ` Pierre Neidhardt 2019-11-12 18:34 ` pelzflorian (Florian Pelz) 0 siblings, 1 reply; 23+ messages in thread From: Pierre Neidhardt @ 2019-11-12 16:00 UTC (permalink / raw) To: pelzflorian (Florian Pelz); +Cc: 37850 [-- Attachment #1: Type: text/plain, Size: 436 bytes --] 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. -- Pierre Neidhardt https://ambrevar.xyz/ [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-11-12 16:00 ` Pierre Neidhardt @ 2019-11-12 18:34 ` pelzflorian (Florian Pelz) 2019-11-15 11:17 ` Pierre Neidhardt 0 siblings, 1 reply; 23+ messages in thread From: pelzflorian (Florian Pelz) @ 2019-11-12 18:34 UTC (permalink / raw) To: Pierre Neidhardt; +Cc: 37850 On Tue, Nov 12, 2019 at 05:00:40PM +0100, Pierre Neidhardt wrote: > 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 the package and Guix’ meson-build-system.scm reveals (I think) that the package arguments are correctly rewritten by substitute-keyword-arguments, but the meson-build procedure from meson-build-system.scm is called with the original package’s args. Regards, Florian ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-11-12 18:34 ` pelzflorian (Florian Pelz) @ 2019-11-15 11:17 ` Pierre Neidhardt 2019-11-15 12:14 ` pelzflorian (Florian Pelz) 2019-11-15 14:10 ` Marius Bakke 0 siblings, 2 replies; 23+ messages in thread From: Pierre Neidhardt @ 2019-11-15 11:17 UTC (permalink / raw) To: pelzflorian (Florian Pelz); +Cc: 37850, petermikkelsen10 [-- Attachment #1: Type: text/plain, Size: 7923 bytes --] You are right, something is wrong with substitute-keyword-arguments. If I copy-paste the arguments from glib, then add the stuff to build the doc, 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. --8<---------------cut here---------------start------------->8--- (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)))))))) --8<---------------cut here---------------end--------------->8--- -- Pierre Neidhardt https://ambrevar.xyz/ [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-11-15 11:17 ` Pierre Neidhardt @ 2019-11-15 12:14 ` pelzflorian (Florian Pelz) 2019-11-15 14:10 ` Marius Bakke 1 sibling, 0 replies; 23+ messages in thread From: pelzflorian (Florian Pelz) @ 2019-11-15 12:14 UTC (permalink / raw) To: Pierre Neidhardt; +Cc: 37850, petermikkelsen10 On Fri, Nov 15, 2019 at 12:17:30PM +0100, Pierre Neidhardt wrote: > You are right, something is wrong with substitute-keyword-arguments. > No, I did not say that, I said that despite substitute-keyword-arguments returning the correct arguments – as is visible by enclosing the args with a call to (error …) –, meson builds with the old arguments. However now you say it works when copying the arguments from Glib, which is strange. Regards, Florian ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-11-15 11:17 ` Pierre Neidhardt 2019-11-15 12:14 ` pelzflorian (Florian Pelz) @ 2019-11-15 14:10 ` Marius Bakke 2019-11-15 15:06 ` Pierre Neidhardt 1 sibling, 1 reply; 23+ messages in thread From: Marius Bakke @ 2019-11-15 14:10 UTC (permalink / raw) To: Pierre Neidhardt, pelzflorian (Florian Pelz); +Cc: 37850 [-- Attachment #1: Type: text/plain, Size: 697 bytes --] Pierre Neidhardt <mail@ambrevar.xyz> writes: > You are right, something is wrong with substitute-keyword-arguments. The problem is that GLib has no configure-flags from before. I'm not sure why we get no error from substitute-keyword-arguments (is it swallowed? 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 as the empty list when not already set. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-11-15 14:10 ` Marius Bakke @ 2019-11-15 15:06 ` Pierre Neidhardt 2019-11-21 19:50 ` Marius Bakke 0 siblings, 1 reply; 23+ messages in thread From: Pierre Neidhardt @ 2019-11-15 15:06 UTC (permalink / raw) To: Marius Bakke, pelzflorian (Florian Pelz); +Cc: 37850 [-- Attachment #1.1: Type: text/plain, Size: 188 bytes --] Oh, that makes total sense, thanks for the explanation Marius! Alright, final patch attached. Let me know if I should merge on master. -- Pierre Neidhardt https://ambrevar.xyz/ [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-gnu-Add-glib-with-documentation.patch --] [-- Type: text/x-patch, Size: 3005 bytes --] 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. --- gnu/packages/glib.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 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 ^ permalink raw reply related [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-11-15 15:06 ` Pierre Neidhardt @ 2019-11-21 19:50 ` Marius Bakke 2019-11-27 12:37 ` Pierre Neidhardt 0 siblings, 1 reply; 23+ messages in thread From: Marius Bakke @ 2019-11-21 19:50 UTC (permalink / raw) To: Pierre Neidhardt, pelzflorian (Florian Pelz); +Cc: 37850 [-- Attachment #1: Type: text/plain, Size: 2287 bytes --] Pierre Neidhardt <mail@ambrevar.xyz> writes: > 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! > 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]: ... [...] > +(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 future proof. :-) > + (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! [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-11-21 19:50 ` Marius Bakke @ 2019-11-27 12:37 ` Pierre Neidhardt 0 siblings, 0 replies; 23+ messages in thread From: Pierre Neidhardt @ 2019-11-27 12:37 UTC (permalink / raw) To: Marius Bakke, pelzflorian (Florian Pelz); +Cc: 37850 [-- Attachment #1: Type: text/plain, Size: 387 bytes --] Marius Bakke <mbakke@fastmail.com> writes: > This should say (glib)[properties]: ... Fixed. > Using (alist-delete 'hidden? (package-properties glib)) is more future > proof. :-) Done. > Can this phase be removed if you add 'libxml2' to inputs (for the > $XML_CATALOG_FILES search path)? It worked, thanks! Merged! -- Pierre Neidhardt https://ambrevar.xyz/ [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --] ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-10-21 10:45 bug#37850: Glib documentation is missing Pierre Neidhardt 2019-10-23 18:22 ` Marius Bakke @ 2019-11-09 2:03 ` Alexandros Theodotou 2019-11-09 2:10 ` Alexandros Theodotou 1 sibling, 1 reply; 23+ messages in thread From: Alexandros Theodotou @ 2019-11-09 2:03 UTC (permalink / raw) To: 37850 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. ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#37850: Glib documentation is missing 2019-11-09 2:03 ` Alexandros Theodotou @ 2019-11-09 2:10 ` Alexandros Theodotou 0 siblings, 0 replies; 23+ messages in thread From: Alexandros Theodotou @ 2019-11-09 2:10 UTC (permalink / raw) To: 37850 I missed this part. > 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. > What about 'hiding' the normal glib package Maybe the *-bootstrap package can be hidden. Then the normal glib package can have its "doc" back? ^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2019-11-27 12:38 UTC | newest] Thread overview: 23+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-10-21 10:45 bug#37850: Glib documentation is missing Pierre Neidhardt 2019-10-23 18:22 ` Marius Bakke 2019-10-23 18:38 ` Pierre Neidhardt 2019-10-25 21:23 ` Ludovic Courtès 2019-10-26 9:04 ` Pierre Neidhardt 2019-10-29 10:36 ` Pierre Neidhardt 2019-11-03 16:39 ` Pierre Neidhardt 2019-11-03 19:04 ` Marius Bakke 2019-11-04 9:46 ` Pierre Neidhardt 2019-11-09 23:20 ` Marius Bakke 2019-11-11 9:29 ` Pierre Neidhardt 2019-11-12 12:32 ` pelzflorian (Florian Pelz) 2019-11-12 13:22 ` pelzflorian (Florian Pelz) 2019-11-12 16:00 ` Pierre Neidhardt 2019-11-12 18:34 ` pelzflorian (Florian Pelz) 2019-11-15 11:17 ` Pierre Neidhardt 2019-11-15 12:14 ` pelzflorian (Florian Pelz) 2019-11-15 14:10 ` Marius Bakke 2019-11-15 15:06 ` Pierre Neidhardt 2019-11-21 19:50 ` Marius Bakke 2019-11-27 12:37 ` Pierre Neidhardt 2019-11-09 2:03 ` Alexandros Theodotou 2019-11-09 2:10 ` Alexandros Theodotou
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).