Fridrich Strba 2024-09-24 13:19:13 +00:00 committed by Git OBS Bridge
commit 333e9da664
26 changed files with 956 additions and 0 deletions

26
.gitattributes vendored Normal file
View File

@ -0,0 +1,26 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
## Specific LFS patterns
jquery-3.7.0.min.js filter=lfs diff=lfs merge=lfs -text
jquery-3.7.0.slim.min.js filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

10
_constraints Normal file
View File

@ -0,0 +1,10 @@
<constraints>
<hardware>
<physicalmemory>
<size unit="G">4</size>
</physicalmemory>
<disk>
<size unit="G">4</size>
</disk>
</hardware>
</constraints>

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>bootstrap</package>
</multibuild>

4
asm.properties Normal file
View File

@ -0,0 +1,4 @@
#@@DATE@@
scala.version.number=@@VER@@
scala.binary.version.number=@@MAJVER@@
version.number=@@ASMVER@@-scala-@@ASMREL@@

10
buildcharacter.properties Normal file
View File

@ -0,0 +1,10 @@
#@@DATE@@
maven.version.number=@@VER@@
maven.version.base=@@VER@@
jline.version=@@JLINEVER@@
version.number=@@VER@@
scala-asm.version=@@ASMVER@@-scala-@@ASMREL@@
maven.version.suffix=
starr.version=@@VER@@
jna.version=@@JNAVER@@
osgi.version.number=@@OSGI@@

6
compiler.properties Normal file
View File

@ -0,0 +1,6 @@
#@@DATE@@
shell.banner=%n ________ ___ / / ___%n / __/ __// _ | / / / _ |%n __\\ \\/ /__/ __ |/ /__/ __ |%n /____/\\___/_/ |_/____/_/ | |%n |/ %s
copyright.string=Copyright 2002-2023, LAMP/EPFL and Lightbend, Inc.
version.number=@@VER@@
osgi.version.number=@@OSGI@@
maven.version.number=@@VER@@

3
jquery-3.7.0.min.js vendored Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d8f9afbf492e4c139e9d2bcb9ba6ef7c14921eb509fb703bc7a3f911b774eff8
size 87462

3
jquery-3.7.0.slim.min.js vendored Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b46e6671952d26c66fc8a03160b557ae68ca0552dde95a5571cab3febe32a451
size 70193

3
scala-2.13.12.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a73de0631dd67f632a62559643ea6da2e4172fe4a449b96872a4ea1c192d286f
size 7799882

3
scala-2.13.12.tgz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:afe7e6fb59e3c88457e99f7018730e52fba27c8d15e3d7154f72968206ca8719
size 24014528

View File

@ -0,0 +1,71 @@
<?xml version='1.0' encoding='UTF-8'?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-compiler</artifactId>
<packaging>jar</packaging>
<description>Compiler for the Scala Programming Language</description>
<url>https://www.scala-lang.org/</url>
<version>2.13.12</version>
<licenses>
<license>
<name>Apache-2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<name>Scala Compiler</name>
<inceptionYear>2002</inceptionYear>
<organization>
<name>LAMP/EPFL</name>
<url>https://lamp.epfl.ch/</url>
</organization>
<scm>
<connection>scm:git:git://github.com/scala/scala.git</connection>
<url>https://github.com/scala/scala</url>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/scala/bug/issues</url>
</issueManagement>
<developers>
<developer>
<id>lamp</id>
<name>LAMP/EPFL</name>
</developer>
<developer>
<id>Lightbend</id>
<name>Lightbend, Inc.</name>
</developer>
</developers>
<properties>
<info.apiURL>https://www.scala-lang.org/api/2.13.12/scala-compiler/</info.apiURL>
</properties>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.13.12</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-reflect</artifactId>
<version>2.13.12</version>
</dependency>
<dependency>
<groupId>io.github.java-diff-utils</groupId>
<artifactId>java-diff-utils</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>org.jline</groupId>
<artifactId>jline</artifactId>
<version>3.22.0</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>5.13.0</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,4 @@
Automatic-Module-Name: scala.tools.nsc
Bundle-Name: Scala Compiler
Bundle-SymbolicName: org.scala-lang.scala-compiler
Export-Package: LICENSE,NOTICE,compiler.properties,interactive.properties,jquery.min.js,jquery.slim.min.js,repl.properties,replFrontend.properties,rootdoc.txt,scala-asm.properties,scala-buildcharacter.properties,scala.*,scaladoc.properties,templates

