Gentoo Archives: gentoo-java

From: Sean McEligot <sean.mceligot@×××××.com>
To: gentoo-java@l.g.o
Subject: [gentoo-java] new jruby ebuild
Date: Wed, 30 Aug 2006 16:38:56
Message-Id: 95a05c000608300937t39934c94vd0b6f7882947e6aa@mail.gmail.com
1 I updated the jruby ebuild for my first gentoo project. It's nearly
2 complete. I just have to test a few things. I added /usr/bin/jruby and
3 /usr/bin/jirb and some others. I also added /usr/share/jruby. I also
4 created an ebuild for jvyaml, a new dependancy in jruby. I tried to
5 contact the last maintainer (luckyduck@g.o) but the email
6 bounced. I'd like to get some help checking over my work. I'd also like
7 to know the steps involved to get this into main. Here's the ebuilds:
8
9 == jruby-0.9.0.ebuild ==
10 # Copyright 1999-2005 Gentoo Foundation
11 # Distributed under the terms of the GNU General Public License v2
12 # $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-0.7.0-r1.ebuild,v
13 1.3 2005/07/16 14:28:28 axxo Exp $
14
15 inherit base java-pkg-2
16
17 DESCRIPTION="Java based ruby interpreter implementation"
18 HOMEPAGE="http://jruby.sourceforge.net/"
19 SRC_URI="mirror://sourceforge/jruby/${PN}-src-${PV}.tar.gz"
20 #SRC_URI="http://dist.codehaus.org/jruby/jruby-src-${PV}.tar.gz
21 KEYWORDS=<http://dist.codehaus.org/jruby/jruby-src-$%7BPV%7D.tar.gzKEYWORDS=>"x86
22 amd64"
23 LICENSE="GPL-2"
24 SLOT="0"
25 IUSE="doc examples jikes junit source"
26 RDEPEND=">=virtual/jre-1.4
27 =dev-java/jvyaml-0.1*
28 =dev-java/bsf-2.3*
29 =dev-java/jakarta-oro-2.0*
30 =dev-java/gnu-regexp-1.1*"
31 DEPEND=">=virtual/jdk-1.4
32 ${RDEPEND}
33 >=dev-java/ant-1.4
34 jikes? ( dev-java/jikes )
35 junit? ( dev-java/junit )
36 source? ( app-arch/zip )"
37
38 src_unpack() {
39 unpack ${A}
40 cd ${S}/lib
41 rm -rf *.jar
42 java-pkg_jar-from bsf-2.3
43 java-pkg_jar-from jakarta-oro-2.0
44 java-pkg_jar-from gnu-regexp-1
45 java-pkg_jar-from jvyaml
46 use junit && java-pkg_jar-from junit
47 }
48
49 src_compile() {
50 local antflags="jar"
51 use doc && antflags="${antflags} create-apidocs"
52 use jikes && antflags="${antflags} -Dbuild.compiler=jikes"
53 use junit && antflags="${antflags} test"
54 ant ${antflags} || die "Compile Failed"
55 }
56
57 src_install() {
58 java-pkg_dojar ${S}/lib/jruby.jar
59
60 use doc && java-pkg_dohtml -r docs/api/*
61 if use examples; then
62 dodir /usr/share/doc/${PF}/examples
63 cp -r samples/* ${D}/usr/share/doc/${PF}/examples
64 fi
65 use source && java-pkg_dosrc src/org
66 java-pkg_dolauncher jruby \
67 --main 'org.jruby.Main' \
68 --java_args '-
69 Djruby.base=/usr/share/jruby -Djruby.home=/usr/share/jruby -
70 Djruby.lib=/usr/share/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh'
71 insinto /usr/share/${PN}
72 doins -r lib
73 exeinto /usr/bin
74 newexe ${S}/bin/gem jgem
75 newexe ${S}/bin/gem_server jgem_server
76 newexe ${S}/bin/gemlock jgem_lock
77 newexe ${S}/bin/gemri jgemri
78 newexe ${S}/bin/gemwhich jgemwhich
79 newexe ${S}/bin/update_rubygems jupdate_rubygems
80 newexe ${S}/bin/generate_yaml_index.rb jgenerate_yaml_index.rb
81 newexe ${S}/bin/index_gem_repository.rb jindex_gem_repository.rb
82 doexe ${S}/bin/jirb
83 }
84 == jvyaml-0.1.ebuild ==
85 # Copyright 1999-2006 Gentoo Foundation
86 # Distributed under the terms of the GNU General Public License v2
87 # $Header: Exp $
88
89 inherit java-pkg-2 java-ant-2 eutils
90
91 DESCRIPTION="Java YAML parser and emitter"
92 HOMEPAGE="https://jvyaml.dev.java.net/"
93 SRC_URI="https://${PN}.dev.java.net/files/documents/5215/35811/${PN}-src-${PV}.tar.gz"
94 LICENSE="MIT"
95 SLOT="0"
96 KEYWORDS="~amd64 ~ppc ~x86"
97 IUSE="doc examples source"
98 DEPEND=">=virtual/jdk-1.3
99 sys-apps/sed
100 dev-java/ant-core
101 source? ( app-arch/zip )"
102 RDEPEND=">=virtual/jre-1.3"
103
104 S="${WORKDIR}/${PN}-${PV}"
105
106 src_unpack() {
107 unpack ${A}
108 }
109
110 src_compile() {
111 local antflags="jar"
112 use doc && antflags="${antflags} javadoc"
113 eant ${antflags} || die "compilation failed"
114 }
115
116 src_install() {
117 java-pkg_dojar lib/${PN}.jar
118
119 if use doc; then
120 dodoc README
121 java-pkg_dohtml -r www/*
122 java-pkg_dohtml -r doc/api
123 fi
124 use source && java-pkg_dosrc src/*
125
126 #newenvd ${FILESDIR}/jvyaml-${PV} 22jvyaml
127 }