/[gentoo-x86]/dev-java/jruby/jruby-1.0.0_rc2-r1.ebuild
Gentoo

Diff of /dev-java/jruby/jruby-1.0.0_rc2-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.2
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/Attic/jruby-1.0.0_rc2-r1.ebuild,v 1.1 2007/05/24 18:49:04 nichoj Exp $ 3# $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/Attic/jruby-1.0.0_rc2-r1.ebuild,v 1.2 2007/05/27 19:20:23 caster Exp $
4 4
5JAVA_PKG_IUSE="doc source test" 5JAVA_PKG_IUSE="doc source test"
6inherit eutils java-pkg-2 java-ant-2 6inherit eutils java-pkg-2 java-ant-2
7 7
8MY_PV="${PV/_rc/RC}" 8MY_PV="${PV/_rc/RC}"
13SRC_URI="http://dist.codehaus.org/${PN}/${PN}-src-${MY_PV}.tar.gz" 13SRC_URI="http://dist.codehaus.org/${PN}/${PN}-src-${MY_PV}.tar.gz"
14 14
15LICENSE="|| ( CPL-1.0 GPL-2 LGPL-2.1 )" 15LICENSE="|| ( CPL-1.0 GPL-2 LGPL-2.1 )"
16SLOT="0" 16SLOT="0"
17KEYWORDS="~amd64 ~ppc ~x86" 17KEYWORDS="~amd64 ~ppc ~x86"
18IUSE="doc source test" 18IUSE="bsf"
19 19
20COMMON_DEPEND=">=dev-java/jline-0.9.91 20COMMON_DEPEND=">=dev-java/jline-0.9.91
21 =dev-java/asm-2.2* 21 =dev-java/asm-2.2*
22 >=dev-java/bsf-2.3
23 dev-java/backport-util-concurrent 22 dev-java/backport-util-concurrent
24 !<dev-java/jruby-1.0.0_rc2-r1" 23 !<dev-java/jruby-1.0.0_rc2-r1"
25RDEPEND=">=virtual/jre-1.4 24RDEPEND=">=virtual/jre-1.4
26 ${COMMON_DEPEND}" 25 ${COMMON_DEPEND}"
27DEPEND=">=virtual/jdk-1.4 26DEPEND=">=virtual/jdk-1.4
27 bsf? ( >=dev-java/bsf-2.3 )
28 test? ( 28 test? (
29 =dev-java/junit-3* 29 =dev-java/junit-3*
30 dev-java/ant-junit 30 dev-java/ant-junit
31 dev-java/ant-trax 31 dev-java/ant-trax
32 ) 32 )
33 ${COMMON_DEPEND}" 33 ${COMMON_DEPEND}"
34PDEPEND="dev-ruby/rubygems" 34PDEPEND="dev-ruby/rubygems"
35 35
36S="${WORKDIR}/${MY_P}" 36S="${WORKDIR}/${MY_P}"
37
38EANT_DOC_TARGET="create-apidocs"
39
40# only use javac, see http://jira.codehaus.org/browse/JRUBY-675
41JAVA_PKG_FILTER_COMPILER="ecj-3.2 ecj-3.1 jikes"
42 37
43RUBY_HOME=/usr/share/${PN}/lib/ruby 38RUBY_HOME=/usr/share/${PN}/lib/ruby
44SITE_RUBY=${RUBY_HOME}/site_ruby 39SITE_RUBY=${RUBY_HOME}/site_ruby
45GEMS=${RUBY_HOME}/gems 40GEMS=${RUBY_HOME}/gems
46 41
53 fi 48 fi
54 if [[ -d ${GEMS} ]]; then 49 if [[ -d ${GEMS} ]]; then
55 ewarn "dev-java/jruby now uses dev-lang/ruby's gems directory by creating symlinks." 50 ewarn "dev-java/jruby now uses dev-lang/ruby's gems directory by creating symlinks."
56 ewarn "${GEMS} is a directory right now, which will cause problems when being merged onto the filesystem." 51 ewarn "${GEMS} is a directory right now, which will cause problems when being merged onto the filesystem."
57 fi 52 fi
53
54 # only use javac, see http://jira.codehaus.org/browse/JRUBY-675
55 java-pkg_force-compiler javac
58} 56}
59 57
60src_unpack() { 58src_unpack() {
61 unpack ${A} 59 unpack ${A}
62 cd ${S} 60 cd ${S}
63 # prevents /root/.jruby being created at build time with 61 # prevents /root/.jruby being created at build time with
64 # FEATURES="-userpriv" 62 # FEATURES="-userpriv"
65 # see http://bugs.gentoo.org/show_bug.cgi?id=170058 63 # see http://bugs.gentoo.org/show_bug.cgi?id=170058
66 epatch ${FILESDIR}/${PN}-0.9.8-sandbox.patch 64 epatch ${FILESDIR}/${PN}-0.9.8-sandbox.patch
65 # search only lib, kills jdk1.4+ property which we set manually
66 java-ant_ignore-system-classes
67 67
68 cd ${S}/lib 68 cd ${S}/lib
69 rm *.jar 69 rm -v *.jar || die
70 70
71 java-pkg_jar-from --build-only ant-core ant.jar 71 java-pkg_jar-from --build-only ant-core ant.jar
72 java-pkg_jar-from asm-2.2 asm.jar 72 java-pkg_jar-from asm-2.2 asm.jar
73 java-pkg_jar-from asm-2.2 asm-commons.jar 73 java-pkg_jar-from asm-2.2 asm-commons.jar
74 java-pkg_jar-from bsf-2.3
75 java-pkg_jar-from jline 74 java-pkg_jar-from jline
76 java-pkg_jar-from backport-util-concurrent 75 java-pkg_jar-from backport-util-concurrent
77 use test && java-pkg_jar-from --build-only junit 76 use test && java-pkg_jar-from --build-only junit
77
78 # build-only because it's just BSF adapter classes and won't be used
79 # unless invoked from bsf itself, so no need to pollute classpath
80 if use bsf; then
81 java-pkg_jar-from --build-only bsf-2.3
82 else
83 cd ${S}
84 # testcases depending on bsf
85 rm test/org/jruby/test/TestAdoptedThreading.java || die
86 rm test/org/jruby/javasupport/test/TestBSF.java || die
87 sed -i -e '/TestBSF.class/d' \
88 test/org/jruby/javasupport/test/JavaSupportTestSuite.java || die
89 sed -i -e '/TestAdoptedThreading.class/d' \
90 test/org/jruby/test/MainTestSuite.java || die
91 fi
78} 92}
79 93
80src_compile() { 94src_compile() {
81 eant jar $(use_doc create-apidocs) -Djruby.home=${T}/.jruby 95 eant jar $(use_doc create-apidocs) -Djruby.home=${T}/.jruby -Djdk1.4+=true
96}
97
98src_test() {
99 # needs bsf's runtime deps to work
100 use bsf && java-pkg_jar-from --into lib --with-dependencies bsf-2.3
101 ANT_TASKS="ant-junit ant-trax" eant test -Djdk1.4+=true
82} 102}
83 103
84src_install() { 104src_install() {
85 java-pkg_dojar lib/${PN}.jar 105 java-pkg_dojar lib/${PN}.jar
86 106
119 fi 139 fi
120 die "Please address the above errors, then emerge --resume." 140 die "Please address the above errors, then emerge --resume."
121 fi 141 fi
122} 142}
123 143
124src_test() {
125 ANT_TASKS="ant-junit ant-trax" eant test
126}

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20