Page 1 of 1

How to build Deluge 1.2.0_RC4 under Leopard 10.5.8 on Intel

Posted: Sat Nov 28, 2009 4:41 am
by comedian
****NOTE*****

You should follow the updated tutorial here http://forum.deluge-torrent.org/viewtop ... 13&t=27695 as it is much cleaner

I'll leave this here for reference.

1. Install X11 from your Leopard CD (it should already be installed as it installs by default on Leopard and Snow Leopard)
2. Download Xcode tools 3.1.4 from Apple Developer Connection (free registration required for download). Don't install 3.2.1, that's for Snow Leopard.
3. Download and install Mac Ports from MacPorts.org. (1.8.1 as of this writing).
4. Open a terminal prompt (from Utilities) and escalate your privileges. (sudo -s).
5. After Mac Ports has installed issue the following port command to install all prereqs for Deluge in terminal:
port -v install python26 python_select py26-twisted py26-twisted-web2 openssl py26-openssl py26-simplejson py26-setuptools gettext py26-geoip py26-chardet py26-game py26-gtk py-gtk2 librsvg libnotify py26-xdg py26-mako boost +python26 wget
6. Go solve world hunger. It's gonna be awhile for the downloading and compiling above. (10 hours on my mini!!!).
7. After installs above complete, select python26 as your default (python_select python26).
8. Create a temporary directory to build Deluge in (I use ~/Build so mkdir -p ~/Build).
9. cd to that directory (cd ~/Build).
10. Get the source code for Deluge (wget http://download.deluge-torrent.info/sou ... c4.tar.bz2).
11. Untar it (tar -xvjf deluge-1.2.0_rc4.tar.bz2).
12. cd to that directory (cd deluge-1.2.0_rc4).
13. Get the source code for rasterbar libtorrent - NOT THE LIBTORRENT THAT COMES WITH MACPORTS NOR THE LIBTORRENT THAT COMES WITH RTORRENT - from http://sourceforge.net/projects/libtorrent/files/ (wget http://downloads.sourceforge.net/projec ... works-us-1) or the appropriate link for you.
14. Untar it (tar -xvzf libtorrent-rasterbar-0.14.7.tar.gz)
15. Rename it (mv libtorrent-rasterbar-0.14.7 libtorrent)
16. Link boost into it (cd libtorrent/include && ln -s /opt/local/include/boost .) Note the "." at the end.
18. Compile Deluge. (cd ../.. && python ./setup.py install) Takes about 10-20 minutes.
19. Test it. (cd /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin && ./deluged -d -L debug).
20. If deluged runs fine (and it should if you did it right), ctrl+c to quit it, then make links to your new bins in /opt/local/bin (cd /opt/local/bin && for i in `ls /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/deluge*`; do ln -s $i .; done).
21. Copy plugins into the correct place so that they will run. (cp ~/Build/deluge-1.2.0_rc4/deluge/plugins/*.egg ~/.config/deluge/plugins)
22. exit your privileged terminal shell (exit).
23. Go to your $HOME directory, and rehome your rights in config to your normal account (cd $HOME && sudo chown -R `whoami`:staff .config)
24. cd $HOME, and load deluged (cd $HOME && deluged &).
25. Start deluge. (deluge &).
26. Thank your lucky stars I took a week figuring this out so you didn't have to.

Re: How to build Deluge 1.2.0_RC4 under Leopard 10.5.8 on Intel

Posted: Sat Dec 19, 2009 9:54 pm
by comedian
This also works for 1.2.0_RC5

Re: How to build Deluge 1.2.0_RC4 under Leopard 10.5.8 on Intel

Posted: Mon Dec 28, 2009 7:28 pm
by Gravey
Thanks for the instructions, comedian.

If you try this on Snow Leopard (10.6.2), you'll likely get this error:
Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap
This is because boost with +python26 currently links against the wrong python in Snow Leopard. For the time being, you can relink it by hand:

Code: Select all

sudo install_name_tool -change /System/Library/Frameworks/Python.framework/Versions/2.6/Python /opt/local/Library/Frameworks/Python.framework/Versions/2.6/Python /opt/local/lib/libboost_python-mt.dylib
After doing this, Deluge started up just fine for me.

Re: How to build Deluge 1.2.0_RC4 under Leopard 10.5.8 on Intel

Posted: Wed Dec 30, 2009 10:22 pm
by comedian
I'm glad you posted that as I would have never figured it out. One of the reasons I haven't upgraded to Snow yet.