[scala] Explicit build agains jdk6

Jochen Schmitt s4504kr at fedoraproject.org
Sun Nov 27 20:15:10 UTC 2011


commit df8260edc3b6932302a9faf9ff7b530e6915b8d0
Author: Jochen Schmitt <Jochen at herr-schmitt.de>
Date:   Sun Nov 27 21:14:56 2011 +0100

    Explicit build agains jdk6

 scala-2.9.1-tooltemplate.patch |   10 ++++++----
 scala.spec                     |   12 +++++++++---
 2 files changed, 15 insertions(+), 7 deletions(-)
---
diff --git a/scala-2.9.1-tooltemplate.patch b/scala-2.9.1-tooltemplate.patch
index 2b3a885..e7ac671 100644
--- a/scala-2.9.1-tooltemplate.patch
+++ b/scala-2.9.1-tooltemplate.patch
@@ -1,7 +1,7 @@
 diff -up scala-2.9.1.final-sources/src/compiler/scala/tools/ant/templates/tool-unix.tmpl.tool scala-2.9.1.final-sources/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
 --- scala-2.9.1.final-sources/src/compiler/scala/tools/ant/templates/tool-unix.tmpl.tool	2011-05-02 12:20:26.000000000 +0200
-+++ scala-2.9.1.final-sources/src/compiler/scala/tools/ant/templates/tool-unix.tmpl	2011-11-03 19:49:45.558715195 +0100
-@@ -47,24 +47,13 @@ case "`uname`" in
++++ scala-2.9.1.final-sources/src/compiler/scala/tools/ant/templates/tool-unix.tmpl	2011-11-27 20:15:00.986325419 +0100
+@@ -47,24 +47,15 @@ case "`uname`" in
      CYGWIN*) cygwin=true ;;
  esac
  
@@ -23,6 +23,8 @@ 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/
++
 +[ -r @@JAVADIR@@-utils/java-functions ] && . @@JAVADIR@@-utils/java-functions || exit 1
 +
 +set_javacmd || exit 3
@@ -33,7 +35,7 @@ diff -up scala-2.9.1.final-sources/src/compiler/scala/tools/ant/templates/tool-u
  
  # Remove spaces from SCALA_HOME on windows
  if $cygwin; then
-@@ -84,23 +73,6 @@ if [ -z "$TOOL_CLASSPATH" ] ; then
+@@ -84,23 +75,6 @@ if [ -z "$TOOL_CLASSPATH" ] ; then
      done
  fi
  
@@ -57,7 +59,7 @@ diff -up scala-2.9.1.final-sources/src/compiler/scala/tools/ant/templates/tool-u
  [ -n "$JAVA_OPTS" ] || JAVA_OPTS="@javaflags@"
  
  # break out -D and -J options and add them to JAVA_OPTS as well
-@@ -146,11 +118,7 @@ done
+@@ -146,11 +120,7 @@ done
  # reset "$@@" to the remaining args
  set -- "${scala_args[@@]}"
  
diff --git a/scala.spec b/scala.spec
index 35269d9..c8e5ee7 100644
--- a/scala.spec
+++ b/scala.spec
@@ -2,7 +2,7 @@
 
 Name:           scala
 Version:        2.9.1
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        A hybrid functional/object-oriented language for the JVM
 BuildArch:      noarch
 Group:          Development/Languages
@@ -15,6 +15,8 @@ URL:            http://www.scala-lang.org/
 Source0:        http://www.scala-lang.org/downloads/distrib/files/scala-%{fullversion}-sources.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
 
 # Use system jline2 instead of bundled jline2
@@ -32,7 +34,7 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 # 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-devel-openjdk >= 1:1.6.0
+BuildRequires:  java-1.6.0-openjdk-devel
 BuildRequires:  ant
 BuildRequires:  ant-contrib
 BuildRequires:  ant-nodeps
@@ -96,7 +98,8 @@ popd
 %build
 
 export ANT_OPTS="-Xms1024m -Xmx1024m"
-%ant build docs
+export JAVA_HOME=/usr/lib/jvm/java-1.6.0/
+ant build docs
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -169,6 +172,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/scala/examples
 
 %changelog
+* Sun Nov 27 2011 Jochen Schmitt <Jochen herr-schmitt de> - 2.9.1-2
+- Build explicit agains java-1.6.0
+
 * Thu Nov  3 2011 Jochen Schmitt <Jochen herr-schmitt de> - 2.9.1-1
 - New upstream release
 


More information about the scm-commits mailing list