[scala] updated spec for 2.10.4

William Benton willb at fedoraproject.org
Fri Sep 26 19:45:30 UTC 2014


commit a4b671579445fe4deff19257f6fb6aea160f4e59
Author: William Benton <willb at redhat.com>
Date:   Fri Sep 26 14:44:57 2014 -0500

    updated spec for 2.10.4

 scala.spec |   81 ++++++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 57 insertions(+), 24 deletions(-)
---
diff --git a/scala.spec b/scala.spec
index 5c744c9..aaf2320 100644
--- a/scala.spec
+++ b/scala.spec
@@ -19,9 +19,12 @@
 %global apidoc %{_docdir}/%{name}-apidoc-%{version}
 %endif
 
+%global junit_pkg junit
+
+
 Name:           scala
-Version:        2.10.3
-Release:        12%{?dist}
+Version:        2.10.4
+Release:        1%{?dist}
 Summary:        A hybrid functional/object-oriented language for the JVM
 BuildArch:      noarch
 Group:          Development/Languages
@@ -29,15 +32,25 @@ 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 and Source2 will generated from upstream git repository via
-# the get-source.sh script
-Source0:        scala-%{version}.tgz
+
+Source0:        https://github.com/scala/scala/archive/v%{version}.tar.gz
 Source1:        scala-library-2.10.0-bnd.properties.in
 # Bootstrap file generated by ./get-sources.sh
-Source2:        scala-%{version}-bootstrap.tgz
+Source2:        scala-2.10.3-bootstrap.tgz
 # git information generated by ./get-sources.sh
-Source3:       scala.gitinfo
+Source3:        scala.gitinfo
+
+# we need this binary copy of the scala 2.10.4 compiler
+# 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.
+
+# unfortunately, this has the same name as the source archive,
+# so we can't use a URL here.  Get this file by running 
+#   curl http://www.scala-lang.org/files/archive/scala-2.10.4.tgz \
+#       > scala-bin-2.10.4.tgz
+
+Source4:        http://www.scala-lang.org/files/archive/scala-2.10.4.tgz
 
 # Source0:        http://www.scala-lang.org/downloads/distrib/files/scala-sources-%{fullversion}.tgz
 # Change the default classpath (SCALA_HOME)
@@ -53,8 +66,8 @@ Patch6:         scala-2.10-jline.patch
 # work around a known bug when running binary-compatibility tests against
 # non-optimized builds (we can't do optimized builds due to another bug):
 # http://grokbase.com/t/gg/scala-internals/1347g1jahq/2-10-x-bc-test-fails
-Patch7:         scala-2.10.1-bc.patch
-Patch8:         scala-2.10.3-build_xml.patch
+# Patch7:         scala-2.10.1-bc.patch
+Patch8:         scala-2.10.4-build_xml.patch
 
 Source21:       scala.keys
 Source22:       scala.mime
@@ -75,7 +88,7 @@ BuildRequires:  jline2
 BuildRequires:  javapackages-tools
 BuildRequires:  shtool
 BuildRequires:  aqute-bnd
-BuildRequires:  junit4
+BuildRequires:  %{junit_pkg}
 BuildRequires:  felix-framework
 BuildRequires:  jpackage-utils
 
@@ -89,9 +102,11 @@ Requires:       jansi
 %if 0%{?fedora} > 20
 Requires:       java-headless >= 1:1.7.0
 Requires:       jline >= 2.10
+%global want_jdk8 1
 %else
 Requires:       java >= 1:1.7.0
 Requires:       jline2
+%global want_jdk8 0
 %endif
 
 Requires:       %{jansi_jar}
@@ -141,6 +156,7 @@ Scala is a general purpose programming language for the JVM that blends
 object-oriented and functional programming. This package enables support for
 the scala ant tasks.
 
+%if 0
 %package examples
 Summary:        Examples for the Scala programming language
 Group:          Development/Languages
@@ -163,27 +179,47 @@ Requires:       ant
 %description swing-examples
 This package contains examples for the Swing library of the Scala language which is required
 to create GUI applications in the Scala programming language. 
+%endif
 
 %prep
+
+%global _default_patch_fuzz 2
+
 %setup -q 
 %patch1 -p1 -b .tool
 %patch2 -p1 -b .sysjline
 %patch3 -p1 -b .compiler-pom
 %patch4 -p1 -b .jdk7
 %patch6 -p1 -b .rvk
