Fridrich Strba 2023-09-28 16:51:01 +00:00 committed by Git OBS Bridge
parent 137eb8d6ab
commit ef52779993
3 changed files with 33 additions and 5 deletions

27
scala-2.10.7-jdk15.patch Normal file
View File

@ -0,0 +1,27 @@
--- scala-2.10.7/src/compiler/scala/tools/ant/antlib.xml 2023-09-28 18:35:06.147897841 +0200
+++ scala-2.10.7/src/compiler/scala/tools/ant/antlib.xml 2023-09-28 18:47:47.202949642 +0200
@@ -13,6 +13,4 @@
classname="scala.tools.ant.ScalaTool"/>
<taskdef name="same"
classname="scala.tools.ant.Same"/>
- <taskdef name="pack200"
- classname="scala.tools.ant.Pack200Task"/>
</antlib>
Only in scala-2.10.7/src/compiler/scala/tools/ant: Pack200Task.scala
--- scala-2.10.7/src/library/scala/collection/mutable/StringBuilder.scala 2023-09-28 18:35:06.187898108 +0200
+++ scala-2.10.7/src/library/scala/collection/mutable/StringBuilder.scala 2023-09-28 18:49:06.536809546 +0200
@@ -437,6 +437,14 @@
* @return the string assembled by this StringBuilder
*/
def result(): String = toString
+
+ /** Tests whether this builder is empty.
+ *
+ * This method is required for JDK15+ compatibility
+ *
+ * @return `true` if this builder contains nothing, `false` otherwise.
+ */
+ override def isEmpty: Boolean = underlying.length() == 0
}
object StringBuilder {

View File

@ -7,7 +7,7 @@ Index: scala-2.10.7/build.xml
classpath="${@{project}-classes}"
includes="**/*.java"
- target="1.6" source="1.5"
+ target="1.6" source="1.6"
+ target="1.8" source="1.8"
compiler="javac1.6"
includeantruntime="false" >
<compilerarg line="${javac.args} @{args}"/>
@ -16,7 +16,7 @@ Index: scala-2.10.7/build.xml
excludes="@{excludes}"
includeantruntime="false"
- target="1.6" source="1.5">
+ target="1.6" source="1.6">
+ target="1.8" source="1.8">
<compilerarg line="${javac.args} @{args}"/>
<classpath refid="@{stage}.@{destproject}.build.path"/>
</javac>

View File

@ -60,6 +60,7 @@ Patch9: scala-2.10.6-scaladoc-resources.patch
Patch10: scala-2.10.7-source6.patch
Patch11: scala-2.10.7-lines.patch
Patch12: scala-2.10.7-java8compat.patch
Patch13: scala-2.10.7-jdk15.patch
BuildRequires: ant
BuildRequires: ant-contrib
BuildRequires: ant-junit
@ -69,9 +70,6 @@ BuildRequires: java-devel >= 1.7
BuildRequires: javapackages-local
BuildRequires: jline >= 2.10
BuildRequires: junit
BuildConflicts: java >= 9
BuildConflicts: java-devel >= 9
BuildConflicts: java-headless >= 9
Requires: jansi
Requires: java-headless >= 1.7
# Require full javapackages-tools since scripts use
@ -154,9 +152,12 @@ the Scala ant tasks.
%patch10 -p1 -b .source6
%patch11 -p1 -b .jdk11
%patch12 -p1 -b .java8compat
%patch13 -p1 -b .jdk15
echo "starr.version=2.10.4\nstarr.use.released=0" > starr.number
rm -f src/compiler/scala/tools/ant/Pack200Task.scala
pushd src
rm -rf jline
popd