This commit is contained in:
parent
508864a4e7
commit
aadf5889d5
19
_service
Normal file
19
_service
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<services>
|
||||||
|
<service name="tar_scm" mode="disabled">
|
||||||
|
<param name="scm">git</param>
|
||||||
|
<param name="url">git://github.com/scala/scala.git</param>
|
||||||
|
<param name="revision">v2.10.7</param>
|
||||||
|
<param name="versionformat">2.10.7</param>
|
||||||
|
<param name="filename">scala</param>
|
||||||
|
<param name="exclude">lib/*.jar</param>
|
||||||
|
<param name="exclude">lib/ant/*.jar</param>
|
||||||
|
<param name="exclude">test</param>
|
||||||
|
<param name="exclude">tools/*jar</param>
|
||||||
|
<param name="exclude">src/compiler/scala/tools/nsc/doc/html/resource/lib</param>
|
||||||
|
</service>
|
||||||
|
<service name="recompress" mode="disabled">
|
||||||
|
<param name="file">*.tar</param>
|
||||||
|
<param name="compression">xz</param>
|
||||||
|
</service>
|
||||||
|
<service name="set_version" mode="disabled"/>
|
||||||
|
</services>
|
@ -1,26 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
name=scala
|
|
||||||
version="$(sed -n 's/Version:\s*//p' *.spec)"
|
|
||||||
|
|
||||||
# RETRIEVE
|
|
||||||
wget "https://github.com/scala/scala/archive/v${version}.tar.gz" -O "${name}-${version}.orig.tar.gz"
|
|
||||||
|
|
||||||
rm -rf tarball-tmp
|
|
||||||
mkdir tarball-tmp
|
|
||||||
cd tarball-tmp
|
|
||||||
tar xf "../${name}-${version}.orig.tar.gz"
|
|
||||||
|
|
||||||
# CLEAN TARBALL
|
|
||||||
find -name '*.jar' -delete
|
|
||||||
find -name '*.class' -delete
|
|
||||||
# Possibly proprietary code
|
|
||||||
find -name '*.dll' -delete
|
|
||||||
find -name '*.so' -delete
|
|
||||||
# Contains minified js of uncertain origin
|
|
||||||
rm -r */src/compiler/scala/tools/nsc/doc/html/resource/lib
|
|
||||||
|
|
||||||
tar czf "../${name}-${version}.tar.gz" *
|
|
||||||
cd ..
|
|
||||||
rm -r tarball-tmp "${name}-${version}.orig.tar.gz"
|
|
@ -1,21 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -x
|
|
||||||
|
|
||||||
VER="$(sed -n 's/Version:\s*//p' *.spec)"
|
|
||||||
|
|
||||||
FNS=scala-$VER
|
|
||||||
|
|
||||||
rm -rf $FNS/
|
|
||||||
git clone git://github.com/scala/scala.git $FNS
|
|
||||||
cd $FNS
|
|
||||||
git checkout v$VER
|
|
||||||
git log --pretty=format:"%H%n%ci" v$VER | head -n 2 | \
|
|
||||||
sed -e 's/\-//g' -e 's/\s\+.*//g' >../scala.gitinfo
|
|
||||||
cd ..
|
|
||||||
tar -zcf $FNS.tgz --exclude $FNS/.git $FNS/
|
|
||||||
cd $FNS
|
|
||||||
./pull-binary-libs.sh
|
|
||||||
rm -rf lib/jline.jar
|
|
||||||
tar -zcf ../$FNS-bootstrap.tgz --exclude .git lib/*.jar
|
|
||||||
cd ..
|
|
||||||
rm -rf $FNS/
|
|
@ -1,8 +1,6 @@
|
|||||||
diff --git a/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala b/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala
|
--- scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala 2019-11-27 16:04:03.141644641 +0100
|
||||||
index 10f9724..2970276 100644
|
+++ scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala 2019-11-27 16:04:24.461764259 +0100
|
||||||
--- a/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala
|
@@ -45,7 +45,7 @@
|
||||||
+++ b/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala
|
|
||||||
@@ -42,7 +42,7 @@ class JLineReader(_completion: => Completion) extends InteractiveReader {
|
|
||||||
def readOneKey(prompt: String) = {
|
def readOneKey(prompt: String) = {
|
||||||
this.print(prompt)
|
this.print(prompt)
|
||||||
this.flush()
|
this.flush()
|
||||||
@ -11,24 +9,20 @@ index 10f9724..2970276 100644
|
|||||||
}
|
}
|
||||||
def eraseLine() = consoleReader.resetPromptLine("", "", 0)
|
def eraseLine() = consoleReader.resetPromptLine("", "", 0)
|
||||||
def redrawLineAndFlush(): Unit = { flush() ; drawLine() ; flush() }
|
def redrawLineAndFlush(): Unit = { flush() ; drawLine() ; flush() }
|
||||||
diff --git a/src/compiler/scala/tools/nsc/interpreter/session/FileBackedHistory.scala b/src/compiler/scala/tools/nsc/interpreter/session/FileBackedHistory.scala
|
--- scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/session/FileBackedHistory.scala 2019-11-27 16:04:03.141644641 +0100
|
||||||
index dddfb1b..e598ac5 100644
|
+++ scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/session/FileBackedHistory.scala 2019-11-27 16:05:14.034042924 +0100
|
||||||
--- a/src/compiler/scala/tools/nsc/interpreter/session/FileBackedHistory.scala
|
@@ -15,7 +15,7 @@
|
||||||
+++ b/src/compiler/scala/tools/nsc/interpreter/session/FileBackedHistory.scala
|
|
||||||
@@ -13,7 +13,7 @@ import FileBackedHistory._
|
|
||||||
/** TODO: file locking.
|
/** TODO: file locking.
|
||||||
*/
|
*/
|
||||||
trait FileBackedHistory extends JLineHistory with JPersistentHistory {
|
trait FileBackedHistory extends JLineHistory with JPersistentHistory {
|
||||||
- def maxSize: Int
|
- def maxSize: Int
|
||||||
+ def maxSize: Int = 2500
|
+ def maxSize: Int = 2500
|
||||||
protected lazy val historyFile: File = defaultFile
|
|
||||||
private var isPersistent = true
|
|
||||||
|
|
||||||
diff --git a/src/compiler/scala/tools/nsc/interpreter/session/JLineHistory.scala b/src/compiler/scala/tools/nsc/interpreter/session/JLineHistory.scala
|
// For a history file in the standard location, always try to restrict permission,
|
||||||
index 18e0ee7..fc33192 100644
|
// creating an empty file if none exists.
|
||||||
--- a/src/compiler/scala/tools/nsc/interpreter/session/JLineHistory.scala
|
--- scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/session/JLineHistory.scala 2019-11-27 16:04:03.141644641 +0100
|
||||||
+++ b/src/compiler/scala/tools/nsc/interpreter/session/JLineHistory.scala
|
+++ scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/session/JLineHistory.scala 2019-11-27 16:04:24.461764259 +0100
|
||||||
@@ -13,7 +13,6 @@ package session
|
@@ -13,7 +13,6 @@
|
||||||
trait JLineHistory extends JHistory with History {
|
trait JLineHistory extends JHistory with History {
|
||||||
def size: Int
|
def size: Int
|
||||||
def isEmpty: Boolean
|
def isEmpty: Boolean
|
||||||
@ -36,7 +30,7 @@ index 18e0ee7..fc33192 100644
|
|||||||
def clear(): Unit
|
def clear(): Unit
|
||||||
def get(index: Int): CharSequence
|
def get(index: Int): CharSequence
|
||||||
def add(line: CharSequence): Unit
|
def add(line: CharSequence): Unit
|
||||||
@@ -42,7 +41,8 @@ object JLineHistory {
|
@@ -42,7 +41,8 @@
|
||||||
addLineToFile(item)
|
addLineToFile(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -46,11 +40,9 @@ index 18e0ee7..fc33192 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
def apply(): JLineHistory = try new JLineFileHistory catch { case x: Exception => new SimpleHistory() }
|
def apply(): JLineHistory = try new JLineFileHistory catch { case x: Exception => new SimpleHistory() }
|
||||||
diff --git a/src/compiler/scala/tools/nsc/interpreter/session/SimpleHistory.scala b/src/compiler/scala/tools/nsc/interpreter/session/SimpleHistory.scala
|
--- scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/session/SimpleHistory.scala 2019-11-27 16:04:03.141644641 +0100
|
||||||
index 9f4e2b9..8933849 100644
|
+++ scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/session/SimpleHistory.scala 2019-11-27 16:04:24.461764259 +0100
|
||||||
--- a/src/compiler/scala/tools/nsc/interpreter/session/SimpleHistory.scala
|
@@ -10,7 +10,7 @@
|
||||||
+++ b/src/compiler/scala/tools/nsc/interpreter/session/SimpleHistory.scala
|
|
||||||
@@ -10,7 +10,7 @@ package session
|
|
||||||
import scala.collection.mutable.{ Buffer, ListBuffer }
|
import scala.collection.mutable.{ Buffer, ListBuffer }
|
||||||
import scala.collection.JavaConverters._
|
import scala.collection.JavaConverters._
|
||||||
|
|
||||||
@ -59,7 +51,7 @@ index 9f4e2b9..8933849 100644
|
|||||||
private var _index: Int = 0
|
private var _index: Int = 0
|
||||||
private val buf: Buffer[String] = new ListBuffer[String]
|
private val buf: Buffer[String] = new ListBuffer[String]
|
||||||
private def toEntries(): Seq[JEntry] = buf.zipWithIndex map { case (x, i) => Entry(i, x) }
|
private def toEntries(): Seq[JEntry] = buf.zipWithIndex map { case (x, i) => Entry(i, x) }
|
||||||
@@ -32,27 +32,27 @@ class SimpleHistory extends JLineHistory {
|
@@ -32,27 +32,27 @@
|
||||||
def maxSize: Int = 2500
|
def maxSize: Int = 2500
|
||||||
def last = if (isEmpty) fail("last") else buf.last
|
def last = if (isEmpty) fail("last") else buf.last
|
||||||
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:dc73608f70f4339bd9fbaec71b029d7e8d41007d80a18837e77a21d261af9a76
|
|
||||||
size 27218643
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:b46db638c5c6066eee21f00c447fc13d1dfedbfb60d07db544e79db67ba810c3
|
|
||||||
size 29937534
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:4b5effeefd1da8bab690f5c1251ed9da1dd2d8f375a2aa6deaa08aa1dca9dfd8
|
|
||||||
size 5490733
|
|
147
scala-2.10.7-jdk11.patch
Normal file
147
scala-2.10.7-jdk11.patch
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
--- scala-2.10.7/src/compiler/scala/tools/cmd/gen/AnyVals.scala 2017-11-01 04:52:36.000000000 +0100
|
||||||
|
+++ scala-2.10.7/src/compiler/scala/tools/cmd/gen/AnyVals.scala 2019-11-28 13:37:03.940143371 +0100
|
||||||
|
@@ -183,7 +183,7 @@
|
||||||
|
}
|
||||||
|
def objectLines = {
|
||||||
|
val comp = if (isCardinal) cardinalCompanion else floatingCompanion
|
||||||
|
- (comp + allCompanions + "\n" + nonUnitCompanions).trim.lines.toList ++ implicitCoercions map interpolate
|
||||||
|
+ (comp + allCompanions + "\n" + nonUnitCompanions).trim.linesIterator.toList ++ implicitCoercions map interpolate
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Makes a set of binary operations based on the given set of ops, args, and resultFn.
|
||||||
|
@@ -225,7 +225,7 @@
|
||||||
|
def representation = repr.map(", a " + _).getOrElse("")
|
||||||
|
|
||||||
|
def indent(s: String) = if (s == "") "" else " " + s
|
||||||
|
- def indentN(s: String) = s.lines map indent mkString "\n"
|
||||||
|
+ def indentN(s: String) = s.linesIterator map indent mkString "\n"
|
||||||
|
|
||||||
|
def boxUnboxImpls = Map(
|
||||||
|
"@boxImpl@" -> "%s.valueOf(x)".format(boxedName),
|
||||||
|
@@ -453,9 +453,9 @@
|
||||||
|
def ^(x: Boolean): Boolean
|
||||||
|
|
||||||
|
override def getClass(): Class[Boolean] = null
|
||||||
|
- """.trim.lines.toList
|
||||||
|
+ """.trim.linesIterator.toList
|
||||||
|
|
||||||
|
- def objectLines = interpolate(allCompanions + "\n" + nonUnitCompanions).lines.toList
|
||||||
|
+ def objectLines = interpolate(allCompanions + "\n" + nonUnitCompanions).linesIterator.toList
|
||||||
|
}
|
||||||
|
object U extends AnyValRep("Unit", None, "void") {
|
||||||
|
override def classDoc = """
|
||||||
|
@@ -468,7 +468,7 @@
|
||||||
|
def classLines = List(
|
||||||
|
"""override def getClass(): Class[Unit] = null"""
|
||||||
|
)
|
||||||
|
- def objectLines = interpolate(allCompanions).lines.toList
|
||||||
|
+ def objectLines = interpolate(allCompanions).linesIterator.toList
|
||||||
|
|
||||||
|
override def boxUnboxImpls = Map(
|
||||||
|
"@boxImpl@" -> "scala.runtime.BoxedUnit.UNIT",
|
||||||
|
--- scala-2.10.7/src/compiler/scala/tools/nsc/doc/base/CommentFactoryBase.scala 2017-11-01 04:52:36.000000000 +0100
|
||||||
|
+++ scala-2.10.7/src/compiler/scala/tools/nsc/doc/base/CommentFactoryBase.scala 2019-11-28 13:38:10.892515720 +0100
|
||||||
|
@@ -209,7 +209,7 @@
|
||||||
|
SafeTags.replaceAllIn(javadoclessComment, { mtch =>
|
||||||
|
java.util.regex.Matcher.quoteReplacement(safeTagMarker + mtch.matched + safeTagMarker)
|
||||||
|
})
|
||||||
|
- markedTagComment.lines.toList map (cleanLine(_))
|
||||||
|
+ markedTagComment.linesIterator.toList map (cleanLine(_))
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Parses a comment (in the form of a list of lines) to a `Comment`
|
||||||
|
--- scala-2.10.7/src/compiler/scala/tools/nsc/interactive/tests/InteractiveTestSettings.scala 2017-11-01 04:52:36.000000000 +0100
|
||||||
|
+++ scala-2.10.7/src/compiler/scala/tools/nsc/interactive/tests/InteractiveTestSettings.scala 2019-11-28 13:39:14.716870692 +0100
|
||||||
|
@@ -58,7 +58,7 @@
|
||||||
|
val str = try File(optsFile).slurp() catch {
|
||||||
|
case e: java.io.IOException => ""
|
||||||
|
}
|
||||||
|
- str.lines.filter(!_.startsWith(CommentStartDelimiter)).mkString(" ")
|
||||||
|
+ str.linesIterator.filter(!_.startsWith(CommentStartDelimiter)).mkString(" ")
|
||||||
|
}
|
||||||
|
|
||||||
|
override protected def printClassPath(implicit reporter: Reporter) {
|
||||||
|
--- scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/AbstractFileClassLoader.scala 2017-11-01 04:52:36.000000000 +0100
|
||||||
|
+++ scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/AbstractFileClassLoader.scala 2019-11-28 13:57:53.339092518 +0100
|
||||||
|
@@ -85,7 +85,7 @@
|
||||||
|
defineClass(name, bytes, 0, bytes.length)
|
||||||
|
}
|
||||||
|
|
||||||
|
- private val packages = mutable.Map[String, Package]()
|
||||||
|
+ private val whatever = mutable.Map[String, Package]()
|
||||||
|
|
||||||
|
override def definePackage(name: String, specTitle: String, specVersion: String, specVendor: String, implTitle: String, implVersion: String, implVendor: String, sealBase: URL): Package = {
|
||||||
|
throw new UnsupportedOperationException()
|
||||||
|
@@ -94,7 +94,7 @@
|
||||||
|
override def getPackage(name: String): Package = {
|
||||||
|
findAbstractDir(name) match {
|
||||||
|
case null => super.getPackage(name)
|
||||||
|
- case file => packages.getOrElseUpdate(name, {
|
||||||
|
+ case file => whatever.getOrElseUpdate(name, {
|
||||||
|
val ctor = classOf[Package].getDeclaredConstructor(classOf[String], classOf[String], classOf[String], classOf[String], classOf[String], classOf[String], classOf[String], classOf[URL], classOf[ClassLoader])
|
||||||
|
ctor.setAccessible(true)
|
||||||
|
ctor.newInstance(name, null, null, null, null, null, null, null, this)
|
||||||
|
--- scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/Formatting.scala 2017-11-01 04:52:36.000000000 +0100
|
||||||
|
+++ scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/Formatting.scala 2019-11-28 13:43:44.162369415 +0100
|
||||||
|
@@ -25,7 +25,7 @@
|
||||||
|
def indentCode(code: String) = {
|
||||||
|
val indent = spaces(code)
|
||||||
|
stringFromWriter(str =>
|
||||||
|
- for (line <- code.lines) {
|
||||||
|
+ for (line <- code.linesIterator) {
|
||||||
|
str print indent
|
||||||
|
str print (line + "\n")
|
||||||
|
str.flush()
|
||||||
|
--- scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/IMain.scala 2017-11-01 04:52:36.000000000 +0100
|
||||||
|
+++ scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/IMain.scala 2019-11-28 13:47:12.735529430 +0100
|
||||||
|
@@ -454,7 +454,7 @@
|
||||||
|
// enclosing in braces it is constructed like "val x =\n5 // foo".
|
||||||
|
private def removeComments(line: String): String = {
|
||||||
|
showCodeIfDebugging(line) // as we're about to lose our // show
|
||||||
|
- line.lines map (s => s indexOf "//" match {
|
||||||
|
+ line.linesIterator map (s => s indexOf "//" match {
|
||||||
|
case -1 => s
|
||||||
|
case idx => s take idx
|
||||||
|
}) mkString "\n"
|
||||||
|
@@ -580,7 +580,7 @@
|
||||||
|
if (printResults && result != "")
|
||||||
|
printMessage(result stripSuffix "\n")
|
||||||
|
else if (isReplDebug) // show quiet-mode activity
|
||||||
|
- printMessage(result.trim.lines map ("[quiet] " + _) mkString "\n")
|
||||||
|
+ printMessage(result.trim.linesIterator map ("[quiet] " + _) mkString "\n")
|
||||||
|
|
||||||
|
// Book-keeping. Have to record synthetic requests too,
|
||||||
|
// as they may have been issued for information, e.g. :type
|
||||||
|
@@ -1161,8 +1161,8 @@
|
||||||
|
/** Secret bookcase entrance for repl debuggers: end the line
|
||||||
|
* with "// show" and see what's going on.
|
||||||
|
*/
|
||||||
|
- def isShow = code.lines exists (_.trim endsWith "// show")
|
||||||
|
- def isShowRaw = code.lines exists (_.trim endsWith "// raw")
|
||||||
|
+ def isShow = code.linesIterator exists (_.trim endsWith "// show")
|
||||||
|
+ def isShowRaw = code.linesIterator exists (_.trim endsWith "// raw")
|
||||||
|
|
||||||
|
// old style
|
||||||
|
beSilentDuring(parse(code)) foreach { ts =>
|
||||||
|
--- scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/Power.scala 2017-11-01 04:52:36.000000000 +0100
|
||||||
|
+++ scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/Power.scala 2019-11-28 13:46:26.087269973 +0100
|
||||||
|
@@ -150,7 +150,7 @@
|
||||||
|
// Then we import everything from $r.
|
||||||
|
intp interpret ("import " + intp.pathToTerm("$r") + "._")
|
||||||
|
// And whatever else there is to do.
|
||||||
|
- init.lines foreach (intp interpret _)
|
||||||
|
+ init.linesIterator foreach (intp interpret _)
|
||||||
|
}
|
||||||
|
def valsDescription: String = {
|
||||||
|
def to_str(m: Symbol) = "%12s %s".format(
|
||||||
|
--- scala-2.10.7/src/scalacheck/org/scalacheck/Pretty.scala 2017-11-01 04:52:36.000000000 +0100
|
||||||
|
+++ scala-2.10.7/src/scalacheck/org/scalacheck/Pretty.scala 2019-11-28 14:07:48.018400196 +0100
|
||||||
|
@@ -45,7 +45,7 @@
|
||||||
|
else s.substring(0, length) / break(lead+s.substring(length), lead, length)
|
||||||
|
|
||||||
|
def format(s: String, lead: String, trail: String, width: Int) =
|
||||||
|
- s.lines.map(l => break(lead+l+trail, " ", width)).mkString("\n")
|
||||||
|
+ s.linesIterator.map(l => break(lead+l+trail, " ", width)).mkString("\n")
|
||||||
|
|
||||||
|
implicit def prettyAny(t: Any) = Pretty { p => t.toString }
|
||||||
|
|
20
scala-2.10.7-source6.patch
Normal file
20
scala-2.10.7-source6.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- scala-2.10.7/build.xml 2019-11-27 17:42:56.487021401 +0100
|
||||||
|
+++ scala-2.10.7/build.xml 2019-11-27 17:43:39.491264930 +0100
|
||||||
|
@@ -757,7 +757,7 @@
|
||||||
|
destdir="${@{project}-classes}"
|
||||||
|
classpath="${@{project}-classes}"
|
||||||
|
includes="**/*.java"
|
||||||
|
- target="1.6" source="1.5"
|
||||||
|
+ target="1.6" source="1.6"
|
||||||
|
compiler="javac1.6"
|
||||||
|
includeantruntime="false" >
|
||||||
|
<compilerarg line="${javac.args} @{args}"/>
|
||||||
|
@@ -793,7 +793,7 @@
|
||||||
|
includes="**/*.java"
|
||||||
|
excludes="@{excludes}"
|
||||||
|
includeantruntime="false"
|
||||||
|
- target="1.6" source="1.5">
|
||||||
|
+ target="1.6" source="1.6">
|
||||||
|
<compilerarg line="${javac.args} @{args}"/>
|
||||||
|
<classpath refid="@{stage}.@{destproject}.build.path"/>
|
||||||
|
</javac>
|
BIN
scala-2.10.7.tar.xz
(Stored with Git LFS)
Normal file
BIN
scala-2.10.7.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
3
scala-2.10.7.tgz
Normal file
3
scala-2.10.7.tgz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:9283119916f6bb7714e076a2840ccf22d58819b355228ed1591ae6f76929f111
|
||||||
|
size 29993772
|
@ -1,152 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<!-- scala 2.10.0-RC3 build file by gil -->
|
|
||||||
<!-- for rebuild only this scala components -->
|
|
||||||
<project name="scala-components" basedir=".">
|
|
||||||
|
|
||||||
<property name="version" value="2.10.0-RC3"/>
|
|
||||||
<property name="lib.dir" value="${basedir}/lib"/>
|
|
||||||
|
|
||||||
<property name="fjbg.dir" value="${basedir}/fjbg"/>
|
|
||||||
<property name="fjbg.src.dir" value="${basedir}/src/fjbg"/>
|
|
||||||
<property name="fjbg.build.dir" value="${fjbg.dir}/classes"/>
|
|
||||||
<property name="fjbg.jar" value="${basedir}/lib/fjbg.jar"/>
|
|
||||||
|
|
||||||
<property name="forkjoin.dir" value="${basedir}/forkjoin"/>
|
|
||||||
<property name="forkjoin.src.dir" value="${basedir}/src/forkjoin"/>
|
|
||||||
<property name="forkjoin.build.dir" value="${forkjoin.dir}/classes"/>
|
|
||||||
<property name="forkjoin.jar" value="${basedir}/lib/forkjoin.jar"/>
|
|
||||||
|
|
||||||
<property name="msil.dir" value="${basedir}/msil"/>
|
|
||||||
<property name="msil.src.dir" value="${basedir}/src/msil"/>
|
|
||||||
<property name="msil.build.dir" value="${msil.dir}/classes/msil"/>
|
|
||||||
<property name="msil.jar" value="${basedir}/lib/msil.jar"/>
|
|
||||||
|
|
||||||
<target name="build"
|
|
||||||
depends="build.fjbg,build.forkjoin,build.msil" description="Compile the sources">
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="dist" depends="clean,build"
|
|
||||||
description="generate the distribution" >
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="clean">
|
|
||||||
<delete file="${fjbg.jar}" />
|
|
||||||
<delete file="${forkjoin.jar}" />
|
|
||||||
<delete file="${msil.jar}" />
|
|
||||||
<delete dir="${fjbg.dir}" />
|
|
||||||
<delete dir="${forkjoin.dir}" />
|
|
||||||
<delete dir="${msil.dir}" />
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<path id="scalac.classpath">
|
|
||||||
<fileset dir="/usr/share/java" includes="ant.jar"/>
|
|
||||||
<fileset dir="${lib.dir}" includes="scala-compiler.jar"/>
|
|
||||||
<fileset dir="${lib.dir}" includes="scala-library.jar"/>
|
|
||||||
<fileset dir="${lib.dir}" includes="scala-reflect.jar"/>
|
|
||||||
<fileset dir="${basedir}/lib" includes="fjbg.jar"/>
|
|
||||||
<fileset dir="${basedir}/lib" includes="forkjoin.jar"/>
|
|
||||||
<pathelement location="${msil.build.dir}"/>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<target name="build.fjbg" description="Build Scala fjbg component">
|
|
||||||
<compile-javac
|
|
||||||
dirsrc="${fjbg.src.dir}"
|
|
||||||
destfile="${fjbg.build.dir}"/>
|
|
||||||
|
|
||||||
<make-jar
|
|
||||||
basedir="${fjbg.build.dir}"
|
|
||||||
destfile="${fjbg.jar}"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build.forkjoin" description="Build Scala forkjoin component">
|
|
||||||
<compile-javac
|
|
||||||
dirsrc="${forkjoin.src.dir}"
|
|
||||||
destfile="${forkjoin.build.dir}"/>
|
|
||||||
|
|
||||||
<make-jar
|
|
||||||
basedir="${forkjoin.build.dir}"
|
|
||||||
destfile="${forkjoin.jar}"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="build.msil" description="Build Scala msil component">
|
|
||||||
<mkdir dir="${msil.build.dir}"/>
|
|
||||||
<compile-scala
|
|
||||||
dirsrc="${msil.src.dir}"
|
|
||||||
destfile="${msil.build.dir}" />
|
|
||||||
|
|
||||||
<make-jar
|
|
||||||
basedir="${msil.build.dir}"
|
|
||||||
destfile="${msil.jar}"/>
|
|
||||||
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<macrodef name="compile-javac">
|
|
||||||
<attribute name="destfile"/>
|
|
||||||
<attribute name="dirsrc"/>
|
|
||||||
<attribute name="excludes" default=""/>
|
|
||||||
<attribute name="includes" default=""/>
|
|
||||||
<attribute name="buildclasspath" default=""/>
|
|
||||||
<sequential>
|
|
||||||
<mkdir dir="@{destfile}"/>
|
|
||||||
<javac
|
|
||||||
srcdir="@{dirsrc}"
|
|
||||||
destdir="@{destfile}"
|
|
||||||
debug="true"
|
|
||||||
target="1.5" source="1.5">
|
|
||||||
<exclude name="@{excludes}"/>
|
|
||||||
</javac>
|
|
||||||
</sequential>
|
|
||||||
</macrodef>
|
|
||||||
|
|
||||||
<taskdef name="scalac" classname="scala.tools.ant.sabbus.ScalacFork" classpathref="scalac.classpath"/>
|
|
||||||
<macrodef name="compile-scala">
|
|
||||||
<attribute name="destfile"/>
|
|
||||||
<attribute name="dirsrc"/>
|
|
||||||
<attribute name="excludes" default=""/>
|
|
||||||
<attribute name="includes" default=""/>
|
|
||||||
<attribute name="buildclasspath" default=""/>
|
|
||||||
<sequential>
|
|
||||||
<javac
|
|
||||||
srcdir="@{dirsrc}"
|
|
||||||
destdir="@{destfile}"
|
|
||||||
includes="**/*.java"
|
|
||||||
excludes="**/tests/**"
|
|
||||||
debug="true"
|
|
||||||
target="1.5" source="1.5">
|
|
||||||
</javac>
|
|
||||||
<scalac
|
|
||||||
srcdir="@{dirsrc}"
|
|
||||||
destdir="@{destfile}"
|
|
||||||
compilerpathref="scalac.classpath">
|
|
||||||
<include name="**/*.scala"/>
|
|
||||||
<compilationpath>
|
|
||||||
<pathelement location="${msil.build.dir}"/>
|
|
||||||
<pathelement location="/usr/share/java/ant.jar"/>
|
|
||||||
<pathelement location="${lib.dir}/scala-compiler.jar"/>
|
|
||||||
<pathelement location="${lib.dir}/scala-library.jar"/>
|
|
||||||
<pathelement location="${lib.dir}/scala-reflect.jar"/>
|
|
||||||
<pathelement location="${basedir}/lib/fjbg.jar"/>
|
|
||||||
<pathelement location="${basedir}/lib/forkjoin.jar"/>
|
|
||||||
</compilationpath>
|
|
||||||
</scalac>
|
|
||||||
</sequential>
|
|
||||||
</macrodef>
|
|
||||||
|
|
||||||
<macrodef name="make-jar">
|
|
||||||
<attribute name="destfile"/>
|
|
||||||
<attribute name="basedir"/>
|
|
||||||
<attribute name="excludes" default=""/>
|
|
||||||
<attribute name="includes" default="**"/>
|
|
||||||
<attribute name="resources" default=""/>
|
|
||||||
<attribute name="paramvalue" default=""/>
|
|
||||||
<sequential>
|
|
||||||
<jar destfile="@{destfile}"
|
|
||||||
basedir="@{basedir}"
|
|
||||||
includes="@{includes}">
|
|
||||||
</jar>
|
|
||||||
</sequential>
|
|
||||||
</macrodef>
|
|
||||||
|
|
||||||
</project>
|
|
@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 28 14:27:20 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Upgrade to upstream version 2.10.7
|
||||||
|
* Can be built and used with java 11
|
||||||
|
- Get sources by a source service instead of a custom script
|
||||||
|
- Clean a bit the spec file and remove unnecessary sources
|
||||||
|
- Added patches:
|
||||||
|
* scala-2.10.7-source6.patch
|
||||||
|
+ Build not only with target level 6, but also with source
|
||||||
|
level 6, in order to be able to build with jdk9+
|
||||||
|
* scala-2.10.7-jdk11.patch
|
||||||
|
+ Fix type conflict with jdk11's java.lang.String.lines
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Nov 26 10:56:50 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
Tue Nov 26 10:56:50 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
bda53196ebbeb1369c70f3d1ec066796c06a6409
|
89e57bc7ad4a1809864b637617456736fd7b8101
|
||||||
20150918
|
20171031
|
||||||
|
56
scala.spec
56
scala.spec
@ -29,34 +29,22 @@
|
|||||||
%global jline2_jar %{_javadir}/jline/jline.jar
|
%global jline2_jar %{_javadir}/jline/jline.jar
|
||||||
%global scaladir %{_datadir}/scala
|
%global scaladir %{_datadir}/scala
|
||||||
%global base_name scala
|
%global base_name scala
|
||||||
%global want_jdk8 1
|
|
||||||
%define __requires_exclude .*org\.apache\.ant.*
|
%define __requires_exclude .*org\.apache\.ant.*
|
||||||
Version: 2.10.6
|
Version: 2.10.7
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A hybrid functional/object-oriented language for the JVM
|
Summary: A hybrid functional/object-oriented language for the JVM
|
||||||
License: BSD-3-Clause AND CC0-1.0 AND SUSE-Public-Domain
|
License: BSD-3-Clause AND CC0-1.0 AND SUSE-Public-Domain
|
||||||
Group: Development/Libraries/Java
|
Group: Development/Libraries/Java
|
||||||
URL: http://www.scala-lang.org/
|
URL: http://www.scala-lang.org/
|
||||||
# ./generate-tarball.sh
|
Source0: %{base_name}-%{version}.tar.xz
|
||||||
Source0: %{base_name}-%{version}.tar.gz
|
|
||||||
Source1: scala-library-2.10.0-bnd.properties
|
Source1: scala-library-2.10.0-bnd.properties
|
||||||
# Bootstrap file generated by ./get-sources.sh
|
# git log --pretty=format:"%H%n%ci" v%{version} | head -n 2 | sed -e 's/\-//g' -e 's/\s\+.*//g'
|
||||||
Source2: scala-2.10.3-bootstrap.tgz
|
|
||||||
# git information generated by ./get-sources.sh
|
|
||||||
Source3: scala.gitinfo
|
Source3: scala.gitinfo
|
||||||
# we need this binary copy of the scala 2.10.4 compiler
|
Source4: http://www.scala-lang.org/files/archive/%{base_name}-%{version}.tgz
|
||||||
# for bootstrapping under Java 8; this can be removed if
|
|
||||||
# necessary after Scala 2.10.5 is released if it uses 2.10.4
|
|
||||||
# for bootstrapping.
|
|
||||||
Source4: http://www.scala-lang.org/files/archive/scala-2.10.4.tgz
|
|
||||||
# Remove bundled binaries which are possibly proprietary
|
|
||||||
Source5: generate-tarball.sh
|
|
||||||
Source6: get-source.sh
|
|
||||||
Source21: scala.keys
|
Source21: scala.keys
|
||||||
Source22: scala.mime
|
Source22: scala.mime
|
||||||
Source23: scala-mime-info.xml
|
Source23: scala-mime-info.xml
|
||||||
Source24: scala.ant.d
|
Source24: scala.ant.d
|
||||||
Source31: scala-bootstript.xml
|
|
||||||
# Change the default classpath (SCALA_HOME)
|
# Change the default classpath (SCALA_HOME)
|
||||||
Patch1: scala-2.10.0-tooltemplate.patch
|
Patch1: scala-2.10.0-tooltemplate.patch
|
||||||
# Use system jline2 instead of bundled jline2
|
# Use system jline2 instead of bundled jline2
|
||||||
@ -71,6 +59,8 @@ Patch8: scala-2.10.4-build_xml.patch
|
|||||||
# Stop scaladoc from trying to bundle non-existent resources that were
|
# Stop scaladoc from trying to bundle non-existent resources that were
|
||||||
# removed due to being in object form only, whithout sources
|
# removed due to being in object form only, whithout sources
|
||||||
Patch9: scala-2.10.6-scaladoc-resources.patch
|
Patch9: scala-2.10.6-scaladoc-resources.patch
|
||||||
|
Patch10: scala-2.10.7-source6.patch
|
||||||
|
Patch11: scala-2.10.7-jdk11.patch
|
||||||
BuildRequires: ant
|
BuildRequires: ant
|
||||||
BuildRequires: ant-contrib
|
BuildRequires: ant-contrib
|
||||||
BuildRequires: ant-junit
|
BuildRequires: ant-junit
|
||||||
@ -80,7 +70,7 @@ BuildRequires: java-devel >= 1.7
|
|||||||
BuildRequires: javapackages-local
|
BuildRequires: javapackages-local
|
||||||
BuildRequires: jline >= 2.10
|
BuildRequires: jline >= 2.10
|
||||||
BuildRequires: junit
|
BuildRequires: junit
|
||||||
BuildConflicts: java-devel >= 9
|
#BuildConflicts: java-devel >= 9
|
||||||
Requires: jansi
|
Requires: jansi
|
||||||
Requires: java-headless >= 1.7
|
Requires: java-headless >= 1.7
|
||||||
# Require full javapackages-tools since scripts use
|
# Require full javapackages-tools since scripts use
|
||||||
@ -143,9 +133,10 @@ the Scala ant tasks.
|
|||||||
%patch3 -p1 -b .compiler-pom
|
%patch3 -p1 -b .compiler-pom
|
||||||
%patch4 -p1 -b .jdk7
|
%patch4 -p1 -b .jdk7
|
||||||
%patch6 -p1 -b .rvk
|
%patch6 -p1 -b .rvk
|
||||||
# %patch7 -p1 -b .bc
|
|
||||||
%patch8 -p1 -b .bld
|
%patch8 -p1 -b .bld
|
||||||
%patch9 -p1 -b .scaladoc
|
%patch9 -p1 -b .scaladoc
|
||||||
|
%patch10 -p1 -b .source6
|
||||||
|
%patch11 -p1 -b .jdk11
|
||||||
|
|
||||||
echo "starr.version=2.10.4\nstarr.use.released=0" > starr.number
|
echo "starr.version=2.10.4\nstarr.use.released=0" > starr.number
|
||||||
|
|
||||||
@ -158,10 +149,7 @@ sed -i '/exec.*pull-binary-libs.sh/d' build.xml
|
|||||||
|
|
||||||
%if %{with bootstrap}
|
%if %{with bootstrap}
|
||||||
%global do_bootstrap -DdoBootstrapBuild=yes
|
%global do_bootstrap -DdoBootstrapBuild=yes
|
||||||
tar -xzvf %{SOURCE2}
|
tar -xzvf %{SOURCE4} --strip-components=1 %{base_name}-%{version}/lib
|
||||||
%if %{want_jdk8}
|
|
||||||
tar -xzvf %{SOURCE4} --strip-components=1 scala-2.10.4/lib
|
|
||||||
%endif
|
|
||||||
%else
|
%else
|
||||||
%global do_bootstrap %{nil}
|
%global do_bootstrap %{nil}
|
||||||
%endif
|
%endif
|
||||||
@ -183,8 +171,6 @@ pushd lib
|
|||||||
popd
|
popd
|
||||||
popd
|
popd
|
||||||
|
|
||||||
cp -rf %{SOURCE31} .
|
|
||||||
|
|
||||||
sed -i -e 's!@JLINE@!%{jline2_jar}!g' build.xml
|
sed -i -e 's!@JLINE@!%{jline2_jar}!g' build.xml
|
||||||
|
|
||||||
echo echo $(head -n 1 %{SOURCE3}) > tools/get-scala-commit-sha
|
echo echo $(head -n 1 %{SOURCE3}) > tools/get-scala-commit-sha
|
||||||
@ -199,7 +185,6 @@ export ANT_OPTS="-Xms2048m -Xmx2048m %{do_bootstrap}"
|
|||||||
# is slow, OBS thinks it is stuck and kills it before it has chance
|
# is slow, OBS thinks it is stuck and kills it before it has chance
|
||||||
# to finish
|
# to finish
|
||||||
%ant \
|
%ant \
|
||||||
-Dscalac.args=-verbose \
|
|
||||||
build || exit 1
|
build || exit 1
|
||||||
pushd build/pack/lib
|
pushd build/pack/lib
|
||||||
mv scala-library.jar scala-library.jar.no
|
mv scala-library.jar scala-library.jar.no
|
||||||
@ -207,27 +192,6 @@ bnd wrap --properties %{SOURCE1} --output scala-library.jar \
|
|||||||
--version "%{version}" scala-library.jar.no
|
--version "%{version}" scala-library.jar.no
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%check
|
|
||||||
|
|
||||||
# these tests fail, but their failures appear spurious
|
|
||||||
rm -f test/files/run/parserJavaIdent.scala
|
|
||||||
rm -rf test/files/presentation/implicit-member
|
|
||||||
rm -rf test/files/presentation/t5708
|
|
||||||
rm -rf test/files/presentation/ide-bug-1000349
|
|
||||||
rm -rf test/files/presentation/ide-bug-1000475
|
|
||||||
rm -rf test/files/presentation/callcc-interpreter
|
|
||||||
rm -rf test/files/presentation/ide-bug-1000531
|
|
||||||
rm -rf test/files/presentation/visibility
|
|
||||||
rm -rf test/files/presentation/ping-pong
|
|
||||||
|
|
||||||
rm -f test/osgi/src/ReflectionToolboxTest.scala
|
|
||||||
|
|
||||||
# fails under mock but not under rpmbuild
|
|
||||||
rm -f test/files/run/t6223.scala
|
|
||||||
|
|
||||||
## Most test dependencies still aren't available in Fedora
|
|
||||||
# ant test
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
|
||||||
install -d %{buildroot}%{_bindir}
|
install -d %{buildroot}%{_bindir}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user