-%patch7 -p1 -b .bc
+# %patch7 -p1 -b .bc
 %patch8 -p1 -b .bld
 
+echo "starr.version=2.10.4\nstarr.use.released=0" > starr.number
+
 pushd src
 rm -rf jline
 popd
 
+sed -i '/is not supported by/d' build.xml
+sed -i '/exec.*pull-binary-libs.sh/d' build.xml
+
+%if 0%{?bootstrap_build}
+%global do_bootstrap -DdoBootstrapBuild=yes
+tar -xzvf %{SOURCE2}
+%if %{want_jdk8}
+tar -xzvf %{SOURCE4} --strip-components=1 scala-2.10.4/lib
+%endif
+%else
+%global do_bootstrap %{nil}
+%endif
+
 pushd lib
 #  fjbg.jar ch.epfl.lamp
 #  forkjoin.jar scala.concurrent.forkjoin available @ https://bugzilla.redhat.com/show_bug.cgi?id=854234 as jsr166y
 #  find -not \( -name 'scala-compiler.jar' -or -name 'scala-library.jar' -or -name 'midpapi10.jar' -or \
 #       -name 'msil.jar' -or -name 'fjbg.jar' -or -name 'forkjoin.jar' \) -and -name '*.jar' -delete
 
+
 #  midpapi10.jar https://bugzilla.redhat.com/show_bug.cgi?id=807242 ?
 #  msil.jar ch.epfl.lamp.compiler
 #  scala-compiler.jar
@@ -210,12 +246,6 @@ popd
 
 cp -rf %{SOURCE31} .
 
-%if 0%{?bootstrap_build}
-%global do_bootstrap -DdoBootstrapBuild=yes
-tar -xzvf %{SOURCE2}
-%else
-%global do_bootstrap %{nil}
-%endif
 
 sed -i -e 's!@JLINE@!%{jline2_jar}!g' build.xml
 
@@ -292,7 +322,9 @@ shtool mkln -s $RPM_BUILD_ROOT%{jansi_jar} $RPM_BUILD_ROOT%{scaladir}/lib
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/ant.d
 install -p -m 644 %{SOURCE24} $RPM_BUILD_ROOT%{_sysconfdir}/ant.d/scala
 
+%if 0
 cp -pr docs/examples $RPM_BUILD_ROOT%{_datadir}/scala/
+%endif 
 
 install -d $RPM_BUILD_ROOT%{_datadir}/mime-info
 install -p -m 644 %{SOURCE21} %{SOURCE22} $RPM_BUILD_ROOT%{_datadir}/mime-info/
@@ -311,7 +343,7 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
 %postun
 update-mime-database %{_datadir}/mime &> /dev/null || :
 
-%files
+%files -f .mfiles
 %defattr(-,root,root,-)
 %{_bindir}/*
 %dir %{_javadir}/%{name}
@@ -328,11 +360,6 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
 %{_datadir}/mime-info/*
 %{_datadir}/mime/packages/*
 %{_mandir}/man1/*
-%{_mavenpomdir}/JPP.%{name}-%{name}-compiler.pom
-%{_mavenpomdir}/JPP.%{name}-%{name}-library.pom
-%{_mavenpomdir}/JPP.%{name}-%{name}-reflect.pom
-%{_mavenpomdir}/JPP.%{name}-scalap.pom
-%{_mavendepmapfragdir}/%{name}
 %doc docs/LICENSE
 
 %files swing
@@ -354,6 +381,7 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
 %doc build/scaladoc/library/*
 %doc docs/LICENSE
 
+%if 0
 %files examples
 %defattr(-,root,root,-)
 %{_datadir}/scala/examples
@@ -364,8 +392,13 @@ update-mime-database %{_datadir}/mime &> /dev/null || :
 %defattr(-,root,root,-)
 %{_datadir}/scala/examples/swing 
 %doc docs/LICENSE
+%endif
 
 %changelog
+* Mon Sep 15 2014 William Benton <willb at redhat.com> - 2.10.4-1
+- updated to upstream version 2.10.4
+- fixes for Java 8 compatibility:  use scala 2.10.4 for bootstrapping
+
 * Sun Jun 08 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.10.3-12
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list