44
scala-library-2.13.12.pom Normal file
View File

@ -0,0 +1,44 @@
<?xml version='1.0' encoding='UTF-8'?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<packaging>jar</packaging>
<description>Standard library for the Scala Programming Language</description>
<url>https://www.scala-lang.org/</url>
<version>2.13.12</version>
<licenses>
<license>
<name>Apache-2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<name>Scala Library</name>
<inceptionYear>2002</inceptionYear>
<organization>
<name>LAMP/EPFL</name>
<url>https://lamp.epfl.ch/</url>
</organization>
<scm>
<connection>scm:git:git://github.com/scala/scala.git</connection>
<url>https://github.com/scala/scala</url>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/scala/bug/issues</url>
</issueManagement>
<developers>
<developer>
<id>lamp</id>
<name>LAMP/EPFL</name>
</developer>
<developer>
<id>Lightbend</id>
<name>Lightbend, Inc.</name>
</developer>
</developers>
<properties>
<info.apiURL>https://www.scala-lang.org/api/2.13.12/</info.apiURL>
</properties>
</project>

View File

@ -0,0 +1,4 @@
Automatic-Module-Name: scala.library
Bundle-Name: Scala Standard Library
Bundle-SymbolicName: org.scala-lang.scala-library
Export-Package: LICENSE,NOTICE,library.properties,rootdoc.txt,scala.*

8
scala-mime-info.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="text/x-scala">
<sub-class-of type="text/plain"/>
<comment>Scala source code</comment>
<glob pattern="*.scala" />
</mime-type>
</mime-info>

51
scala-reflect-2.13.12.pom Normal file
View File

@ -0,0 +1,51 @@
<?xml version='1.0' encoding='UTF-8'?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-reflect</artifactId>
<packaging>jar</packaging>
<description>Reflection Library for the Scala Programming Language</description>
<url>https://www.scala-lang.org/</url>
<version>2.13.12</version>
<licenses>
<license>
<name>Apache-2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<name>Scala Reflect</name>
<inceptionYear>2002</inceptionYear>
<organization>
<name>LAMP/EPFL</name>
<url>https://lamp.epfl.ch/</url>
</organization>
<scm>
<connection>scm:git:git://github.com/scala/scala.git</connection>
<url>https://github.com/scala/scala</url>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/scala/bug/issues</url>
</issueManagement>
<developers>
<developer>
<id>lamp</id>
<name>LAMP/EPFL</name>
</developer>
<developer>
<id>Lightbend</id>
<name>Lightbend, Inc.</name>
</developer>
</developers>
<properties>
<info.apiURL>https://www.scala-lang.org/api/2.13.12/scala-reflect/</info.apiURL>
</properties>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.13.12</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,4 @@
Automatic-Module-Name: scala.reflect
Bundle-Name: Scala Reflect
Bundle-SymbolicName: org.scala-lang.scala-reflect
Export-Package: LICENSE,NOTICE,reflect.properties,scala.*

25
scala-tooltemplate.patch Normal file
View File

