[scala-2.10] 121/166: Update patches
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Tue Nov 15 12:43:42 UTC 2016
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to branch master
in repository scala-2.10.
commit e179e42f1675a5517a80b2147ded6d8db436d4dc
Author: Lucas Satabin <lucas.satabin at gnieh.org>
Date: Sun Mar 30 18:01:53 2014 +0200
Update patches
---
debian/patches/0001-Define-system-locations.patch | 21 ++--
.../patches/0002-Use-system-ant-contrib.jar.patch | 19 ++-
..._HOME-and-TOOL_CLASSPATH-to-the-package-l.patch | 55 ++++----
debian/patches/0005-java7-compilation.patch | 138 +++++++++------------
debian/patches/remove-non-ascii-ftbfs.patch | 9 +-
5 files changed, 113 insertions(+), 129 deletions(-)
diff --git a/debian/patches/0001-Define-system-locations.patch b/debian/patches/0001-Define-system-locations.patch
index 2fee3dc..33ef923 100644
--- a/debian/patches/0001-Define-system-locations.patch
+++ b/debian/patches/0001-Define-system-locations.patch
@@ -6,24 +6,22 @@ Subject: Define system locations
build.xml | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
-diff --git a/build.xml b/build.xml
-index 2281613..f77c225 100644
--- a/build.xml
+++ b/build.xml
-@@ -141,6 +141,10 @@ PROPERTIES
+@@ -97,6 +97,10 @@
<!-- Prevents system classpath from being used -->
- <property name="build.sysclasspath" value="ignore"/>
+ <property name="build.sysclasspath" value="ignore"/>
+ <!-- Defines system location of java libraries -->
+ <property name="javalib.dir" value="/usr/share/java" />
+ <property name="scalalib.dir" value="${javalib.dir}/scala" />
+
<!-- Defines the repository layout -->
- <property name="docs.dir" value="${basedir}/docs"/>
- <property name="lib.dir" value="${basedir}/lib"/>
-@@ -159,6 +163,11 @@ PROPERTIES
- <property name="scalac.args" value=""/>
- <property name="javac.args" value=""/>
+ <property name="docs.dir" value="${basedir}/docs"/>
+ <property name="lib.dir" value="${basedir}/lib"/>
+@@ -117,6 +121,11 @@
+ <!-- read starr.version -->
+ <property file="${basedir}/starr.number"/>
+ <!-- Sets location of system libraries -->
+ <property name="junit.jar" value="${javalib.dir}/junit4.jar"/>
@@ -31,6 +29,5 @@ index 2281613..f77c225 100644
+ <property name="jansi-native.jar" value="${javalib.dir}/jansi-native.jar"/>
+
<!-- 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"/>
---
+ <property name="library.starr.jar" value="${lib.dir}/scala-library.jar"/>
+ <property name="reflect.starr.jar" value="${lib.dir}/scala-reflect.jar"/>
diff --git a/debian/patches/0002-Use-system-ant-contrib.jar.patch b/debian/patches/0002-Use-system-ant-contrib.jar.patch
index 1b728ca..c8a7093 100644
--- a/debian/patches/0002-Use-system-ant-contrib.jar.patch
+++ b/debian/patches/0002-Use-system-ant-contrib.jar.patch
@@ -6,17 +6,14 @@ Subject: Use system ant-contrib.jar
build.xml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
-diff --git a/build.xml b/build.xml
-index f77c225..33db14a 100644
--- a/build.xml
+++ b/build.xml
-@@ -220,7 +220,7 @@ INITIALISATION
- <property name="scalac.args.all" value="${scalac.args} ${scalac.args.optimise}"/>
- <property name="scalac.args.quick" value="${scalac.args.all} ${scalac.args.quickonly}"/>
- <!-- Setting-up Ant contrib tasks -->
-- <taskdef resource="net/sf/antcontrib/antlib.xml" classpath="${lib.dir}/ant/ant-contrib.jar"/>
+@@ -202,7 +202,7 @@
+
+ <target name="init" depends="boot">
+ <!-- Set up Ant contrib tasks so we can use <if><then><else> instead of the clunky `unless` attribute -->
+- <taskdef resource="net/sf/antcontrib/antlib.xml" classpath="${lib-ant.dir}/ant-contrib.jar"/>
+ <taskdef resource="net/sf/antcontrib/antlib.xml" classpath="${javalib.dir}/ant-contrib.jar"/>
- <!-- This is the start time for the distribution -->
- <tstamp prefix="time">
- <format property="human" pattern="d MMMM yyyy, HH:mm:ss"/>
---
+
+ <!-- Add our maven ant tasks -->
+ <path id="maven-ant-tasks.classpath" path="${lib-ant.dir}/maven-ant-tasks-2.1.1.jar" />
diff --git a/debian/patches/0003-Adapt-SCALA_HOME-and-TOOL_CLASSPATH-to-the-package-l.patch b/debian/patches/0003-Adapt-SCALA_HOME-and-TOOL_CLASSPATH-to-the-package-l.patch
index e7d80d2..87601f1 100644
--- a/debian/patches/0003-Adapt-SCALA_HOME-and-TOOL_CLASSPATH-to-the-package-l.patch
+++ b/debian/patches/0003-Adapt-SCALA_HOME-and-TOOL_CLASSPATH-to-the-package-l.patch
@@ -8,46 +8,47 @@ Subject: Adapt SCALA_HOME and TOOL_CLASSPATH to the package layout
--- a/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
+++ b/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
-@@ -48,23 +48,7 @@
- esac
+@@ -8,16 +8,6 @@
+ # PARTICULAR PURPOSE.
+ ##############################################################################
+
+-findScalaHome () {
+- # see SI-2092 and SI-5792
+- local source="${BASH_SOURCE[0]}"
+- while [ -h "$source" ] ; do
+- local linked="$(readlink "$source")"
+- local dir="$( cd -P $(dirname "$source") && cd -P $(dirname "$linked") && pwd )"
+- source="$dir/$(basename "$linked")"
+- done
+- ( cd -P "$(dirname "$source")/.." && pwd )
+-}
+ execCommand () {
+ [[ -n $SCALA_RUNNER_DEBUG ]] && echo "" && for arg in "$@@"; do echo "$arg"; done && echo "";
+ "$@@"
+@@ -68,7 +58,7 @@
+ fi
# Finding the root folder for this Scala distribution
--SOURCE=$0;
--SCRIPT=`basename "$SOURCE"`;
--while [ -h "$SOURCE" ]; do
-- SCRIPT=`basename "$SOURCE"`;
-- LOOKUP=`ls -ld "$SOURCE"`;
-- TARGET=`expr "$LOOKUP" : '.*-> \(.*\)$'`;
-- if expr "${TARGET:-.}/" : '/.*/$' > /dev/null; then
-- SOURCE=${TARGET:-.};
-- else
-- SOURCE=`dirname "$SOURCE"`/${TARGET:-.};
-- fi;
--done;
--
--# see #2092
--SCALA_HOME=`dirname "$SOURCE"`
--SCALA_HOME=`cd "$SCALA_HOME"; pwd -P`
--SCALA_HOME=`cd "$SCALA_HOME"/..; pwd`
+-SCALA_HOME="$(findScalaHome)"
+SCALA_HOME="/usr/share/java"
+ SEP=":"
- # Remove spaces from SCALA_HOME on windows
- if $cygwin; then
-@@ -73,16 +57,7 @@
+ # Possible additional command line options
+@@ -84,16 +74,7 @@
fi
# Constructing the extension classpath
-TOOL_CLASSPATH="@classpath@"
--if [ -z "$TOOL_CLASSPATH" ] ; then
+-if [[ -z "$TOOL_CLASSPATH" ]]; then
- for ext in "$SCALA_HOME"/lib/* ; do
-- if [ -z "$TOOL_CLASSPATH" ] ; then
+- if [[ -z "$TOOL_CLASSPATH" ]]; then
- TOOL_CLASSPATH="$ext"
- else
-- TOOL_CLASSPATH="$TOOL_CLASSPATH:$ext"
+- TOOL_CLASSPATH="${TOOL_CLASSPATH}${SEP}${ext}"
- fi
- done
-fi
+TOOL_CLASSPATH="$SCALA_HOME/scala-compiler.jar:$SCALA_HOME/scala-library.jar:$SCALA_HOME/scalap.jar:$SCALA_HOME/scala/jline.jar:$SCALA_HOME/jansi.jar"
- CYGWIN_JLINE_TERMINAL=
- if $cygwin; then
+ if [[ -n "$cygwin" ]]; then
+ if [[ "$OS" = "Windows_NT" ]] && cygpath -m .>/dev/null 2>/dev/null ; then
diff --git a/debian/patches/0005-java7-compilation.patch b/debian/patches/0005-java7-compilation.patch
index 70fb437..314bd22 100644
--- a/debian/patches/0005-java7-compilation.patch
+++ b/debian/patches/0005-java7-compilation.patch
@@ -5,27 +5,16 @@ Forwarded: not-needed
--- a/src/swing/scala/swing/ComboBox.scala
+++ b/src/swing/scala/swing/ComboBox.scala
-@@ -1,17 +1,15 @@
- /* __ *\
- ** ________ ___ / / ___ Scala API **
--** / __/ __// _ | / / / _ | (c) 2007-2011, LAMP/EPFL **
-+** / __/ __// _ | / / / _ | (c) 2007-2013, LAMP/EPFL **
- ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
- ** /____/\___/_/ |_/____/_/ | | **
- ** |/ **
- \* */
-
--
--
+@@ -9,7 +9,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 javax.swing.{JComponent, JComboBox, JTextField, ComboBoxModel, AbstractListModel, ListCellRenderer}
import java.awt.event.ActionListener
object ComboBox {
-@@ -120,10 +118,10 @@
+@@ -118,10 +118,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)
@@ -39,7 +28,7 @@ Forwarded: not-needed
def setSelectedItem(a: Any) {
if ((selected != null && selected != a) ||
selected == null && a != null) {
-@@ -131,7 +129,7 @@
+@@ -129,7 +129,7 @@
fireContentsChanged(this, -1, -1)
}
}
@@ -48,7 +37,7 @@ Forwarded: not-needed
def getSize = items.size
}
}
-@@ -159,7 +157,7 @@
+@@ -157,7 +157,7 @@
* @see javax.swing.JComboBox
*/
class ComboBox[A](items: Seq[A]) extends Component with Publisher {
@@ -57,7 +46,7 @@ Forwarded: not-needed
object selection extends Publisher {
def index: Int = peer.getSelectedIndex
-@@ -184,7 +182,8 @@
+@@ -182,7 +182,8 @@
* of the component to its own defaults _after_ the renderer has been
* configured. That's Swing's principle of most suprise.
*/
@@ -67,28 +56,68 @@ Forwarded: not-needed
def renderer_=(r: ListView.Renderer[A]) { peer.setRenderer(r.peer) }
/* XXX: currently not safe to expose:
-@@ -203,8 +202,8 @@
+@@ -201,8 +202,9 @@
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)
+ peer.setPrototypeDisplayValue((v map toAnyRef).orNull.asInstanceOf[A])
}
}
++
+--- a/build.xml
++++ b/build.xml
+@@ -364,13 +364,6 @@
+
+ <fail if="has.unsupported.jdk" message="JDK ${ant.java.version} is not supported by this build!"/>
+
+- <if><isset property="has.java7"/><then>
+- <echo level="warning"> You are using JDK7 for this build.
+- While this will be able to build most of Scala, it will not build the Swing project.
+- You will be unable to create a distribution.
+- </echo>
+- </then></if>
+-
+ <!-- Allow this to be overridden simply -->
+ <property name="sbt.latest.version" value="0.12.2"/>
+
+@@ -1195,7 +1188,7 @@
+ <target name="quick.partest" depends="quick.scalap, quick.comp, asm.done">
+ <staged-build with="locker" stage="quick" project="partest" version="partest"/> </target>
+
+- <target name="quick.swing" depends="quick.actors, quick.lib" if="has.java6">
++ <target name="quick.swing" depends="quick.actors, quick.lib">
+ <staged-build with="locker" stage="quick" project="swing"/> </target>
+
+ <target name="quick.plugins" depends="quick.comp">
+@@ -1246,7 +1239,7 @@
+ <staged-pack project="library"/></target>
+
+ <target name="pack.actors" depends="quick.lib"> <staged-pack project="actors"/> </target>
+- <target name="pack.swing" if="has.java6" depends="quick.swing"> <staged-pack project="swing"/> </target>
++ <target name="pack.swing" depends="quick.swing"> <staged-pack project="swing"/> </target>
+ <target name="pack.reflect" depends="quick.reflect"> <staged-pack project="reflect"/> </target>
+
+ <target name="pack.comp" depends="quick.comp, asm.done">
+@@ -1393,11 +1386,9 @@
+ <make-bundle name="scala-reflect" version="${osgi.version.number}" />
+ <make-bundle name="scala-compiler" version="${osgi.version.number}" />
+ <make-plugin-bundle name="continuations" version="${osgi.version.number}" />
++ <make-bundle name="scala-swing" version="${osgi.version.number}"/>
+ <touch file="${build-osgi.dir}/bundles.complete" verbose="no"/>
+
+- <if><isset property="has.java6"/><then>
+- <make-bundle name="scala-swing" version="${osgi.version.number}"/></then>
+- </if>
+ <stopwatch name="osgi.bundle.timer" action="total"/></then>
+ </if>
+ </target>
--- a/src/swing/scala/swing/ListView.scala
+++ b/src/swing/scala/swing/ListView.scala
-@@ -1,6 +1,6 @@
- /* __ *\
- ** ________ ___ / / ___ Scala API **
--** / __/ __// _ | / / / _ | (c) 2007-2011, LAMP/EPFL **
-+** / __/ __// _ | / / / _ | (c) 2007-2013, LAMP/EPFL **
- ** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
- ** /____/\___/_/ |_/____/_/ | | **
- ** |/ **
-@@ -24,21 +24,21 @@
+@@ -24,18 +24,18 @@
val MultiInterval = Value(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION)
}
@@ -106,15 +135,11 @@ Forwarded: not-needed
*/
- 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) = {
++ 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>
*/
@@ -188,7 +213,7 @@ Forwarded: not-needed
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: ModelWrapper[A] => model.items
+ case model => new Seq[A] { selfSeq =>
def length = model.getSize
def iterator = new Iterator[A] {
@@ -209,34 +234,7 @@ Forwarded: not-needed
def getSize = items.size
})
}
-@@ -195,25 +195,12 @@
- object indices extends Indices(peer.getSelectedIndices) {
- def -=(n: Int): this.type = { peer.removeSelectionInterval(n,n); this }
- def +=(n: Int): this.type = { peer.addSelectionInterval(n,n); this }
-- @deprecated("Use ListView.selection.leadIndex", "2.8.0")
-- def leadIndex: Int = peer.getSelectionModel.getLeadSelectionIndex
-- @deprecated("Use ListView.selection.anchorIndex", "2.8.0")
-- def anchorIndex: Int = peer.getSelectionModel.getAnchorSelectionIndex
- }
-
-- @deprecated("Use ListView.selectIndices", "2.8.0")
-- def selectIndices(ind: Int*) = peer.setSelectedIndices(ind.toArray)
--
- /**
- * The currently selected items.
- */
-- object items extends scala.collection.SeqProxy[A] {
-- def self = peer.getSelectedValues.map(_.asInstanceOf[A])
-- @deprecated("Use ListView.selection.leadIndex", "2.8.0")
-- def leadIndex: Int = peer.getSelectionModel.getLeadSelectionIndex
-- @deprecated("Use ListView.selection.anchorIndex", "2.8.0")
-- def anchorIndex: Int = peer.getSelectionModel.getAnchorSelectionIndex
-- }
-+ lazy val items = peer.getSelectedValues.map(_.asInstanceOf[A])
-
- def intervalMode: IntervalMode.Value = IntervalMode(peer.getSelectionModel.getSelectionMode)
- def intervalMode_=(m: IntervalMode.Value) { peer.getSelectionModel.setSelectionMode(m.id) }
-@@ -227,7 +214,7 @@
+@@ -216,7 +216,7 @@
def adjusting = peer.getSelectionModel.getValueIsAdjusting
}
@@ -245,15 +243,3 @@ Forwarded: not-needed
def renderer_=(r: ListView.Renderer[A]) { peer.setCellRenderer(r.peer) }
def fixedCellWidth = peer.getFixedCellWidth
-@@ -239,6 +226,11 @@
- def prototypeCellValue: A = peer.getPrototypeCellValue.asInstanceOf[A]
- def prototypeCellValue_=(a: A) { peer.setPrototypeCellValue(a) }
-
-+ def visibleRowCount = peer.getVisibleRowCount
-+ def visibleRowCount_=(n: Int) = peer.setVisibleRowCount(n)
-+
-+ def ensureIndexIsVisible(idx: Int) = peer.ensureIndexIsVisible(idx)
-+
- def selectionForeground: Color = peer.getSelectionForeground
- def selectionForeground_=(c: Color) = peer.setSelectionForeground(c)
- def selectionBackground: Color = peer.getSelectionBackground
diff --git a/debian/patches/remove-non-ascii-ftbfs.patch b/debian/patches/remove-non-ascii-ftbfs.patch
index 7f4ef77..2989521 100644
--- a/debian/patches/remove-non-ascii-ftbfs.patch
+++ b/debian/patches/remove-non-ascii-ftbfs.patch
@@ -9,13 +9,14 @@
* @since 2.0
*/
public class UnixTerminal
-@@ -245,4 +245,4 @@
+@@ -245,4 +245,5 @@
return codes.get((short) code);
}
}
-}
\ No newline at end of file
+}
++
--- a/src/jline/src/main/java/scala/tools/jline/internal/TerminalLineSettings.java
+++ b/src/jline/src/main/java/scala/tools/jline/internal/TerminalLineSettings.java
@@ -22,7 +22,7 @@
@@ -27,13 +28,14 @@
* @since 2.0
*/
public final class TerminalLineSettings
-@@ -214,4 +214,4 @@
+@@ -214,4 +214,5 @@
}
}
}
-}
\ No newline at end of file
+}
++
--- a/src/jline/src/test/java/scala/tools/jline/internal/TerminalLineSettingsTest.java
+++ b/src/jline/src/test/java/scala/tools/jline/internal/TerminalLineSettingsTest.java
@@ -8,7 +8,7 @@
@@ -45,10 +47,11 @@
*/
public class TerminalLineSettingsTest
{
-@@ -143,4 +143,4 @@
+@@ -143,4 +143,5 @@
assertEquals(32, settings.getProperty("rows", freeBsdSttySample));
}
-}
\ No newline at end of file
+}
++
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/scala-2.10.git
More information about the pkg-java-commits
mailing list