1 |
Hi Sean, |
2 |
|
3 |
Sean McEligot wrote: |
4 |
> I updated the jruby ebuild for my first gentoo project. It's nearly |
5 |
> complete. I just have to test a few things. I added /usr/bin/jruby and |
6 |
> /usr/bin/jirb and some others. I also added /usr/share/jruby. I also |
7 |
> created an ebuild for jvyaml, a new dependancy in jruby. I tried to |
8 |
> contact the last maintainer (luckyduck@g.o) but the email |
9 |
> bounced. I'd like to get some help checking over my work. I'd also like |
10 |
> to know the steps involved to get this into main. Here's the ebuilds: |
11 |
> |
12 |
> |
13 |
luckyduck is actually retired, so that would explain the bounce. The |
14 |
proper way to get the ball rolling is to file a version bump request in |
15 |
bugzilla for jruby, and a new package request in bugzilla for jvyaml. |
16 |
|
17 |
Your ebuilds need a little bit of cleaning up, so I'm going to comment |
18 |
inline. |
19 |
> == jruby-0.9.0.ebuild == |
20 |
> # Copyright 1999-2005 Gentoo Foundation |
21 |
> # Distributed under the terms of the GNU General Public License v2 |
22 |
> # $Header: /var/cvsroot/gentoo-x86/dev-java/jruby/jruby-0.7.0-r1.ebuild,v 1.3 2005/07/16 14:28:28 axxo Exp $ |
23 |
> |
24 |
> inherit base java-pkg-2 |
25 |
> |
26 |
> |
27 |
|
28 |
I don't see anything using functionality from base, so you probably |
29 |
don't need to inherit. And since you're using ant, you should inherit |
30 |
java-ant-2 |
31 |
|
32 |
> DESCRIPTION="Java based ruby interpreter implementation" |
33 |
> HOMEPAGE="http://jruby.sourceforge.net/" |
34 |
> SRC_URI="mirror://sourceforge/jruby/${PN}-src-${PV}.tar.gz" |
35 |
> #SRC_URI="http://dist.codehaus.org/jruby/jruby-src-${PV}.tar.gz |
36 |
> |
37 |
You should probably removed commented code that isn't being used. |
38 |
> KEYWORDS="x86 amd64" |
39 |
> |
40 |
New versions should always be keyworded with unstable keywords. |
41 |
> LICENSE="GPL-2" |
42 |
> SLOT="0" |
43 |
> IUSE="doc examples jikes junit source" |
44 |
> |
45 |
jikes is a deprecated used flag. We have other mechanisms for |
46 |
controlling the compiler. |
47 |
|
48 |
test should be used instead of junit. |
49 |
> RDEPEND=">=virtual/jre-1.4 |
50 |
> =dev-java/jvyaml-0.1* |
51 |
> =dev-java/bsf-2.3* |
52 |
> =dev-java/jakarta-oro-2.0* |
53 |
> =dev-java/gnu-regexp-1.1*" |
54 |
> DEPEND=">=virtual/jdk-1.4 |
55 |
> ${RDEPEND} |
56 |
> >=dev-java/ant-1.4 |
57 |
> jikes? ( dev-java/jikes ) |
58 |
> junit? ( dev-java/junit ) |
59 |
> source? ( app-arch/zip )" |
60 |
> |
61 |
> |
62 |
Lose the jikes, as mentioned above. Ditto on junit -> test. |
63 |
> src_unpack() { |
64 |
> unpack ${A} |
65 |
> cd ${S}/lib |
66 |
> rm -rf *.jar |
67 |
> java-pkg_jar-from bsf-2.3 |
68 |
> java-pkg_jar-from jakarta-oro-2.0 |
69 |
> java-pkg_jar-from gnu-regexp-1 |
70 |
> java-pkg_jar-from jvyaml |
71 |
> use junit && java-pkg_jar-from junit |
72 |
> } |
73 |
> |
74 |
> src_compile() { |
75 |
> local antflags="jar" |
76 |
> use doc && antflags="${antflags} create-apidocs" |
77 |
> use jikes && antflags="${antflags} -Dbuild.compiler=jikes" |
78 |
> use junit && antflags="${antflags} test" |
79 |
> ant ${antflags} || die "Compile Failed" |
80 |
> } |
81 |
> |
82 |
> |
83 |
Testing should be done in src_test. |
84 |
|
85 |
You should be using eant instead of ant directly. This can be slimmed |
86 |
down to: |
87 |
|
88 |
eant jar $(use_doc create-apidocs) |
89 |
|
90 |
use_doc will check if using doc flag, and if so, will print the args you |
91 |
pass to it... or 'javadoc' if you don't give it any args. |
92 |
|
93 |
> src_install() { |
94 |
> java-pkg_dojar ${S}/lib/jruby.jar |
95 |
> |
96 |
> use doc && java-pkg_dohtml -r docs/api/* |
97 |
> if use examples; then |
98 |
> dodir /usr/share/doc/${PF}/examples |
99 |
> cp -r samples/* ${D}/usr/share/doc/${PF}/examples |
100 |
> fi |
101 |
> use source && java-pkg_dosrc src/org |
102 |
> java-pkg_dolauncher jruby \ |
103 |
> --main 'org.jruby.Main' \ |
104 |
> --java_args '-Djruby.base=/usr/share/jruby -Djruby.home=/usr/share/jruby -Djruby.lib=/usr/share/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh' |
105 |
> insinto /usr/share/${PN} |
106 |
> doins -r lib |
107 |
> exeinto /usr/bin |
108 |
> newexe ${S}/bin/gem jgem |
109 |
> newexe ${S}/bin/gem_server jgem_server |
110 |
> newexe ${S}/bin/gemlock jgem_lock |
111 |
> newexe ${S}/bin/gemri jgemri |
112 |
> newexe ${S}/bin/gemwhich jgemwhich |
113 |
> newexe ${S}/bin/update_rubygems jupdate_rubygems |
114 |
> newexe ${S}/bin/generate_yaml_index.rb jgenerate_yaml_index.rb |
115 |
> newexe ${S}/bin/index_gem_repository.rb jindex_gem_repository.rb |
116 |
> doexe ${S}/bin/jirb |
117 |
> } |
118 |
> == jvyaml-0.1.ebuild == |
119 |
> # Copyright 1999-2006 Gentoo Foundation |
120 |
> # Distributed under the terms of the GNU General Public License v2 |
121 |
> # $Header: Exp $ |
122 |
> |
123 |
> inherit java-pkg-2 java-ant-2 eutils |
124 |
> |
125 |
> DESCRIPTION="Java YAML parser and emitter" |
126 |
> HOMEPAGE="https://jvyaml.dev.java.net/" |
127 |
> SRC_URI="https://${PN}.dev.java.net/files/documents/5215/35811/${PN}-src-${PV}.tar.gz" |
128 |
> LICENSE="MIT" |
129 |
> SLOT="0" |
130 |
> KEYWORDS="~amd64 ~ppc ~x86" |
131 |
> IUSE="doc examples source" |
132 |
> DEPEND=">=virtual/jdk-1.3 |
133 |
> sys-apps/sed |
134 |
> dev-java/ant-core |
135 |
> source? ( app-arch/zip )" |
136 |
> RDEPEND=">=virtual/jre-1.3" |
137 |
> |
138 |
> S="${WORKDIR}/${PN}-${PV}" |
139 |
> |
140 |
This S is unnecessary, since that is what the default value of S is. |
141 |
> src_unpack() { |
142 |
> unpack ${A} |
143 |
> } |
144 |
> |
145 |
> |
146 |
This src_unpack is unnecessary, because that is the default src_unpack |
147 |
> src_compile() { |
148 |
> local antflags="jar" |
149 |
> use doc && antflags="${antflags} javadoc" |
150 |
> eant ${antflags} || die "compilation failed" |
151 |
> } |
152 |
> |
153 |
> |
154 |
This can be rewritten as: |
155 |
eant jar $(use_doc) |
156 |
> src_install() { |
157 |
> java-pkg_dojar lib/${PN}.jar |
158 |
> |
159 |
> if use doc; then |
160 |
> dodoc README |
161 |
> java-pkg_dohtml -r www/* |
162 |
> java-pkg_dohtml -r doc/api |
163 |
> fi |
164 |
> |
165 |
README should generally always be installed. doc is traditionally used |
166 |
for generating and installing documantation that may take more time / |
167 |
space to process/install |
168 |
> use source && java-pkg_dosrc src/* |
169 |
> |
170 |
> #newenvd ${FILESDIR}/jvyaml-${PV} 22jvyaml |
171 |
> |
172 |
Should remove uncommented code. |
173 |
> } |
174 |
> |
175 |
> |
176 |
Hope this doesn't come off to harsh :) |
177 |
|
178 |
Some resources that would be of interest: |
179 |
The Java development guide: |
180 |
http://www.gentoo.org/proj/en/java/java-devel.xml |
181 |
The Gentoo Developer Handbook: |
182 |
http://www.gentoo.org/proj/en/devrel/handbook/handbook.xml |
183 |
The Devmanual: |
184 |
http://devmanual.gentoo.org/ |
185 |
|
186 |
Regards, |
187 |
|
188 |
-- |
189 |
Joshua Nichols |
190 |
Gentoo/Java Project Lead |
191 |
-- |
192 |
gentoo-java@g.o mailing list |