@ -0,0 +1,25 @@
--- a/src/compiler/templates/tool-unix.tmpl
+++ b/src/compiler/templates/tool-unix.tmpl
@@ -12,15 +12,14 @@
# additional information regarding copyright ownership.
##############################################################################
+. /usr/share/java-utils/java-functions || exit 1
+
+set_javacmd || exit 3
+check_java_env || exit 4
+set_jvm_dirs || exit 5
+
findScalaHome () {
- # see scala/bug#2092 and scala/bug#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 )
+ echo "/usr/share/java/scala"
}
execCommand () {
[[ -n $SCALA_RUNNER_DEBUG ]] && echo "" && for arg in "$@@"; do echo "$arg"; done && echo "";

View File

@ -0,0 +1,36 @@
--- a/src/scaladoc/scala/tools/nsc/doc/html/HtmlFactory.scala
+++ b/src/scaladoc/scala/tools/nsc/doc/html/HtmlFactory.scala
@@ -46,33 +46,6 @@ class HtmlFactory(val universe: doc.Univ
"object_comp_trait.svg",
"object_comp_annotation.svg",
"abstract_type.svg",
- "lato-v11-latin-100.eot",
- "lato-v11-latin-100.ttf",
- "lato-v11-latin-100.woff",
- "lato-v11-latin-regular.eot",
- "lato-v11-latin-regular.ttf",
- "lato-v11-latin-regular.woff",
- "open-sans-v13-latin-regular.eot",
- "open-sans-v13-latin-regular.ttf",
- "open-sans-v13-latin-regular.woff",
- "open-sans-v13-latin-400i.eot",
- "open-sans-v13-latin-400i.ttf",
- "open-sans-v13-latin-400i.woff",
- "open-sans-v13-latin-700.eot",
- "open-sans-v13-latin-700.ttf",
- "open-sans-v13-latin-700.woff",
- "open-sans-v13-latin-700i.eot",
- "open-sans-v13-latin-700i.ttf",
- "open-sans-v13-latin-700i.woff",
- "source-code-pro-v6-latin-700.eot",
- "source-code-pro-v6-latin-700.ttf",
- "source-code-pro-v6-latin-700.woff",
- "source-code-pro-v6-latin-regular.eot",
- "source-code-pro-v6-latin-regular.ttf",
- "source-code-pro-v6-latin-regular.woff",
- "MaterialIcons-Regular.eot",
- "MaterialIcons-Regular.ttf",
- "MaterialIcons-Regular.woff",
"index.js",
"scheduler.js",

152
scala.changes Normal file
View File

@ -0,0 +1,152 @@
-------------------------------------------------------------------
Tue Sep 24 13:19:04 UTC 2024 - Fridrich Strba <fstrba@suse.com>
- Use SOURCE_DATE_EPOCH for reproducible jar mtime
-------------------------------------------------------------------
Thu Oct 12 12:06:07 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Upgrade to upstream version 2.13.12
* 2.13 improves Scala in the following areas:
+ Collections: Standard library collections have been overhauled
for simplicity, performance, and safety. This is the
centerpiece of the release.
+ Standard library: Future is faster and more robust. Elsewhere,
useful classes and methods have been added.
+ Language: Literal types, partial unification, by-name
implicits, more.
+ Compiler: 5-10% faster, deterministic output, improved
optimizer.
- Removed patches:
* scala-2.10-jline.patch
* scala-2.10.0-tooltemplate.patch
* scala-2.10.2-java7.patch
* scala-2.10.3-compiler-pom.patch
* scala-2.10.3-use_system_jline.patch
* scala-2.10.4-build_xml.patch
* scala-2.10.6-scaladoc-resources.patch
* scala-2.10.7-java8compat.patch
* scala-2.10.7-jdk15.patch
* scala-2.10.7-lines.patch
* scala-2.10.7-source8.patch
+ not needed with this version
- Added patches:
* scala-tooltemplate.patch
+ use the javapackages way of finding the JVM to invoke
* scala-unbundle-fonts.patch
+ unbundle fonts from scaladoc
-------------------------------------------------------------------
Fri Sep 29 06:45:12 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Allow building with jdk >= 9 too
- Added patch:
* scala-2.10.7-jdk15.patch
+ do not build pack200 ant task since Pack200 was removed in
jdk15
+ implement a new method added in jdk15
- Modified patches:
* scala-2.10.4-build_xml.patch
+ do not try to instantiate the pack200 ant task
* scala-2.10.7-source6.patch -> scala-2.10.7-source8.patch
+ build with source/target 8 levels
-------------------------------------------------------------------
Mon Sep 11 13:07:40 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Reproducible builds: do not generate non-reproducible entries
by bnd tools
-------------------------------------------------------------------
Mon May 16 11:28:03 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Fix the scala build to find correctly the jansi.jar file
- Make the package that links the jansi.jar file archfull
-------------------------------------------------------------------
Thu Jul 29 21:25:14 UTC 2021 - Fridrich Strba <fstrba@suse.com>
- Bootstrap the build with our own built jar instead of downloading
prebuilt binaries from www.scala-lang.org
-------------------------------------------------------------------
Fri Jun 26 12:30:08 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>
- No longer package /usr/share/mime-info: this came from GNOME 1
times which are long gone (boo#1062631).
+ Drop scala.keys and scala.mime source files.
-------------------------------------------------------------------
Tue Dec 17 06:34:27 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Stop overriding default fuzz in spec file
- Changed patch:
* scala-2.10.7-source6.patch
+ Refresh using source service
-------------------------------------------------------------------
Fri Dec 13 11:11:24 UTC 2019 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Add _constraints to avoid long builds because of swapping
-------------------------------------------------------------------
Wed Dec 4 09:21:06 UTC 2019 - Dominique Leuenberger <dimstar@opensuse.org>
- Have scala-bootstrap-swing require scala*bootstrap and
scala-swing require scala. There is not guarantee that the
rebuild counters between scala and scala-bootstrap would be in
sync, making the Requires: scala = %{version}-%{release} for
scala-bootstrap unresolvable (let alone that it would not be
usable before scala is built)
-------------------------------------------------------------------
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>
- Let the non-bootstrap packages obsolete their bootstrap
counterparts
-------------------------------------------------------------------
Sat Mar 23 08:27:59 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Make scriptlets POSIX sh compatible.
- Trim filler wording from descriptions.
-------------------------------------------------------------------
Fri Mar 1 06:35:22 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of scala compiler 2.10.6

4
scala.keys Normal file
View File

@ -0,0 +1,4 @@
text/x-scala
description=Scala source code
category=Software Development/Source Code
can_be_executable=TRUE

2
scala.mime Normal file
View File

@ -0,0 +1,2 @@
text/x-scala
ext: scala

428
scala.spec Normal file
View File

@ -0,0 +1,428 @@
#
# spec file for package scala
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "bootstrap"
%bcond_without bootstrap
%else
%bcond_with bootstrap
%endif
%global base_name scala
%global asmver 9.5.0
%global asmrel 1
# Version of jquery bundled in scaladoc
%global jqueryver 3.7.0
# Version of jline to use
%global jlinever 3.22.0
%global scaladir %{_datadir}/scala
# Used to generate OSGi data
%global date 20230901
%global seqnum 134811
%global commit 80514f73a6c7db32df9887d9a5ca9ae921e25118
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global osgiver %{version}.v%{date}-%{seqnum}-VFINAL-%{shortcommit}
%global majver %(cut -d. -f1-2 <<< %{version})
Version: 2.13.12
Release: 0
Summary: Hybrid functional/object-oriented language for the JVM
# The project as a whole is Apache-2.0.
# The bundled ASM is BSD-3-Clause.
# The bundled jquery is MIT.
License: Apache-2.0 AND BSD-3-Clause AND MIT
Group: Development/Libraries/Java
URL: https://www.scala-lang.org/
# Source code
Source0: https://github.com/scala/scala/archive/v%{version}/%{base_name}-%{version}.tar.gz
# Scala-modified version of objectweb-asm
Source2: https://github.com/scala/scala-asm/archive/v%{asmver}-scala-%{asmrel}.tar.gz
# POMs from maven central
Source3: https://repo1.maven.org/maven2/org/scala-lang/scala-library/%{version}/scala-library-%{version}.pom
Source4: https://repo1.maven.org/maven2/org/scala-lang/scala-reflect/%{version}/scala-reflect-%{version}.pom
Source5: https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/%{version}/scala-compiler-%{version}.pom
Source6: https://repo1.maven.org/maven2/org/scala-lang/scalap/%{version}/scalap-%{version}.pom
# Bundled version of jquery for scaladoc
Source7: https://code.jquery.com/jquery-%{jqueryver}.min.js
Source8: https://code.jquery.com/jquery-%{jqueryver}.slim.min.js
# OSGi properties for the reflect jar
Source9: scala-reflect-bnd.properties
# OSGi properties for the library jar
Source10: scala-library-bnd.properties
# OSGi properties for the compiler jar
Source11: scala-compiler-bnd.properties
# Properties file for scala-compiler
Source12: compiler.properties
# Properties file for scala-asm
Source13: asm.properties
# Properties file for scala-buildcharacter
Source14: buildcharacter.properties
# MIME information
Source15: scala.keys
Source16: scala.mime
Source17: scala-mime-info.xml
# Use the javapackages way of finding the JVM to invoke
Patch0: %{base_name}-tooltemplate.patch
# Unbundle fonts from scaladoc
Patch1: %{base_name}-unbundle-fonts.patch
BuildRequires: aqute-bnd
BuildRequires: javapackages-local
BuildRequires: xmvn-install
BuildRequires: xmvn-resolve
BuildRequires: mvn(io.github.java-diff-utils:java-diff-utils)
BuildRequires: mvn(junit:junit)
BuildRequires: mvn(net.java.dev.jna:jna)
BuildRequires: mvn(org.jline:jline-builtins)
BuildRequires: mvn(org.jline:jline-terminal-jna)
BuildRequires: mvn(org.openjdk.jol:jol-core)
Requires: javapackages-tools
Obsoletes: %{base_name}-swing < 2.13.4
BuildArch: noarch
%if %{with bootstrap}
Name: %{base_name}-bootstrap
# Binary form, used to bootstrap
Source1: https://downloads.lightbend.com/scala/%{version}/%{base_name}-%{version}.tgz
%else
Name: %{base_name}
BuildRequires: %{base_name}-bootstrap >= %{version}
Provides: %{base_name}-bootstrap = %{version}-%{release}
Obsoletes: %{base_name}-bootstrap
%endif
%description
Scala is a general purpose programming language designed to express
common programming patterns in a concise, elegant, and type-safe way.
It smoothly integrates features of object-oriented and functional
languages. It is also fully interoperable with Java.
%if %{without bootstrap}
%package apidoc
Summary: Documentation for the Scala programming language
Group: Documentation/HTML
Recommends: font(lato)
Recommends: font(opensans)
Recommends: font(sourcecodepro)
%description apidoc
This package provides reference and API documentation for the Scala
programming language.
%endif
%prep
%autosetup -n %{base_name}-%{version} -p1
%if %{with bootstrap}
%setup -q -n %{base_name}-%{version} -T -D -a 1
%endif
%setup -q -n %{base_name}-%{version} -T -D -a 2
fixtimestamp() {
touch -r $1.orig $1
rm -f $1.orig
}
# Unbundle fonts
# The CSS uses local() references, so these should not be needed anyway.
rm src/scaladoc/scala/tools/nsc/doc/html/resource/lib/{lato,MaterialIcons,open-sans,source-code-pro}*
# Fetch upstream's POMs
cp -p %{SOURCE3} src/library/pom.xml
cp -p %{SOURCE4} src/reflect/pom.xml
cp -p %{SOURCE5} src/compiler/pom.xml
cp -p %{SOURCE6} src/scalap/pom.xml
# Fedora has a split jline3, so split up the dependency
%pom_change_dep org.jline:jline org.jline:jline-terminal-jna src/compiler
%pom_add_dep org.jline:jline-reader:%{jlinever} src/compiler
%pom_add_dep org.jline:jline-style:%{jlinever} src/compiler
%pom_add_dep org.jline:jline-builtins:%{jlinever} src/compiler
%build
export LC_ALL=C.UTF-8
%if %{with bootstrap}
PATH=$PATH:$PWD/%{base_name}-%{version}/bin
COMPJAR=$PWD/%{base_name}-%{version}/lib/scala-compiler.jar
%else
COMPJAR=%{_javadir}/scala/scala-compiler.jar
%endif
JLINE_JARS=$(build-classpath jna jline3/jline-terminal jline3/jline-terminal-jna \
jline3/jline-reader jline3/jline-style jline3/jline-builtins)
JAVAC_FLAGS="-g -parameters -source 8 -target 8"
SCALAC_FLAGS="-g:vars -release 8 -J-Xmx512M -J-Xms32M"
SCALADOC_FLAGS='-J-Xmx512M -J-Xms32M -doc-footer epfl -diagrams -implicits -groups -doc-version %{version} -doc-source-url https://github.com/scala/scala/blob/v%{version}/src/€{FILE_PATH_EXT}#L€{FILE_LINE}'
DIFFUTILS_JAR=$(build-classpath java-diff-utils)
mkdir -p target/{compiler,library,manual,reflect,scalap,tastytest,testkit}
mkdir -p target/html/{compiler,library,reflect}
# Build the bundled objectweb-asm
cd scala-asm-%{asmver}-scala-%{asmrel}
javac $JAVAC_FLAGS -d ../target/compiler $(find src -name \*.java)
cd -
# Build the library
cd src
javac $JAVAC_FLAGS -d ../target/library -cp $(build-classpath junit) \
$(find library -name \*.java)
scalac $SCALAC_FLAGS -d ../target/library -classpath ../target/library \
$(find library -name \*.scala | sort)
%if %{without bootstrap}
scaladoc $SCALADOC_FLAGS -doc-title 'Scala Standard Library' \
-sourcepath $PWD/library -doc-no-compile $PWD/library-aux \
-skip-packages scala.concurrent.impl \
-doc-root-content $PWD/library/rootdoc.txt \
$(find library -name \*.scala | sort)
mv scala ../target/html/library
%endif
# Build the reflection library
javac $JAVAC_FLAGS -d ../target/reflect $(find reflect -name \*.java)
scalac $SCALAC_FLAGS -d ../target/reflect -classpath ../target/reflect \
$(find reflect -name \*.scala | sort)
%if %{without bootstrap}
scaladoc $SCALADOC_FLAGS -doc-title 'Scala Reflection Library' \
-sourcepath $PWD/reflect \
-skip-packages scala.reflect.macros.internal:scala.reflect.internal:scala.reflect.io \
$(find reflect -name \*.scala | sort)
mv scala ../target/html/reflect
%endif
# Build the compiler
javac $JAVAC_FLAGS -d ../target/compiler -cp $COMPJAR \
$(find compiler -name \*.java)
scalac $SCALAC_FLAGS -d ../target/compiler \
-classpath ../target/compiler:$DIFFUTILS_JAR \
-feature $(find compiler -name \*.scala)
# Build the interactive compiler
scalac $SCALAC_FLAGS -d ../target/compiler -classpath ../target/compiler \
-feature $(find interactive -name \*.scala)
# Build the REPL
scalac $SCALAC_FLAGS -d ../target/compiler -classpath ../target/reflect \
-feature $(find repl -name \*.scala)
# Build the REPL frontend
javac $JAVAC_FLAGS -d ../target/compiler $(find repl-frontend -name \*.java)
scalac $SCALAC_FLAGS -d ../target/compiler \
-classpath ../target/compiler:$JLINE_JARS \
-feature $(find repl-frontend -name \*.scala)
%if %{without bootstrap}
scaladoc $SCALADOC_FLAGS -doc-title 'Scala Compiler' \
-sourcepath $PWD/compiler:$PWD/interactive:$PWD/repl:$PWD/repl-frontend \
-doc-root-content $PWD/compiler/rootdoc.txt \
-classpath $PWD/../target/library:$PWD/../target/reflect:$JLINE_JARS:$DIFFUTILS_JAR \
$(find compiler -name \*.scala) $(find interactive -name \*.scala) \
$(find repl -name \*.scala) $(find repl-frontend -name \*.scala)
mv scala ../target/html/compiler
%endif
# Build the documentation generator
# The order of the source files matters!
scalac $SCALAC_FLAGS -d ../target/compiler \
-feature $(find scaladoc -name \*.scala | sort)
# Build the bytecode parser
scalac $SCALAC_FLAGS -d ../target/scalap $(find scalap -name \*.scala)
# Build the testing tool
javac $JAVAC_FLAGS -d ../target/testkit \
-cp ../target/library:$(build-classpath junit) \
$(find testkit -name \*.java)
scalac $SCALAC_FLAGS -d ../target/testkit \
-classpath ../target/testkit:$(build-classpath junit) -feature \
$(find testkit -name \*.scala)
# TODO: build the parser testing tool. This cannot be done without some sbt
# classes. If we have sbt, then we don't need to build manually anyway.
# Build the integration tests
scalac $SCALAC_FLAGS -d ../target/tastytest -classpath $DIFFUTILS_JAR \
$(find tastytest -name \*.scala)
# Build the man page builder
scalac $SCALAC_FLAGS -d ../target/manual -classpath ../target/library \
$(find manual -name \*.scala)
cd -
# Copy source files into target before constructing jars
for dir in reflect library compiler scalap; do
cp -p LICENSE NOTICE target/$dir
done
cp -p src/library/rootdoc.txt target/library
cp -p src/compiler/rootdoc.txt target/compiler
cp -a src/compiler/templates target/compiler
mkdir -p target/compiler/scala/tools/nsc/doc/html/resource/lib/
cp -p src/scaladoc/scala/tools/nsc/doc/html/resource/lib/* target/compiler/scala/tools/nsc/doc/html/resource/lib/
cp -p src/scalap/decoder.properties target/scalap
# Build the compiler jar
cd target
mkdir -p compiler/META-INF/services
cat > compiler/META-INF/services/javax.script.ScriptEngineFactory << EOF
scala.tools.nsc.interpreter.shell.Scripted\$Factory
EOF
propdate=$(date -u -d %{date})
jnaver=$(rpm -q --qf="%{VERSION}" jna)
cp -p %{SOURCE7} compiler/jquery.min.js
cp -p %{SOURCE8} compiler/jquery.slim.min.js
sed -e "s/@@DATE@@/$propdate/;s/@@VER@@/%{version}/;s/@@OSGI@@/%{osgiver}/" \
%{SOURCE12} > compiler/compiler.properties
cp -p compiler/compiler.properties compiler/interactive.properties
cp -p compiler/compiler.properties compiler/repl.properties
cp -p compiler/compiler.properties compiler/replFrontend.properties
cp -p compiler/compiler.properties compiler/scaladoc.properties
sed -e "s/@@DATE@@/$propdate/;s/@@VER@@/%{version}/;s/@@MAJVER@@/%{majver}/" \
-e "s/@@ASMVER@@/%{asmver}/;s/@@ASMREL@@/%{asmrel}/" \
%{SOURCE13} > compiler/scala-asm.properties
sed -e "s/@@DATE@@/$propdate/;s/@@VER@@/%{version}/;s/@@OSGI@@/%{osgiver}/" \
-e "s/@@ASMVER@@/%{asmver}/;s/@@ASMREL@@/%{asmrel}/" \
-e "s/@@JLINEVER@@/%{jlinever}/;s/@@JNAVER@@/$jnaver/" \
%{SOURCE14} > compiler/scala-buildcharacter.properties
jar \
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0}
--date="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)" \
%endif
--create --file=scala-compiler.jar.no -C compiler .
bnd wrap --properties %{SOURCE11} --output scala-compiler.jar \
--version "%{osgiver}" scala-compiler.jar.no
# Build the reflect jar
cp -p compiler/compiler.properties reflect/reflect.properties
jar \
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0}
--date="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)" \
%endif
--create --file=scala-reflect.jar.no -C reflect .
bnd wrap --properties %{SOURCE9} --output scala-reflect.jar \
--version "%{osgiver}" scala-reflect.jar.no
# Build the library jar
cp -p compiler/compiler.properties library/library.properties
jar \
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0}
--date="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)" \
%endif
--create --file=scala-library.jar.no -C library .
bnd wrap --properties %{SOURCE10} --output scala-library.jar \
--version "%{osgiver}" scala-library.jar.no
# Build the decoder jar
cp -p compiler/compiler.properties scalap/scalap.properties
jar \
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0}
--date="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)" \
%endif
--create --file=scalap-%{version}.jar -C scalap .
cd -
# Build the man pages
mkdir -p html man/man1
cd src
scala -classpath ../target/manual:../target/scala-library.jar scala.tools.docutil.ManMaker 'fsc, scala, scalac, scaladoc, scalap' ../html ../man
cd -
%{mvn_file} ":{*}" %{base_name}/@1
# Prepare to install
%{mvn_artifact} src/library/pom.xml target/scala-library.jar
%{mvn_artifact} src/reflect/pom.xml target/scala-reflect.jar
%{mvn_artifact} src/compiler/pom.xml target/scala-compiler.jar
%{mvn_artifact} src/scalap/pom.xml target/scalap-%{version}.jar
%install
%mvn_install
# Create the binary scripts
mkdir -p %{buildroot}%{_bindir}
CLASSPATH=$(build-classpath jna jline3/jline-terminal \
jline3/jline-terminal-jna jline3/jline-reader jline3/jline-style \
jline3/jline-builtins)\
:%{_javadir}/scala/scala-library.jar\
:%{_javadir}/scala/scala-reflect.jar\
:%{_javadir}/scala/scala-compiler.jar
JAVAFLAGS="-Xmx256M -Xms32M"
sed -e "s,@classpath@,$CLASSPATH," \
-e "s,@javaflags@,$JAVAFLAGS," \
-e "s,@properties@ ,," \
-e "s,@class@,scala.tools.nsc.fsc.CompileClient," \
-e "s,@toolflags@ ,," \
-e "s,@@,@,g" \
src/compiler/templates/tool-unix.tmpl > %{buildroot}%{_bindir}/fsc
sed -e "s,@classpath@,$CLASSPATH," \
-e "s,@javaflags@,$JAVAFLAGS," \
-e "s,@properties@ ,," \
-e "s,@class@,scala.tools.nsc.MainGenericRunner," \
-e "s,@toolflags@ ,," \
-e "s,@@,@,g" \
src/compiler/templates/tool-unix.tmpl > %{buildroot}%{_bindir}/scala
sed -e "s,@classpath@,$CLASSPATH," \
-e "s,@javaflags@,$JAVAFLAGS," \
-e "s,@properties@ ,," \
-e "s,@class@,scala.tools.nsc.Main," \
-e "s,@toolflags@ ,," \
-e "s,@@,@,g" \
src/compiler/templates/tool-unix.tmpl > %{buildroot}%{_bindir}/scalac
sed -e "s,@classpath@,$CLASSPATH," \
-e "s,@javaflags@,$JAVAFLAGS," \
-e "s,@properties@ ,," \
-e "s,@class@,scala.tools.nsc.ScalaDoc," \
-e "s,@toolflags@ ,," \
-e "s,@@,@,g" \
src/compiler/templates/tool-unix.tmpl > %{buildroot}%{_bindir}/scaladoc
sed -e "s,@classpath@,$CLASSPATH:$(build-classpath scala/scalap)," \
-e "s,@javaflags@,$JAVAFLAGS," \
-e "s,@properties@ ,," \
-e "s,@class@,scala.tools.scalap.Main," \
-e "s,@toolflags@ ,," \
-e "s,@@,@,g" \
src/compiler/templates/tool-unix.tmpl > %{buildroot}%{_bindir}/scalap
chmod 0755 %{buildroot}%{_bindir}/{fsc,scala*}
# Install the MIME info
#install -d %{buildroot}%{_datadir}/mime-info
#install -p -m 644 %{SOURCE15} %{SOURCE16} %{buildroot}%{_datadir}/mime-info/
install -d %{buildroot}%{_datadir}/mime/packages/
install -p -m 644 %{SOURCE17} %{buildroot}%{_datadir}/mime/packages/
# Install the man pages
install -d %{buildroot}%{_mandir}/man1
install -p -m 644 man/man1/* %{buildroot}%{_mandir}/man1
%files -f .mfiles
%{_bindir}/fsc
%{_bindir}/scala*
#{_datadir}/mime-info/scala.*
%{_datadir}/mime/packages/scala-mime-info.xml
%{_mandir}/man1/fsc.1%{?ext_man}
%{_mandir}/man1/scala*
%license LICENSE NOTICE doc/LICENSE.md doc/License.rtf
%if %{without bootstrap}
%files apidoc
%doc target/html/*
%license LICENSE NOTICE doc/LICENSE.md doc/License.rtf
%endif
%changelog

48
scalap-2.13.12.pom Normal file
View File

@ -0,0 +1,48 @@
<?xml version='1.0' encoding='UTF-8'?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
<modelVersion>4.0.0</modelVersion>
<groupId>org.scala-lang</groupId>
<artifactId>scalap</artifactId>
<packaging>jar</packaging>
<description>bytecode analysis tool</description>
<url>https://www.scala-lang.org/</url>
<version>2.13.12</version>
<licenses>
<license>
<name>Apache-2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<name>Scalap</name>
<inceptionYear>2002</inceptionYear>
<organization>
<name>LAMP/EPFL</name>
<url>https://lamp.epfl.ch/</url>
</organization>
<scm>
<connection>scm:git:git://github.com/scala/scala.git</connection>
<url>https://github.com/scala/scala</url>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/scala/bug/issues</url>
</issueManagement>
<developers>
<developer>
<id>lamp</id>
<name>LAMP/EPFL</name>
</developer>
<developer>
<id>Lightbend</id>
<name>Lightbend, Inc.</name>
</developer>
</developers>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-compiler</artifactId>
<version>2.13.12</version>
</dependency>
</dependencies>
</project>

3
v9.5.0-scala-1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ff7cf540b4e2543b6d219a426d6ff10435a4bbf570d879234a65a79035e403fd
size 261603