View previous topic :: View next topic |
Author |
Message |
padukes Apprentice
Joined: 27 Feb 2003 Posts: 232
|
Posted: Thu Feb 27, 2003 3:03 am Post subject: How best to compile source code outside of emerge |
|
|
Hi all,
I was wondering what the community thought was the best way to compile source code that isn't available via emerge. By 'best' I mean follows the pattern that code available through emerge uses so that my system stays consistent (unless you have a "better" definition of 'best'). The two cases I'm thinking of are:
1. Altering code that came from a *.tar that was downloaded from emerge
2. Compiling source that is not available at all through emerge
I think (1) is pretty easy because the tar already exists (somewhere) and I could extract it (somewhere), edit the appropriate file and then run the ebuild script (from somewhere). However, I don't know where any of the "somewhere"s are - (and I'm probably totally wrong on the steps anyway). As for (2) I'd guess it's similar but I'm not sure how.
Any help would be much appreciated!
P |
|
Back to top |
|
|
David_Escott l33t
Joined: 12 Jan 2003 Posts: 952 Location: Boston, MA
|
Posted: Thu Feb 27, 2003 3:27 am Post subject: |
|
|
probably the best way is to roll your own ebuild it usually isnt that difficult and if you dont care about other people being able to use it then your job is even easier.
And for method 1 I would unpack the source and then edit, then build it not unpack, edit, repack, merge |
|
Back to top |
|
|
padukes Apprentice
Joined: 27 Feb 2003 Posts: 232
|
Posted: Thu Feb 27, 2003 3:29 am Post subject: |
|
|
Thanks! - is there a default location where the tars are kept? What does it mean to roll my own ebuild?
Thanks agin,
P |
|
Back to top |
|
|
David_Escott l33t
Joined: 12 Jan 2003 Posts: 952 Location: Boston, MA
|
Posted: Thu Feb 27, 2003 3:39 am Post subject: |
|
|
skel.ebuild in /usr/portage is a good start
turn on the overlay in your make.conf
tarballs go in /usr/portage/distfiles
/usr/portage/eclass has useful scripts for many families of programs (gnome, vi, kde, etc)
And of course check bugs first to make sure someone else hasnt already made an ebuild. |
|
Back to top |
|
|
darktux Veteran
Joined: 16 Nov 2002 Posts: 1086 Location: Coimbra, Portugal
|
Posted: Thu Feb 27, 2003 11:39 am Post subject: |
|
|
If what you're compiling has a configure script, then you're better off doing:
Code: |
./configure
make
make install
|
If you like the program, do make uninstall and then an ebuild for it, if you don't feel confortable enough to roll your own ebuild, keep the app and sugest it to someone. If the app just isn't what you wanted then just make uninstall.. _________________ Lego my ego, and I'll lego your knowledge
www.tuxslare.org - My reborn website |
|
Back to top |
|
|
padukes Apprentice
Joined: 27 Feb 2003 Posts: 232
|
Posted: Thu Feb 27, 2003 1:54 pm Post subject: |
|
|
Great! This is really helpful - one last question - do you think it's "bad" to have applications installed that did not go through the emerge process (e.g. ./configure; make; make install) - Will that mess up my dependencies?
Thanks even more,
P |
|
Back to top |
|
|
David_Escott l33t
Joined: 12 Jan 2003 Posts: 952 Location: Boston, MA
|
Posted: Thu Feb 27, 2003 2:16 pm Post subject: |
|
|
DarkTux if your program only requires ./configure; make; make install; then all the more reason to make an ebuild since all you will have to do is define the d/l path. That said there is nothing wrong with not doing it by emerge but doing so does add a certain degree of consistency as well as giving you the ability to remove/upgrade very easily |
|
Back to top |
|
|
padukes Apprentice
Joined: 27 Feb 2003 Posts: 232
|
Posted: Thu Feb 27, 2003 5:02 pm Post subject: |
|
|
Thanks! I appreciate the help!
-P |
|
Back to top |
|
|
darktux Veteran
Joined: 16 Nov 2002 Posts: 1086 Location: Coimbra, Portugal
|
Posted: Thu Feb 27, 2003 5:02 pm Post subject: |
|
|
David_Escott wrote: | DarkTux if your program only requires ./configure; make; make install; then all the more reason to make an ebuild since all you will have to do is define the d/l path. That said there is nothing wrong with not doing it by emerge but doing so does add a certain degree of consistency as well as giving you the ability to remove/upgrade very easily |
A good ebuild isn't just that, there are configure flags to use and such. IMO doing an ebuild, just because of the make uninstall/-C feature isn't worth it. _________________ Lego my ego, and I'll lego your knowledge
www.tuxslare.org - My reborn website |
|
Back to top |
|
|
|