summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wright <gienah@gentoo.org>2013-08-30 13:55:11 +0000
committerMark Wright <gienah@gentoo.org>2013-08-30 13:55:11 +0000
commitffab6da6cbba40d7f109ddf709c0d519021e0ed5 (patch)
tree8f00dfb5b86a59947afcde594acd234d5cd5652f /dev-lang/scala
parentppc64 stable wrt bug #449628 (diff)
downloadgentoo-2-ffab6da6cbba40d7f109ddf709c0d519021e0ed5.tar.gz
gentoo-2-ffab6da6cbba40d7f109ddf709c0d519021e0ed5.tar.bz2
gentoo-2-ffab6da6cbba40d7f109ddf709c0d519021e0ed5.zip
Fix: bug 482192 - thanks to Christian Strahl, Mike Limansky and Sumit Khanna for reporting; bug 482260 - thanks to Christoph Lange for reporting; bug 482286
(Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key 618E971F)
Diffstat (limited to 'dev-lang/scala')
-rw-r--r--dev-lang/scala/ChangeLog8
-rw-r--r--dev-lang/scala/files/scala-2.10.2-maven-deps.patch70
-rw-r--r--dev-lang/scala/scala-2.10.2.ebuild78
3 files changed, 143 insertions, 13 deletions
diff --git a/dev-lang/scala/ChangeLog b/dev-lang/scala/ChangeLog
index 54d300196db6..4158a0921258 100644
--- a/dev-lang/scala/ChangeLog
+++ b/dev-lang/scala/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-lang/scala
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/ChangeLog,v 1.32 2013/08/22 10:05:56 gienah Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/ChangeLog,v 1.33 2013/08/30 13:55:11 gienah Exp $
+
+ 30 Aug 2013; Mark Wright <gienah@gentoo.org>
+ +files/scala-2.10.2-maven-deps.patch, scala-2.10.2.ebuild:
+ Fix: bug 482192 - thanks to Christian Strahl, Mike Limansky and Sumit Khanna
+ for reporting; bug 482260 - thanks to Christoph Lange for reporting; bug
+ 482286
*scala-2.10.2 (22 Aug 2013)
diff --git a/dev-lang/scala/files/scala-2.10.2-maven-deps.patch b/dev-lang/scala/files/scala-2.10.2-maven-deps.patch
new file mode 100644
index 000000000000..133a2a4f7576
--- /dev/null
+++ b/dev-lang/scala/files/scala-2.10.2-maven-deps.patch
@@ -0,0 +1,70 @@
+--- scala-2.10.2-orig/build.xml 2013-05-31 00:44:27.000000000 +1000
++++ scala-2.10.2/build.xml 2013-08-30 22:48:11.727055000 +1000
+@@ -202,30 +202,19 @@
+ on repeated use of artifact:dependencies
+ -->
+ <if><not><isset property="maven-deps-done"></isset></not><then>
+- <mkdir dir="${user.home}/.m2/repository"/>
+- <!-- This task has an issue where if the user directory does not exist, so we create it above. UGH. -->
+- <artifact:dependencies pathId="extra.tasks.classpath" filesetId="extra.tasks.fileset">
+- <dependency groupId="biz.aQute" artifactId="bnd" version="1.50.0"/>
+- </artifact:dependencies>
++ <path id="extra.tasks.classpath">
++ <pathelement path="BNDLIB_CLASSPATH"></pathelement>
++ </path>
+
+ <!-- Pax runner -->
+- <property name="pax.exam.version" value="2.5.0"/>
+- <artifact:dependencies pathId="pax.exam.classpath" filesetId="pax.exam.fileset">
+- <dependency groupId="org.ops4j.pax.exam" artifactId="pax-exam-container-native" version="${pax.exam.version}"/>
+- <dependency groupId="org.ops4j.pax.exam" artifactId="pax-exam-junit4" version="${pax.exam.version}"/>
+- <dependency groupId="org.ops4j.pax.exam" artifactId="pax-exam-link-assembly" version="${pax.exam.version}"/>
+- <dependency groupId="org.ops4j.pax.url" artifactId="pax-url-aether" version="1.4.0"/>
+- <dependency groupId="org.ops4j.pax.swissbox" artifactId="pax-swissbox-framework" version="1.5.1"/>
+- <dependency groupId="ch.qos.logback" artifactId="logback-core" version="0.9.20"/>
+- <dependency groupId="ch.qos.logback" artifactId="logback-classic" version="0.9.20"/>
+- <dependency groupId="junit" artifactId="junit" version="4.10"/>
+- <dependency groupId="org.apache.felix" artifactId="org.apache.felix.framework" version="3.2.2"/>
+- </artifact:dependencies>
+-
+- <artifact:dependencies pathId="partest.extras.classpath" filesetId="partest.extras.fileset" versionsId="partest.extras.versions">
+- <dependency groupId="com.googlecode.java-diff-utils" artifactId="diffutils" version="1.3.0"/>
+- </artifact:dependencies>
+-
++ <path id="pax.exam.classpath">
++ <pathelement path="PAX_RUNNER_CLASSPATH"></pathelement>
++ </path>
++
++ <path id="partest.extras.classpath">
++ <pathelement path="DIFFUTILS_CLASSPATH"></pathelement>
++ </path>
++ <property name="partest.extras.versions" value="1.3.0"></property>
+ <!-- BND support -->
+ <typedef resource="aQute/bnd/ant/taskdef.properties" classpathref="extra.tasks.classpath" />
+
+@@ -1247,10 +1236,8 @@
+ <!-- depend on quick.done so quick.bin is run when pack.done is -->
+ <target name="pack.done" depends="quick.done, pack.bin">
+ <!-- copy dependencies to build/pack/lib, it only takes a second so don't bother with uptodate checks -->
+- <copy todir="${build-pack.dir}/lib">
+- <resources refid="partest.extras.fileset"/>
+- <mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper"
+- from="${partest.extras.versions}" to="flatten"/>
++ <copy todir="${build-pack.dir}/lib" flatten="true">
++ <path><path refid="partest.extras.classpath"/></path>
+ </copy>
+
+ <taskdef resource="scala/tools/ant/antlib.xml" classpathref="pack.compiler.path"/>
+@@ -1769,10 +1756,8 @@
+ </fileset>
+ </copy>
+
+- <copy todir="${dist.dir}/lib">
+- <resources refid="partest.extras.fileset"/>
+- <mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper"
+- from="${partest.extras.versions}" to="flatten"/>
++ <copy todir="${dist.dir}/lib" flatten="true">
++ <path><path refid="partest.extras.classpath"/></path>
+ </copy>
+
+ <mkdir dir="${dist.dir}/bin"/>
diff --git a/dev-lang/scala/scala-2.10.2.ebuild b/dev-lang/scala/scala-2.10.2.ebuild
index cf08c68714cb..c8e2a6645c8c 100644
--- a/dev-lang/scala/scala-2.10.2.ebuild
+++ b/dev-lang/scala/scala-2.10.2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 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.1 2013/08/22 10:05:56 gienah Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/scala/scala-2.10.2.ebuild,v 1.2 2013/08/30 13:55:11 gienah Exp $
EAPI="5"
JAVA_PKG_IUSE="doc examples source"
@@ -53,6 +53,7 @@ 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"
@@ -61,7 +62,9 @@ KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux ~x86-macos"
IUSE="binary emacs"
COMMON_DEP="dev-java/ant-core
- dev-java/hawtjni-runtime"
+ dev-java/bndlib
+ dev-java/hawtjni-runtime
+ dev-java/junit:4"
DEPEND="${COMMON_DEP}
>=virtual/jdk-1.6.0
<virtual/jdk-1.8.0
@@ -78,7 +81,7 @@ PDEPEND="emacs? ( app-emacs/scala-mode )"
S="${WORKDIR}/${P}"
-LIBRARY_PKGS="ant-core,hawtjni-runtime"
+LIBRARY_PKGS="ant-core,bndlib,hawtjni-runtime,junit-4"
CHECKREQS_MEMORY="1532M"
@@ -100,12 +103,18 @@ src_unpack() {
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 has_version ">=virtual/jdk-1.7.0"; then
@@ -114,11 +123,61 @@ java_prepare() {
fi
# https://issues.scala-lang.org/browse/SI-7455
epatch "${FILESDIR}/${PN}-2.10.2-jdk-1.7-swing-SI-7455.patch"
- local j
- for j in "${JURI[@]}"
+ # 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
- cp -p "${DISTDIR}/${j##*/}" "${S}/${j#${BURI}/*/}" || die
+ 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
}
@@ -128,14 +187,11 @@ src_compile() {
#sets -X type variables which might come back to bite me
unset ANT_OPTS
- # Thanks to Coy Barnes: https://bugs.gentoo.org/show_bug.cgi?id=450298#c13
- export JAVA_OPTS="$JAVA_OPTS -Duser.home=${T}"
-
# 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} \
- build-opt
+ -Duser.home="${WORKDIR}" build-opt
eant dist.done
else
einfo "Skipping compilation, USE=binary is set."
@@ -182,6 +238,4 @@ src_install() {
local _name=$(basename "${b}")
dosym "/usr/share/${PN}/bin/${_name}" "/usr/bin/${_name}"
done
- dosym "/usr/share/${JAVA_PKG_NAME}/lib" "/usr/share/${PN}/lib"
- dosym "/usr/share/${JAVA_PKG_NAME}/package.env" "/usr/share/${PN}/package.env"
}