Gentoo Archives: gentoo-user

From: Michael Orlitzky <mjo@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: SRC_URISRC_URI.mirror
Date: Sat, 20 Sep 2014 19:54:36
Message-Id: 541DDB73.9000503@gentoo.org
In Reply to: [gentoo-user] Re: SRC_URISRC_URI.mirror by James
1 On 09/20/2014 03:17 PM, James wrote:
2 >
3 > OK, that behind me now......
4 >
5 > So the build fails, so I figure I'll just build it manually, then
6 > finish the ebuild. So I went to:
7 >
8 >
9 > /var/tmp/portage/sys-cluster/spark-1.1.0/work/spark-1.1.0
10 > and no configure scripts....
11 >
12 > The README.md has this:
13 >
14 > Spark is built on Scala 2.10. To build Spark and its example programs, run:
15 >
16 > ./sbt/sbt assembly
17 >
18 > I did and it looks like the manual compile worked:
19 >
20 > [info] Packaging
21 > /var/tmp/portage/sys-cluster/spark-1.1.0/work/spark-1.1.0/
22 > examples/target/scala-2.10/spark-examples-1.1.0-hadoop1.0.4.jar
23 > ...
24 > [info] Done packaging.
25 > [success] Total time: 786 s, completed Sep 20, 2014 3:04:22 PM
26 >
27 > So I need to add commands to the ebuild to launch
28 > " ./sbt/sbt assembly"
29 >
30 > I've been all over the man 5 ebuild and the devmanual. So naturally
31 > I've seen what to do, but missed it.
32 >
33
34 Short answer: just put the command in the ebuild (which is nothing but a
35 fancy bash script). It'll run. For example,
36
37 src_compile() {
38 ./sbt/sbt assembly || die "assembly build failed"
39 [the rest of the build commands go here]
40 }
41
42 The long answer is that we usually have eclasses for different build
43 systems. The way eclass inheritance works, the eclasses override certain
44 phases of the ebuild. So for example, the haskell-cabal eclass knows
45 that it should run `runghc Setup.hs configure` or something like that
46 instead of ./configure (like we would run by default).
47
48 Unfortunately, I don't see any other ebuilds for scala packages in the
49 tree. So you're probably the first person to need such an eclass. Rather
50 than set yourself back implementing the eclass, you're probably better
51 off running all of the build commands manually and waiting for somebody
52 else to write the eclass.
53
54 Someone may be working on scala in an overlay; the java herd is taking
55 care of dev-lang/scala so perhaps you can ask in #gentoo-java.

Replies

Subject Author
[gentoo-user] Re: SRC_URISRC_URI.mirror James <wireless@×××××××××××.com>