diff --git a/groovy18-timestamp.patch b/groovy18-timestamp.patch index e795acf..220f92a 100644 --- a/groovy18-timestamp.patch +++ b/groovy18-timestamp.patch @@ -22,6 +22,24 @@ public void visit(ASTNode[] astNodes, SourceUnit sourceUnit) { +--- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/classgen/Verifier.java 2023-09-15 00:14:26.176051747 +0200 ++++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/classgen/Verifier.java 2023-09-15 00:14:20.536016445 +0200 +@@ -432,13 +432,13 @@ + ClassHelper.long_TYPE, + //"", + node, +- new ConstantExpression(System.currentTimeMillis())); ++ new ConstantExpression((System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date()).getTime())); + // alternatively, FieldNode timeTagField = SourceUnit.createFieldNode("public static final long __timeStamp = " + System.currentTimeMillis() + "L"); + timeTagField.setSynthetic(true); + node.addField(timeTagField); + + timeTagField = new FieldNode( +- Verifier.__TIMESTAMP__ + String.valueOf(System.currentTimeMillis()), ++ Verifier.__TIMESTAMP__ + String.valueOf((System.getenv("SOURCE_DATE_EPOCH") != null ? new Date(1000 * Long.parseLong(System.getenv("SOURCE_DATE_EPOCH"))) : new Date()).getTime()), + ACC_PUBLIC | ACC_STATIC | ACC_SYNTHETIC, + ClassHelper.long_TYPE, + //"", --- groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html 2023-09-14 17:55:59.569563087 +0200 +++ groovy-core-GROOVY_1_8_9/src/main/org/codehaus/groovy/tools/groovydoc/gstringTemplates/classLevel/classDocName.html 2023-09-14 21:15:34.220475678 +0200 @@ -62,9 +62,8 @@ diff --git a/groovy18.spec b/groovy18.spec index 63a293f..c0ec125 100644 --- a/groovy18.spec +++ b/groovy18.spec @@ -190,7 +190,7 @@ export CLASSPATH=$(build-classpath ant/ant-antlr) %if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0} export ANT_OPTS="--add-opens=java.base/java.lang=ALL-UNNAMED" %endif -%ant -v -DskipTests=on -DskipExamples=on -DskipFetch=on -DskipEmbeddable=on \ +%ant -DskipTests=on -DskipExamples=on -DskipFetch=on -DskipEmbeddable=on \ createJars javadoc %install