From patchwork Sat Jul 4 16:01:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brice Waegeneire X-Patchwork-Id: 23044 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 4C73C27BBE3; Sat, 4 Jul 2020 17:04:22 +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 9138C27BBE1 for ; Sat, 4 Jul 2020 17:04:21 +0100 (BST) Received: from localhost ([::1]:41562 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrkeL-00078L-0w for patchwork@mira.cbaines.net; Sat, 04 Jul 2020 12:04:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrkc6-0003qN-ET for guix-patches@gnu.org; Sat, 04 Jul 2020 12:02:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47886) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jrkc6-0005RC-1N for guix-patches@gnu.org; Sat, 04 Jul 2020 12:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jrkc5-0007AP-U5 for guix-patches@gnu.org; Sat, 04 Jul 2020 12:02:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42189] [PATCH] gnu: Add kicad-doc. Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 04 Jul 2020 16:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42189 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42189@debbugs.gnu.org Cc: me@tobias.gr X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159387851427526 (code B ref -1); Sat, 04 Jul 2020 16:02:01 +0000 Received: (at submit) by debbugs.gnu.org; 4 Jul 2020 16:01:54 +0000 Received: from localhost ([127.0.0.1]:59429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrkbx-00079s-2A for submit@debbugs.gnu.org; Sat, 04 Jul 2020 12:01:53 -0400 Received: from lists.gnu.org ([209.51.188.17]:59856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrkbs-00079i-BM for submit@debbugs.gnu.org; Sat, 04 Jul 2020 12:01:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrkbr-0003VW-Vy for guix-patches@gnu.org; Sat, 04 Jul 2020 12:01:48 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:59627) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrkbp-0005Lw-6C for guix-patches@gnu.org; Sat, 04 Jul 2020 12:01:47 -0400 X-Originating-IP: 176.181.186.101 Received: from localhost (i15-les02-ntr-176-181-186-101.sfr.lns.abo.bbox.fr [176.181.186.101]) (Authenticated sender: brice@waegenei.re) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id C39FDC0003; Sat, 4 Jul 2020 16:01:39 +0000 (UTC) From: Brice Waegeneire Date: Sat, 4 Jul 2020 18:01:24 +0200 Message-Id: <20200704160124.13847-1-brice@waegenei.re> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Received-SPF: pass client-ip=217.70.183.198; envelope-from=brice@waegenei.re; helo=relay6-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/04 12:01:41 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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 * gnu/packages/engineering.scm (kicad-doc): New variable. (kicad)[native-search-paths]: Add 'KICAD'. --- The environment variable 'KICAD' is set to the the root of the profile because there isn't a specific variable to set the documentation path. This environment variable isn't documented tho it is explicitly used in the code. [1]: https://gitlab.com/kicad/code/kicad/-/blob/f3f17401dc393e558000616d1b0da229299ec278/common/searchhelpfilefullpath.cpp#L122-124 gnu/packages/engineering.scm | 46 +++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index f2d32e663f..fb8ffc8263 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -65,6 +65,7 @@ #:use-module (gnu packages curl) #:use-module (gnu packages dejagnu) #:use-module (gnu packages digest) + #:use-module (gnu packages docbook) #:use-module (gnu packages documentation) #:use-module (gnu packages flex) #:use-module (gnu packages fontutils) @@ -95,6 +96,7 @@ #:use-module (gnu packages multiprecision) #:use-module (gnu packages mpi) #:use-module (gnu packages ncurses) + #:use-module (gnu packages pretty-print) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -805,7 +807,6 @@ language.") (license (list license:mpl2.0 ;library license:gpl2+))))) ;Guile bindings and GUI -;; TODO Add doc https://gitlab.com/kicad/services/kicad-doc/-/tree/master (define-public kicad (package (name "kicad") @@ -855,6 +856,9 @@ language.") #t))))) (native-search-paths (list (search-path-specification + (variable "KICAD") ; to find kicad-doc + (files '(""))) + (search-path-specification (variable "KICAD_TEMPLATE_DIR") (files '("share/kicad/template"))) (search-path-specification @@ -926,6 +930,46 @@ translations for KiCad.") (define-public kicad-i18l (deprecated-package "kicad-i18l" kicad-i18n)) +(define-public kicad-doc + (package + (name "kicad-doc") + (version "5.1.6") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/kicad/services/kicad-doc.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "03kvss8a0xrjnfvkwymm0vfd7rn9ix7i926xdzz9jg9iycrjfj3g")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags (list "-DBUILD_FORMATS=html") + #:phases + (modify-phases %standard-phases + (delete 'build) + (add-before 'install 'set-perl-env + (lambda* (#:key inputs #:allow-other-keys) + (setenv "PERL5LIB" + (string-append (assoc-ref inputs "perl-unicode-linebreak") + "/lib/perl5/site_perl" ":" + (getenv "PERL5LIB"))) + #t)) + (delete 'check)))) + (native-inputs + `(("asciidoc" ,asciidoc) + ("gettext" ,gettext-minimal) + ("git" ,git-minimal) + ("perl" ,perl) + ("perl-unicode-linebreak" ,perl-unicode-linebreak) + ("po4a" ,po4a) + ("source-highlight" ,source-highlight))) + (home-page "https://kicad-pcb.org/") + (synopsis "KiCad official documentation") + (description "This repository contains the official KiCad documentation.") + (license license:gpl3+))) + (define-public kicad-symbols (package (name "kicad-symbols")