From patchwork Mon Feb 17 18:25:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "ashish.is--- via Guix-patches\" via" X-Patchwork-Id: 20303 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 0F11327BBEE; Mon, 17 Feb 2020 18:27:00 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham 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 39BFF27BBEA for ; Mon, 17 Feb 2020 18:26:59 +0000 (GMT) Received: from localhost ([::1]:50376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3l5w-0003XR-EP for patchwork@mira.cbaines.net; Mon, 17 Feb 2020 13:26:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45719) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3l5n-0003W3-KK for guix-patches@gnu.org; Mon, 17 Feb 2020 13:26:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3l5m-00073R-8p for guix-patches@gnu.org; Mon, 17 Feb 2020 13:26:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:33225) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j3l5m-00073G-5Z for guix-patches@gnu.org; Mon, 17 Feb 2020 13:26:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j3l5m-00011e-1V for guix-patches@gnu.org; Mon, 17 Feb 2020 13:26:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#39647] [PATCH] gnu: Add unoconv. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Feb 2020 18:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 39647 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39647@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15819639363909 (code B ref -1); Mon, 17 Feb 2020 18:26:01 +0000 Received: (at submit) by debbugs.gnu.org; 17 Feb 2020 18:25:36 +0000 Received: from localhost ([127.0.0.1]:39198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3l5M-00010w-AA for submit@debbugs.gnu.org; Mon, 17 Feb 2020 13:25:36 -0500 Received: from lists.gnu.org ([209.51.188.17]:41479) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j3l5K-00010n-AR for submit@debbugs.gnu.org; Mon, 17 Feb 2020 13:25:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45588) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3l5I-00034D-Ho for guix-patches@gnu.org; Mon, 17 Feb 2020 13:25:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3l5G-0006lw-Ig for guix-patches@gnu.org; Mon, 17 Feb 2020 13:25:31 -0500 Received: from tobias.gr ([2001:470:7405::1]:50646) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j3l5G-0006hC-36 for guix-patches@gnu.org; Mon, 17 Feb 2020 13:25:30 -0500 Received: by tobias.gr (OpenSMTPD) with ESMTP id d8bdaad8 for ; Mon, 17 Feb 2020 18:25:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to :subject:date:message-id:mime-version:content-transfer-encoding; s=2018; i=me@tobias.gr; bh=KWCwY1OfRF1SLUeDJVr0hqiRxJR4DY4tnhDK 7oxmYRU=; b=KZEVvAZfpYp5DqNoAN8JjB2hk1aZWzIhrjGpj1Go34LheVLnqrnH yNlI+ta6eZfOYbUzYnqhvgrt3y6l+VdWf3z2RVTmOBx6aP0ld4N0VpnJBxWa6B9d XOOgvMOlJZnTkx52vIL7qdjy5VveDD/2leZq7KO/32JSoAw0R6c+s6spH/8m9RA5 rZqM3YQie3OyszHFh3wAF/Z/rH9Q33/ReLLkQJLNyJDZssLbnUfu3O3MPFei4xMA f8sJYiN4mw9Adzka7y5Deb1RrmnriJHtTUKfjl6Bs30v6jAvUIylAsH12wRfony5 nJ8q3/CZprNTiIjpWjZS8sQ+MxbwNRz8mw== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id b63bb929 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Mon, 17 Feb 2020 18:25:27 +0000 (UTC) Date: Mon, 17 Feb 2020 19:25:09 +0100 Message-Id: <20200217182509.11993-1-me@tobias.gr> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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" Reply-to: Tobias Geerinckx-Rice , Tobias Geerinckx-Rice via Guix-patches X-Patchwork-Original-From: Tobias Geerinckx-Rice via Guix-patches via From: "ashish.is--- via Guix-patches\" via" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/libreoffice.scm (unoconv): New public variable. --- gnu/packages/libreoffice.scm | 55 +++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm index 04477e2082..5e9e5ebd40 100644 --- a/gnu/packages/libreoffice.scm +++ b/gnu/packages/libreoffice.scm @@ -31,11 +31,12 @@ (define-module (gnu packages libreoffice) #:use-module (guix build-system glib-or-gtk) #:use-module (guix build-system gnu) + #:use-module (guix build-system python) #:use-module (guix build-system trivial) #:use-module (guix download) #:use-module (guix git-download) #:use-module ((guix licenses) - #:select (gpl2+ lgpl2.1+ lgpl3+ mpl1.1 mpl2.0 + #:select (gpl2 gpl2+ lgpl2.1+ lgpl3+ mpl1.1 mpl2.0 non-copyleft x11-style bsd-3)) #:use-module (guix packages) #:use-module (guix utils) @@ -141,6 +142,58 @@ Plain Text, Gnumeric XML, Generic XML. It also includes low-level parsers for CSV, CSS and XML.") (license mpl2.0))) +(define-public unoconv + (package + (name "unoconv") + (version "0.9.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "unoconv" version)) + (sha256 + (base32 "0cb0bvyxib3xrj0jdgizhp6p057lr8kqnd3n921rin37ivcvz3ih")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-find_offices + ;; find_offices is a convoluted cross-platform treasure hunt. + ;; Keep things simple and return the correct paths immediately. + (lambda* (#:key inputs #:allow-other-keys) + (let* ((libreoffice (assoc-ref inputs "libreoffice"))) + (substitute* "unoconv" + (("def find_offices\\(\\):" match) + (string-append + match "\n" + " ret = []\n" + " office = Office(" + "'" libreoffice "/lib/libreoffice', " + "'" libreoffice "/lib/libreoffice/program', " + "'" libreoffice "/lib/libreoffice/program', " + "'" libreoffice "/lib/libreoffice/program/pyuno.so', " + "'" libreoffice "/bin/soffice', " + "sys.executable, " + "None)\n" + " ret.append(office)\n" + " return ret\n"))) + #t)))))) + (inputs + `(("libreoffice" ,libreoffice))) + (home-page "http://dag.wiee.rs/home-made/unoconv/") + (synopsis "Convert between any document format supported by LibreOffice") + (description + "Unoconv is a command-line utility to convert documents from any format +that LibreOffice can import, to any format it can export. It can be used for +batch processing, and can apply custom style templates and filters. + +Unoconv can convert between over a hundred formats, including Open Document +Format (@file{.odt}, @file{.ods}, @file{.odp})), Portable Document Format +(@file{.pdf}), HTML and XHTML, RTF, DocBook (@file{.xml}), @file{.doc} and +@file{.docx}), @file{.xls} and @file{.xlsx}). + +All required fonts must be installed on the converting system.") + (license gpl2))) + (define-public librevenge (package (name "librevenge")