[70538] trunk/dports/net

devans at macports.org devans at macports.org
Thu Aug 12 12:30:45 PDT 2010


Revision: 70538
          http://trac.macports.org/changeset/70538
Author:   devans at macports.org
Date:     2010-08-12 12:30:42 -0700 (Thu, 12 Aug 2010)
Log Message:
-----------
New port libtorrent-rasterbar, a C++ bittorrent library with Python bindings.
This port is a required dependency of port deluge and is a differenct code
base than existing port libtorrent.

Added Paths:
-----------
    trunk/dports/net/libtorrent-rasterbar/
    trunk/dports/net/libtorrent-rasterbar/Portfile
    trunk/dports/net/libtorrent-rasterbar/files/
    trunk/dports/net/libtorrent-rasterbar/files/patch-bindings-python-setup.py.in.diff

Added: trunk/dports/net/libtorrent-rasterbar/Portfile
===================================================================
--- trunk/dports/net/libtorrent-rasterbar/Portfile	                        (rev 0)
+++ trunk/dports/net/libtorrent-rasterbar/Portfile	2010-08-12 19:30:42 UTC (rev 70538)
@@ -0,0 +1,85 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem      1.0
+
+name            libtorrent-rasterbar
+version         0.15.1
+categories      net
+maintainers     devans openmaintainer
+platforms       darwin
+homepage        http://www.rasterbar.com/products/libtorrent/
+master_sites    http://libtorrent.googlecode.com/files/
+
+description \
+    A C++ bittorrent library (not the same as port libtorrent)    
+
+long_description \
+    A C++ bittorrent library designed to run on anything from embedded systems to large scale \
+    seed servers. It comes with python bindings and detailed documentation. 
+
+universal_variant  no
+
+checksums       md5     6803d692ee57ce78f07092e135ec79d5 \
+                sha1    0a6e24c4a137d202243fab5ed4cf3c6acecebde9 \
+                rmd160  1408abbf37c77059b9db1693c94da9d31b2c5462
+
+depends_build   port:pkgconfig
+
+depends_lib     port:python26 \
+                port:boost \
+                port:libgeoip \
+                port:openssl
+
+if { ![file exists ${prefix}/lib/libboost_python-mt.dylib] } {
+        depends_lib-delete port:boost
+}
+
+pre-extract {
+        if { ![file exists ${prefix}/lib/libboost_python-mt.dylib] } {
+            if { [file exists ${prefix}/lib/libboost_system-mt.dylib] } {
+                ui_error "
+****
+**** libtorrent-rasterbar requires port boost installed with variant +python26.
+**** Please do the following then try installing libtorrent-rasterbar again:
+****
+****     sudo port deactivate boost
+****     sudo port install boost +python26
+****
+
+"
+            } else {
+                ui_error "
+****
+**** libtorrent-rasterbar requires port boost installed with variant +python26.
+**** Please do the following then try installing libtorrent-rasterbar again:
+****
+****     sudo port install boost +python26
+****
+
+"
+            }
+
+            error "libtorrent-rasterbar requires boost +python26"
+        }
+}
+
+patchfiles      patch-bindings-python-setup.py.in.diff
+
+post-patch      {
+                    reinplace "s|__MP_BUILD_ARCH__|${build_arch}|" ${worksrcpath}/bindings/python/setup.py.in
+                }
+
+configure.env-append \
+                "PYTHON_INSTALL_PARAMS=--prefix=${destroot}${prefix}/Library/Frameworks/Python.framework/Versions/2.6"
+
+configure.args  --disable-silent-rules \
+                --enable-python-binding \
+                --enable-geoip \
+                --with-libgeoip
+
+configure.python ${prefix}/bin/python2.6
+
+livecheck.type  regex
+livecheck.url   http://code.google.com/p/libtorrent/downloads/list
+livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"


Property changes on: trunk/dports/net/libtorrent-rasterbar/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/net/libtorrent-rasterbar/files/patch-bindings-python-setup.py.in.diff
===================================================================
--- trunk/dports/net/libtorrent-rasterbar/files/patch-bindings-python-setup.py.in.diff	                        (rev 0)
+++ trunk/dports/net/libtorrent-rasterbar/files/patch-bindings-python-setup.py.in.diff	2010-08-12 19:30:42 UTC (rev 70538)
@@ -0,0 +1,21 @@
+--- bindings/python/setup.py.in.orig	2010-08-10 02:59:59.000000000 -0700
++++ bindings/python/setup.py.in	2010-08-10 03:01:43.000000000 -0700
+@@ -23,8 +23,7 @@
+ 
+ def arch():
+ 	if platform.system() != 'Darwin': return []
+-	a = os.uname()[4]
+-	if a == 'Power Macintosh': a = 'ppc'
++	a = '__MP_BUILD_ARCH__'
+ 	return ['-arch', a]
+ 
+ if platform.system() == 'Windows':
+@@ -78,7 +77,7 @@
+ 		language='c++',
+ 		include_dirs = ['@top_srcdir@/include'] + parse_cmd(extra_cmd, '-I'),
+ 		library_dirs = ['@top_builddir@/src/.libs'] + parse_cmd(extra_cmd, '-L'),
+-		extra_link_args = '@LDFLAGS@'.split() + arch(),
++		extra_link_args = '@LDFLAGS@'.split(),
+ 		extra_compile_args = parse_cmd(extra_cmd, '-D', True) + arch(),
+ 		libraries = ['torrent-rasterbar'] + parse_cmd(extra_cmd, '-l'))],
+ )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100812/27cdfc5f/attachment-0001.html>


More information about the macports-changes mailing list