Accepting request 752799 from Java:packages
Upgrade 2.10.7 + bootstrap with 2.10.7: allows building with jdk11 OBS-URL: https://build.opensuse.org/request/show/752799 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/scala?expand=0&rev=2
This commit is contained in:
commit
2291996e6d
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
|
||||
index 10f9724..2970276 100644
|
||||
--- a/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala
|
||||
+++ b/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala
|
||||
@@ -42,7 +42,7 @@ class JLineReader(_completion: => Completion) extends InteractiveReader {
|
||||
--- scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala 2019-11-27 16:04:03.141644641 +0100
|
||||
+++ scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala 2019-11-27 16:04:24.461764259 +0100
|
||||
@@ -45,7 +45,7 @@
|
||||
def readOneKey(prompt: String) = {
|
||||
this.print(prompt)
|
||||
this.flush()
|
||||
@ -11,24 +9,20 @@ index 10f9724..2970276 100644
|
||||
}
|
||||
def eraseLine() = consoleReader.resetPromptLine("", "", 0)
|
||||
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
|
||||
index dddfb1b..e598ac5 100644
|
||||
--- a/src/compiler/scala/tools/nsc/interpreter/session/FileBackedHistory.scala
|
||||
+++ b/src/compiler/scala/tools/nsc/interpreter/session/FileBackedHistory.scala
|
||||
@@ -13,7 +13,7 @@ import FileBackedHistory._
|
||||
--- scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/session/FileBackedHistory.scala 2019-11-27 16:04:03.141644641 +0100
|
||||
+++ scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/session/FileBackedHistory.scala 2019-11-27 16:05:14.034042924 +0100
|
||||
@@ -15,7 +15,7 @@
|
||||
/** TODO: file locking.
|
||||
*/
|
||||
trait FileBackedHistory extends JLineHistory with JPersistentHistory {
|
||||
- def maxSize: Int
|
||||
+ 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
|
||||
index 18e0ee7..fc33192 100644
|
||||
--- a/src/compiler/scala/tools/nsc/interpreter/session/JLineHistory.scala
|
||||
+++ b/src/compiler/scala/tools/nsc/interpreter/session/JLineHistory.scala
|
||||
@@ -13,7 +13,6 @@ package session
|
||||
// For a history file in the standard location, always try to restrict permission,
|
||||
// creating an empty file if none exists.
|
||||
--- scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/session/JLineHistory.scala 2019-11-27 16:04:03.141644641 +0100
|
||||
+++ 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 @@
|
||||
trait JLineHistory extends JHistory with History {
|
||||
def size: Int
|
||||
def isEmpty: Boolean
|
||||
@ -36,7 +30,7 @@ index 18e0ee7..fc33192 100644
|
||||
def clear(): Unit
|
||||
def get(index: Int): CharSequence
|
||||
def add(line: CharSequence): Unit
|
||||
@@ -42,7 +41,8 @@ object JLineHistory {
|
||||
@@ -42,7 +41,8 @@
|
||||
addLineToFile(item)
|
||||
}
|
||||
}
|
||||
@ -46,11 +40,9 @@ index 18e0ee7..fc33192 100644
|
||||
}
|
||||
|
||||
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
|
||||
index 9f4e2b9..8933849 100644
|
||||
--- a/src/compiler/scala/tools/nsc/interpreter/session/SimpleHistory.scala
|
||||
+++ b/src/compiler/scala/tools/nsc/interpreter/session/SimpleHistory.scala
|
||||
@@ -10,7 +10,7 @@ package session
|
||||
--- scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/session/SimpleHistory.scala 2019-11-27 16:04:03.141644641 +0100
|
||||
+++ scala-2.10.7/src/compiler/scala/tools/nsc/interpreter/session/SimpleHistory.scala 2019-11-27 16:04:24.461764259 +0100
|
||||
@@ -10,7 +10,7 @@
|
||||
import scala.collection.mutable.{ Buffer, ListBuffer }
|
||||
import scala.collection.JavaConverters._
|
||||
|
||||
@ -59,7 +51,7 @@ index 9f4e2b9..8933849 100644
|
||||
private var _index: Int = 0
|
||||
private val buf: Buffer[String] = new ListBuffer[String]
|
||||
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 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
|
184
scala-2.10.7-java8compat.patch
Normal file
184
scala-2.10.7-java8compat.patch
Normal file
@ -0,0 +1,184 @@
|
||||
--- scala-2.10.7/src/compiler/scala/tools/nsc/io/SourceReader.scala 2017-11-01 04:52:36.000000000 +0100
|
||||
+++ scala-2.10.7/src/compiler/scala/tools/nsc/io/SourceReader.scala 2019-11-28 18:22:37.444126737 +0100
|
||||
@@ -8,7 +8,7 @@
|
||||
package io
|
||||
|
||||
import java.io.{ FileInputStream, InputStream, IOException }
|
||||
-import java.nio.{ByteBuffer, CharBuffer}
|
||||
+import java.nio.{Buffer, ByteBuffer, CharBuffer}
|
||||
import java.nio.channels.{FileChannel, ReadableByteChannel, Channels}
|
||||
import java.nio.charset.{CharsetDecoder, CoderResult}
|
||||
import scala.tools.nsc.reporters._
|
||||
@@ -61,13 +61,13 @@
|
||||
/** Reads the specified byte channel. */
|
||||
protected def read(input: ReadableByteChannel): Array[Char] = {
|
||||
val decoder: CharsetDecoder = this.decoder.reset()
|
||||
- val bytes: ByteBuffer = this.bytes; bytes.clear()
|
||||
- var chars: CharBuffer = this.chars; chars.clear()
|
||||
+ val bytes: ByteBuffer = this.bytes; bytes.asInstanceOf[Buffer].clear()
|
||||
+ var chars: CharBuffer = this.chars; chars.asInstanceOf[Buffer].clear()
|
||||
var endOfInput = false
|
||||
|
||||
while (!endOfInput ) {
|
||||
endOfInput = input.read(bytes) < 0
|
||||
- bytes.flip()
|
||||
+ bytes.asInstanceOf[Buffer].flip()
|
||||
chars = decode(decoder, bytes, chars, endOfInput)
|
||||
}
|
||||
terminate(flush(decoder, chars))
|
||||
@@ -76,7 +76,7 @@
|
||||
/** Reads the specified byte buffer. */
|
||||
protected def read(bytes: ByteBuffer): Array[Char] = {
|
||||
val decoder: CharsetDecoder = this.decoder.reset()
|
||||
- val chars: CharBuffer = this.chars; chars.clear()
|
||||
+ val chars: CharBuffer = this.chars; chars.asInstanceOf[Buffer].clear()
|
||||
terminate(flush(decoder, decode(decoder, bytes, chars, true)))
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
def flush(decoder: CharsetDecoder, chars: CharBuffer): CharBuffer = {
|
||||
val result: CoderResult = decoder.flush(chars)
|
||||
if (result.isUnderflow()) {
|
||||
- chars.flip()
|
||||
+ chars.asInstanceOf[Buffer].flip()
|
||||
chars
|
||||
} else {
|
||||
if (result.isError()) throw new IOException(result.toString())
|
||||
@@ -142,7 +142,7 @@
|
||||
* content but with an increased capacity.
|
||||
*/
|
||||
private def increaseCapacity(buffer: CharBuffer): CharBuffer = {
|
||||
- buffer.flip()
|
||||
+ buffer.asInstanceOf[Buffer].flip()
|
||||
val capacity = 2 * buffer.capacity()
|
||||
CharBuffer.allocate(capacity).put(buffer)
|
||||
}
|
||||
--- scala-2.10.7/src/msil/ch/epfl/lamp/compiler/msil/Attribute.java 2017-11-01 04:52:36.000000000 +0100
|
||||
+++ scala-2.10.7/src/msil/ch/epfl/lamp/compiler/msil/Attribute.java 2019-11-28 17:28:47.932834776 +0100
|
||||
@@ -11,6 +11,7 @@
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Iterator;
|
||||
+import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
@@ -462,7 +463,7 @@
|
||||
return null;
|
||||
try { str = new String(value, buf.position(), length, "UTF-8" ); }
|
||||
catch (UnsupportedEncodingException e) { throw new Error(e); }
|
||||
- buf.position(buf.position() + length);
|
||||
+ ((Buffer)buf).position(buf.position() + length);
|
||||
return str;
|
||||
}
|
||||
|
||||
--- scala-2.10.7/src/msil/ch/epfl/lamp/compiler/msil/PEFile.java 2017-11-01 04:52:36.000000000 +0100
|
||||
+++ scala-2.10.7/src/msil/ch/epfl/lamp/compiler/msil/PEFile.java 2019-11-28 17:32:27.926199324 +0100
|
||||
@@ -17,6 +17,7 @@
|
||||
import java.io.IOException;
|
||||
import java.io.FileNotFoundException;
|
||||
|
||||
+import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.nio.MappedByteBuffer;
|
||||
@@ -454,7 +455,7 @@
|
||||
|
||||
/** Go to the specified position in the file. */
|
||||
public void seek(int pos) {
|
||||
- buf.position(pos);
|
||||
+ ((Buffer)buf).position(pos);
|
||||
}
|
||||
|
||||
|
||||
@@ -485,7 +486,7 @@
|
||||
|
||||
/** Move the forward in the file by the specified number of bytes. */
|
||||
public void skip(int n) {
|
||||
- buf.position(buf.position() + n);
|
||||
+ ((Buffer)buf).position(buf.position() + n);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -503,11 +504,11 @@
|
||||
|
||||
/** Returns a buffer from the given offset to the end of the file. */
|
||||
public ByteBuffer getBuffer(long offset, int size) {
|
||||
- buf.mark();
|
||||
- buf.position((int)offset);
|
||||
+ ((Buffer)buf).mark();
|
||||
+ ((Buffer)buf).position((int)offset);
|
||||
ByteBuffer bb = buf.slice();
|
||||
- buf.reset();
|
||||
- bb.limit(size);
|
||||
+ ((Buffer)buf).reset();
|
||||
+ ((Buffer)bb).limit(size);
|
||||
bb.order(java.nio.ByteOrder.LITTLE_ENDIAN);
|
||||
return bb;
|
||||
}
|
||||
@@ -707,11 +708,11 @@
|
||||
if (i < length - 1)
|
||||
b.append(" ");
|
||||
}
|
||||
- buf.position(savedPos);
|
||||
+ ((Buffer)buf).position(savedPos);
|
||||
return b.append(")").toString();
|
||||
}
|
||||
|
||||
- public Sig reset() { buf.position(pos); return this; }
|
||||
+ public Sig reset() { ((Buffer)buf).position(pos); return this; }
|
||||
|
||||
public int pos() { return buf.position() - pos; }
|
||||
|
||||
--- scala-2.10.7/src/msil/ch/epfl/lamp/compiler/msil/util/PEStream.java 2017-11-01 04:52:36.000000000 +0100
|
||||
+++ scala-2.10.7/src/msil/ch/epfl/lamp/compiler/msil/util/PEStream.java 2019-11-28 17:36:37.103730311 +0100
|
||||
@@ -11,6 +11,7 @@
|
||||
import java.io.PrintStream;
|
||||
import java.io.IOException;
|
||||
|
||||
+import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.channels.FileChannel;
|
||||
|
||||
@@ -64,7 +65,7 @@
|
||||
/** Move to the specified position in the stream. */
|
||||
private void seek(int pos) {
|
||||
try {
|
||||
- buffer.position(pos);
|
||||
+ ((Buffer)buffer).position(pos);
|
||||
} catch (IllegalArgumentException e) {
|
||||
System.err.println("\nSeek failed in file " + file
|
||||
+ " for position " + pos
|
||||
@@ -76,11 +77,11 @@
|
||||
/** Return a string from the specified position in the stream. */
|
||||
public String getString(int pos) {
|
||||
seek(pos);
|
||||
- buffer.mark();
|
||||
+ ((Buffer)buffer).mark();
|
||||
int i;
|
||||
for (i = 0; getByte() != 0; i++);
|
||||
byte[] buf = new byte[i];
|
||||
- buffer.reset(); // go back to the marked position
|
||||
+ ((Buffer)buffer).reset(); // go back to the marked position
|
||||
buffer.get(buf);
|
||||
try {
|
||||
return new String(buf, "UTF-8");
|
||||
--- scala-2.10.7/src/msil/ch/epfl/lamp/compiler/msil/util/Table.java 2017-11-01 04:52:36.000000000 +0100
|
||||
+++ scala-2.10.7/src/msil/ch/epfl/lamp/compiler/msil/util/Table.java 2019-11-28 17:34:43.543040457 +0100
|
||||
@@ -9,6 +9,7 @@
|
||||
import ch.epfl.lamp.compiler.msil.PEFile.Sig;
|
||||
|
||||
import java.io.PrintStream;
|
||||
+import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.MappedByteBuffer;
|
||||
|
||||
@@ -327,7 +328,7 @@
|
||||
protected final void seekRow(int row) {
|
||||
assert row > 0 && row <= rows
|
||||
: "Index " + row + " is not within the table with #rows = " + rows;
|
||||
- buffer.position((row - 1)* rowSize());
|
||||
+ ((Buffer)buffer).position((row - 1)* rowSize());
|
||||
}
|
||||
|
||||
public final int currentRow() { return currentRow; }
|
147
scala-2.10.7-lines.patch
Normal file
147
scala-2.10.7-lines.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,38 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 29 10:53:22 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Do not package ant tasks in bootstrap build
|
||||
- Added patch:
|
||||
* scala-2.10.7-java8compat.patch
|
||||
+ Build binaries compatible with java 8 even when building
|
||||
with jdk >= 9
|
||||
|
||||
-------------------------------------------------------------------
|
||||
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-lines.patch
|
||||
+ Fix type conflict with jdk11's java.lang.String.lines
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 26 10:56:50 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Do not build api documentation in bootstrap flavour
|
||||
- Be extra verbose for the scalac build
|
||||
* The build is long on non-JIT architectures and OBS needs some
|
||||
compiler output in order to know that the job is not dead;
|
||||
otherwise it kills it.
|
||||
- Do not build apidocs to avoid intermittent internal scaladoc
|
||||
errors after hours of build on s390x
|
||||
- Remove obsolete scriptlets
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 25 13:30:12 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
bda53196ebbeb1369c70f3d1ec066796c06a6409
|
||||
20150918
|
||||
89e57bc7ad4a1809864b637617456736fd7b8101
|
||||
20171031
|
||||
|
100
scala.spec
100
scala.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package scala
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2019 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -29,34 +29,22 @@
|
||||
%global jline2_jar %{_javadir}/jline/jline.jar
|
||||
%global scaladir %{_datadir}/scala
|
||||
%global base_name scala
|
||||
%global want_jdk8 1
|
||||
%define __requires_exclude .*org\.apache\.ant.*
|
||||
Version: 2.10.6
|
||||
Version: 2.10.7
|
||||
Release: 0
|
||||
Summary: A hybrid functional/object-oriented language for the JVM
|
||||
License: BSD-3-Clause AND CC0-1.0 AND SUSE-Public-Domain
|
||||
Group: Development/Libraries/Java
|
||||
URL: http://www.scala-lang.org/
|
||||
# ./generate-tarball.sh
|
||||
Source0: %{base_name}-%{version}.tar.gz
|
||||
Source0: %{base_name}-%{version}.tar.xz
|
||||
Source1: scala-library-2.10.0-bnd.properties
|
||||
# Bootstrap file generated by ./get-sources.sh
|
||||
Source2: scala-2.10.3-bootstrap.tgz
|
||||
# git information 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'
|
||||
Source3: scala.gitinfo
|
||||
# we need this binary copy of the scala 2.10.4 compiler
|
||||
# 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
|
||||
Source4: http://www.scala-lang.org/files/archive/%{base_name}-%{version}.tgz
|
||||
Source21: scala.keys
|
||||
Source22: scala.mime
|
||||
Source23: scala-mime-info.xml
|
||||
Source24: scala.ant.d
|
||||
Source31: scala-bootstript.xml
|
||||
# Change the default classpath (SCALA_HOME)
|
||||
Patch1: scala-2.10.0-tooltemplate.patch
|
||||
# Use system jline2 instead of bundled jline2
|
||||
@ -71,6 +59,9 @@ Patch8: scala-2.10.4-build_xml.patch
|
||||
# Stop scaladoc from trying to bundle non-existent resources that were
|
||||
# removed due to being in object form only, whithout sources
|
||||
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
|
||||
BuildRequires: ant
|
||||
BuildRequires: ant-contrib
|
||||
BuildRequires: ant-junit
|
||||
@ -80,7 +71,6 @@ BuildRequires: java-devel >= 1.7
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: jline >= 2.10
|
||||
BuildRequires: junit
|
||||
BuildConflicts: java-devel >= 9
|
||||
Requires: jansi
|
||||
Requires: java-headless >= 1.7
|
||||
# Require full javapackages-tools since scripts use
|
||||
@ -90,11 +80,10 @@ Requires: jline >= 2.10
|
||||
BuildArch: noarch
|
||||
%if %{with bootstrap}
|
||||
Name: %{base_name}-bootstrap
|
||||
Provides: %{base_name}
|
||||
%else
|
||||
Name: %{base_name}
|
||||
BuildRequires: %{base_name}
|
||||
Provides: %{base_name}-bootstrap
|
||||
BuildRequires: %{base_name}-bootstrap >= %{version}
|
||||
Provides: %{base_name}-bootstrap = %{version}-%{release}
|
||||
Obsoletes: %{base_name}-bootstrap
|
||||
%endif
|
||||
|
||||
@ -104,6 +93,7 @@ common programming patterns in a concise and type-safe way. It
|
||||
integrates features of object-oriented and functional languages. It
|
||||
is also interoperable with Java.
|
||||
|
||||
%if %{without bootstrap}
|
||||
%package apidoc
|
||||
Summary: Documentation for the Scala programming language
|
||||
Group: Documentation/HTML
|
||||
@ -115,6 +105,7 @@ Obsoletes: %{base_name}-bootstrap-apidoc
|
||||
Scala is a general purpose programming language for the JVM that blends
|
||||
object-oriented and functional programming. This package provides
|
||||
reference and API documentation for the Scala programming language.
|
||||
%endif
|
||||
|
||||
%package swing
|
||||
Summary: The swing library for the Scala programming languages
|
||||
@ -155,9 +146,11 @@ the Scala ant tasks.
|
||||
%patch3 -p1 -b .compiler-pom
|
||||
%patch4 -p1 -b .jdk7
|
||||
%patch6 -p1 -b .rvk
|
||||
# %patch7 -p1 -b .bc
|
||||
%patch8 -p1 -b .bld
|
||||
%patch9 -p1 -b .scaladoc
|
||||
%patch10 -p1 -b .source6
|
||||
%patch11 -p1 -b .jdk11
|
||||
%patch12 -p1 -b .java8compat
|
||||
|
||||
echo "starr.version=2.10.4\nstarr.use.released=0" > starr.number
|
||||
|
||||
@ -170,22 +163,21 @@ sed -i '/exec.*pull-binary-libs.sh/d' build.xml
|
||||
|
||||
%if %{with bootstrap}
|
||||
%global do_bootstrap -DdoBootstrapBuild=yes
|
||||
tar -xzvf %{SOURCE2}
|
||||
%if %{want_jdk8}
|
||||
tar -xzvf %{SOURCE4} --strip-components=1 scala-2.10.4/lib
|
||||
%endif
|
||||
%global docs_target %{nil}
|
||||
tar -xzvf %{SOURCE4} --strip-components=1 %{base_name}-%{version}/lib
|
||||
%else
|
||||
%global do_bootstrap %{nil}
|
||||
%global docs_target docs
|
||||
%endif
|
||||
|
||||
pushd lib
|
||||
%if %{without bootstrap}
|
||||
rm -rf scala-compiler.jar
|
||||
ln -s $(build-classpath scala/scala-compiler.jar) scala-compiler.jar
|
||||
ln -s $(find-jar scala/scala-compiler) scala-compiler.jar
|
||||
rm -rf scala-library.jar
|
||||
ln -s $(build-classpath scala/scala-library.jar) scala-library.jar
|
||||
ln -s $(find-jar scala/scala-library) scala-library.jar
|
||||
rm -rf scala-reflect.jar
|
||||
ln -s $(build-classpath scala/scala-reflect.jar) scala-reflect.jar
|
||||
ln -s $(find-jar scala/scala-reflect) scala-reflect.jar
|
||||
%endif
|
||||
pushd ant
|
||||
rm -rf ant.jar
|
||||
@ -195,8 +187,6 @@ pushd lib
|
||||
popd
|
||||
popd
|
||||
|
||||
cp -rf %{SOURCE31} .
|
||||
|
||||
sed -i -e 's!@JLINE@!%{jline2_jar}!g' build.xml
|
||||
|
||||
echo echo $(head -n 1 %{SOURCE3}) > tools/get-scala-commit-sha
|
||||
@ -207,34 +197,17 @@ chmod 755 tools/get-scala-*
|
||||
|
||||
export ANT_OPTS="-Xms2048m -Xmx2048m %{do_bootstrap}"
|
||||
|
||||
ant build docs || exit 1
|
||||
# Add the -verbose flag to scalac on zero architectures. The build
|
||||
# is slow, OBS thinks it is stuck and kills it before it has chance
|
||||
# to finish
|
||||
%ant \
|
||||
build %{docs_target} || exit 1
|
||||
pushd build/pack/lib
|
||||
mv scala-library.jar scala-library.jar.no
|
||||
bnd wrap --properties %{SOURCE1} --output scala-library.jar \
|
||||
--version "%{version}" scala-library.jar.no
|
||||
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 -d %{buildroot}%{_bindir}
|
||||
@ -268,8 +241,10 @@ done
|
||||
ln -s $(abs2rel %{jline2_jar} %{scaladir}/lib) %{buildroot}%{scaladir}/lib
|
||||
ln -s $(abs2rel %{jansi_jar} %{scaladir}/lib) %{buildroot}%{scaladir}/lib
|
||||
|
||||
%if %{without bootstrap}
|
||||
install -d %{buildroot}%{_sysconfdir}/ant.d
|
||||
install -p -m 644 %{SOURCE24} %{buildroot}%{_sysconfdir}/ant.d/scala
|
||||
%endif
|
||||
|
||||
install -d %{buildroot}%{_datadir}/mime-info
|
||||
install -p -m 644 %{SOURCE21} %{SOURCE22} %{buildroot}%{_datadir}/mime-info/
|
||||
@ -279,19 +254,10 @@ install -p -m 644 %{SOURCE23} %{buildroot}%{_datadir}/mime/packages/
|
||||
|
||||
sed -i -e 's,@JAVADIR@,%{_javadir},g' -e 's,@DATADIR@,%{_datadir},g' %{buildroot}%{_bindir}/*
|
||||
|
||||
%if %{without bootstrap}
|
||||
install -d %{buildroot}%{_mandir}/man1
|
||||
install -p -m 644 build/scaladoc/manual/man/man1/* %{buildroot}%{_mandir}/man1
|
||||
|
||||
%post
|
||||
touch --no-create %{_datadir}/mime/packages >/dev/null 2>&1 || :
|
||||
|
||||
%postun
|
||||
if [ $1 -eq 0 ]; then
|
||||
update-mime-database %{_datadir}/mime >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%posttrans
|
||||
update-mime-database %{?fedora:-n} %{_datadir}/mime >/dev/null 2>&1 || :
|
||||
%endif
|
||||
|
||||
%files -f .mfiles
|
||||
%{_bindir}/*
|
||||
@ -301,13 +267,16 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime >/dev/null 2>&1 || :
|
||||
%exclude %{_datadir}/%{base_name}/lib/scala-swing.jar
|
||||
%{_datadir}/mime-info
|
||||
%{_datadir}/mime/packages/*
|
||||
%{_mandir}/man1/*
|
||||
%license docs/LICENSE
|
||||
%if %{without bootstrap}
|
||||
%{_mandir}/man1/*
|
||||
%endif
|
||||
|
||||
%files swing -f .mfiles-swing
|
||||
%license docs/LICENSE
|
||||
%{_datadir}/%{base_name}/lib/scala-swing.jar
|
||||
|
||||
%if %{without bootstrap}
|
||||
%files -n ant-%{name}
|
||||
# Following is plain config because the ant task classpath could change from
|
||||
# release to release
|
||||
@ -317,5 +286,6 @@ update-mime-database %{?fedora:-n} %{_datadir}/mime >/dev/null 2>&1 || :
|
||||
%files apidoc
|
||||
%doc build/scaladoc/library/*
|
||||
%license docs/LICENSE
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user