* [gentoo-dev] ebuild question
@ 2002-04-17 5:21 Richard Jackson
2002-04-17 5:02 ` Jared H. Hudson
0 siblings, 1 reply; 10+ messages in thread
From: Richard Jackson @ 2002-04-17 5:21 UTC (permalink / raw
To: gentoo-dev
I have a ebuild script question. I'm working on adding Qt 3 to nethack. I
think I saw a post at one point that someone else was doing this as well.
Either way I'm going to do this as an educational experance. When I have it
clean I will track down the other person working on it and see if they want
what I have done. If not I will just calk it up to experance. I picked this
one becase it has some uniqe issues and I thought if I could get this one
right then the experance will help latter on.
Now to the question.
Nethack is uniqe in that it can be compiled many differant ways
1) Console - This is currently the only option
2) Qt 3 or 2 - I have this one pretty much done using Qt 3.
3) X11
4) KDE
5) Gnome
The problem with this is that what it looks to be doing is compiling in
support for Console and one widget set into one executable. And I can't seem
to beable to get all 5 options to work at one time witch I kinda figured it
wouldn't. So lets say the user has this in his/her USE statment:
USE="qt x11 kde gnome"
How would I go about handling the compile?
Should I compile all 4 of them? Yes doing this would take some bash magic but
not too much. If I should do all four of them what naming convention should I
use for the differant executables? Some thing like nethackQt nethackGnome?
Should I just pick one of them and compile that one? What if I pick the one
the user doesn't want?
Should I force some user interaction with the build process? Other words ask
them which one they want? I don't really like this option myself.
And now even more questions.
On instalation of the above should I create menu items in KDE and GNOME if the
user has them? And a side question to that is it seems that KDE does not
automaticly include the GNOME apps but GNOME does automaticly include he KDE
apps so if I'm doing a KDE build should I add it to the GNOME menu if they
have it. And the reverse if I'm doing a GNOME build should I add that to the
KDE menus?
Any thoughts on the above would be helpfull.
Thanks
Richard Jackson
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] ebuild question
2002-04-17 5:21 [gentoo-dev] ebuild question Richard Jackson
@ 2002-04-17 5:02 ` Jared H. Hudson
2002-04-17 6:05 ` Richard Jackson
0 siblings, 1 reply; 10+ messages in thread
From: Jared H. Hudson @ 2002-04-17 5:02 UTC (permalink / raw
To: gentoo-dev
> Should I compile all 4 of them? Yes doing this would take some bash magic but
> not too much. If I should do all four of them what naming convention should I
> use for the differant executables? Some thing like nethackQt nethackGnome?
I would say yes, do this. If you need an example, look at:
app-editors/vim for example, it builds a GUI version and a non-GUI version.
It's really not that hard. The way I would lay it out is:
# handle use options common to all types
use foo && myconf="$myconf --enable-foo"
use foo2 && myconf="$myconf --enable-foo2"
# handle first possible build type
if [ "`use gnome`" ];
then
./configure --prefix=/usr --host=$CHOST \
--mandir=/usr/share/man --enable-gtk --enable-gnome $myconf \
|| die "gnome & gtk configure failed"
emake || die "gnome & gtk make failed"
mv src/foo src/gfoo
fi
# handle second possible build type
if [ "`use kde`" ];
then
./configure --prefix=/usr --host=$CHOST \
--mandir=/usr/share/man --enable-qt --enable-kde $myconf \
|| die "kde & qt configure failed"
emake || die "kde & qt make failed"
mv src/foo src/kfoo
fi
# handle normal build type
./configure --prefix=/usr --host=$CHOST \
--mandir=/usr/share/man $myconf \
|| die "normal configure failed"
emake || die "normal make failed"
My example may not be perfect, but you get the idea (I hope)
-Jared H.
>
> Should I just pick one of them and compile that one? What if I pick the one
> the user doesn't want?
>
> Should I force some user interaction with the build process? Other words ask
> them which one they want? I don't really like this option myself.
>
> And now even more questions.
> On instalation of the above should I create menu items in KDE and GNOME if the
> user has them? And a side question to that is it seems that KDE does not
> automaticly include the GNOME apps but GNOME does automaticly include he KDE
> apps so if I'm doing a KDE build should I add it to the GNOME menu if they
> have it. And the reverse if I'm doing a GNOME build should I add that to the
> KDE menus?
>
> Any thoughts on the above would be helpfull.
> Thanks
> Richard Jackson
> _______________________________________________
> gentoo-dev mailing list
> gentoo-dev@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-dev
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] ebuild question
2002-04-17 5:02 ` Jared H. Hudson
@ 2002-04-17 6:05 ` Richard Jackson
2002-04-17 5:21 ` Jared H. Hudson
0 siblings, 1 reply; 10+ messages in thread
From: Richard Jackson @ 2002-04-17 6:05 UTC (permalink / raw
To: gentoo-dev
On Wednesday 17 April 2002 12:02 am, Jared H. Hudson wrote:
> > Should I compile all 4 of them? Yes doing this would take some bash magic
> > but not too much. If I should do all four of them what naming convention
> > should I use for the differant executables? Some thing like nethackQt
> > nethackGnome?
>
> I would say yes, do this. If you need an example, look at:
> app-editors/vim for example, it builds a GUI version and a non-GUI version.
>
> It's really not that hard. The way I would lay it out is:
>
> # handle use options common to all types
> use foo && myconf="$myconf --enable-foo"
> use foo2 && myconf="$myconf --enable-foo2"
>
> # handle first possible build type
> if [ "`use gnome`" ];
> then
> ./configure --prefix=/usr --host=$CHOST \
> --mandir=/usr/share/man --enable-gtk --enable-gnome $myconf \
>
> || die "gnome & gtk configure failed"
>
> emake || die "gnome & gtk make failed"
>
> mv src/foo src/gfoo
> fi
>
> # handle second possible build type
> if [ "`use kde`" ];
> then
> ./configure --prefix=/usr --host=$CHOST \
> --mandir=/usr/share/man --enable-qt --enable-kde $myconf \
>
> || die "kde & qt configure failed"
>
> emake || die "kde & qt make failed"
>
> mv src/foo src/kfoo
> fi
>
> # handle normal build type
> ./configure --prefix=/usr --host=$CHOST \
> --mandir=/usr/share/man $myconf \
>
> || die "normal configure failed"
>
> emake || die "normal make failed"
>
>
> My example may not be perfect, but you get the idea (I hope)
>
Kinda of what I was looking at doing. The differance is that basicly I have to
have a clean source directory for each step because you have to modify the
make files as nethack does not use automake so I have a patch for each option
that has to be applied to the clean sources. And of couse each of them will
install on top of the other when you get to the install process so I was
looking at handling that myself so things would be done right as far as each
version goes that is. It is kinda of a pain but doable. I will take a look at
the vim ebuild though as I'm still not real strait on some of the vars used
in the ebuild files. I gues I need to reread the howto again.
Richard jackson
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [gentoo-dev] ebuild question
2002-04-17 6:05 ` Richard Jackson
@ 2002-04-17 5:21 ` Jared H. Hudson
2002-04-17 11:04 ` Good ebuild examples to learn from - Was " Pichai Asokan
0 siblings, 1 reply; 10+ messages in thread
From: Jared H. Hudson @ 2002-04-17 5:21 UTC (permalink / raw
To: gentoo-dev
I would not use the vim ebuild as a good example of a ebuild to learn
from. It's harder to understand than most and does a lot of things most
ebuilds don't need to do. But I would use it as an example of how to
build to things at the same time, like your case requires.
-Jared H.
Richard Jackson wrote:
> On Wednesday 17 April 2002 12:02 am, Jared H. Hudson wrote:
>
>>>Should I compile all 4 of them? Yes doing this would take some bash magic
>>>but not too much. If I should do all four of them what naming convention
>>>should I use for the differant executables? Some thing like nethackQt
>>>nethackGnome?
>>
>>I would say yes, do this. If you need an example, look at:
>>app-editors/vim for example, it builds a GUI version and a non-GUI version.
>>
>>It's really not that hard. The way I would lay it out is:
>>
>># handle use options common to all types
>>use foo && myconf="$myconf --enable-foo"
>>use foo2 && myconf="$myconf --enable-foo2"
>>
>># handle first possible build type
>>if [ "`use gnome`" ];
>>then
>> ./configure --prefix=/usr --host=$CHOST \
>> --mandir=/usr/share/man --enable-gtk --enable-gnome $myconf \
>>
>> || die "gnome & gtk configure failed"
>>
>> emake || die "gnome & gtk make failed"
>>
>> mv src/foo src/gfoo
>>fi
>>
>># handle second possible build type
>>if [ "`use kde`" ];
>>then
>> ./configure --prefix=/usr --host=$CHOST \
>> --mandir=/usr/share/man --enable-qt --enable-kde $myconf \
>>
>> || die "kde & qt configure failed"
>>
>> emake || die "kde & qt make failed"
>>
>> mv src/foo src/kfoo
>>fi
>>
>># handle normal build type
>>./configure --prefix=/usr --host=$CHOST \
>>--mandir=/usr/share/man $myconf \
>>
>>|| die "normal configure failed"
>>
>>emake || die "normal make failed"
>>
>>
>>My example may not be perfect, but you get the idea (I hope)
>>
>
> Kinda of what I was looking at doing. The differance is that basicly I have to
> have a clean source directory for each step because you have to modify the
> make files as nethack does not use automake so I have a patch for each option
> that has to be applied to the clean sources. And of couse each of them will
> install on top of the other when you get to the install process so I was
> looking at handling that myself so things would be done right as far as each
> version goes that is. It is kinda of a pain but doable. I will take a look at
> the vim ebuild though as I'm still not real strait on some of the vars used
> in the ebuild files. I gues I need to reread the howto again.
>
> Richard jackson
> _______________________________________________
> gentoo-dev mailing list
> gentoo-dev@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-dev
^ permalink raw reply [flat|nested] 10+ messages in thread
* Good ebuild examples to learn from - Was Re:[gentoo-dev] ebuild question
2002-04-17 5:21 ` Jared H. Hudson
@ 2002-04-17 11:04 ` Pichai Asokan
2002-04-17 5:50 ` Sandy McArthur
0 siblings, 1 reply; 10+ messages in thread
From: Pichai Asokan @ 2002-04-17 11:04 UTC (permalink / raw
To: gentoo-dev
Hi
Can some of the developers take a few minutes to suggest
the ebuilds to study for 'would be contributors'?
Thanks for a nice distro
P Asokan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Good ebuild examples to learn from - Was Re:[gentoo-dev] ebuild question
2002-04-17 11:04 ` Good ebuild examples to learn from - Was " Pichai Asokan
@ 2002-04-17 5:50 ` Sandy McArthur
2002-04-17 11:38 ` Pichai Asokan
0 siblings, 1 reply; 10+ messages in thread
From: Sandy McArthur @ 2002-04-17 5:50 UTC (permalink / raw
To: gentoo-dev
Pichai Asokan wrote:
> Can some of the developers take a few minutes to suggest
> the ebuilds to study for 'would be contributors'?
Without being specific I'd say look at ones for software you have
compiled on your own from the source in the past, that way you'll be
familar with what should be going on.
Sandy McArthur
http://Leknor.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Good ebuild examples to learn from - Was Re:[gentoo-dev] ebuild question
2002-04-17 5:50 ` Sandy McArthur
@ 2002-04-17 11:38 ` Pichai Asokan
2002-04-17 12:08 ` Todd Wright
2002-04-17 15:03 ` Aadi Deshpande
0 siblings, 2 replies; 10+ messages in thread
From: Pichai Asokan @ 2002-04-17 11:38 UTC (permalink / raw
To: gentoo-dev
On Wed, Apr 17, 2002 at 01:50:31AM -0400, Sandy McArthur wrote:
> Pichai Asokan wrote:
> >Can some of the developers take a few minutes to suggest
> >the ebuilds to study for 'would be contributors'?
>
> Without being specific I'd say look at ones for software you have
> compiled on your own from the source in the past, that way you'll be
> familar with what should be going on.
Thanks;
but often it was a case of
(un)tar
./configure
make
make install
Well; I could have looked at what went where, but I never did :-(
So I am not sure how much this will help.
P Asokan
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: Good ebuild examples to learn from - Was Re:[gentoo-dev] ebuild question
2002-04-17 11:38 ` Pichai Asokan
@ 2002-04-17 12:08 ` Todd Wright
2002-04-17 15:03 ` Aadi Deshpande
1 sibling, 0 replies; 10+ messages in thread
From: Todd Wright @ 2002-04-17 12:08 UTC (permalink / raw
To: gentoo-dev
> > Pichai Asokan wrote:
> > >Can some of the developers take a few minutes to suggest
> > >the ebuilds to study for 'would be contributors'?
> >
> > Without being specific I'd say look at ones for software you have
> > compiled on your own from the source in the past, that way you'll be
> > familar with what should be going on.
> Thanks;
> but often it was a case of
> (un)tar
> ./configure
> make
> make install
> Well; I could have looked at what went where, but I never did :-(
> So I am not sure how much this will help.
> P Asokan
Pichai,
It will help, as I said in my email to you off-list, looking at other ebuilds is a great way to learn how to write them. In fact you will see that usually, what a lot of ebuilds do is
(un)tar
./configure
make
make install
Not too difficult, huh? Its pretty familiar. What you need to look at is mainly how the ebuild optionally includes (or excludes) for example, ssl support by checking the use flags and then adding the appropriate option to the ./configure parms
You dont need to know what goes where. Portage builds everything in a sandbox. The 'make install' part should install everything to the 'image' dir (under /var/tmp/portage<package>). Sometimes it needs special attention to achieve this. You may have seen people complain about ACCESS DENIED errors - you get these if 'make install' trys to put things outside of this 'secured' directory, so you will see ebuilds that say 'make DESTDIR=${D} install' to ensure everything is installed into the sandbox.
Later the src_install() function of the ebuild moves everything to its proper and final place on the system. Thats probably the most compex part of putting tother an ebuild, and once youve done it a couple of times, its not so tough.
Anyway, sounds like you're on your way. Feel free to bug me again if you need any help.
-- _--_|\ --------- Todd Wright -- wylie@geekasylum.org --------
/ \
\_.--._* <--- http://www.dreams.darker.net/~wylie/
v Mobile: +61-403-796-001 Ph: +61-2-9521-8677
----------------------------------------------------------------
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Good ebuild examples to learn from - Was Re:[gentoo-dev] ebuild question
2002-04-17 11:38 ` Pichai Asokan
2002-04-17 12:08 ` Todd Wright
@ 2002-04-17 15:03 ` Aadi Deshpande
2002-04-17 20:56 ` Pichai Asokan
1 sibling, 1 reply; 10+ messages in thread
From: Aadi Deshpande @ 2002-04-17 15:03 UTC (permalink / raw
To: gentoo-dev
I think the best way is to study the steps progressively.
Once you've read the portage documentation ( and man files )
then start looking for simple packages that you could study each step off of..
net-misc/vnc was a good package for me to start with.
app-editors/jed is a little more advanced.
net-www/prozilla was also helpful
x11-libs/qt shows some neat sed tricks to overcome interactivity
app-editors/vim shows good use of 'USE' variable techniques.
Another alternative is to look at bugs.gentoo.org and find a broken ebuild bug and try to fix
that, thereby gaining experience through trial, error, and lots of questions.
--- Pichai Asokan <pasokan@os4.com> wrote:
> On Wed, Apr 17, 2002 at 01:50:31AM -0400, Sandy McArthur wrote:
> > Pichai Asokan wrote:
> > >Can some of the developers take a few minutes to suggest
> > >the ebuilds to study for 'would be contributors'?
> >
> > Without being specific I'd say look at ones for software you have
> > compiled on your own from the source in the past, that way you'll be
> > familar with what should be going on.
> Thanks;
> but often it was a case of
> (un)tar
> ./configure
> make
> make install
> Well; I could have looked at what went where, but I never did :-(
> So I am not sure how much this will help.
> P Asokan
> _______________________________________________
> gentoo-dev mailing list
> gentoo-dev@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-dev
__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Good ebuild examples to learn from - Was Re:[gentoo-dev] ebuild question
2002-04-17 15:03 ` Aadi Deshpande
@ 2002-04-17 20:56 ` Pichai Asokan
0 siblings, 0 replies; 10+ messages in thread
From: Pichai Asokan @ 2002-04-17 20:56 UTC (permalink / raw
To: gentoo-dev
On Wed, Apr 17, 2002 at 08:03:44AM -0700, Aadi Deshpande wrote:
> I think the best way is to study the steps progressively.
>
> Once you've read the portage documentation ( and man files )
> then start looking for simple packages that you could study each step off of..
>
> net-misc/vnc was a good package for me to start with.
> app-editors/jed is a little more advanced.
> net-www/prozilla was also helpful
> x11-libs/qt shows some neat sed tricks to overcome interactivity
> app-editors/vim shows good use of 'USE' variable techniques.
>
> Another alternative is to look at bugs.gentoo.org and find a broken ebuild bug and try to fix
> that, thereby gaining experience through trial, error, and lots of questions.
Thanks a lot.
May be this should go into a doc for developers?
P Asokan
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2002-04-17 15:29 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-17 5:21 [gentoo-dev] ebuild question Richard Jackson
2002-04-17 5:02 ` Jared H. Hudson
2002-04-17 6:05 ` Richard Jackson
2002-04-17 5:21 ` Jared H. Hudson
2002-04-17 11:04 ` Good ebuild examples to learn from - Was " Pichai Asokan
2002-04-17 5:50 ` Sandy McArthur
2002-04-17 11:38 ` Pichai Asokan
2002-04-17 12:08 ` Todd Wright
2002-04-17 15:03 ` Aadi Deshpande
2002-04-17 20:56 ` Pichai Asokan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox