Groovy compiles, but needs work for plugins, subprojects and tests
groovy-Add-exceptionutilsgenerator.patch unknown status 1
| 1 | + | From 3dbdc68093e90f0ef9b77b70490d8e0b1dcfbf8f Mon Sep 17 00:00:00 2001 | |
| 2 | + | From: Julien Lepiller <julien@lepiller.eu> | |
| 3 | + | Date: Sun, 17 Sep 2017 21:08:45 +0200 | |
| 4 | + | Subject: [PATCH] Add ExceptionUtilsGenerator.java from previous versions | |
| 5 | + | ||
| 6 | + | This is replaced by a gradle task, but gradle depends on groovy, so we | |
| 7 | + | need so way to generate the file without gradle. | |
| 8 | + | --- | |
| 9 | + | .../codehaus/groovy/ExceptionUtilsGenerator.java | 75 ++++++++++++++++++++++ | |
| 10 | + | 1 file changed, 75 insertions(+) | |
| 11 | + | create mode 100644 config/ant/src/org/codehaus/groovy/ExceptionUtilsGenerator.java | |
| 12 | + | ||
| 13 | + | diff --git a/config/ant/src/org/codehaus/groovy/ExceptionUtilsGenerator.java b/config/ant/src/org/codehaus/groovy/ExceptionUtilsGenerator.java | |
| 14 | + | new file mode 100644 | |
| 15 | + | index 0000000..41f006d | |
| 16 | + | --- /dev/null | |
| 17 | + | +++ b/config/ant/src/org/codehaus/groovy/ExceptionUtilsGenerator.java | |
| 18 | + | @@ -0,0 +1,75 @@ | |
| 19 | + | +package org.codehaus.groovy; | |
| 20 | + | + | |
| 21 | + | +import org.objectweb.asm.*; | |
| 22 | + | + | |
| 23 | + | +import java.io.BufferedOutputStream; | |
| 24 | + | +import java.io.File; | |
| 25 | + | +import java.io.FileOutputStream; | |
| 26 | + | +import java.io.IOException; | |
| 27 | + | +import java.util.logging.Logger; | |
| 28 | + | + | |
| 29 | + | +public class ExceptionUtilsGenerator implements Opcodes { | |
| 30 | + | + private final static Logger LOGGER = Logger.getLogger(ExceptionUtilsGenerator.class.getName()); | |
| 31 | + | + | |
| 32 | + | + public static void main(String... args) { | |
| 33 | + | + if (args==null || args.length==0) { | |
| 34 | + | + throw new IllegalArgumentException("You must specify at least one file"); | |
| 35 | + | + } | |
| 36 | + | + | |
| 37 | + | + ClassWriter cw = new ClassWriter(0); | |
| 38 | + | + MethodVisitor mv; | |
| 39 | + | + | |
| 40 | + | + cw.visit(V1_5, ACC_PUBLIC + ACC_SUPER, "org/codehaus/groovy/runtime/ExceptionUtils", null, "java/lang/Object", null); | |
| 41 | + | + | |
| 42 | + | + cw.visitSource("ExceptionUtils.java", null); | |
| 43 | + | + | |
| 44 | + | + mv = cw.visitMethod(ACC_PUBLIC, "<init>", "()V", null, null); | |
| 45 | + | + mv.visitCode(); | |
| 46 | + | + Label l0 = new Label(); | |
| 47 | + | + mv.visitLabel(l0); | |
| 48 | + | + mv.visitLineNumber(18, l0); | |
| 49 | + | + mv.visitVarInsn(ALOAD, 0); | |
| 50 | + | + mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V"); | |
| 51 | + | + mv.visitInsn(RETURN); | |
| 52 | + | + Label l1 = new Label(); | |
| 53 | + | + mv.visitLabel(l1); | |
| 54 | + | + mv.visitLocalVariable("this", "Lorg/codehaus/groovy/runtime/ExceptionUtils;", null, l0, l1, 0); | |
| 55 | + | + mv.visitMaxs(1, 1); | |
| 56 | + | + mv.visitEnd(); | |
| 57 | + | + | |
| 58 | + | + mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC, "sneakyThrow", "(Ljava/lang/Throwable;)V", null, null); | |
| 59 | + | + mv.visitCode(); | |
| 60 | + | + Label l2 = new Label(); | |
| 61 | + | + mv.visitLabel(l2); | |
| 62 | + | + mv.visitLineNumber(20, l2); | |
| 63 | + | + mv.visitVarInsn(ALOAD, 0); | |
| 64 | + | + mv.visitInsn(ATHROW); | |
| 65 | + | + Label l3 = new Label(); | |
| 66 | + | + mv.visitLabel(l3); | |
| 67 | + | + mv.visitLocalVariable("e", "Ljava/lang/Throwable;", null, l2, l3, 0); | |
| 68 | + | + mv.visitMaxs(1, 1); | |
| 69 | + | + mv.visitEnd(); | |
| 70 | + | + | |
| 71 | + | + cw.visitEnd(); | |
| 72 | + | + | |
| 73 | + | + LOGGER.info("Generating ExceptionUtils"); | |
| 74 | + | + byte[] bytes = cw.toByteArray(); | |
| 75 | + | + for (String classFilePath : args) { | |
| 76 | + | + File classFile = new File(classFilePath); | |
| 77 | + | + if (classFile.getParentFile().exists() || classFile.getParentFile().mkdirs()) { | |
| 78 | + | + try { | |
| 79 | + | + if (classFile.exists()) { | |
| 80 | + | + classFile.delete(); | |
| 81 | + | + } | |
| 82 | + | + BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(classFile)); | |
| 83 | + | + bos.write(bytes); | |
| 84 | + | + bos.close(); | |
| 85 | + | + } catch (IOException e) { | |
| 86 | + | + LOGGER.warning("Unable to write file "+classFile); | |
| 87 | + | + } | |
| 88 | + | + } else { | |
| 89 | + | + LOGGER.warning("Unable to create directory "+classFile.getParentFile()); | |
| 90 | + | + } | |
| 91 | + | + } | |
| 92 | + | + } | |
| 93 | + | +} | |
| 94 | + | -- | |
| 95 | + | 2.14.1 | |
| 96 | + |
java-antlr4-Add-standalone-generator.patch unknown status 1
| 1 | + | From 3b43b79da15be994348f13035474925ba592fe1f Mon Sep 17 00:00:00 2001 | |
| 2 | + | From: LEPILLER Julien <julien.lepiller@irisa.fr> | |
| 3 | + | Date: Fri, 15 Sep 2017 10:06:42 +0200 | |
| 4 | + | Subject: [PATCH] Add standalone template generator | |
| 5 | + | ||
| 6 | + | --- | |
| 7 | + | tool/src/org/antlr/v4/unicode/UnicodeRenderer.java | 33 ++++++++++++++++++++++ | |
| 8 | + | 1 file changed, 33 insertions(+) | |
| 9 | + | create mode 100644 tool/src/org/antlr/v4/unicode/UnicodeRenderer.java | |
| 10 | + | ||
| 11 | + | diff --git a/tool/src/org/antlr/v4/unicode/UnicodeRenderer.java b/tool/src/org/antlr/v4/unicode/UnicodeRenderer.java | |
| 12 | + | new file mode 100644 | |
| 13 | + | index 0000000..9e53213 | |
| 14 | + | --- /dev/null | |
| 15 | + | +++ b/tool/src/org/antlr/v4/unicode/UnicodeRenderer.java | |
| 16 | + | @@ -0,0 +1,33 @@ | |
| 17 | + | +package org.antlr.v4.unicode; | |
| 18 | + | + | |
| 19 | + | +import org.stringtemplate.v4.*; | |
| 20 | + | +import org.stringtemplate.v4.misc.ErrorBuffer; | |
| 21 | + | +import org.antlr.v4.unicode.UnicodeDataTemplateController; | |
| 22 | + | + | |
| 23 | + | +import java.io.File; | |
| 24 | + | +import java.io.FileWriter; | |
| 25 | + | +import java.io.IOException; | |
| 26 | + | +import java.util.Map; | |
| 27 | + | +import java.util.Map.Entry; | |
| 28 | + | + | |
| 29 | + | +public class UnicodeRenderer extends UnicodeDataTemplateController { | |
| 30 | + | + public static void main(String[] arg) | |
| 31 | + | + throws IOException { | |
| 32 | + | + String inputdir = arg[0]; | |
| 33 | + | + String input = arg[1]; | |
| 34 | + | + String output = arg[2]; | |
| 35 | + | + | |
| 36 | + | + FileWriter fileWriter = new FileWriter(new File(output)); | |
| 37 | + | + ErrorBuffer listener = new ErrorBuffer(); | |
| 38 | + | + | |
| 39 | + | + STGroupDir group = new STGroupDir(inputdir); | |
| 40 | + | + ST st = group.getInstanceOf(input); | |
| 41 | + | + | |
| 42 | + | + for(Entry<String, Object> entry : getProperties().entrySet()) | |
| 43 | + | + st.add(entry.getKey(), entry.getValue()); | |
| 44 | + | + | |
| 45 | + | + st.write(new AutoIndentWriter(fileWriter), listener); | |
| 46 | + | + fileWriter.flush(); | |
| 47 | + | + fileWriter.close(); | |
| 48 | + | + } | |
| 49 | + | +} | |
| 50 | + | -- | |
| 51 | + | 2.13.5 | |
| 52 | + |
java-xerces-bootclasspath.patch unknown status 1
| 1 | + | Based on https://anonscm.debian.org/viewvc/pkg-java/trunk/libxerces2-java/debian/patches/03_bootclasspath.patch?revision=14509, adopted for guix | |
| 2 | + | ||
| 3 | + | --- xerces-2_11_0/build.xml.orig 2010-11-26 21:42:11.000000000 +0100 | |
| 4 | + | +++ xerces-2_11_0/build.xml 2017-03-28 14:04:41.946606996 +0200 | |
| 5 | + | @@ -290,13 +290,14 @@ | |
| 6 | + | destdir="${build.dest}"
| |
| 7 | + | source="${javac.source}"
| |
| 8 | + | target="${javac.target}"
| |
| 9 | + | - classpath="${build.dir}/classes:${tools.dir}/${jar.apis}:${tools.dir}/${jar.resolver}:${tools.dir}/${jar.serializer}"
| |
| 10 | + | + classpath="${build.dir}/classes:${jar.jaxp}:${jar.apis-ext}:${jar.resolver}"
| |
| 11 | + | debug="${debug}" nowarn="true"
| |
| 12 | + | debuglevel="${debuglevel}"
| |
| 13 | + | deprecation="${deprecation}"
| |
| 14 | + | optimize="${optimize}"
| |
| 15 | + | includeAntRuntime="false" | |
| 16 | + | - includeJavaRuntime="false" | |
| 17 | + | + includeJavaRuntime="true" | |
| 18 | + | + bootclasspath="${jar.jaxp}:${jar.apis-ext}:${jar.resolver}"
| |
| 19 | + | excludes="org/xml/sax/** | |
| 20 | + | javax/xml/** | |
| 21 | + | org/w3c/dom/* | |
| 22 | + | @@ -1451,13 +1452,14 @@ | |
| 23 | + | destdir="${build.dest}"
| |
| 24 | + | source="${javac.source}"
| |
| 25 | + | target="${javac.target}"
| |
| 26 | + | - classpath="${build.dir}/classes:${tools.dir}/${jar.apis}:${tools.dir}/${jar.resolver}:${tools.dir}/${jar.serializer}"
| |
| 27 | + | + classpath="${build.dir}/classes:${jar.jaxp}:${jar.apis-ext}:${jar.resolver}"
| |
| 28 | + | debug="${debug}"
| |
| 29 | + | debuglevel="${debuglevel}"
| |
| 30 | + | deprecation="${deprecation}"
| |
| 31 | + | optimize="${optimize}"
| |
| 32 | + | includeAntRuntime="false" | |
| 33 | + | - includeJavaRuntime="false" | |
| 34 | + | + includeJavaRuntime="true" | |
| 35 | + | + bootclasspath="${jar.jaxp}:${jar.apis-ext}:${jar.resolver}"
| |
| 36 | + | excludes="org/xml/sax/** | |
| 37 | + | javax/xml/** | |
| 38 | + | org/w3c/dom/* |
java-xerces-build_dont_unzip.patch unknown status 1
| 1 | + | Don't unzip the sources which were bundled originally. Guix strips them from | |
| 2 | + | the source and uses pre-build packages. | |
| 3 | + | ||
| 4 | + | Taken from https://anonscm.debian.org/viewvc/pkg-java/trunk/libxerces2-java/debian/patches/02_build_dont_unzip.patch?revision=14507 | |
| 5 | + | ||
| 6 | + | Index: b/build.xml | |
| 7 | + | =================================================================== | |
| 8 | + | --- a/build.xml | |
| 9 | + | +++ b/build.xml | |
| 10 | + | @@ -247,7 +247,7 @@ | |
| 11 | + | <copy file="${src.dir}/org/apache/xerces/impl/xpath/regex/message.properties"
| |
| 12 | + | tofile="${build.src}/org/apache/xerces/impl/xpath/regex/message_en.properties"/>
| |
| 13 | + | ||
| 14 | + | - <!-- now deal with API's: --> | |
| 15 | + | + <!-- not needed for Debian | |
| 16 | + | <unzip src="${src.apis.zip}" dest="${build.src}">
| |
| 17 | + | <patternset | |
| 18 | + | includes="org/xml/sax/** | |
| 19 | + | @@ -270,6 +270,7 @@ | |
| 20 | + | org/w3c/dom/xpath/**" | |
| 21 | + | /> | |
| 22 | + | </unzip> | |
| 23 | + | + --> | |
| 24 | + | ||
| 25 | + | <!-- substitute tokens as needed --> | |
| 26 | + | <replace file="${build.dir}/src/org/apache/xerces/impl/Version.java"
| |
| 27 | + | @@ -1232,7 +1233,7 @@ | |
| 28 | + | <replace file="${build.dir}/src/org/apache/xerces/parsers/AbstractSAXParser.java"
| |
| 29 | + | token="return (fConfiguration instanceof XML11Configurable);" value="return false;"/> | |
| 30 | + | ||
| 31 | + | - <!-- now deal with API's: --> | |
| 32 | + | + <!-- not needed for Debian | |
| 33 | + | <unzip src="${src.apis.zip}" dest="${build.src}">
| |
| 34 | + | <patternset | |
| 35 | + | includes="org/xml/sax/** | |
| 36 | + | @@ -1255,7 +1256,7 @@ | |
| 37 | + | org/w3c/dom/xpath/**" | |
| 38 | + | /> | |
| 39 | + | </unzip> | |
| 40 | + | - | |
| 41 | + | + --> | |
| 42 | + | ||
| 43 | + | <!-- substitute tokens as needed --> | |
| 44 | + | <replace file="${build.dir}/src/org/apache/xerces/impl/Version.java"
|
java-xerces-manifest_classpath.patch unknown status 1
| 1 | + | Index: b/src/manifest.xerces | |
| 2 | + | =================================================================== | |
| 3 | + | --- a/src/manifest.xerces | |
| 4 | + | +++ b/src/manifest.xerces | |
| 5 | + | @@ -1,5 +1,6 @@ | |
| 6 | + | Manifest-Version: 1.0 | |
| 7 | + | Created-By: @java.version@ (@java.vendor@) | |
| 8 | + | +Class-Path: xml-apis-ext.jar xml-resolver.jar jaxp-1.4.jar | |
| 9 | + | ||
| 10 | + | Name: org/apache/xerces/impl/Version.class | |
| 11 | + | Comment: @impl.name@ |
java-xerces-xjavac_taskdef.patch unknown status 1
| 1 | + | This patch eliminates the need for providing "xjavac", which saves building a | |
| 2 | + | package for the unmaintained "xerces-tools". | |
| 3 | + | ||
| 4 | + | Taken from https://anonscm.debian.org/viewvc/pkg-java/trunk/libxerces2-java/debian/patches/01_xjavac_taskdef.patch?revision=14507 | |
| 5 | + | ||
| 6 | + | Index: b/build.xml | |
| 7 | + | =================================================================== | |
| 8 | + | --- a/build.xml | |
| 9 | + | +++ b/build.xml | |
| 10 | + | @@ -39,7 +39,7 @@ | |
| 11 | + | <property name="tools.dir" value="./tools"/> | |
| 12 | + | ||
| 13 | + | <!-- enable compilation under JDK 1.4 and above --> | |
| 14 | + | - <taskdef name="xjavac" classname="org.apache.xerces.util.XJavac"> | |
| 15 | + | + <taskdef name="xjavac" classname="org.apache.tools.ant.taskdefs.Javac"> | |
| 16 | + | <classpath> | |
| 17 | + | <pathelement location="${tools.dir}/bin/xjavac.jar"/>
| |
| 18 | + | </classpath> | |
| 19 | + | @@ -291,7 +291,7 @@ | |
| 20 | + | source="${javac.source}"
| |
| 21 | + | target="${javac.target}"
| |
| 22 | + | classpath="${build.dir}/classes:${tools.dir}/${jar.apis}:${tools.dir}/${jar.resolver}:${tools.dir}/${jar.serializer}"
| |
| 23 | + | - debug="${debug}"
| |
| 24 | + | + debug="${debug}" nowarn="true"
| |
| 25 | + | debuglevel="${debuglevel}"
| |
| 26 | + | deprecation="${deprecation}"
| |
| 27 | + | optimize="${optimize}"
| |
| 28 | + | @@ -359,7 +359,7 @@ | |
| 29 | + | source="${javac.source}"
| |
| 30 | + | target="${javac.target}"
| |
| 31 | + | classpath="${build.dir}/classes:${tools.dir}/${jar.apis}"
| |
| 32 | + | - debug="${debug}"
| |
| 33 | + | + debug="${debug}" nowarn="true"
| |
| 34 | + | debuglevel="${debuglevel}"
| |
| 35 | + | includeAntRuntime="false" | |
| 36 | + | includeJavaRuntime="true"/> | |
| 37 | + | @@ -379,7 +379,7 @@ | |
| 38 | + | source="${javac.source}"
| |
| 39 | + | target="${javac.target}"
| |
| 40 | + | classpath="${tools.dir}/${jar.apis}:${build.dir}/classes:./tools/junit.jar"
| |
| 41 | + | - debug="${debug}"
| |
| 42 | + | + debug="${debug}" nowarn="true"
| |
| 43 | + | debuglevel="${debuglevel}"
| |
| 44 | + | includeAntRuntime="false" | |
| 45 | + | includeJavaRuntime="true"/> |
more/packages/java.scm
| 2643 | 2643 | "") | |
| 2644 | 2644 | (license license:asl2.0))) | |
| 2645 | 2645 | ||
| 2646 | + | (define-public java-osgi-service-packageadmin | |
| 2647 | + | (package | |
| 2648 | + | (name "java-osgi-service-packageadmin") | |
| 2649 | + | (version "1.2.0") | |
| 2650 | + | (source (origin | |
| 2651 | + | (method url-fetch) | |
| 2652 | + | (uri (string-append "http://central.maven.org/maven2/org/osgi/" | |
| 2653 | + | "org.osgi.service.packageadmin/" | |
| 2654 | + | version "/org.osgi.service.packageadmin-" | |
| 2655 | + | version "-sources.jar")) | |
| 2656 | + | (sha256 | |
| 2657 | + | (base32 | |
| 2658 | + | "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52")))) | |
| 2659 | + | (build-system ant-build-system) | |
| 2660 | + | (arguments | |
| 2661 | + | `(#:jar-name "osgi-service-packageadmin.jar" | |
| 2662 | + | #:tests? #f)); no tests | |
| 2663 | + | (inputs | |
| 2664 | + | `(("framework" ,java-osgi-framework))) | |
| 2665 | + | (home-page "http://www.osgi.org") | |
| 2666 | + | (synopsis "") | |
| 2667 | + | (description | |
| 2668 | + | "OSGi, for Open Services Gateway initiative framework, is a module system | |
| 2669 | + | and service platform for the Java programming language. This package contains | |
| 2670 | + | the packageadmin service.") | |
| 2671 | + | (license license:asl2.0))) | |
| 2672 | + | ||
| 2646 | 2673 | (define-public java-aqute-bndlib | |
| 2647 | 2674 | (package | |
| 2648 | 2675 | (name "java-aqute-bndlib") | |
… | |||
| 5359 | 5386 | (description "") | |
| 5360 | 5387 | (license license:x11))) | |
| 5361 | 5388 | ||
| 5389 | + | (define-public java-hawtjni | |
| 5390 | + | (package | |
| 5391 | + | (name "java-hawtjni") | |
| 5392 | + | (version "1.15") | |
| 5393 | + | (source (origin | |
| 5394 | + | (method url-fetch) | |
| 5395 | + | (uri (string-append "https://github.com/fusesource/hawtjni/archive/" | |
| 5396 | + | "hawtjni-project-" version ".tar.gz")) | |
| 5397 | + | (sha256 | |
| 5398 | + | (base32 | |
| 5399 | + | "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g")))) | |
| 5400 | + | (build-system ant-build-system) | |
| 5401 | + | (arguments | |
| 5402 | + | `(#:jar-name "hawtjni.jar" | |
| 5403 | + | #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java" | |
| 5404 | + | #:tests? #f; no tests | |
| 5405 | + | #:phases | |
| 5406 | + | (modify-phases %standard-phases | |
| 5407 | + | (add-before 'build 'build-native | |
| 5408 | + | (lambda* (#:key inputs #:allow-other-keys) | |
| 5409 | + | (with-directory-excursion "hawtjni-generator/src/main/resources/" | |
| 5410 | + | (system* "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o" | |
| 5411 | + | "-fPIC" "-O2" | |
| 5412 | + | (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")) | |
| 5413 | + | (system* "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o" | |
| 5414 | + | "-fPIC" "-O2" | |
| 5415 | + | (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")) | |
| 5416 | + | (zero? (system* "gcc" "-o" "libhawtjni.so" "-shared" | |
| 5417 | + | "hawtjni.o" "hawtjni-callback.o"))))) | |
| 5418 | + | (add-after 'install 'install-native | |
| 5419 | + | (lambda* (#:key outputs #:allow-other-keys) | |
| 5420 | + | (let* ((out (assoc-ref outputs "out")) | |
| 5421 | + | (lib (string-append out "/lib")) | |
| 5422 | + | (inc (string-append out "/include"))) | |
| 5423 | + | (mkdir-p lib) | |
| 5424 | + | (mkdir-p inc) | |
| 5425 | + | (with-directory-excursion "hawtjni-generator/src/main/resources/" | |
| 5426 | + | (copy-file "libhawtjni.so" (string-append lib "/libhawtjni.so")) | |
| 5427 | + | (copy-file "hawtjni.h" (string-append inc "/hawtjni.h"))))))))) | |
| 5428 | + | (inputs | |
| 5429 | + | `(("cli" ,java-commons-cli) | |
| 5430 | + | ("asm" ,java-asm) | |
| 5431 | + | ("finder" ,java-geronimo-xbean-finder))) | |
| 5432 | + | (home-page "https://fusesource.github.io/hawtjni/") | |
| 5433 | + | (synopsis "") | |
| 5434 | + | (description "") | |
| 5435 | + | (license license:asl2.0))) | |
| 5436 | + | ||
| 5437 | + | (define-public java-jansi-native | |
| 5438 | + | (package | |
| 5439 | + | (name "java-jansi-native") | |
| 5440 | + | (version "1.7") | |
| 5441 | + | (source (origin | |
| 5442 | + | (method url-fetch) | |
| 5443 | + | (uri (string-append "https://github.com/fusesource/jansi-native/" | |
| 5444 | + | "archive/jansi-native-" version ".tar.gz")) | |
| 5445 | + | (sha256 | |
| 5446 | + | (base32 | |
| 5447 | + | "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf")))) | |
| 5448 | + | (build-system ant-build-system) | |
| 5449 | + | (arguments | |
| 5450 | + | `(#:jar-name "jansi-native.jar" | |
| 5451 | + | #:source-dir "src/main/java" | |
| 5452 | + | #:tests? #f; no tests | |
| 5453 | + | #:phases | |
| 5454 | + | (modify-phases %standard-phases | |
| 5455 | + | (add-before 'build 'build-native | |
| 5456 | + | (lambda* (#:key inputs #:allow-other-keys) | |
| 5457 | + | (substitute* "src/main/native-package/src/jansi_ttyname.c" | |
| 5458 | + | (("#include \"jansi_.*") "")) | |
| 5459 | + | ;; TODO: there are more required files for windows in windows/ | |
| 5460 | + | (with-directory-excursion "src/main/native-package/src" | |
| 5461 | + | (system* "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o" | |
| 5462 | + | (string-append "-I" (assoc-ref inputs "hawtjni") "/include") | |
| 5463 | + | (string-append "-I" (assoc-ref inputs "jdk") "/include/linux") | |
| 5464 | + | "-fPIC" "-O2") | |
| 5465 | + | (system* "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")) | |
| 5466 | + | ;; TODO: detect one of linux{32,64}, freebsd{32,64}, osx, windows{32,64} | |
| 5467 | + | (mkdir-p "build/classes/META-INF/native/linux64") | |
| 5468 | + | (copy-file "src/main/native-package/src/libjansi.so" | |
| 5469 | + | "build/classes/META-INF/native/linux64/libjansi.so"))) | |
| 5470 | + | (add-after 'install 'install-native | |
| 5471 | + | (lambda* (#:key outputs #:allow-other-keys) | |
| 5472 | + | (mkdir-p (string-append (assoc-ref outputs "out") "/bin")) | |
| 5473 | + | (copy-file "src/main/native-package/src/jansi.h" | |
| 5474 | + | (string-append (assoc-ref outputs "out") | |
| 5475 | + | "/bin/jansi.h"))))))) | |
| 5476 | + | (inputs | |
| 5477 | + | `(("hawtjni" ,java-hawtjni))) | |
| 5478 | + | (home-page "https://fusesource.github.io/jansi/") | |
| 5479 | + | (synopsis "") | |
| 5480 | + | (description "") | |
| 5481 | + | (license license:asl2.0))) | |
| 5482 | + | ||
| 5483 | + | (define-public java-jansi | |
| 5484 | + | (package | |
| 5485 | + | (name "java-jansi") | |
| 5486 | + | (version "1.16") | |
| 5487 | + | (source (origin | |
| 5488 | + | (method url-fetch) | |
| 5489 | + | (uri (string-append "https://github.com/fusesource/jansi/archive/" | |
| 5490 | + | "jansi-project-" version ".tar.gz")) | |
| 5491 | + | (sha256 | |
| 5492 | + | (base32 | |
| 5493 | + | "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z")))) | |
| 5494 | + | (build-system ant-build-system) | |
| 5495 | + | (arguments | |
| 5496 | + | `(#:jar-name "jansi.jar" | |
| 5497 | + | #:source-dir "jansi/src/main/java" | |
| 5498 | + | #:test-dir "jansi/src/test")) | |
| 5499 | + | (inputs | |
| 5500 | + | `(("jansi-native" ,java-jansi-native))) | |
| 5501 | + | (native-inputs | |
| 5502 | + | `(("junit" ,java-junit) | |
| 5503 | + | ("hamcrest" ,java-hamcrest-core))) | |
| 5504 | + | (home-page "https://fusesource.github.io/jansi/") | |
| 5505 | + | (synopsis "") | |
| 5506 | + | (description "") | |
| 5507 | + | (license license:asl2.0))) | |
| 5508 | + | ||
| 5509 | + | (define-public java-jline | |
| 5510 | + | (package | |
| 5511 | + | (name "java-jline") | |
| 5512 | + | (version "1.0") | |
| 5513 | + | (source (origin | |
| 5514 | + | (method url-fetch) | |
| 5515 | + | (uri (string-append "https://github.com/jline/jline1/archive/jline-" | |
| 5516 | + | version ".tar.gz")) | |
| 5517 | + | (sha256 | |
| 5518 | + | (base32 | |
| 5519 | + | "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir")))) | |
| 5520 | + | (build-system ant-build-system) | |
| 5521 | + | (arguments | |
| 5522 | + | `(#:jar-name "jline.jar" | |
| 5523 | + | #:source-dir "src/main/java" | |
| 5524 | + | #:test-dir "src/test" | |
| 5525 | + | #:phases | |
| 5526 | + | (modify-phases %standard-phases | |
| 5527 | + | (add-before 'build 'copy-resources | |
| 5528 | + | (lambda _ | |
| 5529 | + | (mkdir-p "build/classes/jline") | |
| 5530 | + | (for-each (lambda (f) (copy-file (string-append "src/main/resources/jline/" f) | |
| 5531 | + | (string-append "build/classes/jline/" f))) | |
| 5532 | + | '("CandidateListCompletionHandler.properties" | |
| 5533 | + | "keybindings-mac.properties" | |
| 5534 | + | "keybindings.properties" | |
| 5535 | + | "windowsbindings.properties"))))))) | |
| 5536 | + | (native-inputs | |
| 5537 | + | `(("junit" ,java-junit))) | |
| 5538 | + | (home-page "https://jline.github.io") | |
| 5539 | + | (synopsis "") | |
| 5540 | + | (description "") | |
| 5541 | + | (license license:asl2.0))) | |
| 5542 | + | ||
| 5362 | 5543 | ;; vanished from the face of the earth :/ | |
| 5363 | 5544 | (define-public java-jsonp | |
| 5364 | 5545 | (package | |
… | |||
| 5397 | 5578 | (file-name (string-append name "-" version ".tar.gz")) | |
| 5398 | 5579 | (sha256 | |
| 5399 | 5580 | (base32 | |
| 5400 | - | "15c9xmf7rhr5w4qk2jcb6swds336l4l5gyb51pcjay2ywnigk8sa")))) | |
| 5581 | + | "15c9xmf7rhr5w4qk2jcb6swds336l4l5gyb51pcjay2ywnigk8sa")) | |
| 5582 | + | (patches | |
| 5583 | + | (search-patches | |
| 5584 | + | "groovy-Add-exceptionutilsgenerator.patch")))) | |
| 5401 | 5585 | (build-system ant-build-system) | |
| 5402 | 5586 | (arguments | |
| 5403 | 5587 | `(#:jar-name "groovy.jar" | |
| 5404 | - | #:tests? #f)) | |
| 5588 | + | #:source-dir "src/main:subprojects/groovy-test/src/main/java" | |
| 5589 | + | #:tests? #f | |
| 5590 | + | #:phases | |
| 5591 | + | (modify-phases %standard-phases | |
| 5592 | + | (add-before 'build 'generate-parser | |
| 5593 | + | (lambda _ | |
| 5594 | + | (with-directory-excursion "src/main/org/codehaus/groovy/antlr/java" | |
| 5595 | + | (zero? (system* "antlr" "java.g"))) | |
| 5596 | + | (with-directory-excursion "src/main/org/codehaus/groovy/antlr" | |
| 5597 | + | (mkdir "parser") | |
| 5598 | + | (with-directory-excursion "parser" | |
| 5599 | + | (zero? (system* "antlr" "../groovy.g")))))) | |
| 5600 | + | (add-before 'build 'generate-exception-utils | |
| 5601 | + | (lambda _ | |
| 5602 | + | (system* "javac" "-cp" (getenv "CLASSPATH") | |
| 5603 | + | "config/ant/src/org/codehaus/groovy/ExceptionUtilsGenerator.java") | |
| 5604 | + | (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH") | |
| 5605 | + | ":config/ant/src") | |
| 5606 | + | "org.codehaus.groovy.ExceptionUtilsGenerator" | |
| 5607 | + | "build/classes/org/codehaus/groovy/runtime/ExceptionUtils.class"))))))) | |
| 5405 | 5608 | (native-inputs | |
| 5406 | 5609 | `(("junit" ,java-junit) | |
| 5407 | 5610 | ("antlr" ,antlr2))) | |
… | |||
| 5409 | 5612 | `(("commons-cli" ,java-commons-cli) | |
| 5410 | 5613 | ("asm" ,java-asm) | |
| 5411 | 5614 | ("servlet" ,java-tomcat) | |
| 5412 | - | ("xstream" ,java-xstream))) | |
| 5615 | + | ("xstream" ,java-xstream) | |
| 5616 | + | ("jansi" ,java-jansi) | |
| 5617 | + | ("jline" ,java-jline))) | |
| 5413 | 5618 | (home-page "") | |
| 5414 | 5619 | (synopsis "") | |
| 5415 | 5620 | (description "") | |
… | |||
| 5417 | 5622 | ;; actually CDDL 1.1 | |
| 5418 | 5623 | license:cddl1.0)))) | |
| 5419 | 5624 | ||
| 5420 | - | ;; requires jline, org.fusesource.jansi, org.livetribe, | |
| 5421 | - | ;; com.thoughtworks.xstream, org.apache.ivy, bsf | |
| 5422 | - | (define-public groovy-1.8.9 | |
| 5423 | - | (package | |
| 5424 | - | (inherit groovy) | |
| 5425 | - | (name "groovy") | |
| 5426 | - | (version "1.8.9") | |
| 5427 | - | (source (origin | |
| 5428 | - | (method url-fetch) | |
| 5429 | - | (uri (string-append "https://github.com/apache/groovy/archive/GROOVY_" | |
| 5430 | - | "1_8_9.tar.gz")) | |
| 5431 | - | (file-name (string-append name "-" version ".tar.gz")) | |
| 5432 | - | (sha256 | |
| 5433 | - | (base32 | |
| 5434 | - | "16z3jv5yw11wwwzbs6x41g83gqazhngg30ys2kpy7cpfm3rsqi71")))) | |
| 5435 | - | (arguments | |
| 5436 | - | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
| 5437 | - | #:tests? #f | |
| 5438 | - | #:source-dir "src/main/java" | |
| 5439 | - | #:phases | |
| 5440 | - | (modify-phases %standard-phases | |
| 5441 | - | (add-before 'build 'generate-parser | |
| 5442 | - | (lambda _ | |
| 5443 | - | (with-directory-excursion "src/main/org/codehaus/groovy/antlr/java" | |
| 5444 | - | (zero? (system* "antlr" "java.g")))))))))) | |
| 5445 | - | ||
| 5446 | - | (define-public groovy-1.0 | |
| 5447 | - | (package | |
| 5448 | - | (inherit groovy) | |
| 5449 | - | (name "groovy") | |
| 5450 | - | (version "1.0") | |
| 5451 | - | (source (origin | |
| 5452 | - | (method url-fetch) | |
| 5453 | - | (uri (string-append "https://github.com/apache/groovy/archive/GROOVY_" | |
| 5454 | - | "1_0.tar.gz")) | |
| 5455 | - | (file-name (string-append name "-" version ".tar.gz")) | |
| 5456 | - | (sha256 | |
| 5457 | - | (base32 | |
| 5458 | - | "0v2nygblrvzjbdnz1l14dm167g4865d1iwxlpr909fsc4784lv1v")))) | |
| 5459 | - | (arguments | |
| 5460 | - | `(#:jar-name (string-append ,name "-" ,version ".jar") | |
| 5461 | - | #:tests? #f | |
| 5462 | - | #:source-dir "src/main" | |
| 5463 | - | #:phases | |
| 5464 | - | (modify-phases %standard-phases | |
| 5465 | - | (add-before 'build 'generate-parser | |
| 5466 | - | (lambda _ | |
| 5467 | - | (with-directory-excursion "src/main/org/codehaus/groovy/antlr" | |
| 5468 | - | (zero? (system* "antlr" "groovy.g")))))))))) | |
| 5469 | - | ||
| 5470 | - | ||
| 5471 | 5625 | ;(define-public antlr3-3.4 | |
| 5472 | 5626 | ; (package | |
| 5473 | 5627 | ; (name "antlr3") | |
… | |||
| 6054 | 6208 | (description "") | |
| 6055 | 6209 | (license license:asl2.0))) | |
| 6056 | 6210 | ||
| 6211 | + | (define-public java-geronimo-xbean-bundleutils | |
| 6212 | + | (package | |
| 6213 | + | (inherit java-geronimo-xbean-reflect) | |
| 6214 | + | (name "java-geronimo-xbean-bundleutils") | |
| 6215 | + | (arguments | |
| 6216 | + | `(#:jar-name "geronimo-xbean-bundleutils.jar" | |
| 6217 | + | #:source-dir "xbean-bundleutils/src/main/java" | |
| 6218 | + | #:test-dir "xbean-bundleutils/src/test" | |
| 6219 | + | #:phases | |
| 6220 | + | (modify-phases %standard-phases | |
| 6221 | + | (add-before 'build 'fix-java | |
| 6222 | + | (lambda _ | |
| 6223 | + | (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java" | |
| 6224 | + | (("import org.osgi.framework.ServiceRegistration;") | |
| 6225 | + | (string-append "import org.osgi.framework.ServiceRegistration;\n" | |
| 6226 | + | "import org.osgi.framework.ServiceFactory;\n" | |
| 6227 | + | "import java.util.Collection;\n" | |
| 6228 | + | "import org.osgi.framework.ServiceObjects;")) | |
| 6229 | + | (("public Bundle getBundle\\(\\)") | |
| 6230 | + | (string-append "@Override\n" | |
| 6231 | + | "public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {\n" | |
| 6232 | + | " throw new UnsupportedOperationException();\n" | |
| 6233 | + | "}\n" | |
| 6234 | + | "@Override\n" | |
| 6235 | + | "public <S> ServiceRegistration<S> registerService(Class<S> clazz, ServiceFactory<S> factory, Dictionary<String, ?> properties) {" | |
| 6236 | + | " throw new UnsupportedOperationException();\n" | |
| 6237 | + | "}\n" | |
| 6238 | + | "public Bundle getBundle()")))))))) | |
| 6239 | + | (inputs | |
| 6240 | + | `(("slf4j" ,java-slf4j-api) | |
| 6241 | + | ("asm" ,java-asm) | |
| 6242 | + | ("framework" ,java-osgi-framework) | |
| 6243 | + | ("eclipse-osgi" ,java-eclipse-osgi) | |
| 6244 | + | ("packageadmin" ,java-osgi-service-packageadmin))))) | |
| 6245 | + | ||
| 6246 | + | (define-public java-geronimo-xbean-asm-util | |
| 6247 | + | (package | |
| 6248 | + | (inherit java-geronimo-xbean-reflect) | |
| 6249 | + | (name "java-geronimo-xbean-asm-util") | |
| 6250 | + | (arguments | |
| 6251 | + | `(#:jar-name "geronimo-xbean-asm-util.jar" | |
| 6252 | + | #:source-dir "xbean-asm-util/src/main/java" | |
| 6253 | + | #:tests? #f)); no tests | |
| 6254 | + | (inputs | |
| 6255 | + | `(("asm" ,java-asm))))) | |
| 6256 | + | ||
| 6257 | + | (define-public java-geronimo-xbean-finder | |
| 6258 | + | (package | |
| 6259 | + | (inherit java-geronimo-xbean-reflect) | |
| 6260 | + | (name "java-geronimo-xbean-finder") | |
| 6261 | + | (arguments | |
| 6262 | + | `(#:jar-name "geronimo-xbean-finder.jar" | |
| 6263 | + | #:source-dir "xbean-finder/src/main/java" | |
| 6264 | + | #:test-dir "xbean-finder/src/test")) | |
| 6265 | + | (inputs | |
| 6266 | + | `(("slf4j" ,java-slf4j-api) | |
| 6267 | + | ("asm" ,java-asm) | |
| 6268 | + | ("bundleutils" ,java-geronimo-xbean-bundleutils) | |
| 6269 | + | ("asm-util" ,java-geronimo-xbean-asm-util) | |
| 6270 | + | ("packageadmin" ,java-osgi-service-packageadmin) | |
| 6271 | + | ("framework" ,java-osgi-framework))) | |
| 6272 | + | (native-inputs | |
| 6273 | + | `(("junit" ,java-junit) | |
| 6274 | + | ("hamcrest" ,java-hamcrest-core))))) | |
| 6275 | + | ||
| 6057 | 6276 | (define-public java-plexus-io | |
| 6058 | 6277 | (package | |
| 6059 | 6278 | (name "java-plexus-io") | |