Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How best to compile source code outside of emerge
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
padukes
Apprentice
Apprentice


Joined: 27 Feb 2003
Posts: 232

PostPosted: Thu Feb 27, 2003 3:03 am    Post subject: How best to compile source code outside of emerge Reply with quote

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
View user's profile Send private message
David_Escott
l33t
l33t


Joined: 12 Jan 2003
Posts: 952
Location: Boston, MA

PostPosted: Thu Feb 27, 2003 3:27 am    Post subject: Reply with quote

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
View user's profile Send private message
padukes
Apprentice
Apprentice


Joined: 27 Feb 2003
Posts: 232

PostPosted: Thu Feb 27, 2003 3:29 am    Post subject: Reply with quote

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
View user's profile Send private message
David_Escott
l33t
l33t


Joined: 12 Jan 2003
Posts: 952
Location: Boston, MA

PostPosted: Thu Feb 27, 2003 3:39 am    Post subject: Reply with quote

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
View user's profile Send private message
darktux
Veteran
Veteran


Joined: 16 Nov 2002
Posts: 1086
Location: Coimbra, Portugal

PostPosted: Thu Feb 27, 2003 11:39 am    Post subject: Reply with quote

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.. :roll:
_________________
Lego my ego, and I'll lego your knowledge

www.tuxslare.org - My reborn website :P
Back to top
View user's profile Send private message
padukes
Apprentice
Apprentice


Joined: 27 Feb 2003
Posts: 232

PostPosted: Thu Feb 27, 2003 1:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
David_Escott
l33t
l33t


Joined: 12 Jan 2003
Posts: 952
Location: Boston, MA

PostPosted: Thu Feb 27, 2003 2:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
padukes
Apprentice
Apprentice


Joined: 27 Feb 2003
Posts: 232

PostPosted: Thu Feb 27, 2003 5:02 pm    Post subject: Reply with quote

Thanks! I appreciate the help!

-P
Back to top
View user's profile Send private message
darktux
Veteran
Veteran


Joined: 16 Nov 2002
Posts: 1086
Location: Coimbra, Portugal

PostPosted: Thu Feb 27, 2003 5:02 pm    Post subject: Reply with quote

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 :P
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum