From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDXTp-0002WI-8D for guix-patches@gnu.org; Tue, 01 May 2018 11:46:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fDXTo-0000O7-Ec for guix-patches@gnu.org; Tue, 01 May 2018 11:46:13 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:38010) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fDXTo-0000O1-9d for guix-patches@gnu.org; Tue, 01 May 2018 11:46:12 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fDXTo-00063c-3a for guix-patches@gnu.org; Tue, 01 May 2018 11:46:12 -0400 Subject: [bug#31333] [PATCH 18/22] gnu: Add groovy-servlet. Resent-Message-ID: From: Julien Lepiller Date: Tue, 1 May 2018 17:44:45 +0200 Message-Id: <20180501154449.3531-18-julien@lepiller.eu> In-Reply-To: <20180501154449.3531-1-julien@lepiller.eu> References: <20180501174136.1c411b1a@lepiller.eu> <20180501154449.3531-1-julien@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: 31333@debbugs.gnu.org * gnu/packages/groovy.scm (groovy-servlet): New variable. --- gnu/packages/groovy.scm | 56 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/gnu/packages/groovy.scm b/gnu/packages/groovy.scm index 8f50ee023..c6a7dcaca 100644 --- a/gnu/packages/groovy.scm +++ b/gnu/packages/groovy.scm @@ -904,3 +904,59 @@ module is used for interaction between Groovy and Java code."))) (synopsis "Groovy input-output library") (description "This package implements an input/output library that extends the functionnality of the common library of Java."))) + +(define groovy-servlet + (package + (inherit groovy-bootstrap) + (name "groovy-servlet") + (arguments + `(#:jar-name "groovy-servlet.jar" + #:test-dir "src/test" + #:jdk ,icedtea-8 + #:phases + (modify-phases %standard-phases + (add-before 'configure 'chdir + (lambda _ + (chdir "subprojects/groovy-servlet"))) + (replace 'build + (lambda _ + (mkdir-p "build/classes") + (mkdir-p "build/jar") + (and + (zero? (apply system* "java" "-cp" (getenv "CLASSPATH") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/classes" + "-j"; joint compilation + (find-files "src/main" + ".*\\.(groovy|java)$"))) + (zero? (system* "jar" "-cf" "build/jar/groovy-servlet.jar" + "-C" "build/classes" "."))))) + (replace 'check + (lambda _ + (mkdir-p "build/test-classes") + (substitute* "build.xml" + (("depends=\"compile-tests\"") "depends=\"\"") + (("}/java") "}/groovy")) + (and + (zero? (apply system* "java" "-cp" + (string-append (getenv "CLASSPATH") ":build/classes") + "org.codehaus.groovy.tools.FileSystemCompiler" + "-d" "build/test-classes" + "-j" + (append + (find-files "src/test" + ".*\\.(groovy|java)$")))) + (zero? (system* "ant" "check")))))))) + (inputs + `(("groovy-templates" ,groovy-templates) + ("groovy-xml" ,groovy-xml) + ,@(package-inputs groovy-bootstrap))) + (native-inputs + `(("groovy-bootstrap" ,groovy-bootstrap) + ("groovy-json" ,groovy-json) + ("groovy-test" ,groovy-test) + ("groovy-tests-bootstrap" ,groovy-tests-bootstrap) + ,@(package-native-inputs groovy-java-bootstrap))) + (synopsis "Groovy's servlet implementation") + (description "This package contains a library to create groovlets, Groovy's +version of Java servlets."))) -- 2.17.0