[85232] trunk/dports/net
jmr at macports.org
jmr at macports.org
Tue Oct 11 17:54:11 PDT 2011
Revision: 85232
http://trac.macports.org/changeset/85232
Author: jmr at macports.org
Date: 2011-10-11 17:54:08 -0700 (Tue, 11 Oct 2011)
Log Message:
-----------
libtorrent, libtorrent-devel: use valloc when posix_memalign is not available (#27289), correct license
Modified Paths:
--------------
trunk/dports/net/libtorrent/Portfile
trunk/dports/net/libtorrent-devel/Portfile
Added Paths:
-----------
trunk/dports/net/libtorrent/files/
trunk/dports/net/libtorrent/files/no_posix_memalign.patch
trunk/dports/net/libtorrent-devel/files/
trunk/dports/net/libtorrent-devel/files/no_posix_memalign.patch
Modified: trunk/dports/net/libtorrent/Portfile
===================================================================
--- trunk/dports/net/libtorrent/Portfile 2011-10-11 23:59:49 UTC (rev 85231)
+++ trunk/dports/net/libtorrent/Portfile 2011-10-12 00:54:08 UTC (rev 85232)
@@ -9,7 +9,7 @@
categories net
platforms darwin
maintainers gmail.com:gardnermj
-license GPL
+license GPL-2+
description BitTorrent library
@@ -40,6 +40,10 @@
${destroot}${docdir}
}
+if {${os.platform} == "darwin" && ${os.major} <= 9} {
+ patchfiles-append no_posix_memalign.patch
+}
+
livecheck.type regex
livecheck.url ${homepage}
livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)
Added: trunk/dports/net/libtorrent/files/no_posix_memalign.patch
===================================================================
--- trunk/dports/net/libtorrent/files/no_posix_memalign.patch (rev 0)
+++ trunk/dports/net/libtorrent/files/no_posix_memalign.patch 2011-10-12 00:54:08 UTC (rev 85232)
@@ -0,0 +1,15 @@
+--- rak/allocators.h.orig 2011-04-05 20:25:36.000000000 +1000
++++ rak/allocators.h 2011-10-12 11:24:21.000000000 +1100
+@@ -77,8 +77,11 @@ public:
+
+ static pointer alloc_size(size_type size) {
+ pointer ptr = NULL;
++#ifdef HAVE_POSIX_MEMALIGN
+ int __UNUSED result = posix_memalign((void**)&ptr, LT_SMP_CACHE_BYTES, size);
+-
++#else
++ ptr = valloc(size);
++#endif
+ return ptr;
+ }
+
Modified: trunk/dports/net/libtorrent-devel/Portfile
===================================================================
--- trunk/dports/net/libtorrent-devel/Portfile 2011-10-11 23:59:49 UTC (rev 85231)
+++ trunk/dports/net/libtorrent-devel/Portfile 2011-10-12 00:54:08 UTC (rev 85232)
@@ -11,7 +11,7 @@
categories net
platforms darwin
maintainers gmail.com:gardnermj
-license GPL
+license GPL-2+
description BitTorrent library (unstable release)
@@ -45,6 +45,10 @@
${destroot}${docdir}
}
+if {${os.platform} == "darwin" && ${os.major} <= 9} {
+ patchfiles-append no_posix_memalign.patch
+}
+
livecheck.type regex
livecheck.url [lindex ${master_sites} 0]
livecheck.regex ${real_name}-(\\d+(?:\\.\\d+)*)${extract.suffix}
Added: trunk/dports/net/libtorrent-devel/files/no_posix_memalign.patch
===================================================================
--- trunk/dports/net/libtorrent-devel/files/no_posix_memalign.patch (rev 0)
+++ trunk/dports/net/libtorrent-devel/files/no_posix_memalign.patch 2011-10-12 00:54:08 UTC (rev 85232)
@@ -0,0 +1,15 @@
+--- rak/allocators.h.orig 2011-04-05 20:25:36.000000000 +1000
++++ rak/allocators.h 2011-10-12 11:24:21.000000000 +1100
+@@ -77,8 +77,11 @@ public:
+
+ static pointer alloc_size(size_type size) {
+ pointer ptr = NULL;
++#ifdef HAVE_POSIX_MEMALIGN
+ int __UNUSED result = posix_memalign((void**)&ptr, LT_SMP_CACHE_BYTES, size);
+-
++#else
++ ptr = valloc(size);
++#endif
+ return ptr;
+ }
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111011/63d7b99d/attachment.html>
More information about the macports-changes
mailing list