From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 05 11:39:04 2018 Received: (at submit) by debbugs.gnu.org; 5 Oct 2018 15:39:04 +0000 Received: from localhost ([127.0.0.1]:38025 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g8SC0-0001ES-4D for submit@debbugs.gnu.org; Fri, 05 Oct 2018 11:39:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g8SBx-0001Dz-Mx for submit@debbugs.gnu.org; Fri, 05 Oct 2018 11:39:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8SBr-0006xp-AC for submit@debbugs.gnu.org; Fri, 05 Oct 2018 11:38:56 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:50077) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g8SBr-0006xf-6H for submit@debbugs.gnu.org; Fri, 05 Oct 2018 11:38:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59350) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8SBn-0000u8-Su for guix-patches@gnu.org; Fri, 05 Oct 2018 11:38:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8S2A-0002Iv-Rl for guix-patches@gnu.org; Fri, 05 Oct 2018 11:28:58 -0400 Received: from lepiller.eu ([2a00:5884:8208::1]:45396) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g8S2A-0002GJ-Hu for guix-patches@gnu.org; Fri, 05 Oct 2018 11:28:54 -0400 Received: from webmail.lepiller.eu (static-176-182-42-79.ncc.abo.bbox.fr [176.182.42.79]) by lepiller.eu (OpenSMTPD) with ESMTPSA id d32a1887 (TLSv1.2:ECDHE-RSA-CHACHA20-POLY1305:256:NO) for ; Fri, 5 Oct 2018 15:30:49 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Fri, 05 Oct 2018 17:28:51 +0200 From: Julien Lepiller To: guix-patches@gnu.org Subject: Re: [bug#32947] [PATCH 1/3] gnu: Add java-cup. In-Reply-To: <20181005152044.9682-1-dannym@scratchpost.org> References: <20181005151859.9616-1-dannym@scratchpost.org> <20181005152044.9682-1-dannym@scratchpost.org> Message-ID: <9094b40c6c25c077212da6428dcc30dc@lepiller.eu> X-Sender: julien@lepiller.eu User-Agent: Roundcube Webmail/1.3.6 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Le 2018-10-05 17:20, Danny Milosavljevic a écrit : > * gnu/packages/java.scm (java-cup): New variable. > --- > gnu/packages/java.scm | 44 +++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 44 insertions(+) > > diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm > index 96da495c2..4ddffb357 100644 > --- a/gnu/packages/java.scm > +++ b/gnu/packages/java.scm > @@ -69,6 +69,7 @@ > #:use-module (gnu packages perl) > #:use-module (gnu packages popt) > #:use-module (gnu packages kerberos) > + #:use-module (gnu packages version-control) > #:use-module (gnu packages xml) > #:use-module (gnu packages xorg) > #:use-module (gnu packages texinfo) > @@ -9634,6 +9635,49 @@ Candidate Recommendation, and will correctly > serialize XML 1.1 documents if > the DOM level 3 load/save API's are in use.") > (license license:asl2.0))) > > +(define-public java-cup > + (package > + (name "java-cupx") Why x? > + (version "11b-20160615") > + (source > + (origin > + (method url-fetch) > + (uri (string-append > + > "http://www2.cs.tum.edu/projects/cup/releases/java-cup-src-" > + version ".tar.gz")) > + (sha256 > + (base32 > + "1ymz3plngxclh7x3xr31537rvvak7lwyd0qkmnl1mkj5drh77rz0")))) > + (build-system ant-build-system) > + (arguments > + `(#:build-target "dist" > + #:test-target "test" > + #:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'remove-prebuilt-jars > + (lambda _ > + (for-each delete-file > + (find-files "." "\\.jar$")) > + #t)) Maybe that should be a snippet? > + (add-before 'build 'chdir > + (lambda _ > + (chdir "..") > + #t)) > + (replace 'install > + (lambda* (#:key outputs #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out")) > + (out-share (string-append out "/share/java"))) > + (mkdir-p out-share) > + (install-file "dist/java-cup-11b-runtime.jar" > out-share) > + (install-file "dist/java-cup-11b.jar" out-share) > + #t)))))) > + (native-inputs > + `(("git" ,git))) > + (home-page "http://www2.cs.tum.edu/projects/cup/") > + (synopsis "LALR parser generator for Java") > + (description "@code{java_cup} is a LALR parser generator for > Java.") > + (license license:asl2.0))) > + > (define-public java-jline > (package > (name "java-jline") I don't know if that's an issue, but the source code bundles generated source by java-cup and jflex. I've tried to bootstrap both correctly, but there is no version of jflex you can build without jflex and cup. I have a recipe for java-jflex and java-cup that are built without pre-generated source, using two bootstrap jars. Then, I could use them to build other packages that I need for the future maven-build-system. I wasn't able to build java-jflex with the latest java-cup. Do you want me to send these recipes for comparison?