Gentoo Archives: gentoo-dev

From: "Jared H. Hudson" <jhhudso@××××××××××.com>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] ebuild question
Date: Wed, 17 Apr 2002 00:21:38
Message-Id: 3CBD065F.4020804@volumehost.com
In Reply to: Re: [gentoo-dev] ebuild question by Richard Jackson
1 I would not use the vim ebuild as a good example of a ebuild to learn
2 from. It's harder to understand than most and does a lot of things most
3 ebuilds don't need to do. But I would use it as an example of how to
4 build to things at the same time, like your case requires.
5
6 -Jared H.
7
8 Richard Jackson wrote:
9 > On Wednesday 17 April 2002 12:02 am, Jared H. Hudson wrote:
10 >
11 >>>Should I compile all 4 of them? Yes doing this would take some bash magic
12 >>>but not too much. If I should do all four of them what naming convention
13 >>>should I use for the differant executables? Some thing like nethackQt
14 >>>nethackGnome?
15 >>
16 >>I would say yes, do this. If you need an example, look at:
17 >>app-editors/vim for example, it builds a GUI version and a non-GUI version.
18 >>
19 >>It's really not that hard. The way I would lay it out is:
20 >>
21 >># handle use options common to all types
22 >>use foo && myconf="$myconf --enable-foo"
23 >>use foo2 && myconf="$myconf --enable-foo2"
24 >>
25 >># handle first possible build type
26 >>if [ "`use gnome`" ];
27 >>then
28 >> ./configure --prefix=/usr --host=$CHOST \
29 >> --mandir=/usr/share/man --enable-gtk --enable-gnome $myconf \
30 >>
31 >> || die "gnome & gtk configure failed"
32 >>
33 >> emake || die "gnome & gtk make failed"
34 >>
35 >> mv src/foo src/gfoo
36 >>fi
37 >>
38 >># handle second possible build type
39 >>if [ "`use kde`" ];
40 >>then
41 >> ./configure --prefix=/usr --host=$CHOST \
42 >> --mandir=/usr/share/man --enable-qt --enable-kde $myconf \
43 >>
44 >> || die "kde & qt configure failed"
45 >>
46 >> emake || die "kde & qt make failed"
47 >>
48 >> mv src/foo src/kfoo
49 >>fi
50 >>
51 >># handle normal build type
52 >>./configure --prefix=/usr --host=$CHOST \
53 >>--mandir=/usr/share/man $myconf \
54 >>
55 >>|| die "normal configure failed"
56 >>
57 >>emake || die "normal make failed"
58 >>
59 >>
60 >>My example may not be perfect, but you get the idea (I hope)
61 >>
62 >
63 > Kinda of what I was looking at doing. The differance is that basicly I have to
64 > have a clean source directory for each step because you have to modify the
65 > make files as nethack does not use automake so I have a patch for each option
66 > that has to be applied to the clean sources. And of couse each of them will
67 > install on top of the other when you get to the install process so I was
68 > looking at handling that myself so things would be done right as far as each
69 > version goes that is. It is kinda of a pain but doable. I will take a look at
70 > the vim ebuild though as I'm still not real strait on some of the vars used
71 > in the ebuild files. I gues I need to reread the howto again.
72 >
73 > Richard jackson
74 > _______________________________________________
75 > gentoo-dev mailing list
76 > gentoo-dev@g.o
77 > http://lists.gentoo.org/mailman/listinfo/gentoo-dev

Replies

Subject Author
Good ebuild examples to learn from - Was Re:[gentoo-dev] ebuild question Pichai Asokan <pasokan@×××.com>