From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eGi3j-0001xr-To for guix-patches@gnu.org; Mon, 20 Nov 2017 04:08:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eGi3e-0008TX-Qh for guix-patches@gnu.org; Mon, 20 Nov 2017 04:08:07 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:39580) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eGi3e-0008TN-ML for guix-patches@gnu.org; Mon, 20 Nov 2017 04:08:02 -0500 Subject: [bug#29359] [PATCH 22/31] gnu: Add java-dom4j. Resent-Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Mon, 20 Nov 2017 10:07:16 +0100 From: julien lepiller In-Reply-To: <87y3n1wclw.fsf@elephly.net> References: <20171119175805.902-1-julien@lepiller.eu> <20171119175805.902-22-julien@lepiller.eu> <87y3n1wclw.fsf@elephly.net> Message-ID: <2aac6dc25e6e5ade7de158a0989a7876@lepiller.eu> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 29359@debbugs.gnu.org Le 2017-11-20 09:58, Ricardo Wurmus a écrit : > Julien Lepiller writes: > >> * gnu/packages/java.scm (java-dom4j): New variable. > > Better: (gnu packages xml). > > […] >> + (arguments >> + `(#:jar-name "dom4j.jar" >> + #:jdk ,icedtea-8 >> + #:source-dir "src/main/java" >> + #:tests? #f; Requires xalan, but xalan -> java-cup -> jflex -> >> java-cup... > > So java-cup has a dependency on itself via jflex? > Please add FIXME here, so that we can fix this once xalan is packaged. > >> + #:phases >> + (modify-phases %standard-phases >> + (add-before 'build 'copy-jaxen-sources >> + ;; jaxen-no-rec-deps is not enough. These files have a >> circular >> + ;; dependency and there is no subset of dom4j that would >> allow >> + ;; breaking the circle. > > I still don’t know where “jaxen-no-rec-deps” comes from. It's part of the java-xom patch, but I will rename it and make two patches instead. > >> + (add-before 'build 'fix-old-xpp2 >> + (lambda _ >> + ;; This package normally depends on xpp2 2.0, but we can >> only package >> + ;; version 2.1.10. > > Why? It's the only version I could find the source code of. I will add a comment. > >> + (substitute* >> "src/main/java/org/dom4j/xpp/ProxyXmlStartTag.java" >> + (("public void resetStartTag") >> + (string-append >> + "public boolean removeAttributeByRawName(String >> name) {\n" >> + " return false;\n" >> + "}\n" >> + "public boolean removeAttributeByName(String name, >> String name2) {\n" >> + " return false;\n" >> + "}\n" >> + "\n" > > I prefer not to use string-append here. You can split strings and let > them span multiple lines by escaping the line break. Sure. I fixed some of these and forgot about this one. I'll make sure not to push such a thing in other packages either. I agree that's ugly. > >> + (inputs >> + `(("java-jaxen-no-rec-deps" ,java-jaxen-no-rec-deps) >> + ("java-jaxen-sources" ,(package-source >> java-jaxen-no-rec-deps)) > > Please remember to rename this when renaming “java-jaxen-no-rec-deps” > to > “java-jaxen-bootstrap”. > >> + (home-page "https://dom4j.github.io/") >> + (synopsis "Flexible XML framework for Java") >> + (description "Dom4j is a flexible XML framework for Java.") > > That’s a bit short. Could you elaborate? > >> + ;; some BSD-like 5-clause license >> + (license (license:non-copyleft "file://LICENSE")))) > > Weird license :) Thanks for your review :) > > -- > Ricardo > > GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC > https://elephly.net