[PATCH] gnu: Add fop.

DoneSubmitted by Roel Janssen.
Details
5 participants
  • Björn Höfling
  • Ludovic Courtès
  • Marius Bakke
  • Ricardo Wurmus
  • Roel Janssen
Owner
unassigned
Severity
normal
R
R
Roel Janssen wrote on 2 Mar 2017 00:58
(address . guix-patches@gnu.org)
874lzcft1s.fsf@gnu.org
Dear Guix,
This package is a dependency for Darktable. Therefore, I would like toadd it.
Toggle quote (1 lines)>From 99604dfc19cd9b68863fcc948ecbe4a853bc56f0 Mon Sep 17 00:00:00 2001
From: Roel Janssen <roel@gnu.org>Date: Thu, 2 Mar 2017 00:43:00 +0100Subject: [PATCH] gnu: Add fop.
* gnu/packages/xml.scm (fop): New variable.--- gnu/packages/xml.scm | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+)
Toggle diff (69 lines)diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scmindex b91471690..f7f861fbe 100644--- a/gnu/packages/xml.scm+++ b/gnu/packages/xml.scm@@ -14,6 +14,7 @@ ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is> ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>+;;; Copyright © 2017 Roel Janssen <roel@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;;@@ -42,6 +43,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download)+ #:use-module (guix build-system ant) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (guix build-system perl)@@ -71,6 +73,46 @@ stream-oriented parser in which an application registers handlers for things the parser might find in the XML document (like start tags).") (license license:expat))) +(define-public fop+ (package+ (name "fop")+ (version "2.1")+ (source (origin+ (method url-fetch)+ (uri (string-append+ "mirror://apache/xmlgraphics/fop/source/fop-"+ version "-src.tar.gz"))+ (sha256+ (base32+ "165rx13q47l6qc29ppr7sg1z26vw830s3rkklj5ap7wgvy0ivbz5"))))+ (build-system ant-build-system)+ (arguments+ `(#:phases+ (modify-phases %standard-phases+ (replace 'build+ (lambda* (#:key inputs #:allow-other-keys)+ (system* (string-append (assoc-ref inputs "ant") "/bin/ant"))))+ (replace 'install+ (lambda* (#:key inputs outputs #:allow-other-keys)+ (let* ((out (assoc-ref outputs "out"))+ (bin (string-append out "/bin")))+ (mkdir-p bin)+ (install-file "build/fop.jar" bin)+ (install-file "build/fop-hyph.jar" bin)+ (install-file "build/fop-sandbox.jar" bin)+ (install-file "build/fop-transcoder-allinone.jar" bin)+ (install-file "build/fop-transcoder.jar" bin)+ (install-file "fop" bin)))))))+ (home-page "https://xmlgraphics.apache.org/fop/")+ (synopsis "Formatting objects processor")+ (description "Apache FOP is a print formatter driven by XSL formatting+objects (XSL-FO) and an output independent formatter. It is a Java application+that reads a formatting object (FO) tree and renders the resulting pages to a+specified output. Output formats currently supported include PDF, PS, PCL,+AFP, XML (area tree representation), Print, AWT and PNG, and to a lesser+extent, RTF and TXT. The primary output target is PDF.")+ (license license:asl2.0)))+ (define-public libxml2 (package (name "libxml2")-- 2.11.0
M
M
Marius Bakke wrote on 2 Mar 2017 01:14
87k288sfen.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me
Roel Janssen <roel@gnu.org> writes:
Toggle quote (52 lines)> Dear Guix,>> This package is a dependency for Darktable. Therefore, I would like to> add it.>>>From 99604dfc19cd9b68863fcc948ecbe4a853bc56f0 Mon Sep 17 00:00:00 2001> From: Roel Janssen <roel@gnu.org>> Date: Thu, 2 Mar 2017 00:43:00 +0100> Subject: [PATCH] gnu: Add fop.>> * gnu/packages/xml.scm (fop): New variable.> ---> gnu/packages/xml.scm | 42 ++++++++++++++++++++++++++++++++++++++++++> 1 file changed, 42 insertions(+)>> diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm> index b91471690..f7f861fbe 100644> --- a/gnu/packages/xml.scm> +++ b/gnu/packages/xml.scm> @@ -14,6 +14,7 @@> ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>> ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>> ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>> +;;; Copyright © 2017 Roel Janssen <roel@gnu.org>> ;;;> ;;; This file is part of GNU Guix.> ;;;> @@ -42,6 +43,7 @@> #:use-module ((guix licenses) #:prefix license:)> #:use-module (guix packages)> #:use-module (guix download)> + #:use-module (guix build-system ant)> #:use-module (guix build-system cmake)> #:use-module (guix build-system gnu)> #:use-module (guix build-system perl)> @@ -71,6 +73,46 @@ stream-oriented parser in which an application registers handlers for> things the parser might find in the XML document (like start tags).")> (license license:expat)))> > +(define-public fop> + (package> + (name "fop")> + (version "2.1")> + (source (origin> + (method url-fetch)> + (uri (string-append> + "mirror://apache/xmlgraphics/fop/source/fop-"> + version "-src.tar.gz"))> + (sha256> + (base32> + "165rx13q47l6qc29ppr7sg1z26vw830s3rkklj5ap7wgvy0ivbz5"))))
Ahh...java. Can you try removing some of the 21 bundled JARs with a'snippet' here? We do have a couple of them in Guix already. Even betterif you can package some more.
Toggle quote (8 lines)> + (build-system ant-build-system)> + (arguments> + `(#:phases> + (modify-phases %standard-phases> + (replace 'build> + (lambda* (#:key inputs #:allow-other-keys)> + (system* (string-append (assoc-ref inputs "ant") "/bin/ant"))))
I'm not very familiar with ant-build-system, but isn't ant available inPATH here (so you can simply (system* "ant"))? It should probably alsobe wrapped in a (zero? (system* ..)) so that the return value is checked.
Toggle quote (12 lines)> + (replace 'install> + (lambda* (#:key inputs outputs #:allow-other-keys)> + (let* ((out (assoc-ref outputs "out"))> + (bin (string-append out "/bin")))> + (mkdir-p bin)> + (install-file "build/fop.jar" bin)> + (install-file "build/fop-hyph.jar" bin)> + (install-file "build/fop-sandbox.jar" bin)> + (install-file "build/fop-transcoder-allinone.jar" bin)> + (install-file "build/fop-transcoder.jar" bin)> + (install-file "fop" bin)))))))
"install-file" (or actually "copy-file" from reading (guix build utils)has an unspecified return value, so this phase should end with anexplicit #t.
Toggle quote (10 lines)> + (home-page "https://xmlgraphics.apache.org/fop/")> + (synopsis "Formatting objects processor")> + (description "Apache FOP is a print formatter driven by XSL formatting> +objects (XSL-FO) and an output independent formatter. It is a Java application> +that reads a formatting object (FO) tree and renders the resulting pages to a> +specified output. Output formats currently supported include PDF, PS, PCL,> +AFP, XML (area tree representation), Print, AWT and PNG, and to a lesser> +extent, RTF and TXT. The primary output target is PDF.")> + (license license:asl2.0)))
I did not do a license audit of this package, but please double checkthat all bundled software also carries this license (or mention theirshere). The rest LGTM.
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAli3ZAEACgkQoqBt8qM6VPoCKAf/ROFhqWwh/WvRCxJWQqR0KyR26jmw3z1ilPIFeNIq6FZ6h9t32G5FVE/e1J7qpjQ0ePj1qO9tE+E864MXl4ErO0Ek4+KMhMVG8oJKEbFLoOyNGCaSSPDGms3YT80d1v8sJTz+CTz1vT2yrBFrFSfPo/XcTfaDD3GoFva/Yr8X09kdgaiMPBHksoQ6Y1xpXW9qhoehZHoo2WSOuqT/XiAmhhnHMSzqff35ZC7lYPuBS2xVVIvnD24gMffcwnBbOaFtgovWpuGtNcOel/V6EtuSBRMKj3LWpd1nq3E+XnkLuZLbn1nv3Gns4U9EOg+dF9ZDllscTXOLmIWqGdFG7RXzoA===BO6N-----END PGP SIGNATURE-----
L
L
Ludovic Courtès wrote on 13 Mar 2017 14:17
control message for bug #25925
(address . control@debbugs.gnu.org)
87k27te2p8.fsf@gnu.org
tags 25925 moreinfo
B
B
Björn Höfling wrote on 13 Mar 2017 22:45
Re: bug#25925: [PATCH] gnu: Add fop.
(name . Marius Bakke)(address . mbakke@fastmail.com)
20170313224540.13591105@alma-ubu
On Thu, 02 Mar 2017 01:14:56 +0100Marius Bakke <mbakke@fastmail.com> wrote:
Toggle quote (62 lines)> Roel Janssen <roel@gnu.org> writes:> > > Dear Guix,> >> > This package is a dependency for Darktable. Therefore, I would> > like to add it.> > > >>From 99604dfc19cd9b68863fcc948ecbe4a853bc56f0 Mon Sep 17 00:00:00> >>2001 > > From: Roel Janssen <roel@gnu.org>> > Date: Thu, 2 Mar 2017 00:43:00 +0100> > Subject: [PATCH] gnu: Add fop.> >> > * gnu/packages/xml.scm (fop): New variable.> > ---> > gnu/packages/xml.scm | 42> > ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42> > insertions(+)> >> > diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm> > index b91471690..f7f861fbe 100644> > --- a/gnu/packages/xml.scm> > +++ b/gnu/packages/xml.scm> > @@ -14,6 +14,7 @@> > ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>> > ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>> > ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>> > +;;; Copyright © 2017 Roel Janssen <roel@gnu.org>> > ;;;> > ;;; This file is part of GNU Guix.> > ;;;> > @@ -42,6 +43,7 @@> > #:use-module ((guix licenses) #:prefix license:)> > #:use-module (guix packages)> > #:use-module (guix download)> > + #:use-module (guix build-system ant)> > #:use-module (guix build-system cmake)> > #:use-module (guix build-system gnu)> > #:use-module (guix build-system perl)> > @@ -71,6 +73,46 @@ stream-oriented parser in which an application> > registers handlers for things the parser might find in the XML> > document (like start tags).") (license license:expat)))> > > > +(define-public fop> > + (package> > + (name "fop")> > + (version "2.1")> > + (source (origin> > + (method url-fetch)> > + (uri (string-append> > + "mirror://apache/xmlgraphics/fop/source/fop-"> > + version "-src.tar.gz"))> > + (sha256> > + (base32> > +> > "165rx13q47l6qc29ppr7sg1z26vw830s3rkklj5ap7wgvy0ivbz5")))) > > Ahh...java. Can you try removing some of the 21 bundled JARs with a> 'snippet' here? We do have a couple of them in Guix already. Even> better if you can package some more.

Hi Roel,
as Marius already mentioned, Java people have the tendency to just put abunch of (binary) jar files in a lib folder. In GuixSD, we want alldependencies be built and brought in by Guix. That has two advantages:
1. We can be sure that the dependencies are really what they claimto be, built from the available sources.2. If there are (security) updates in the dependencies they will beupdated automatically.
Building the dependencies can be quite annoying, because they requireother dependencies to be available, and so on ... That's one of thereasons why Java support in GuixSD is yet very limited.
There is a patch-series by Hartmut Goebel not yet applied, containingconnons-lang and commons-io:
https://lists.gnu.org/archive/html/guix-devel/2016-09/threads.html#00774
Maybe you can start with these?
Björn
R
R
Ricardo Wurmus wrote on 30 Mar 2017 15:02
(name . Björn Höfling)(address . bjoern.hoefling@bjoernhoefling.de)
87mvc25354.fsf@elephly.net
Björn Höfling <bjoern.hoefling@bjoernhoefling.de> writes:
Toggle quote (7 lines)> There is a patch-series by Hartmut Goebel not yet applied, containing> connons-lang and commons-io:>> https://lists.gnu.org/archive/html/guix-devel/2016-09/threads.html#00774>> Maybe you can start with these?
I have taken the patches from Hartmut, cleaned them up, added a coupleof more dependencies to run tests … and then got stuck at some pointagain. I have a big WIP branch for that and I think before someone elsestarts from scratch I should share the branch.
I’ll try to get something ready for merging/sharing/collaborating thisweekend. (Feel free to ping me if you don’t hear from me about this.)
--Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAChttps://elephly.net
R
R
Roel Janssen wrote on 11 May 2017 16:23
(name . Marius Bakke)(address . mbakke@fastmail.com)(address . 25925-done@debbugs.gnu.org)
877f1nxyj4.fsf@gnu.org
Marius Bakke writes:
Toggle quote (58 lines)> Roel Janssen <roel@gnu.org> writes:>>> Dear Guix,>>>> This package is a dependency for Darktable. Therefore, I would like to>> add it.>>>>>From 99604dfc19cd9b68863fcc948ecbe4a853bc56f0 Mon Sep 17 00:00:00 2001>> From: Roel Janssen <roel@gnu.org>>> Date: Thu, 2 Mar 2017 00:43:00 +0100>> Subject: [PATCH] gnu: Add fop.>>>> * gnu/packages/xml.scm (fop): New variable.>> --->> gnu/packages/xml.scm | 42 ++++++++++++++++++++++++++++++++++++++++++>> 1 file changed, 42 insertions(+)>>>> diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm>> index b91471690..f7f861fbe 100644>> --- a/gnu/packages/xml.scm>> +++ b/gnu/packages/xml.scm>> @@ -14,6 +14,7 @@>> ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>>> ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>>> ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>>> +;;; Copyright © 2017 Roel Janssen <roel@gnu.org>>> ;;;>> ;;; This file is part of GNU Guix.>> ;;;>> @@ -42,6 +43,7 @@>> #:use-module ((guix licenses) #:prefix license:)>> #:use-module (guix packages)>> #:use-module (guix download)>> + #:use-module (guix build-system ant)>> #:use-module (guix build-system cmake)>> #:use-module (guix build-system gnu)>> #:use-module (guix build-system perl)>> @@ -71,6 +73,46 @@ stream-oriented parser in which an application registers handlers for>> things the parser might find in the XML document (like start tags).")>> (license license:expat)))>> >> +(define-public fop>> + (package>> + (name "fop")>> + (version "2.1")>> + (source (origin>> + (method url-fetch)>> + (uri (string-append>> + "mirror://apache/xmlgraphics/fop/source/fop-">> + version "-src.tar.gz"))>> + (sha256>> + (base32>> + "165rx13q47l6qc29ppr7sg1z26vw830s3rkklj5ap7wgvy0ivbz5"))))>> Ahh...java. Can you try removing some of the 21 bundled JARs with a> 'snippet' here? We do have a couple of them in Guix already. Even better> if you can package some more.
Ahh sorry about this. Because 'fop' is not needed for 'darktable', Iwill just drop this patch for now.
Thanks for your reviewing efforts though!
Kind regards,Roel Janssen
Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 25925@debbugs.gnu.org