diff options
author | Mark Wright <gienah@gentoo.org> | 2015-01-15 12:36:21 +0000 |
---|---|---|
committer | Mark Wright <gienah@gentoo.org> | 2015-01-15 12:36:21 +0000 |
commit | 21ecd152c045941da066de1b828fb57a0a4d6cd0 (patch) | |
tree | c3430061882e9e14db5348380eee85002f3191a9 /dev-lang/scala | |
parent | Fixed docdir (diff) | |
download | gentoo-2-21ecd152c045941da066de1b828fb57a0a4d6cd0.tar.gz gentoo-2-21ecd152c045941da066de1b828fb57a0a4d6cd0.tar.bz2 gentoo-2-21ecd152c045941da066de1b828fb57a0a4d6cd0.zip |
Thanks to Martin Walch for reporting, fix Bug 532694 - dev-lang/scala-2.11*: some scala-* libraries are missing the ".jar" ending. Drop old versions.
(Portage version: 2.2.15/cvs/Linux x86_64, signed Manifest commit with key 618E971F)
Diffstat (limited to 'dev-lang/scala')
-rw-r--r-- | dev-lang/scala/ChangeLog | 10 | ||||
-rw-r--r-- | dev-lang/scala/scala-2.10.2.ebuild | 241 | ||||
-rw-r--r-- | dev-lang/scala/scala-2.11.1.ebuild | 7 | ||||
-rw-r--r-- | dev-lang/scala/scala-2.11.2.ebuild | 7 | ||||
-rw-r--r-- | dev-lang/scala/scala-2.11.4.ebuild | 7 | ||||
-rw-r--r-- | dev-lang/scala/scala-2.9.0.1.ebuild | 140 | ||||
-rw-r--r-- | dev-lang/scala/scala-2.9.1.ebuild | 140 |
7 files changed, 17 insertions, 535 deletions
diff --git a/dev-lang/scala/ChangeLog b/dev-lang/scala/ChangeLog index d156582c439f..ab2209bcf6aa 100644 --- a/dev-lang/scala/ChangeLog +++ b/dev-lang/scala/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-lang/scala -# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/ChangeLog,v 1.43 2014/11/28 00:09:10 gienah Exp $ +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/ChangeLog,v 1.44 2015/01/15 12:36:21 gienah Exp $ + + 15 Jan 2015; Mark Wright <gienah@gentoo.org> -scala-2.10.2.ebuild, + -scala-2.9.0.1.ebuild, -scala-2.9.1.ebuild, scala-2.11.1.ebuild, + scala-2.11.2.ebuild, scala-2.11.4.ebuild: + Thanks to Martin Walch for reporting, fix Bug 532694 - dev-lang/scala-2.11*: + some scala-* libraries are missing the ".jar" ending. Drop old versions. 28 Nov 2014; Mark Wright <gienah@gentoo.org> +files/scala-2.11.4-no-git.patch: Thanks to Juergen Rose for reporting, fix Bug 530836 - dev-lang/scala-2.11.4 - diff --git a/dev-lang/scala/scala-2.10.2.ebuild b/dev-lang/scala/scala-2.10.2.ebuild deleted file mode 100644 index 5ac46399c8dd..000000000000 --- a/dev-lang/scala/scala-2.10.2.ebuild +++ /dev/null @@ -1,241 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/scala-2.10.2.ebuild,v 1.3 2014/02/12 13:46:58 gienah Exp $ - -EAPI="5" -JAVA_PKG_IUSE="doc examples source" -WANT_ANT_TASKS="ant-nodeps" -EANT_TEST_TARGET="test.suite" -inherit eutils check-reqs java-pkg-2 java-ant-2 versionator - -MY_P="${PN}-sources-${PV}" - -# creating the binary: -# JAVA_PKG_FORCE_VM="$available-1.6" USE="doc examples source" ebuild scala-*.ebuild compile -# cd $WORDKIR -# fix dist/latest link. -# tar -cjf $DISTDIR/scala-$PN-gentoo-binary.tar.bz2 ${MY_P}/dists ${MY_P}/docs/TODO - -# in the pullJarFiles function in tools/binary-repo-lib.sh it executes find commands -# to search for .desired.sha1 files, which contain sha1 hashes that are appended -# to ${BURI} along with the subdirectory and filename to form the list of jar files -# listed in SRC_URI. - -BURI="http://repo.typesafe.com/typesafe/scala-sha-bootstrap/org/scala-lang/bootstrap" - -declare -a JURI=(${BURI}/8bdac1cdd60b73ff7e12fd2b556355fa10343e2d/lib/scala-library-src.jar \ - ${BURI}/ddd7d5398733c4fbbb8355c049e258d47af636cf/lib/forkjoin.jar \ - ${BURI}/d48cb950ceded82a5e0ffae8ef2c68d0923ed00c/lib/msil.jar \ - ${BURI}/d229f4c91ea8ab1a81559b5803efd9b0b1632f0b/lib/scala-reflect-src.jar \ - ${BURI}/3fc1e35ca8c991fc3488548f7a276bd9053c179d/lib/ant/ant-dotnet-1.0.jar \ - ${BURI}/2c61d6e9a912b3253194d5d6d3e1db7e2545ac4b/lib/ant/vizant.jar \ - ${BURI}/7b456ca6b93900f96e58cc8371f03d90a9c1c8d1/lib/ant/ant.jar \ - ${BURI}/943cd5c8802b2a3a64a010efb86ec19bac142e40/lib/ant/ant-contrib.jar \ - ${BURI}/7e50e3e227d834695f1e0bf018a7326e06ee4c86/lib/ant/maven-ant-tasks-2.1.1.jar \ - ${BURI}/cfa3ee21f76cd5c115bd3bc070a3b401587bafb5/lib/scala-compiler-src.jar \ - ${BURI}/1e0e39fae15b42e85998740511ec5a3830e26243/lib/scala-library.jar \ - ${BURI}/8acc87f222210b4a5eb2675477602fc1759e7684/lib/fjbg.jar \ - ${BURI}/288f47dbe1002653e030fd25ca500b9ffe1ebd64/lib/scala-reflect.jar \ - ${BURI}/a5261e70728c1847639e2b47d953441d0b217bcb/lib/jline.jar \ - ${BURI}/d54b99f215d4d42b3f0b3489fbb1081270700992/lib/scala-compiler.jar \ - ${BURI}/02fe2ed93766323a13f22c7a7e2ecdcd84259b6c/test/files/lib/annotations.jar \ - ${BURI}/b1ec8a095cec4902b3609d74d274c04365c59c04/test/files/lib/genericNest.jar \ - ${BURI}/981392dbd1f727b152cd1c908c5fce60ad9d07f7/test/files/lib/enums.jar \ - ${BURI}/cd33e0a0ea249eb42363a2f8ba531186345ff68c/test/files/lib/nest.jar \ - ${BURI}/be8454d5e7751b063ade201c225dcedefd252775/test/files/lib/methvsfield.jar \ - ${BURI}/b6f4dbb29f0c2ec1eba682414f60d52fea84f703/test/files/lib/scalacheck.jar \ - ${BURI}/e737b123d31eede5594ceda07caafed1673ec472/test/files/codelib/code.jar \ - ${BURI}/1b11ac773055c1e942c6b5eb4aabdf02292a7194/test/files/speclib/instrumented.jar \ - ${BURI}/a1883f4304d5aa65e1f6ee6aad5900c62dd81079/tools/push.jar) - -DESCRIPTION="The Scala Programming Language" -HOMEPAGE="http://www.scala-lang.org/" -SRC_URI="!binary? -( https://github.com/scala/scala/archive/v${PV}.tar.gz -> ${P}.tar.gz - ${JURI[@]} - http://dev.gentoo.org/~gienah/snapshots/${P}-maven-deps.tar.gz -)" -# binary? ( http://dev.gentoo.org/~ali_bush/distfiles/${P}-gentoo-binary.tar.bz2 )" -LICENSE="BSD" -SLOT="0/${PV}" -KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos" -IUSE="binary emacs" - -COMMON_DEP="dev-java/ant-core - dev-java/bndlib - dev-java/hawtjni-runtime - dev-java/junit:4" -DEPEND="${COMMON_DEP} - >=virtual/jdk-1.6.0 - <virtual/jdk-1.8.0 - java-virtuals/jdk-with-com-sun - !binary? ( - dev-java/ant-contrib:0 - ) - app-arch/xz-utils" -RDEPEND="${COMMON_DEP} - >=virtual/jre-1.6 - !dev-java/scala-bin" - -PDEPEND="emacs? ( app-emacs/scala-mode )" - -S="${WORKDIR}/${P}" - -LIBRARY_PKGS="ant-core,bndlib,hawtjni-runtime,junit-4" - -CHECKREQS_MEMORY="1532M" - -pkg_setup() { - java-pkg-2_pkg_setup - if ! use binary; then - debug-print "Checking for sufficient physical RAM" - - ewarn "This package can fail to build with memory allocation errors in some cases." - ewarn "If you are unable to build from sources, please try USE=binary" - ewarn "for this package. See bug #181390 for more information." - - check-reqs_pkg_setup - fi -} - -src_unpack() { - if use binary; then - unpack ${A} - else - unpack "${P}.tar.gz" - unpack "${P}-maven-deps.tar.gz" - fi -} - -java_prepare() { - java-pkg_getjars ${LIBRARY_PKGS} - if ! use binary; then - local j - for j in "${JURI[@]}" - do - cp -p "${DISTDIR}/${j##*/}" "${S}/${j#${BURI}/*/}" || die - done - # gentoo patch (by gienah) to stop it calling git log in the build - epatch "${FILESDIR}/${PN}-2.10.2-no-git.patch" - if java-pkg_is-vm-version-ge "1.7" ; then - # This patch bumped to 2.10.2: http://pkgs.fedoraproject.org/cgit/scala.git/tree/scala-2.10.0-java7.patch - epatch "${FILESDIR}/${PN}-2.10.2-jdk-1.7-swing.patch" - fi - # https://issues.scala-lang.org/browse/SI-7455 - epatch "${FILESDIR}/${PN}-2.10.2-jdk-1.7-swing-SI-7455.patch" - # Note: to bump scala, some things to try are: - # 1. update all the sha1s in JURI - # 2. comment out applying the maven-deps patch and all the stuff here up to and including the sed of build.xml - # 3. try emerge scala, it will likely download more stuff in src_compile to ${WORDIR}/.m2 - # 4. tar up the stuff in ${WORDIR}/.m2 and change the ${P}-maven-deps.tar.gz in SRC_URI to point to it. - # 5. uncomment the maven-deps patch apply and all the stuff up to and including the sed of build.xml - # 6. the hash in ${P}-no-git.patch should be updated by searching for hash matching the scala release - # tag, so that the source code hyper-links in the scala documentation will point to the correct version of - # the source code. - # Bug 482192 - epatch "${FILESDIR}/${PN}-2.10.2-maven-deps.patch" - # we have $(java-config -p bndlib) in portage, but not bnd. - local bnd_classpath="" - for i in $(find "${WORKDIR}/.m2/repository/biz/aQute/bnd" -type f -name *.jar -print) - do - if [ -z "${bnd_classpath}" ] - then - bnd_classpath="${i}" - else - bnd_classpath="${bnd_classpath}:${i}" - fi - done - bnd_classpath="${bnd_classpath}:$(java-config -p bndlib)" - - # pax runner appears to only be used in the tests - local paxrunner_classpath="" - for i in $(find "${WORKDIR}/.m2/repository/org/ops4j/" -type f -name *.jar -print) - do - if [ -z "${paxrunner_classpath}" ] - then - paxrunner_classpath="${i}" - else - paxrunner_classpath="${paxrunner_classpath}:${i}" - fi - done - paxrunner_classpath="${paxrunner_classpath}:$(java-config -p junit-4)" - - # DiffUtils does not appear to be in portage. It is placed in ${partest.extras.classpath} and - # copied to ${build-pack.dir}/lib in ${PN}-2.10.2-maven-deps.patch. - local diffutils_classpath="" - for i in $(find "${WORKDIR}/.m2/repository/com/googlecode/java-diff-utils" -type f -name *.jar -print) - do - if [ -z "${diffutils_classpath}" ] - then - diffutils_classpath="${i}" - else - diffutils_classpath="${diffutils_classpath}:${i}" - fi - done - - sed -e "s@BNDLIB_CLASSPATH@${bnd_classpath}@" \ - -e "s@PAX_RUNNER_CLASSPATH@${paxrunner_classpath}@" \ - -e "s@DIFFUTILS_CLASSPATH@${diffutils_classpath}@" \ - -i "${S}/build.xml" \ - || die "could not sed classpaths in build.xml" - fi -} - -src_compile() { - if ! use binary; then - #unset ANT_OPTS as this is set in the build.xml - #sets -X type variables which might come back to bite me - unset ANT_OPTS - - # reported in bugzilla that multiple launches use less resources - # https://bugs.gentoo.org/show_bug.cgi?id=282023 - eant all.clean - eant -Djavac.args="-encoding UTF-8" -Djava6.home=${JAVA_HOME} \ - -Duser.home="${WORKDIR}" build-opt - eant dist.done - else - einfo "Skipping compilation, USE=binary is set." - fi -} - -src_test() { - java-pkg-2_src_test -} - -src_install() { - cd dists/latest || die - - local SCALADIR="/usr/share/${PN}/" - - exeinto "${SCALADIR}/bin" - doexe $(find bin/ -type f ! -iname '*.bat') - - #sources are .scala so no use for java-pkg_dosrc - if use source; then - dodir "${SCALADIR}/src" - insinto "${SCALADIR}/src" - doins src/*-src.jar - fi - - java-pkg_dojar lib/*.jar - - doman man/man1/*.1 - - #docs and examples are not contained in the binary tgz anymore - if ! use binary; then - local docdir="doc/${PN}-devel-docs" - dodoc doc/README ../../docs/TODO - if use doc; then - java-pkg_dojavadoc "${docdir}/api" - dohtml -r "${docdir}/tools" - fi - - use examples && java-pkg_doexamples "${docdir}/examples" - fi - - dodir /usr/bin - for b in $(find bin/ -type f ! -iname '*.bat'); do - local _name=$(basename "${b}") - dosym "/usr/share/${PN}/bin/${_name}" "/usr/bin/${_name}" - done -} diff --git a/dev-lang/scala/scala-2.11.1.ebuild b/dev-lang/scala/scala-2.11.1.ebuild index cfc607b0e2db..a73bc94950a1 100644 --- a/dev-lang/scala/scala-2.11.1.ebuild +++ b/dev-lang/scala/scala-2.11.1.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/scala-2.11.1.ebuild,v 1.2 2014/10/06 05:51:40 gienah Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/scala-2.11.1.ebuild,v 1.3 2015/01/15 12:36:21 gienah Exp $ EAPI="5" @@ -180,10 +180,9 @@ src_install() { doexe $(find bin/ -type f ! -iname '*.bat') dodir "${SCALADIR}/lib" insinto "${SCALADIR}/lib" - local maj_min=$(get_version_component_range 2) pushd lib || die for j in *.jar; do - local i="${j%${maj_min}*}" + local i="$(echo "${j}" | sed -e "s@[_-][0-9.-]*\.jar@.jar@")" newins "${j}" "${i}" java-pkg_regjar "${ED}${SCALADIR}/lib/${i}" done diff --git a/dev-lang/scala/scala-2.11.2.ebuild b/dev-lang/scala/scala-2.11.2.ebuild index 0632f57cd478..773b7c2fb159 100644 --- a/dev-lang/scala/scala-2.11.2.ebuild +++ b/dev-lang/scala/scala-2.11.2.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/scala-2.11.2.ebuild,v 1.3 2014/11/26 02:44:19 gienah Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/scala-2.11.2.ebuild,v 1.4 2015/01/15 12:36:21 gienah Exp $ EAPI="5" @@ -182,10 +182,9 @@ src_install() { doexe $(find bin/ -type f ! -iname '*.bat') dodir "${SCALADIR}/lib" insinto "${SCALADIR}/lib" - local maj_min=$(get_version_component_range 2) pushd lib || die for j in *.jar; do - local i="${j%${maj_min}*}" + local i="$(echo "${j}" | sed -e "s@[_-][0-9.-]*\.jar@.jar@")" newins "${j}" "${i}" java-pkg_regjar "${ED}${SCALADIR}/lib/${i}" done diff --git a/dev-lang/scala/scala-2.11.4.ebuild b/dev-lang/scala/scala-2.11.4.ebuild index 7fb25d68d674..0d9a59f18d07 100644 --- a/dev-lang/scala/scala-2.11.4.ebuild +++ b/dev-lang/scala/scala-2.11.4.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/scala-2.11.4.ebuild,v 1.1 2014/11/27 04:05:09 gienah Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/scala-2.11.4.ebuild,v 1.2 2015/01/15 12:36:21 gienah Exp $ EAPI="5" @@ -182,10 +182,9 @@ src_install() { doexe $(find bin/ -type f ! -iname '*.bat') dodir "${SCALADIR}/lib" insinto "${SCALADIR}/lib" - local maj_min=$(get_version_component_range 2) pushd lib || die for j in *.jar; do - local i="${j%${maj_min}*}" + local i="$(echo "${j}" | sed -e "s@[_-][0-9.-]*\.jar@.jar@")" newins "${j}" "${i}" java-pkg_regjar "${ED}${SCALADIR}/lib/${i}" done diff --git a/dev-lang/scala/scala-2.9.0.1.ebuild b/dev-lang/scala/scala-2.9.0.1.ebuild deleted file mode 100644 index 82b2cde1f54c..000000000000 --- a/dev-lang/scala/scala-2.9.0.1.ebuild +++ /dev/null @@ -1,140 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/scala-2.9.0.1.ebuild,v 1.1 2011/06/03 11:16:33 ali_bush Exp $ - -EAPI="3" -JAVA_PKG_IUSE="doc examples source" -WANT_ANT_TASKS="ant-nodeps" -inherit eutils check-reqs java-pkg-2 java-ant-2 versionator - -MY_P="${P}-sources" - -# creating the binary: -# JAVA_PKG_FORCE_VM="$available-1.5" USE="doc examples source" ebuild scala-*.ebuild compile -# cd $WORDKIR -# fix dist/latest link. -# tar -cjf $DISTDIR/scala-$PN-gentoo-binary.tar.bz2 ${MY_P}/dists ${MY_P}/docs/TODO - -DESCRIPTION="The Scala Programming Language" -HOMEPAGE="http://www.scala-lang.org/" -SRC_URI="!binary? ( ${HOMEPAGE}downloads/distrib/files/${MY_P}.txz -> ${P}.tar.xz ) - binary? ( http://dev.gentoo.org/~ali_bush/distfiles/${P}-gentoo-binary.tar.bz2 )" -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="binary emacs" -# one fails with 1.7, two with 1.4 (blackdown) -#RESTRICT="test" - -DEPEND=">=virtual/jdk-1.6 - java-virtuals/jdk-with-com-sun - !binary? ( - dev-java/ant-contrib:0 - ) - app-arch/xz-utils" -RDEPEND=">=virtual/jre-1.6 - !dev-java/scala-bin" - -PDEPEND="emacs? ( app-emacs/scala-mode )" - -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - java-pkg-2_pkg_setup - - if ! use binary; then - debug-print "Checking for sufficient physical RAM" - - ewarn "This package can fail to build with memory allocation errors in some cases." - ewarn "If you are unable to build from sources, please try USE=binary" - ewarn "for this package. See bug #181390 for more information." - - CHECKREQS_MEMORY="1532" - - check_reqs - fi -} - -java_prepare() { - if ! use binary; then - pushd lib &> /dev/null - # other jars are needed for bootstrap - #rm -v jline.jar ant/ant-contrib.jar #cldcapi10.jar midpapi10.jar msil.jar *.dll || die - rm -v ant/ant-contrib.jar || die - java-pkg_jar-from --into ant --build-only ant-contrib - popd &> /dev/null - fi -} - -src_compile() { - if ! use binary; then - #unset ANT_OPTS as this is set in the build.xml - #sets -X type variables which might come back to bite me - unset ANT_OPTS - - # reported in bugzilla that multiple launches use less resources - # https://bugs.gentoo.org/show_bug.cgi?id=282023 - eant all.clean - eant -Djavac.args="-encoding UTF-8" -Djava6.home=${JAVA_HOME} \ - newlibs newforkjoin build-opt - eant dist.done - else - einfo "Skipping compilation, USE=binary is set." - fi -} - -src_test() { - eant test.suite || 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}" \ -# --java_args "-Xmx256M -Xms32M -Dscala.home=${SCALADIR} -Denv.emacs=${EMACS}" -#} - -src_install() { - cd dists/latest || die - - local SCALADIR="/usr/share/${PN}/" - - exeinto "${SCALADIR}/bin" - doexe $(find bin/ -type f ! -iname '*.bat') - - #sources are .scala so no use for java-pkg_dosrc - if use source; then - dodir "${SCALADIR}/src" - insinto "${SCALADIR}/src" - doins src/*-src.jar - fi - - java-pkg_dojar lib/*.jar - - doman man/man1/*.1 || die - - #docs and examples are not contained in the binary tgz anymore - if ! use binary; then - local docdir="doc/${PN}-devel-docs" - dodoc doc/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" - fi - - dodir /usr/bin - for b in $(find bin/ -type f ! -iname '*.bat'); do - #pushd "${D}/usr/bin" &>/dev/null - local _name=$(basename "${b}") - dosym "/usr/share/${JAVA_PKG_NAME}/bin/${_name}" "/usr/bin/${_name}" - #popd &>/dev/null - done - #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.ScalaDoc - #scala_launcher scalap scala.tools.scalap.Main -} diff --git a/dev-lang/scala/scala-2.9.1.ebuild b/dev-lang/scala/scala-2.9.1.ebuild deleted file mode 100644 index 929c43311e5c..000000000000 --- a/dev-lang/scala/scala-2.9.1.ebuild +++ /dev/null @@ -1,140 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/scala-2.9.1.ebuild,v 1.3 2012/01/31 09:22:41 ali_bush Exp $ - -EAPI="3" -JAVA_PKG_IUSE="doc examples source" -WANT_ANT_TASKS="ant-nodeps" -inherit eutils check-reqs java-pkg-2 java-ant-2 versionator - -MY_P="${P}.final-sources" - -# creating the binary: -# JAVA_PKG_FORCE_VM="$available-1.5" USE="doc examples source" ebuild scala-*.ebuild compile -# cd $WORDKIR -# fix dist/latest link. -# tar -cjf $DISTDIR/scala-$PN-gentoo-binary.tar.bz2 ${MY_P}/dists ${MY_P}/docs/TODO - -DESCRIPTION="The Scala Programming Language" -HOMEPAGE="http://www.scala-lang.org/" -SRC_URI="!binary? ( ${HOMEPAGE}downloads/distrib/files/${MY_P}.txz -> ${P}.tar.xz ) - binary? ( http://dev.gentoo.org/~ali_bush/distfiles/${P}-gentoo-binary.tar.bz2 )" -LICENSE="BSD" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="binary emacs" -# one fails with 1.7, two with 1.4 (blackdown) -#RESTRICT="test" - -DEPEND="virtual/jdk:1.6 - java-virtuals/jdk-with-com-sun - !binary? ( - dev-java/ant-contrib:0 - ) - app-arch/xz-utils" -RDEPEND=">=virtual/jre-1.6 - !dev-java/scala-bin" - -PDEPEND="emacs? ( app-emacs/scala-mode )" - -S="${WORKDIR}/${MY_P}" - -pkg_setup() { - java-pkg-2_pkg_setup - - if ! use binary; then - debug-print "Checking for sufficient physical RAM" - - ewarn "This package can fail to build with memory allocation errors in some cases." - ewarn "If you are unable to build from sources, please try USE=binary" - ewarn "for this package. See bug #181390 for more information." - - CHECKREQS_MEMORY="1532M" - - check-reqs_pkg_setup - fi -} - -java_prepare() { - if ! use binary; then - pushd lib &> /dev/null - # other jars are needed for bootstrap - #rm -v jline.jar ant/ant-contrib.jar #cldcapi10.jar midpapi10.jar msil.jar *.dll || die - rm -v ant/ant-contrib.jar || die - java-pkg_jar-from --into ant --build-only ant-contrib - popd &> /dev/null - fi -} - -src_compile() { - if ! use binary; then - #unset ANT_OPTS as this is set in the build.xml - #sets -X type variables which might come back to bite me - unset ANT_OPTS - - # reported in bugzilla that multiple launches use less resources - # https://bugs.gentoo.org/show_bug.cgi?id=282023 - eant all.clean - eant -Djavac.args="-encoding UTF-8" -Djava6.home=${JAVA_HOME} \ - newlibs newforkjoin build-opt - eant dist.done - else - einfo "Skipping compilation, USE=binary is set." - fi -} - -src_test() { - eant test.suite || 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}" \ -# --java_args "-Xmx256M -Xms32M -Dscala.home=${SCALADIR} -Denv.emacs=${EMACS}" -#} - -src_install() { - cd dists/latest || die - - local SCALADIR="/usr/share/${PN}/" - - exeinto "${SCALADIR}/bin" - doexe $(find bin/ -type f ! -iname '*.bat') - - #sources are .scala so no use for java-pkg_dosrc - if use source; then - dodir "${SCALADIR}/src" - insinto "${SCALADIR}/src" - doins src/*-src.jar - fi - - java-pkg_dojar lib/*.jar - - doman man/man1/*.1 || die - - #docs and examples are not contained in the binary tgz anymore - if ! use binary; then - local docdir="doc/${PN}-devel-docs" - dodoc doc/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" - fi - - dodir /usr/bin - for b in $(find bin/ -type f ! -iname '*.bat'); do - #pushd "${D}/usr/bin" &>/dev/null - local _name=$(basename "${b}") - dosym "/usr/share/${JAVA_PKG_NAME}/bin/${_name}" "/usr/bin/${_name}" - #popd &>/dev/null - done - #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.ScalaDoc - #scala_launcher scalap scala.tools.scalap.Main -} |