From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: bug#37850: Glib documentation is missing Date: Fri, 15 Nov 2019 12:17:30 +0100 Message-ID: <87tv752xth.fsf@ambrevar.xyz> References: <87v9sbj2ru.fsf@ambrevar.xyz> <87h83ret3a.fsf@ambrevar.xyz> <87k18gncbn.fsf@ambrevar.xyz> <8736f4ok77.fsf@devup.no> <87ftj4m0s0.fsf@ambrevar.xyz> <8736ewmyc1.fsf@devup.no> <87woc6kbhc.fsf@ambrevar.xyz> <20191112123233.jkcevtpkz5i2yut5@pelzflorian.localdomain> <20191112132254.hzqo2zck3btcerdb@pelzflorian.localdomain> <87h839gk47.fsf@ambrevar.xyz> <20191112183458.fmlullhdc65bp2am@pelzflorian.localdomain> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:36269) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVZc3-0000d3-E7 for bug-guix@gnu.org; Fri, 15 Nov 2019 06:18:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iVZc1-0005vZ-TG for bug-guix@gnu.org; Fri, 15 Nov 2019 06:18:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55131) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iVZc1-0005uu-Pb for bug-guix@gnu.org; Fri, 15 Nov 2019 06:18:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iVZc1-0006EX-JP for bug-guix@gnu.org; Fri, 15 Nov 2019 06:18:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20191112183458.fmlullhdc65bp2am@pelzflorian.localdomain> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: "pelzflorian (Florian Pelz)" Cc: 37850@debbugs.gnu.org, petermikkelsen10@gmail.com --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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. =2D-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 refer= ence (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=3Dtrue") #: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 statemen= ts. (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, wh= ich they ;; are by default. "/timer/stop")) ("gio/tests/gapplication.c" ( ;; XXX: proven to be unreliable. See: ;; ;; "/gapplication/quit" ;; XXX: fails randomly for unknown reason. See: ;; "/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 f= ails. "/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 t= hat ;; 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=3D\\$\\{prefix\\}/bin") "") (("=3D\\$\\{bindir\\}/") "=3D")) #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/x= ml/4../docbookx.dtd") (string-append (assoc-ref inputs "doc= book-xml") "/xml/dtd/docbook/docb= ookx.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)))))))) =2D-8<---------------cut here---------------end--------------->8--- =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAl3OiUoACgkQm9z0l6S7 zH8LpggAm6fBISS9M8aQGmov6sdHBcl9LJZBgqKsOLMnsahNYRwTBJUvZ+tqHXNp 37DJsUjXioVfDGjVHxKtWJnpDNHT1tl/IxzuuFyOcmcaBttBsXv5Yq9yq79Tm0sP VUPOxOoTPR6nBRIwo2knxwZBmkQCmNfgJuAGV44jRjgXY+J3u3nE+1wI7qo/nPo1 jtwBITUaI8IYPscgKWBRCI77DrQLP/g1AcxVc1cyD2wr9kjbOgZr3hVwvRJOstyz guNFtEpDzMnS95Cuf0si7JMj8SKzeOrJw4NQIGPo4h6nzYV8KCgu+8fhlKkTAGLS I3S5BbWspzsbWPNKWFhMGke3rwDoqw== =7w+n -----END PGP SIGNATURE----- --=-=-=--