From patchwork Thu Aug 20 15:10:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danny Milosavljevic X-Patchwork-Id: 23717 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id AD63827BBE6; Thu, 20 Aug 2020 16:17:15 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 3560227BBE5 for ; Thu, 20 Aug 2020 16:17:15 +0100 (BST) Received: from localhost ([::1]:34460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k8mJW-0006Cl-O4 for patchwork@mira.cbaines.net; Thu, 20 Aug 2020 11:17:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8mDd-0006BA-1R for guix-patches@gnu.org; Thu, 20 Aug 2020 11:11:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60163) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k8mDc-0006tS-Nz for guix-patches@gnu.org; Thu, 20 Aug 2020 11:11:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k8mDc-000676-JM for guix-patches@gnu.org; Thu, 20 Aug 2020 11:11:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42958] [PATCH core-updates 04/29] gnu: glib-with-documentation: Update package definition. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 20 Aug 2020 15:11:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42958 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42958@debbugs.gnu.org Cc: Raghav Gururajan , Danny Milosavljevic Received: via spool by 42958-submit@debbugs.gnu.org id=B42958.159793626723461 (code B ref 42958); Thu, 20 Aug 2020 15:11:08 +0000 Received: (at 42958) by debbugs.gnu.org; 20 Aug 2020 15:11:07 +0000 Received: from localhost ([127.0.0.1]:43462 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8mDZ-00065j-1l for submit@debbugs.gnu.org; Thu, 20 Aug 2020 11:11:06 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:42320) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8mDQ-00063G-6Y for 42958@debbugs.gnu.org; Thu, 20 Aug 2020 11:10:57 -0400 Received: from dayas.lan (80-110-126-103.cgn.dynamic.surfer.at [80.110.126.103]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 7DA453367E2C; Thu, 20 Aug 2020 17:10:55 +0200 (CEST) From: Danny Milosavljevic Date: Thu, 20 Aug 2020 17:10:25 +0200 Message-Id: <20200820151050.9529-4-dannym@scratchpost.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200820151050.9529-1-dannym@scratchpost.org> References: <20200820150914.9443-1-dannym@scratchpost.org> <20200820151050.9529-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches From: Raghav Gururajan * gnu/packages/glib.scm (glib-with-documentation): Update package definition. [properties]: Remove field. [native-inputs]: Remove libxml2. [arguments]<#:phases>['patch-docbook-xml]: New phase. ['move-doc]: Modify phase. Signed-off-by: Danny Milosavljevic --- gnu/packages/glib.scm | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 057b90eaa1..55ffdf724e 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -291,27 +291,40 @@ threads, dynamic loading, and an object system.") ;; which in turn depends on glib. (package (inherit glib) - (properties (alist-delete 'hidden? (package-properties glib))) - (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) - ("libxml2" ,libxml2) + `(("gtk-doc" ,gtk-doc) + ("docbook-xml-4.2" ,docbook-xml-4.2) + ("docbook-xml-4.5" ,docbook-xml) ,@(package-native-inputs glib))) + (outputs (cons "doc" (package-outputs glib))) (arguments (substitute-keyword-arguments (package-arguments glib) ((#:configure-flags flags ''()) `(cons "-Dgtk_doc=true" ,flags)) ((#:phases phases) `(modify-phases ,phases + (add-after 'unpack 'patch-docbook-xml + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion "docs/reference" + (substitute* '("gio/gdbus-object-manager-example/.*\\.xml" + "gio/.*\\.xml" "glib/.*\\.xml" "gobject/.*\\.xml") + (("http://www.oasis-open.org/docbook/xml/4.5/") + (string-append (assoc-ref inputs "docbook-xml-4.5") + "/xml/dtd/docbook/"))) + (substitute* "gio/gio.xml" + (("http://www.oasis-open.org/docbook/xml/4.2/") + (string-append (assoc-ref inputs "docbook-xml-4.2") + "/xml/dtd/docbook/")))) + #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)) + (mkdir-p (string-append doc "/share")) + (rename-file + (string-append out html) + (string-append doc html)) #t))))))))) (define gobject-introspection