Difference between revisions of "HowTo Compile In Gentoo"

From AMule Project FAQ
Jump to: navigation, search
Line 18: Line 18:
 
   $ mkdir -p {PORTAGE_OVERLAY}/net-p2p/amule-cvs-2
 
   $ mkdir -p {PORTAGE_OVERLAY}/net-p2p/amule-cvs-2
  
3. Copy [http://forum.amule.org/thread.php?postid=38002#post38002 amule-cvs-2.ebuild] to {PORTAGE_OVERLAY}/net-p2p/amule-cvs-2
+
3. Add to package.keywords
 +
  echo "net-p2p/amule-cvs ~x86" >> /etc/portage/package.keywords
  
4. Change directory
+
4. Copy [http://forum.amule.org/thread.php?postid=38002#post38002 amule-cvs-2.ebuild] to {PORTAGE_OVERLAY}/net-p2p/amule-cvs-2
 +
 
 +
5. Change directory
 
   $ cd {PORTAGE_OVERLAY}/net-p2p/amule-cvs-2/
 
   $ cd {PORTAGE_OVERLAY}/net-p2p/amule-cvs-2/
  
5. Touch file's timestamp
+
6. Touch file's timestamp
 
   $ touch amule-cvs-2.ebuild
 
   $ touch amule-cvs-2.ebuild
  
6. Digest ebuild
+
7. Digest ebuild
 
   $ ebuild amule-cvs-2.ebuild digest
 
   $ ebuild amule-cvs-2.ebuild digest
  
7. Install aMule CVS
+
8. Review installation flags
 
   $ emerge amule-cvs -pv
 
   $ emerge amule-cvs -pv
 +
 +
9. Modify /etc/portage/package.use to suit your needs (please note that debug is enabled regardless of USE flag)
 +
  net-p2p/amule-svn X -amuled -debug gtk2 kad nls -nosystray -optimize -remote -remote-gui -stats unicode
 +
 +
10. Install aMule CVS
 
   $ emerge amule-cvs
 
   $ emerge amule-cvs
  

Revision as of 20:52, 30 July 2005

English | Español

Introduction

Compiling a version 2.0.3 of aMule on Gentoo should be a breeze by just typing emerge amule. Unfortunately, it isn't quite that easy right now. So here's a little step by step explanation. Please read the entire document before attempting installation.

aMule CVS ebuild

The eBuild for aMule CVS can be found here:

 http://forum.amule.org/thread.php?threadid=5732

Intructions for CVS ebuild

1. Define PORTAGE_OVERLAY. Open up /etc/make.conf with your favourite text editor and define the PORTAGE_OVERLAY variable. The default is:

 PORTAGE_OVERLAY="/usr/local/portage"

2. Create overlay for amule-cvs-2

 $ mkdir -p {PORTAGE_OVERLAY}/net-p2p/amule-cvs-2

3. Add to package.keywords

 echo "net-p2p/amule-cvs ~x86" >> /etc/portage/package.keywords

4. Copy amule-cvs-2.ebuild to {PORTAGE_OVERLAY}/net-p2p/amule-cvs-2

5. Change directory

 $ cd {PORTAGE_OVERLAY}/net-p2p/amule-cvs-2/

6. Touch file's timestamp

 $ touch amule-cvs-2.ebuild

7. Digest ebuild

 $ ebuild amule-cvs-2.ebuild digest

8. Review installation flags

 $ emerge amule-cvs -pv

9. Modify /etc/portage/package.use to suit your needs (please note that debug is enabled regardless of USE flag)

 net-p2p/amule-svn X -amuled -debug gtk2 kad nls -nosystray -optimize -remote -remote-gui -stats unicode

10. Install aMule CVS

 $ emerge amule-cvs

PLEASE PLEASE PLEASE do "emerge amule-cvs -pv" before installing to determine how you want to compile aMule.

Stable aMule from portage

If you just emerge amule you will install the version of aMule that Gentoo considers stable. This version is amule-1.2.8 which is over 12 months old, lacks several bugfixes and features which could seriously lower your downloads or make it impossible to connect to some servers. So this option is not really a good option.

Unstable aMule from portage

The most current ebuild for Gentoo is net-p2p/amule-2.0.1.ebuild (masked by keyword). Version 2.0.1 depends on >=wxGTK2.5.3 (masked by keyword) to build the aMule daemon. wxGTK 2.6.0 is suggested.

mkdir /etc/portage
echo 'net-p2p/amule ~x86' >> /etc/portage/package.keywords
emerge -av amule

Recent aMule manual installation

By default, Gentoo uses gtk2 in all recent profiles. When it comes to wxGTK (which is needed by aMule), this can be some trouble. The recent stable wxGTK in portage is wxGTK2.4.2 which should never be linked against GTK2. It causes random crashes, freezes, unpredictable behaviour and may even harm your pet dog!

So there are two possible ways to go: choose wxGTK2.4.2 linked against GTK1.2 (which should be fine for everybody who doesn't want to use aMuled, the aMule daemon) or choose wxGTK2.5.3 linked either against GTK1.2 or GTK2 (for those who want to try aMuled as aMuled doesn't work with wxGTK prior to 2.5.3).

Another thing is unicode support: You can't enable unicode support when using GTK1.2 and enabling unicode with GTK2 causes huge memleaks (100MB and more in 24h). So I will just disable it in these examples.

wxGTK 2.5.3 - 2.6.0

If you want to use amuled then you need, at least, wxGTK2.5.3. Currently, the only version not hard masked in Portage is wxGTK 2.4.2 due to problems when compiling with OpenGL support in wxGTK 2.5.3. But as aMule is no 3D egoshooter, we can safely disable OpenGL support and use it anyway. To do so enter the following into a console as root:

mkdir /etc/portage (this may give you an error if the directory already exists, just ignore that)
echo 'x11-libs/wxGTK ~x86' >> /etc/portage/package.keywords

If you want to use GTK1.2 (recommended):
echo 'x11-libs/wxGTK -gtk2 -unicode -opengl' >> /etc/portage/package.use

If you want to use GTK2 (not thoroughly tested yet):
echo 'x11-libs/wxGTK -unicode -opengl' >> /etc/portage/package.use

emerge -av wxGTK

Note: There are two ebuilds available for amule-cvs. A version with >=wxGTK 2.6.0 support and a version with <=wxGTK 2.5.3 support. Please use the correct version depending on what version of wxGTK you choose to use. Of course, wxGTK >= 2.6.0 is recommended.

wxGTK 2.4.2

If you don't want to use the aMule daemon, wxGTK2.4.2 is just fine for. You only need to tell it that it should link against GTK1.2. To do this grab a console and enter (as root):

mkdir /etc/portage (this may give you an error if the directory already exists, just ignore that)
echo 'x11-libs/wxGTK -gtk2 -unicode' >> /etc/portage/package.use
emerge -av wxGTK

This should (re-)emerge wxGTK2.4.2 linked against GTK1.2. Now you can go on to compiling aMule.

Compiling aMule from source

Grab either amule-2.0.3 from http://www.aMule.org or (specially if you want to use aMuled) a recent CVS tarball from http://amule.hirnriss.net. Untar it by entering tar -xvjf aMule-foo.tar.bz2 and go into the newly created directory.

Review ./configure --help (or this article) for a summary of all configure options. Pick the ones you want and run (as an example building, the monolithic client and aMuleCMD)
./configure --enable-amulecmd

Review the configure output for errors and if everything seems fine type make. Once aMule is done compiling change to a root account and type make install to install aMule. Now you're done and can start enjoying your aMule experience.