summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlastimil Babka <caster@gentoo.org>2007-05-04 17:22:19 +0000
committerVlastimil Babka <caster@gentoo.org>2007-05-04 17:22:19 +0000
commit26fff7293d4b414df9a4d2a9726a54dbffc2aad4 (patch)
tree2c400c5ba3d755e3d24f4d08fe187b5a947394d0 /dev-lang/scala
parentExport LANG="C" LC_ALL="C" for all JDK's and not just IBM. Fixes bug #170367 ... (diff)
downloadgentoo-2-26fff7293d4b414df9a4d2a9726a54dbffc2aad4.tar.gz
gentoo-2-26fff7293d4b414df9a4d2a9726a54dbffc2aad4.tar.bz2
gentoo-2-26fff7293d4b414df9a4d2a9726a54dbffc2aad4.zip
Initial ebuild, intended to replace dev-java/scala-bin with from-source package in more appropriate category. Based on ebuilds from Michel Ganguin <ganguin@romandie.com> and John Reed Riley <john.reed.riley@gmail.com> in bug #147599.
(Portage version: 2.1.2.5)
Diffstat (limited to 'dev-lang/scala')
-rw-r--r--dev-lang/scala/ChangeLog13
-rw-r--r--dev-lang/scala/Manifest20
-rw-r--r--dev-lang/scala/files/digest-scala-2.4.03
-rw-r--r--dev-lang/scala/files/scala-2.4.0-build.xml.patch79
-rw-r--r--dev-lang/scala/metadata.xml5
-rw-r--r--dev-lang/scala/scala-2.4.0.ebuild96
6 files changed, 216 insertions, 0 deletions
diff --git a/dev-lang/scala/ChangeLog b/dev-lang/scala/ChangeLog
new file mode 100644
index 000000000000..56b88bb9a204
--- /dev/null
+++ b/dev-lang/scala/ChangeLog
@@ -0,0 +1,13 @@
+# ChangeLog for dev-lang/scala
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/ChangeLog,v 1.1 2007/05/04 17:22:19 caster Exp $
+
+*scala-2.4.0 (04 May 2007)
+
+ 04 May 2007; Vlastimil Babka <caster@gentoo.org>
+ +files/scala-2.4.0-build.xml.patch, +metadata.xml, +scala-2.4.0.ebuild:
+ Initial ebuild, intended to replace dev-java/scala-bin with from-source
+ package in more appropriate category. Based on ebuilds from Michel Ganguin
+ <ganguin@romandie.com> and John Reed Riley <john.reed.riley@gmail.com> in
+ bug #147599.
+
diff --git a/dev-lang/scala/Manifest b/dev-lang/scala/Manifest
new file mode 100644
index 000000000000..32f7aea31e2a
--- /dev/null
+++ b/dev-lang/scala/Manifest
@@ -0,0 +1,20 @@
+AUX scala-2.4.0-build.xml.patch 2980 RMD160 86d56cf747a0758e90b3aca886bfe6c2c7dfb198 SHA1 251954bd6648a9fb06b0a068fb565a68a1f91170 SHA256 32dfaf2d3dd769fa57760a24f754d002fa1d569f08bf786e3e8f38b744c38ee7
+MD5 ddac2a685d1d115f5da51eb506ed0efd files/scala-2.4.0-build.xml.patch 2980
+RMD160 86d56cf747a0758e90b3aca886bfe6c2c7dfb198 files/scala-2.4.0-build.xml.patch 2980
+SHA256 32dfaf2d3dd769fa57760a24f754d002fa1d569f08bf786e3e8f38b744c38ee7 files/scala-2.4.0-build.xml.patch 2980
+DIST scala-2.4.0-final-sources.tgz 7882898 RMD160 7430c39beb877b96cfb9e7e0c8509e0ce601e7c1 SHA1 edd41bb73e5ce646fe2d396d5c7f76af6b4d168a SHA256 a3fc202bdc4988697a830ab1cace8c30350fdf1b6f46d8860289efc49de5b486
+EBUILD scala-2.4.0.ebuild 2383 RMD160 6d48c42ed3debd9218a3b755e8e727f4a3ffcd98 SHA1 5beefeb421ec160f69e4ce0bbe7657f52d6e8981 SHA256 5de7da30c24ea9df7c5a9db8592a05a1ecdfe7150e31e7adc5f2f7b5f178beef
+MD5 29f5faf9e8cdb3dbf9e0d246c3a6f82b scala-2.4.0.ebuild 2383
+RMD160 6d48c42ed3debd9218a3b755e8e727f4a3ffcd98 scala-2.4.0.ebuild 2383
+SHA256 5de7da30c24ea9df7c5a9db8592a05a1ecdfe7150e31e7adc5f2f7b5f178beef scala-2.4.0.ebuild 2383
+MISC ChangeLog 511 RMD160 3b98c2f77e9b766b73a28a3985fe064ee2da38ae SHA1 5e322c1cae0cc45e6a01ca4c41dd500338a2cfa2 SHA256 a514c6e41ae35700e63965659011dd33ce51cc4a8b877633703b857672662bf3
+MD5 b76499fdf5b7310719ed9e377c89a4a4 ChangeLog 511
+RMD160 3b98c2f77e9b766b73a28a3985fe064ee2da38ae ChangeLog 511
+SHA256 a514c6e41ae35700e63965659011dd33ce51cc4a8b877633703b857672662bf3 ChangeLog 511
+MISC metadata.xml 157 RMD160 ab0b3741457dee7531f59c4da0f0e9e8399af084 SHA1 c37a6b9922aef61b5b3387655bccb6e3b16e0e26 SHA256 295d02c5805b0257938eb80314b371daac94b8d6ea85629a902de7a824adc0c9
+MD5 a6ec7d7724fbd068ffb39b5be56134ed metadata.xml 157
+RMD160 ab0b3741457dee7531f59c4da0f0e9e8399af084 metadata.xml 157
+SHA256 295d02c5805b0257938eb80314b371daac94b8d6ea85629a902de7a824adc0c9 metadata.xml 157
+MD5 230b37fd79b7c98b34d5449d7be5c7b6 files/digest-scala-2.4.0 271
+RMD160 0a150772f14e587542bf23428a5ab5f7a8c3d28e files/digest-scala-2.4.0 271
+SHA256 bb174907aa63a184ae1044eb8427df085fabd111e18c9ceb55c2cdf72a50d7c4 files/digest-scala-2.4.0 271
diff --git a/dev-lang/scala/files/digest-scala-2.4.0 b/dev-lang/scala/files/digest-scala-2.4.0
new file mode 100644
index 000000000000..910d0137dd3f
--- /dev/null
+++ b/dev-lang/scala/files/digest-scala-2.4.0
@@ -0,0 +1,3 @@
+MD5 14cf470ffc730161f7c8810f1545d9c2 scala-2.4.0-final-sources.tgz 7882898
+RMD160 7430c39beb877b96cfb9e7e0c8509e0ce601e7c1 scala-2.4.0-final-sources.tgz 7882898
+SHA256 a3fc202bdc4988697a830ab1cace8c30350fdf1b6f46d8860289efc49de5b486 scala-2.4.0-final-sources.tgz 7882898
diff --git a/dev-lang/scala/files/scala-2.4.0-build.xml.patch b/dev-lang/scala/files/scala-2.4.0-build.xml.patch
new file mode 100644
index 000000000000..f542a80c2d07
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.4.0-build.xml.patch
@@ -0,0 +1,79 @@
+--- build.xml.orig 2007-03-21 17:53:06.000000000 +0100
++++ build.xml 2007-05-04 13:53:33.000000000 +0200
+@@ -86,11 +86,13 @@
+ <!-- Setting-up Ant contrib tasks -->
+ <taskdef resource="net/sf/antcontrib/antlib.xml"
+ classpath="${ant-contrib.jar}"/>
++ <!--
+ <fail message="External library ${ant-contrib.jar} requires the optional Ant tasks to be installed">
+ <condition><not><and>
+ <available file="${ant.home}/lib/ant-nodeps.jar"/>
+ </and></not></condition>
+ </fail>
++ -->
+ <!-- Making sure enough memory is available -->
+ <propertyregex
+ property="memory.set" input="${env.ANT_OPTS}" select="\1"
+@@ -784,7 +786,7 @@
+ DOCUMENTATION
+ ============================================================================ -->
+
+- <target name="docs" depends="setup.quick"
++ <target name="docs" depends="setup.quick" if="do.docs"
+ description="Generated the API for library sources">
+ <mkdir dir="${api-lib.dir}"/>
+ <quickdoc
+@@ -802,7 +804,7 @@
+ </quickdoc>
+ </target>
+
+- <target name="docs.compiler" depends="setup.quick"
++ <target name="docs.compiler" depends="setup.quick" if="do.docs"
+ description="Generated the API for compiler sources">
+ <mkdir dir="${api-comp.dir}"/>
+ <quickdoc
+@@ -886,7 +888,7 @@
+
+ <target name="dist.patch" depends="init">
+ <propertyfile file="${number.file}">
+- <entry key="version.patch" type="int" default="0" operation="+"/>
++ <entry key="version.patch" type="int" default="0"/>
+ </propertyfile>
+ <property file="${number.file}"/>
+ <property name="version.number"
+@@ -896,7 +898,7 @@
+
+ <target name="dist.minor" depends="init">
+ <propertyfile file="${number.file}">
+- <entry key="version.minor" type="int" default="0" operation="+"/>
++ <entry key="version.minor" type="int" default="0"/>
+ <entry key="version.patch" type="int" value="0"/>
+ </propertyfile>
+ <property file="${number.file}"/>
+@@ -1045,7 +1047,7 @@
+ <copy todir="${dist.current.dir}/doc/scala">
+ <fileset dir="${docs.dir}" includes="README,LICENSE"/>
+ </copy>
+- <copy todir="${dist.current.dir}/doc/scala/api">
++ <copy todir="${dist.current.dir}/doc/scala/api" failonerror="false">
+ <fileset dir="${api-lib.dir}"/>
+ </copy>
+ <copy todir="${dist.current.dir}/doc/scala/examples">
+@@ -1066,7 +1068,7 @@
+ </target>
+
+ <!-- Create the SBaz packages -->
+- <target name="build.sbaz" depends="build.dist">
++ <target name="build.sbaz" depends="build.dist" if="do.archive">
+ <property name="sbaz.universe" value="http://scala.epfl.ch/downloads/packages"/>
+ <mkdir dir="${dist.dir}"/>
+ <!-- Create the Scala library package -->
+@@ -1120,7 +1122,7 @@
+ </quicksbaz>
+ </target>
+
+- <target name="build.archive" depends="build.dist">
++ <target name="build.archive" depends="build.dist" if="do.archive">
+ <tar
+ destfile="${dist.dir}/scala-${version.number}.tgz"
+ compression="gzip">
diff --git a/dev-lang/scala/metadata.xml b/dev-lang/scala/metadata.xml
new file mode 100644
index 000000000000..838c00a4a448
--- /dev/null
+++ b/dev-lang/scala/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>java</herd>
+</pkgmetadata>
diff --git a/dev-lang/scala/scala-2.4.0.ebuild b/dev-lang/scala/scala-2.4.0.ebuild
new file mode 100644
index 000000000000..4b5b704015ea
--- /dev/null
+++ b/dev-lang/scala/scala-2.4.0.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/scala-2.4.0.ebuild,v 1.1 2007/05/04 17:22:19 caster Exp $
+
+JAVA_PKG_IUSE="doc examples source"
+WANT_ANT_TASKS="ant-nodeps"
+inherit check-reqs java-pkg-2 java-ant-2 versionator
+
+MY_P="${P}-final"
+
+DESCRIPTION="The Scala Programming Language"
+HOMEPAGE="http://www.scala-lang.org/"
+SRC_URI="http://www.scala-lang.org/downloads/distrib/files/${MY_P}-sources.tgz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE=""
+DEPEND=">=virtual/jdk-1.5
+ dev-java/ant-contrib"
+RDEPEND=">=virtual/jre-1.5"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+
+ debug-print "Checking for sufficient physical RAM"
+ CHECKREQS_MEMORY="512"
+ check_reqs
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # remove check for ant-nodeps.jar in ant-core/lib; make docs opt-in;
+ # don't increase version; don't create dist archives
+ epatch "${FILESDIR}/${P}-build.xml.patch"
+
+ cd lib || die
+ # other jars are needed for bootstrap
+ rm -v ant-contrib.jar || die
+ java-pkg_jar-from --build-only ant-contrib
+}
+
+src_compile() {
+ export ANT_OPTS="-Xmx512M -Xms512M"
+ local target
+ if [[ "$(get_version_component_range 3)" == "0" ]];
+ then
+ target="minor"
+ else
+ target="patch"
+ fi
+ eant dist.${target} $(use_doc -Ddo.docs=true)
+}
+
+src_test() {
+ bash ${S}/test/scalatest || die "Some tests aren't passed"
+}
+
+scala_launcher() {
+ local SCALADIR="/usr/share/${PN}"
+ local bcp="${SCALADIR}/lib/scala-library.jar"
+ java-pkg_dolauncher "${1}" --main "${2}" ${3} \
+ --java_args "-Xmx256M -Xms16M -Xbootclasspath/a:\\\"${bcp}\\\" -Dscala.home=\\\"${SCALADIR}\\\" -Denv.classpath=\\\"\${CLASSPATH}\\\""
+}
+
+src_install() {
+ cd dists/${MY_P} || die
+ local SCALADIR="/usr/share/${PN}/"
+
+ # sources are .scala so no use for java-pkg_dosrc
+ if use source; then
+ dodir "${SCALADIR}/src"
+ insinto "${SCALADIR}/src"
+ doins lib/*-src.jar
+ fi
+
+ rm lib/*-src.jar
+ java-pkg_dojar lib/*.jar
+
+ doman man/man1/*.1 || die
+ local docdir="doc/${PN}"
+ dodoc "${docdir}"/{LICENSE,README} ../../docs/TODO || die
+ if use doc; then
+ java-pkg_dojavadoc "${docdir}/api"
+ dohtml -r "${docdir}/tools" || die
+ fi
+ use examples && java-pkg_doexamples "${docdir}/examples"
+
+ scala_launcher fsc scala.tools.nsc.CompileClient
+ scala_launcher scala scala.tools.nsc.MainGenericRunner
+ scala_launcher scalac scala.tools.nsc.Main
+ scala_launcher scaladoc scala.tools.nsc.Main "--pkg_args -doc"
+}