From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Re: PATCH: LibreOffice Date: Wed, 3 Jun 2015 14:39:07 +0200 Message-ID: <20150603123907.GA22264@debian.math.u-bordeaux1.fr> References: <20150531090831.GA4344@debian> <87pp5gtzi1.fsf@netris.org> <20150601195015.GA6191@debian> <20150601195656.GA6558@debian> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="qDbXVdCdHGoSgWSk" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z07xL-0000Dy-2P for guix-devel@gnu.org; Wed, 03 Jun 2015 08:39:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z07xG-0006fa-Hi for guix-devel@gnu.org; Wed, 03 Jun 2015 08:39:39 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:65272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z07xG-0006e5-6R for guix-devel@gnu.org; Wed, 03 Jun 2015 08:39:34 -0400 Content-Disposition: inline In-Reply-To: <20150601195656.GA6558@debian> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Mark H Weaver Cc: guix-devel@gnu.org --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello all, attached is a new patch. The good news: Patch-shebanging the external xmlsec tarball does indeed not seem to be necessary, so I replaced the package recipe by a simple origin declaration. Does this internal variable need to be mentioned in the commit message? The bad news: autoreconf is still needed for the xmlsec tarball. After discussion with Ludovic, I used "bin/soffice" instead of "bin/libreoffice" as a symbolic link to the binary, which is called "soffice". This is more consistent with our policy of keeping as close to upstream as possible. More comments are of course welcome. Andreas --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-gnu-Add-LibreOffice.patch" >From 80325ab4f875ee771fa5b80d6724f2a3f3f4c80c Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Fri, 29 May 2015 23:49:19 +0200 Subject: [PATCH] gnu: Add LibreOffice. * gnu/packages/libreoffice.scm (xmlsec-src-libreoffice, libreoffice): New variables. Co-authored-by: John Darrington --- gnu/packages/libreoffice.scm | 198 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 194 insertions(+), 4 deletions(-) diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm index 70f0e8e..03f45da 100644 --- a/gnu/packages/libreoffice.scm +++ b/gnu/packages/libreoffice.scm @@ -18,25 +18,52 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages libreoffice) - #:use-module (guix packages) + #:use-module (guix build-system gnu) #:use-module (guix download) #:use-module ((guix licenses) - #:select (gpl2+ lgpl2.1+ mpl1.1 mpl2.0 non-copyleft)) - #:use-module (guix build-system gnu) + #:select (gpl2+ lgpl2.1+ mpl1.1 mpl2.0 + non-copyleft x11-style)) + #:use-module (guix packages) + #:use-module (guix utils) + #:use-module (gnu packages autotools) + #:use-module (gnu packages base) + #:use-module (gnu packages bison) #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages cups) #:use-module (gnu packages curl) #:use-module (gnu packages cyrus-sasl) + #:use-module (gnu packages databases) #:use-module (gnu packages doxygen) + #:use-module (gnu packages flex) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages gdb) #:use-module (gnu packages ghostscript) + #:use-module (gnu packages gl) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) #:use-module (gnu packages gperf) + #:use-module (gnu packages gnuzilla) + #:use-module (gnu packages gstreamer) + #:use-module (gnu packages gtk) #:use-module (gnu packages icu4c) + #:use-module (gnu packages image) + #:use-module (gnu packages java) + #:use-module (gnu packages linux) + #:use-module (gnu packages maths) + #:use-module (gnu packages openldap) #:use-module (gnu packages openssl) + #:use-module (gnu packages pdf) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) - #:use-module (gnu packages xml)) + #:use-module (gnu packages rdf) + #:use-module (gnu packages scanner) + #:use-module (gnu packages version-control) + #:use-module (gnu packages xml) + #:use-module (gnu packages xorg) + #:use-module (gnu packages zip)) (define-public ixion (package @@ -632,3 +659,166 @@ data file and an index file with binary search to look up words and phrases and to return information on pronunciations, meaningss and synonyms.") (license (non-copyleft "file://COPYING" "See COPYING in the distribution.")))) + +;; LibreOffice requires an xmlsec source tarball; it does not even check +;; for the presence of an externally compiled library. +(define xmlsec-src-libreoffice + (origin + (method url-fetch) + (uri + (string-append + "http://dev-www.libreoffice.org/src/" + "1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz")) + (sha256 (base32 + "0jnxxygg6z5zi6za94dvxmg1bfar1wh8p5xa2bzbha0qcn2m02ir")))) + +(define-public libreoffice + (package + (name "libreoffice") + (version "4.4.3.2") + (source + (origin + (method url-fetch) + (uri + (string-append + "http://download.documentfoundation.org/libreoffice/src/" + (version-prefix version 3) "/libreoffice-" version ".tar.xz")) + (sha256 (base32 + "0rl9x01ngxwnqwzxkrqy4vks4rb024m75z0w4zidwyp0az0m8qdd")))) + (build-system gnu-build-system) + (native-inputs + `(("autoconf" ,autoconf) ; required for the xmlsec tarball + ("automake" ,automake) ; ditto + ("bison" ,bison) + ("cppunit" ,cppunit) + ("flex" ,flex) + ("pkg-config" ,pkg-config) + ("python" ,python) + ("which" ,which))) + (inputs + `(("bluez" ,bluez) + ("boost" ,boost) + ("clucene" ,clucene) + ("cups" ,cups) + ("dbus-glib" ,dbus-glib) + ("fontconfig" ,fontconfig) + ("gconf" ,gconf) + ("glew" ,glew) + ("glm" ,glm) + ("gperf" ,gperf) + ("graphite2" ,graphite2) + ("gst-plugins-base" ,gst-plugins-base) + ("gtk+" ,gtk+-2) + ("harfbuzz" ,harfbuzz) + ("hunspell" ,hunspell) + ("hyphen" ,hyphen) + ("libabw" ,libabw) + ("libcdr" ,libcdr) + ("libcmis" ,libcmis) + ("libjpeg" ,libjpeg) + ("libe-book" ,libe-book) + ("libetonyek" ,libetonyek) + ("libexttextcat" ,libexttextcat) + ("libfreehand" ,libfreehand) + ("libmspub" ,libmspub) + ("libmwaw" ,libmwaw) + ("libodfgen" ,libodfgen) + ("libpagemaker" ,libpagemaker) + ("libvisio" ,libvisio) + ("libwpg" ,libwpg) + ("libwps" ,libwps) + ("libxrandr" ,libxrandr) + ("libxrender" ,libxrender) + ("libxslt" ,libxslt) + ("libxt" ,libxt) + ("lpsolve" ,lpsolve) + ("mdds" ,mdds) + ("mythes" ,mythes) + ("neon" ,neon) + ("nspr" ,nspr) + ("nss" ,nss) + ("openldap" ,openldap) + ("openssl" ,openssl) + ("orcus" ,orcus) + ("perl" ,perl) + ("perl-zip" ,perl-zip) + ("poppler" ,poppler) + ("postgresql" ,postgresql) + ("python" ,python) + ("redland" ,redland) + ("sane-backends" ,sane-backends) + ("unixodbc" ,unixodbc) + ("unzip" ,unzip) + ("vigra" ,vigra) + ("xmlsec-src" ,xmlsec-src-libreoffice) + ("zip" ,zip))) + (arguments + `(#:parallel-build? #f ; Otherwise the build fails. + #:tests? #f ; Building the tests already fails. + #:make-flags '("build-nocheck") ; Do not build unit tests, which fails. + #:phases + (modify-phases %standard-phases + (add-before 'configure 'prepare-src + (lambda* (#:key inputs #:allow-other-keys) + (let ((xmlsec (assoc-ref inputs "xmlsec-src"))) + (substitute* + (list "sysui/CustomTarget_share.mk" + "solenv/gbuild/gbuild.mk" + "solenv/gbuild/platform/unxgcc.mk" + "external/libxmlsec/xmlsec1-oldlibtool.patch") + (("/bin/sh") (which "bash"))) + (mkdir "external/tarballs") + (symlink + xmlsec + (string-append "external/tarballs/" + "1f24ab1d39f4a51faf22244c94a6203f-" + "xmlsec1-1.2.14.tar.gz")) + ;; The following is required for building xmlsec from the + ;; unpatched external tarball; since "configure" starts with + ;; "/bin/sh", it needs to be executed by a command invoking + ;; the shell. + (setenv "SHELL" (which "bash")) + (setenv "CONFIG_SHELL" (which "bash")) + (substitute* "external/libxmlsec/ExternalProject_xmlsec.mk" + (("./configure") "$(CONFIG_SHELL) ./configure" )) + #t))) + (add-after 'install 'bin-install + ;; Create a symlink bin/soffice to the executable script. + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (mkdir bin) + (symlink + (string-append out "/lib/libreoffice/program/soffice") + (string-append bin "/soffice"))) + #t))) + #:configure-flags + (list + "--enable-release-build" + "--enable-verbose" + "--without-parallelism" ; otherwise the build fails + "--disable-fetch-external" ; disable downloads + "--with-system-libs" ; enable all --with-system-* flags + (string-append "--with-boost-libdir=" + (assoc-ref %build-inputs "boost") "/lib") + ;; Avoid a dependency on ucpp. + "--with-idlc-cpp=cpp" + ;; The fonts require an external tarball (crosextrafonts). + ;; They should not be needed when system fonts are available. + "--without-fonts" + ;; With java, the build fails since sac.jar is missing. + "--without-java" + ;; FIXME: Enable once the corresponding inputs are packaged. + "--without-system-npapi-headers" + "--disable-coinmp" + "--disable-firebird-sdbc" ; embedded firebird + "--disable-gltf" + "--disable-liblangtag"))) + (home-page "https://www.libreoffice.org/") + (synopsis "Office suite") + (description "LibreOffice is a comprehensive office suite. It contains +a number of components: Writer, a word processor; Calc, a spreadsheet +application; Impress, a presentation engine; Draw, a drawing and +flowcharting application; Base, a database and database frontend; +Math for editing mathematics.") + (license mpl2.0))) -- 2.2.1 --qDbXVdCdHGoSgWSk--