[Lunar-commits] <moonbase> scala-bin: new module

Duncan Gibson engelsman at lunar-linux.org
Sun Nov 28 12:59:33 CET 2010


commit efd7528a1579270d64d696bd7a5a96850fbe48c6
Author: Christian Krause <kizkizzbangbang at googlemail.com>
Date:   Sun Nov 28 12:59:33 2010 +0100

    scala-bin: new module
    
    scala v2.8.1 general purpose programming language
    BUILD is inspired by Java/Ant/maven since these modules work
    similarly
    
    Note: downloads and installs OK, and untested here, but...
          there's possibly some missing && logic in BUILD,
          and it installs in /usr/scala so man pages are not visible
          - engelsman
---
 zbeta/scala-bin/BUILD     |   28 ++++++++++++++++++++++++++++
 zbeta/scala-bin/CONFIGURE |   11 +++++++++++
 zbeta/scala-bin/DEPENDS   |    1 +
 zbeta/scala-bin/DETAILS   |   19 +++++++++++++++++++
 4 files changed, 59 insertions(+), 0 deletions(-)

diff --git a/zbeta/scala-bin/BUILD b/zbeta/scala-bin/BUILD
new file mode 100644
index 0000000..17baf42
--- /dev/null
+++ b/zbeta/scala-bin/BUILD
@@ -0,0 +1,28 @@
+(
+  prepare_install &&
+
+  # rm *.bat files
+  rm $SOURCE_DIRECTORY/bin/*.bat
+
+  # copy extracted files
+  mkdir -p /usr/scala &&
+  cp -r $SOURCE_DIRECTORY /usr/scala &&
+
+  # symlink default and latest (like java)
+  ln -sf /usr/scala/$MOD-${VERSION}.final /usr/scala/latest &&
+  if [ ! -h /usr/scala/default ]; then
+     ln -sf /usr/scala/latest /usr/scala/default
+  fi  &&
+
+  # symlink bin folder
+  for file in /usr/scala/latest/bin/*; do
+      ln -sf $file /usr/bin/
+  done
+
+  if [ $EXTEND_JAVA == "y" ]; then
+      for file in /usr/scala/latest/lib/*; do
+          ln -sf $file /usr/java/latest/jre/lib/ext/
+      done
+  fi
+
+) > $C_FIFO 2>&1
diff --git a/zbeta/scala-bin/CONFIGURE b/zbeta/scala-bin/CONFIGURE
new file mode 100644
index 0000000..def2f1e
--- /dev/null
+++ b/zbeta/scala-bin/CONFIGURE
@@ -0,0 +1,11 @@
+message "${MESSAGE_COLOR}The Java VM searches for and loads classes in the following order:"
+message "1st: Bootstrap classes (Java platform)"
+message "2nd: Extension classes (Extension mechanism)"
+message "3rd: User classes (need to be specified via CLASSPATH or 'java -cp')"
+message ""
+message "You can add the Scala libraries to Java's extension path to make them"
+message "system wide accessible without having to specify CLASSPATH or adding"
+message "the -cp option to the 'java' command.${DEFAULT_COLOR}"
+message ""
+
+mquery EXTEND_JAVA "Add Scala's libraries to Java's extension path?" y
diff --git a/zbeta/scala-bin/DEPENDS b/zbeta/scala-bin/DEPENDS
new file mode 100644
index 0000000..a2a3495
--- /dev/null
+++ b/zbeta/scala-bin/DEPENDS
@@ -0,0 +1 @@
+depends %JAVA_SDK
diff --git a/zbeta/scala-bin/DETAILS b/zbeta/scala-bin/DETAILS
new file mode 100644
index 0000000..30baded
--- /dev/null
+++ b/zbeta/scala-bin/DETAILS
@@ -0,0 +1,19 @@
+          MODULE=scala-bin
+	     MOD=scala
+         VERSION=2.8.1
+          SOURCE=$MOD-$VERSION.final.tgz
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MOD-$VERSION.final
+      SOURCE_URL=http://www.scala-lang.org/downloads/distrib/files/
+      SOURCE_VFY=sha1:b225e97652e06a3881de64321a46a488eaa3a15e
+        WEB_SITE=http://www.scala-lang.org
+         ENTERED=20101120
+           SHORT="general purpose programming language"
+cat << EOF
+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 and runs on any JVM, since it
+compiles to Java bytecode, i.e. indistinguishable from
+Java-generated bytecode.
+EOF


More information about the Lunar-commits mailing list