[scala/f17] update to 2.9.2
Jochen Schmitt
s4504kr at fedoraproject.org
Sat Nov 24 14:31:44 UTC 2012
commit 74be7306d84d8bf58da54beaefc19edcaf0c3863
Author: Jochen Schmitt <Jochen at herr-schmitt.de>
Date: Sat Nov 24 14:26:27 2012 +0100
update to 2.9.2
- added maven poms
- adapted to current guideline
- built with java 7 support
- removed ant-nodeps from buildrequires
- disabled swing module
.gitignore | 1 +
scala-2.9.2-compiler-pom.patch | 14 ++
scala-2.9.2-java7.patch | 198 ++++++++++++++++++++
...emplate.patch => scala-2.9.2-tooltemplate.patch | 2 +-
...ine.patch => scala-2.9.2-use_system_jline.patch | 89 ++++++----
scala.spec | 98 +++++++---
sources | 2 +-
7 files changed, 335 insertions(+), 69 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 3353e0c..b2c497c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ scala-2.7.5.final-sources.tgz
scala-2.7.7.final-sources.tgz
/scala-2.8.1.final-sources.tgz
/scala-2.9.1.final-sources.tgz
+/scala-sources-2.9.2.tgz
diff --git a/scala-2.9.2-compiler-pom.patch b/scala-2.9.2-compiler-pom.patch
new file mode 100644
index 0000000..851c4e7
--- /dev/null
+++ b/scala-2.9.2-compiler-pom.patch
@@ -0,0 +1,14 @@
+--- src/build/maven/scala-compiler-pom.xml 2012-03-18 17:09:24.000000000 +0100
++++ src/build/maven/scala-compiler-pom.xml-gil 2012-09-13 02:41:01.919727846 +0200
+@@ -39,9 +39,9 @@
+ <version>@VERSION@</version>
+ </dependency>
+ <dependency>
+- <groupId>org.scala-lang</groupId>
++ <groupId>org.sonatype.jline</groupId>
+ <artifactId>jline</artifactId>
+- <version>@VERSION@</version>
++ <version>2.5</version>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
diff --git a/scala-2.9.2-java7.patch b/scala-2.9.2-java7.patch
new file mode 100644
index 0000000..1cf8c8b
--- /dev/null
+++ b/scala-2.9.2-java7.patch
@@ -0,0 +1,198 @@
+diff -Nru scala-2.9.2-sources/src/swing/scala/swing/ComboBox.scala scala-2.9.2-sources-gil/src/swing/scala/swing/ComboBox.scala
+--- scala-2.9.2-sources/src/swing/scala/swing/ComboBox.scala 2012-03-18 17:09:24.000000000 +0100
++++ scala-2.9.2-sources-gil/src/swing/scala/swing/ComboBox.scala 2012-11-23 17:09:08.353124190 +0100
+@@ -11,7 +11,7 @@
+ package scala.swing
+
+ import event._
+-import javax.swing.{JList, JComponent, JComboBox, JTextField, ComboBoxModel, AbstractListModel, ListCellRenderer}
++import javax.swing.{ JComponent, JComboBox, JTextField, ComboBoxModel, AbstractListModel, ListCellRenderer }
+ import java.awt.event.ActionListener
+
+ object ComboBox {
+@@ -120,10 +120,10 @@
+ implicit def floatEditor(c: ComboBox[Float]): Editor[Float] = new BuiltInEditor(c)(s => s.toFloat, s => s.toString)
+ implicit def doubleEditor(c: ComboBox[Double]): Editor[Double] = new BuiltInEditor(c)(s => s.toDouble, s => s.toString)
+
+- def newConstantModel[A](items: Seq[A]): ComboBoxModel = {
+- new AbstractListModel with ComboBoxModel {
++ def newConstantModel[A](items: Seq[A]): ComboBoxModel[A] = {
++ new AbstractListModel[A] with ComboBoxModel[A] {
+ private var selected: A = if (items.isEmpty) null.asInstanceOf[A] else items(0)
+- def getSelectedItem: AnyRef = selected.asInstanceOf[AnyRef]
++ def getSelectedItem = selected.asInstanceOf[AnyRef]
+ def setSelectedItem(a: Any) {
+ if ((selected != null && selected != a) ||
+ selected == null && a != null) {
+@@ -131,7 +131,7 @@
+ fireContentsChanged(this, -1, -1)
+ }
+ }
+- def getElementAt(n: Int) = items(n).asInstanceOf[AnyRef]
++ def getElementAt(n: Int) = items(n).asInstanceOf[A]
+ def getSize = items.size
+ }
+ }
+@@ -159,7 +159,7 @@
+ * @see javax.swing.JComboBox
+ */
+ class ComboBox[A](items: Seq[A]) extends Component with Publisher {
+- override lazy val peer: JComboBox = new JComboBox(ComboBox.newConstantModel(items)) with SuperMixin
++ override lazy val peer: JComboBox[A] = new JComboBox(ComboBox.newConstantModel(items)) with SuperMixin
+
+ object selection extends Publisher {
+ def index: Int = peer.getSelectedIndex
+@@ -184,7 +184,8 @@
+ * of the component to its own defaults _after_ the renderer has been
+ * configured. That's Swing's principle of most suprise.
+ */
+- def renderer: ListView.Renderer[A] = ListView.Renderer.wrap(peer.getRenderer)
++ def renderer: ListView.Renderer[A] = ListView.Renderer.wrap[A](peer.getRenderer.asInstanceOf[ListCellRenderer[A]])
++ // def renderer: ListView.Renderer[A] = ListView.Renderer.wrap(peer.getRenderer)
+ def renderer_=(r: ListView.Renderer[A]) { peer.setRenderer(r.peer) }
+
+ /* XXX: currently not safe to expose:
+@@ -203,8 +204,8 @@
+ peer.setEditor(editor(this).comboBoxPeer)
+ }
+
+- def prototypeDisplayValue: Option[A] = toOption[A](peer.getPrototypeDisplayValue)
++ def prototypeDisplayValue: Option[A] = Option(peer.getPrototypeDisplayValue)
+ def prototypeDisplayValue_=(v: Option[A]) {
+- peer.setPrototypeDisplayValue(v map toAnyRef orNull)
++ peer.setPrototypeDisplayValue((v map toAnyRef).orNull.asInstanceOf[A])
+ }
+ }
+diff -Nru scala-2.9.2-sources/src/swing/scala/swing/ListView.scala scala-2.9.2-sources-gil/src/swing/scala/swing/ListView.scala
+--- scala-2.9.2-sources/src/swing/scala/swing/ListView.scala 2012-03-18 17:09:26.000000000 +0100
++++ scala-2.9.2-sources-gil/src/swing/scala/swing/ListView.scala 2012-11-23 17:20:45.704030454 +0100
+@@ -24,21 +24,21 @@
+ val MultiInterval = Value(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
+ }
+
+- def wrap[A](c: JList) = new ListView[A] {
++ def wrap[A](c: JList[A]) = new ListView[A] {
+ override lazy val peer = c
+ }
+
+ object Renderer {
+- def wrap[A](r: ListCellRenderer): Renderer[A] = new Wrapped[A](r)
++ def wrap[A](r: ListCellRenderer[A]): Renderer[A] = new Wrapped[A](r)
+
+ /**
+ * Wrapper for <code>javax.swing.ListCellRenderer<code>s
+ */
+- class Wrapped[A](override val peer: ListCellRenderer) extends Renderer[A] {
+- def componentFor(list: ListView[_], isSelected: Boolean, focused: Boolean, a: A, index: Int) = {
++ class Wrapped[A](override val peer: ListCellRenderer[A]) extends Renderer[A] {
++ def componentFor(list: ListView[_ <: A], isSelected: Boolean, focused: Boolean, a: A, index: Int) = {
+ Component.wrap(peer.getListCellRendererComponent(list.peer, a, index, isSelected, focused).asInstanceOf[JComponent])
++ }
+ }
+- }
+
+ /**
+ * Returns a renderer for items of type <code>A</code>. The given function
+@@ -55,8 +55,8 @@
+ * </code>
+ */
+ def apply[A,B](f: A => B)(implicit renderer: Renderer[B]): Renderer[A] = new Renderer[A] {
+- def componentFor(list: ListView[_], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component =
+- renderer.componentFor(list, isSelected, focused, f(a), index)
++ def componentFor(list: ListView[_ <: A], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component =
++ renderer.componentFor(list.asInstanceOf[ListView[_ <: B]], isSelected, focused, f(a), index)
+ }
+ }
+
+@@ -69,11 +69,11 @@
+ * @see javax.swing.ListCellRenderer
+ */
+ abstract class Renderer[-A] {
+- def peer: ListCellRenderer = new ListCellRenderer {
+- def getListCellRendererComponent(list: JList, a: Any, index: Int, isSelected: Boolean, focused: Boolean) =
+- componentFor(ListView.wrap[A](list), isSelected, focused, a.asInstanceOf[A], index).peer
++ def peer: ListCellRenderer[_ >: A] = new ListCellRenderer[A] {
++ def getListCellRendererComponent(list: JList[_ <: A], a: A, index: Int, isSelected: Boolean, focused: Boolean) =
++ componentFor(ListView.wrap[A](list.asInstanceOf[JList[A]]), isSelected, focused, a, index).peer
+ }
+- def componentFor(list: ListView[_], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component
++ def componentFor(list: ListView[_ <: A], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component
+ }
+
+ /**
+@@ -110,7 +110,7 @@
+ /**
+ * Configures the component before returning it.
+ */
+- def componentFor(list: ListView[_], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component = {
++ def componentFor(list: ListView[_ <: A], isSelected: Boolean, focused: Boolean, a: A, index: Int): Component = {
+ preConfigure(list, isSelected, focused, a, index)
+ configure(list, isSelected, focused, a, index)
+ component
+@@ -123,10 +123,10 @@
+ * that renders the string returned from an item's <code>toString</code>.
+ */
+ implicit object GenericRenderer extends Renderer[Any] {
+- override lazy val peer: ListCellRenderer = new DefaultListCellRenderer
+- def componentFor(list: ListView[_], isSelected: Boolean, focused: Boolean, a: Any, index: Int): Component = {
+- val c = peer.getListCellRendererComponent(list.peer, a, index, isSelected, focused).asInstanceOf[JComponent]
+- Component.wrap(c)
++ override lazy val peer: ListCellRenderer[Any] = (new DefaultListCellRenderer).asInstanceOf[ListCellRenderer[Any]]
++ def componentFor(list: ListView[_ <: Any], isSelected: Boolean, focused: Boolean, a: Any, index: Int): Component = {
++ val c = peer.getListCellRendererComponent(list.peer, a, index, isSelected, focused)
++ Component.wrap(c.asInstanceOf[JComponent])
+ }
+ }
+ }
+@@ -142,34 +142,34 @@
+ */
+ class ListView[A] extends Component {
+ import ListView._
+- override lazy val peer: JList = new JList with SuperMixin
++ override lazy val peer: JList[A] = new JList[A] with SuperMixin
+
+ def this(items: Seq[A]) = {
+ this()
+ listData = items
+ }
+
+- protected class ModelWrapper(val items: Seq[A]) extends AbstractListModel {
+- def getElementAt(n: Int) = items(n).asInstanceOf[AnyRef]
++ protected class ModelWrapper[A](val items: Seq[A]) extends AbstractListModel[A] {
++ def getElementAt(n: Int) = items(n)
+ def getSize = items.size
+ }
+
+ def listData: Seq[A] = peer.getModel match {
+- case model: ModelWrapper => model.items
+- case model @ _ => new Seq[A] { selfSeq =>
++ case model: ModelWrapper[a] => model.items
++ case model => new Seq[A] { selfSeq =>
+ def length = model.getSize
+ def iterator = new Iterator[A] {
+ var idx = 0
+ def next = { idx += 1; apply(idx-1) }
+ def hasNext = idx < selfSeq.length
+ }
+- def apply(n: Int) = model.getElementAt(n).asInstanceOf[A]
++ def apply(n: Int): A = model.getElementAt(n)
+ }
+ }
+
+ def listData_=(items: Seq[A]) {
+- peer.setModel(new AbstractListModel {
+- def getElementAt(n: Int) = items(n).asInstanceOf[AnyRef]
++ peer.setModel(new AbstractListModel[A] {
++ def getElementAt(n: Int) = items(n)
+ def getSize = items.size
+ })
+ }
+@@ -227,7 +227,7 @@
+ def adjusting = peer.getSelectionModel.getValueIsAdjusting
+ }
+
+- def renderer: ListView.Renderer[A] = ListView.Renderer.wrap(peer.getCellRenderer)
++ def renderer: ListView.Renderer[A] = ListView.Renderer.wrap[A](peer.getCellRenderer.asInstanceOf[ListCellRenderer[A]])
+ def renderer_=(r: ListView.Renderer[A]) { peer.setCellRenderer(r.peer) }
+
+ def fixedCellWidth = peer.getFixedCellWidth
diff --git a/scala-2.9.1-tooltemplate.patch b/scala-2.9.2-tooltemplate.patch
similarity index 98%
rename from scala-2.9.1-tooltemplate.patch
rename to scala-2.9.2-tooltemplate.patch
index e7ac671..9ecaf7f 100644
--- a/scala-2.9.1-tooltemplate.patch
+++ b/scala-2.9.2-tooltemplate.patch
@@ -23,7 +23,7 @@ diff -up scala-2.9.1.final-sources/src/compiler/scala/tools/ant/templates/tool-u
-SCALA_HOME=`dirname "$SOURCE"`
-SCALA_HOME=`cd "$SCALA_HOME"; pwd -P`
-SCALA_HOME=`cd "$SCALA_HOME"/..; pwd`
-+export JAVA_HOME=/usr/lib/jvm/java-1.6.0/
++export JAVA_HOME=/usr/lib/jvm/java/
+
+[ -r @@JAVADIR@@-utils/java-functions ] && . @@JAVADIR@@-utils/java-functions || exit 1
+
diff --git a/scala-2.9.1-use_system_jline.patch b/scala-2.9.2-use_system_jline.patch
similarity index 54%
rename from scala-2.9.1-use_system_jline.patch
rename to scala-2.9.2-use_system_jline.patch
index d147669..8b8b133 100644
--- a/scala-2.9.1-use_system_jline.patch
+++ b/scala-2.9.2-use_system_jline.patch
@@ -1,7 +1,7 @@
-diff -up scala-2.9.1.final-sources/build.xml.sysjline scala-2.9.1.final-sources/build.xml
---- scala-2.9.1.final-sources/build.xml.sysjline 2011-08-29 12:44:33.000000000 +0200
-+++ scala-2.9.1.final-sources/build.xml 2011-11-08 19:24:10.840819241 +0100
-@@ -162,7 +162,7 @@ PROPERTIES
+diff -Nru scala-2.9.2-sources/build.xml scala-2.9.2-sources-gil/build.xml
+--- scala-2.9.2-sources/build.xml 2012-04-04 18:03:13.000000000 +0200
++++ scala-2.9.2-sources-gil/build.xml 2012-09-13 02:07:24.630865166 +0200
+@@ -164,7 +164,7 @@
<!-- Sets location of pre-compiled libraries -->
<property name="lib.starr.jar" value="${lib.dir}/scala-library.jar"/>
<property name="comp.starr.jar" value="${lib.dir}/scala-compiler.jar"/>
@@ -10,7 +10,7 @@ diff -up scala-2.9.1.final-sources/build.xml.sysjline scala-2.9.1.final-sources/
<property name="ant.jar" value="${ant.home}/lib/ant.jar"/>
<property name="scalacheck.jar" value="${lib.dir}/scalacheck.jar"/>
-@@ -358,7 +358,7 @@ LOCAL REFERENCE BUILD (LOCKER)
+@@ -425,7 +425,7 @@
<pathelement location="${build-locker.dir}/classes/library"/>
<pathelement location="${build-locker.dir}/classes/compiler"/>
<path refid="aux.libs"/>
@@ -19,7 +19,7 @@ diff -up scala-2.9.1.final-sources/build.xml.sysjline scala-2.9.1.final-sources/
</compilationpath>
</scalacfork>
<propertyfile file="${build-locker.dir}/classes/compiler/compiler.properties">
-@@ -573,7 +573,7 @@ QUICK BUILD (QUICK)
+@@ -644,7 +644,7 @@
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
<path refid="aux.libs"/>
@@ -28,7 +28,7 @@ diff -up scala-2.9.1.final-sources/build.xml.sysjline scala-2.9.1.final-sources/
</compilationpath>
</scalacfork>
<propertyfile file="${build-quick.dir}/classes/compiler/compiler.properties">
-@@ -751,7 +751,7 @@ QUICK BUILD (QUICK)
+@@ -825,7 +825,7 @@
<pathelement location="${build-quick.dir}/classes/compiler"/>
<pathelement location="${build-quick.dir}/classes/scalap"/>
<path refid="aux.libs"/>
@@ -37,26 +37,45 @@ diff -up scala-2.9.1.final-sources/build.xml.sysjline scala-2.9.1.final-sources/
</path>
<taskdef name="quick-bin" classname="scala.tools.ant.ScalaTool" classpathref="quick.bin.classpath"/>
<mkdir dir="${build-quick.dir}/bin"/>
-@@ -857,7 +857,6 @@ PACKED QUICK BUILD (PACK)
+@@ -931,7 +931,7 @@
<zipfileset dirmode="755" filemode="644" src="${fjbg.jar}"/>
<zipfileset dirmode="755" filemode="644" src="${msil.jar}"/>
</jar>
- <copy file="${jline.jar}" toDir="${build-pack.dir}/lib"/>
++ <!--copy file="${jline.jar}" toDir="${build-pack.dir}/lib"/-->
<copy todir="${build-pack.dir}/lib">
<fileset dir="${lib-extra.dir}">
<include name="**/*.jar"/>
-@@ -926,7 +925,7 @@ PACKED QUICK BUILD (PACK)
+@@ -1000,7 +1000,7 @@
<classpath>
<pathelement location="${build-pack.dir}/lib/scala-library.jar"/>
<pathelement location="${build-pack.dir}/lib/scala-compiler.jar"/>
- <pathelement location="${build-pack.dir}/lib/jline.jar"/>
-+
++ <!--pathelement location="${build-pack.dir}/lib/jline.jar"/-->
</classpath>
</taskdef>
<mkdir dir="${build-pack.dir}/bin"/>
-diff -up scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/ConsoleReaderHelper.scala.sysjline scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/ConsoleReaderHelper.scala
---- scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/ConsoleReaderHelper.scala.sysjline 2011-04-26 10:50:33.000000000 +0200
-+++ scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/ConsoleReaderHelper.scala 2011-11-08 19:13:18.272033791 +0100
+@@ -1039,7 +1039,7 @@
+ <pathelement location="${build-pack.dir}/lib/scala-partest.jar"/>
+ <pathelement location="${build-pack.dir}/lib/scalap.jar"/>
+ <pathelement location="${ant.jar}"/>
+- <pathelement location="${jline.jar}"/>
++ <pathelement location="${jline2.jar}"/>
+ <path refid="lib.extra"/>
+ </path>
+ <taskdef resource="scala/tools/ant/antlib.xml" classpathref="pack.classpath"/>
+@@ -1161,7 +1161,7 @@
+ <pathelement location="${build-strap.dir}/classes/library"/>
+ <pathelement location="${build-strap.dir}/classes/compiler"/>
+ <path refid="aux.libs"/>
+- <pathelement location="${jline.jar}"/>
++ <pathelement location="${jline2.jar}"/>
+ </compilationpath>
+ </scalacfork>
+ <propertyfile file="${build-strap.dir}/classes/compiler/compiler.properties">
+diff -Nru scala-2.9.2-sources/src/compiler/scala/tools/nsc/interpreter/ConsoleReaderHelper.scala scala-2.9.2-sources-gil/src/compiler/scala/tools/nsc/interpreter/ConsoleReaderHelper.scala
+--- scala-2.9.2-sources/src/compiler/scala/tools/nsc/interpreter/ConsoleReaderHelper.scala 2012-03-18 17:09:24.000000000 +0100
++++ scala-2.9.2-sources-gil/src/compiler/scala/tools/nsc/interpreter/ConsoleReaderHelper.scala 2012-09-13 01:58:09.000000000 +0200
@@ -6,8 +6,8 @@
package scala.tools.nsc
package interpreter
@@ -68,9 +87,9 @@ diff -up scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/Cons
import Completion._
trait ConsoleReaderHelper extends ConsoleReader {
-diff -up scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/Delimited.scala.sysjline scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/Delimited.scala
---- scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/Delimited.scala.sysjline 2011-02-02 14:55:56.000000000 +0100
-+++ scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/Delimited.scala 2011-11-08 19:13:18.272033791 +0100
+diff -Nru scala-2.9.2-sources/src/compiler/scala/tools/nsc/interpreter/Delimited.scala scala-2.9.2-sources-gil/src/compiler/scala/tools/nsc/interpreter/Delimited.scala
+--- scala-2.9.2-sources/src/compiler/scala/tools/nsc/interpreter/Delimited.scala 2012-03-18 17:09:24.000000000 +0100
++++ scala-2.9.2-sources-gil/src/compiler/scala/tools/nsc/interpreter/Delimited.scala 2012-09-13 01:58:43.000000000 +0200
@@ -6,7 +6,7 @@
package scala.tools.nsc
package interpreter
@@ -80,9 +99,9 @@ diff -up scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/Deli
class JLineDelimiter extends ArgumentDelimiter {
def toJLine(args: List[String], cursor: Int) = args match {
-diff -up scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala.sysjline scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala
---- scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala.sysjline 2011-07-24 13:36:45.000000000 +0200
-+++ scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala 2011-11-08 19:13:18.272033791 +0100
+diff -Nru scala-2.9.2-sources/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala scala-2.9.2-sources-gil/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala
+--- scala-2.9.2-sources/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala 2012-03-18 17:09:26.000000000 +0100
++++ scala-2.9.2-sources-gil/src/compiler/scala/tools/nsc/interpreter/JLineCompletion.scala 2012-09-13 01:59:30.000000000 +0200
@@ -6,8 +6,8 @@
package scala.tools.nsc
package interpreter
@@ -94,9 +113,9 @@ diff -up scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/JLin
import Completion._
import collection.mutable.ListBuffer
-diff -up scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala.sysjline scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala
---- scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala.sysjline 2011-07-24 13:36:45.000000000 +0200
-+++ scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala 2011-11-08 19:13:18.273033788 +0100
+diff -Nru scala-2.9.2-sources/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala scala-2.9.2-sources-gil/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala
+--- scala-2.9.2-sources/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala 2012-03-18 17:09:26.000000000 +0100
++++ scala-2.9.2-sources-gil/src/compiler/scala/tools/nsc/interpreter/JLineReader.scala 2012-09-13 02:00:06.000000000 +0200
@@ -6,8 +6,8 @@
package scala.tools.nsc
package interpreter
@@ -108,9 +127,9 @@ diff -up scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/JLin
import session._
import scala.collection.JavaConverters._
import Completion._
-diff -up scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/Parsed.scala.sysjline scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/Parsed.scala
---- scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/Parsed.scala.sysjline 2011-02-02 14:55:56.000000000 +0100
-+++ scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/Parsed.scala 2011-11-08 19:13:18.273033788 +0100
+diff -Nru scala-2.9.2-sources/src/compiler/scala/tools/nsc/interpreter/Parsed.scala scala-2.9.2-sources-gil/src/compiler/scala/tools/nsc/interpreter/Parsed.scala
+--- scala-2.9.2-sources/src/compiler/scala/tools/nsc/interpreter/Parsed.scala 2012-03-18 17:09:24.000000000 +0100
++++ scala-2.9.2-sources-gil/src/compiler/scala/tools/nsc/interpreter/Parsed.scala 2012-09-13 02:00:40.000000000 +0200
@@ -6,7 +6,7 @@
package scala.tools.nsc
package interpreter
@@ -120,13 +139,13 @@ diff -up scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/Pars
import util.returning
/** One instance of a command buffer.
-diff -up scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/ReplProps.scala.sysjline scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/ReplProps.scala
---- scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/ReplProps.scala.sysjline 2011-08-24 07:55:31.000000000 +0200
-+++ scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/ReplProps.scala 2011-11-08 19:13:18.273033788 +0100
-@@ -11,8 +11,8 @@ import scala.sys._
+diff -Nru scala-2.9.2-sources/src/compiler/scala/tools/nsc/interpreter/ReplProps.scala scala-2.9.2-sources-gil/src/compiler/scala/tools/nsc/interpreter/ReplProps.scala
+--- scala-2.9.2-sources/src/compiler/scala/tools/nsc/interpreter/ReplProps.scala 2012-03-18 17:09:24.000000000 +0100
++++ scala-2.9.2-sources-gil/src/compiler/scala/tools/nsc/interpreter/ReplProps.scala 2012-09-13 02:01:19.000000000 +0200
+@@ -11,8 +11,8 @@
class ReplProps {
private def bool(name: String) = BooleanProp.keyExists(name)
-
+
- val jlineDebug = bool("scala.tools.jline.internal.Log.debug")
- val jlineTrace = bool("scala.tools.jline.internal.Log.trace")
+ val jlineDebug = bool("jline.internal.Log.debug")
@@ -134,10 +153,10 @@ diff -up scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/Repl
val noThreads = bool("scala.repl.no-threads")
val info = bool("scala.repl.info")
-diff -up scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/session/package.scala.sysjline scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/session/package.scala
---- scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/session/package.scala.sysjline 2011-03-17 13:59:48.000000000 +0100
-+++ scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/session/package.scala 2011-11-08 19:13:18.274033785 +0100
-@@ -13,10 +13,10 @@ package object session {
+diff -Nru scala-2.9.2-sources/src/compiler/scala/tools/nsc/interpreter/session/package.scala scala-2.9.2-sources-gil/src/compiler/scala/tools/nsc/interpreter/session/package.scala
+--- scala-2.9.2-sources/src/compiler/scala/tools/nsc/interpreter/session/package.scala 2012-03-18 17:09:24.000000000 +0100
++++ scala-2.9.2-sources-gil/src/compiler/scala/tools/nsc/interpreter/session/package.scala 2012-09-13 02:01:54.000000000 +0200
+@@ -13,10 +13,10 @@
type JIterator[T] = java.util.Iterator[T]
type JListIterator[T] = java.util.ListIterator[T]
@@ -149,6 +168,6 @@ diff -up scala-2.9.1.final-sources/src/compiler/scala/tools/nsc/interpreter/sess
+ type JHistory = jline.console.history.History
+ type JMemoryHistory = jline.console.history.MemoryHistory
+ type JPersistentHistory = jline.console.history.PersistentHistory
-
+
private[interpreter] implicit def charSequenceFix(x: CharSequence): String = x.toString
}
diff --git a/scala.spec b/scala.spec
index c6a8cb5..89b5d52 100644
--- a/scala.spec
+++ b/scala.spec
@@ -1,8 +1,11 @@
-%global fullversion %{version}.final
-
+%global fullversion %{version}
+%global release_repository http://nexus.scala-tools.org/content/repositories/releases
+%global snapshot_repository http://nexus.scala-tools.org/content/repositories/snapshots
+%global jline2_jar /usr/share/java/jline2.jar
+%global jansi_jar /usr/share/java/jansi.jar
Name: scala
-Version: 2.9.1
-Release: 3%{?dist}
+Version: 2.9.2
+Release: 1%{?dist}
Summary: A hybrid functional/object-oriented language for the JVM
BuildArch: noarch
Group: Development/Languages
@@ -10,36 +13,31 @@ Group: Development/Languages
# https://www.redhat.com/archives/fedora-legal-list/2007-December/msg00012.html
License: BSD
URL: http://www.scala-lang.org/
-
# Source
-Source0: http://www.scala-lang.org/downloads/distrib/files/scala-%{fullversion}-sources.tgz
-
+Source0: http://www.scala-lang.org/downloads/distrib/files/scala-sources-%{fullversion}.tgz
# Change the default classpath (SCALA_HOME)
-# Set JAVA-HOME to jdk6, because scala does't
-# works with the jdk7
-Patch1: scala-2.9.1-tooltemplate.patch
-
+Patch1: scala-2.9.2-tooltemplate.patch
# Use system jline2 instead of bundled jline2
-Patch2: scala-2.9.1-use_system_jline.patch
+Patch2: scala-2.9.2-use_system_jline.patch
+# change org.scala-lang jline in org.sonatype.jline jline
+Patch3: scala-2.9.2-compiler-pom.patch
+
+Patch4: scala-2.9.2-java7.patch
Source21: scala.keys
Source22: scala.mime
Source23: scala-mime-info.xml
Source24: scala.ant.d
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-%global jline2_jar /usr/share/java/jline2.jar
-%global jansi_jar /usr/share/java/jansi.jar
-
# Force build with openjdk/icedtea because gij is horribly slow and I haven't
# been successful at integrating aot compilation with the build process
-BuildRequires: java-1.6.0-openjdk-devel
+# BuildRequires: java-1.6.0-openjdk-devel
+BuildRequires: java-devel
BuildRequires: ant
BuildRequires: ant-contrib
-BuildRequires: ant-nodeps
BuildRequires: jline2
BuildRequires: jpackage-utils
+# BuildRequires: maven-ant-tasks
BuildRequires: shtool
Requires: java
Requires: jline2
@@ -90,19 +88,41 @@ the Scala programming language
%setup -q -n scala-%{fullversion}-sources
%patch1 -p1 -b .tool
%patch2 -p1 -b .sysjline
+%patch3 -p0 -b .compiler-pom
+%patch4 -p1 -b .jdk7
pushd src
rm -rf jline
popd
+pushd lib
+# fjbg.jar ch.epfl.lamp
+# forkjoin.jar scala.concurrent.forkjoin available @ https://bugzilla.redhat.com/show_bug.cgi?id=854234 as jsr166y
+ rm -rf jline.jar
+# midpapi10.jar https://bugzilla.redhat.com/show_bug.cgi?id=807242 ?
+# msil.jar ch.epfl.lamp.compiler
+# scala-compiler.jar
+# scala-library-src.jar
+# scala-library.jar
+ pushd ant
+ rm -rf ant.jar
+ rm -rf ant-contrib.jar
+ ln -s $(build-classpath ant.jar) ant.jar
+ ln -s $(build-classpath ant/ant-contrib) ant-contrib.jar
+# rm -rf ant-dotnet-1.0.jar
+ rm -rf maven-ant-tasks-2.1.1.jar
+# rm -rf vizant.jar
+ popd
+popd
+# see https://github.com/scala/scala/pull/1019
+#sed -i "s|<files includes="${src.dir}/swing"/>|<!--files includes="${src.dir}/swing"/-->|" build.xml
+
%build
export ANT_OPTS="-Xms1024m -Xmx1024m"
-export JAVA_HOME=/usr/lib/jvm/java-1.6.0/
ant build docs
%install
-rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_bindir}
for prog in scaladoc fsc scala scalac scalap; do
@@ -111,10 +131,16 @@ done
install -p -m 755 -d $RPM_BUILD_ROOT%{_javadir}/scala
install -p -m 755 -d $RPM_BUILD_ROOT%{scaladir}/lib
-for libname in scala-compiler scala-dbc scala-library scala-partest scala-swing scalap ; do
- install -m 644 build/pack/lib/$libname.jar $RPM_BUILD_ROOT%{_javadir}/scala/$libname-%{fullversion}.jar
- ln -s $libname-%{fullversion}.jar $RPM_BUILD_ROOT%{_javadir}/scala/$libname.jar
+install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
+# TODO scala-swing
+for libname in scala-compiler scala-dbc scala-library scala-partest scalap ; do
+ install -m 644 build/pack/lib/$libname.jar $RPM_BUILD_ROOT%{_javadir}/scala/
shtool mkln -s $RPM_BUILD_ROOT%{_javadir}/scala/$libname.jar $RPM_BUILD_ROOT%{scaladir}/lib
+ sed -i "s|@VERSION@|%{fullversion}|" src/build/maven/$libname-pom.xml
+ sed -i "s|@RELEASE_REPOSITORY@|%{release_repository}|" src/build/maven/$libname-pom.xml
+ sed -i "s|@SNAPSHOT_REPOSITORY@|%{snapshot_repository}|" src/build/maven/$libname-pom.xml
+ install -pm 644 src/build/maven/$libname-pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-$libname.pom
+%add_maven_depmap JPP.%{name}-$libname.pom %{name}/$libname.jar
done
shtool mkln -s $RPM_BUILD_ROOT%{jline2_jar} $RPM_BUILD_ROOT%{scaladir}/lib
shtool mkln -s $RPM_BUILD_ROOT%{jansi_jar} $RPM_BUILD_ROOT%{scaladir}/lib
@@ -141,37 +167,45 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
%postun
update-mime-database %{_datadir}/mime &> /dev/null || :
-%clean
-rm -rf $RPM_BUILD_ROOT
%files
-%defattr(-,root,root,-)
%{_bindir}/*
%{_javadir}/scala
%dir %{_datadir}/scala
%{_datadir}/scala/lib
-%doc docs/LICENSE
-%doc README
%{_datadir}/mime-info/*
%{_datadir}/mime/packages/*
%{_mandir}/man1/*
+%{_mavenpomdir}/JPP.%{name}-*.pom
+%{_mavendepmapfragdir}/%{name}
+%doc docs/LICENSE README
%files -n ant-scala
-%defattr(-,root,root,-)
# Following is plain config because the ant task classpath could change from
# release to release
%config %{_sysconfdir}/ant.d/*
+%doc docs/LICENSE
%files apidoc
-%defattr(-,root,root,-)
%doc build/scaladoc/library/*
%doc docs/LICENSE
%files examples
-%defattr(-,root,root,-)
%{_datadir}/scala/examples
+%doc docs/LICENSE
%changelog
+* Thu Sep 13 2012 gil cattaneo <puntogil at libero.it> 2.9.2-1
+- update to 2.9.2
+- added maven poms
+- adapted to current guideline
+- built with java 7 support
+- removed ant-nodeps from buildrequires
+- disabled swing module
+
+* Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.9.1-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.9.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
diff --git a/sources b/sources
index 27161d4..a266dc3 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-06d321fcea731313d40fc93a4cf72c56 scala-2.9.1.final-sources.tgz
+8b4b3347e2350dcba0aa1615f76de746 scala-sources-2.9.2.tgz
More information about the scm-commits
mailing list