[117059] trunk/dports/devel/jubatus-mpio
hum at macports.org
hum at macports.org
Fri Feb 14 06:50:48 PST 2014
Revision: 117059
https://trac.macports.org/changeset/117059
Author: hum at macports.org
Date: 2014-02-14 06:50:48 -0800 (Fri, 14 Feb 2014)
Log Message:
-----------
jubatus-mpio: add support for Mavericks; fix expressions.
Modified Paths:
--------------
trunk/dports/devel/jubatus-mpio/Portfile
Added Paths:
-----------
trunk/dports/devel/jubatus-mpio/files/
trunk/dports/devel/jubatus-mpio/files/patch-cpp11.diff
Modified: trunk/dports/devel/jubatus-mpio/Portfile
===================================================================
--- trunk/dports/devel/jubatus-mpio/Portfile 2014-02-14 14:43:04 UTC (rev 117058)
+++ trunk/dports/devel/jubatus-mpio/Portfile 2014-02-14 14:50:48 UTC (rev 117059)
@@ -29,11 +29,18 @@
build.args CXXFLAGS=${configure.cxxflags}
+platform darwin {
+ if {${os.major} >= 13} {
+ patchfiles-append patch-cpp11.diff
+ build.args CXXFLAGS="${configure.cxxflags} -std=c++11 -stdlib=libc++"
+ }
+}
+
post-destroot {
# install an additional document.
- set doc_dir ${destroot}${prefix}/share/doc/${name}
- xinstall -d ${doc_dir}
+ set docdir ${prefix}/share/doc/${name}
+ xinstall -d ${destroot}${docdir}
xinstall -m 644 -W ${worksrcpath} \
AUTHORS COPYING ChangeLog LICENSE NOTICE README.md \
- ${doc_dir}
+ ${destroot}${docdir}
}
Added: trunk/dports/devel/jubatus-mpio/files/patch-cpp11.diff
===================================================================
--- trunk/dports/devel/jubatus-mpio/files/patch-cpp11.diff (rev 0)
+++ trunk/dports/devel/jubatus-mpio/files/patch-cpp11.diff 2014-02-14 14:50:48 UTC (rev 117059)
@@ -0,0 +1,84 @@
+--- jubatus/mp/exception.h.orig 2013-04-19 14:45:09.000000000 +0900
++++ jubatus/mp/exception.h 2014-02-14 18:21:45.000000000 +0900
+@@ -20,7 +20,7 @@
+
+ #include <stdexcept>
+ #include <errno.h>
+-#include <string.h>
++#include <string>
+ #include <stdio.h>
+
+ namespace mp {
+--- jubatus/mp/functional.h.orig 2013-04-19 14:45:09.000000000 +0900
++++ jubatus/mp/functional.h 2014-02-14 17:57:25.000000000 +0900
+@@ -37,7 +37,7 @@
+ namespace placeholders { }
+ }
+ #else
+-#ifndef MP_FUNCTIONAL_STANDARD
++#if !defined(MP_FUNCTIONAL_STANDARD) && __cplusplus < 201103L && !defined(_LIBCPP_VERSION)
+ #include <tr1/functional>
+ namespace mp {
+ using std::tr1::function;
+--- jubatus/mp/memory.h.orig 2013-04-19 14:45:09.000000000 +0900
++++ jubatus/mp/memory.h 2014-02-14 17:57:51.000000000 +0900
+@@ -43,7 +43,7 @@
+ using boost::enable_shared_from_this;
+ }
+ #else
+-#ifndef MP_MEMORY_STANDARD
++#if !defined(MP_MEMORY_STANDARD) && __cplusplus < 201103L && !defined(_LIBCPP_VERSION)
+ #include <tr1/memory>
+ namespace mp {
+ using std::tr1::shared_ptr;
+--- jubatus/mp/unordered.h.orig 2013-04-19 14:45:09.000000000 +0900
++++ jubatus/mp/unordered.h 2014-02-14 17:58:40.000000000 +0900
+@@ -44,7 +44,7 @@
+ template <typename T> struct hash : public boost::hash<T> { };
+ }
+
+-#elif defined(MP_UNORDERED_MAP_STANDARD)
++#elif defined(MP_UNORDERED_MAP_STANDARD) || __cplusplus >= 201103L || defined(_LIBCPP_VERSION)
+ #include <unordered_map>
+ #include <unordered_set>
+ namespace mp {
+--- mpsrc/wavy_connect.cc.orig 2013-04-19 14:45:09.000000000 +0900
++++ mpsrc/wavy_connect.cc 2014-02-14 17:10:23.000000000 +0900
+@@ -23,6 +23,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <poll.h>
++#include <math.h>
+
+ namespace mp {
+ namespace wavy {
+@@ -332,8 +333,8 @@
+ double timeout_sec, connect_callback_t callback)
+ {
+ struct timespec timeout = {
+- timeout_sec,
+- ((timeout_sec - (double)(time_t)timeout_sec) * 1e9) };
++ static_cast<time_t>(timeout_sec),
++ static_cast<time_t>((timeout_sec - floor(timeout_sec)) * 1e9)};
+ return connect(socket_family, socket_type, protocol,
+ addr, addrlen, &timeout, callback);
+ }
+--- mpsrc/wavy_timer.cc.orig 2013-04-19 14:45:09.000000000 +0900
++++ mpsrc/wavy_timer.cc 2014-02-14 17:12:34.000000000 +0900
+@@ -16,6 +16,7 @@
+ // limitations under the License.
+ //
+ #include "wavy_timer.h"
++#include <math.h>
+
+ namespace mp {
+ namespace wavy {
+@@ -36,7 +37,7 @@
+ static inline struct timespec sec2spec(double sec)
+ {
+ struct timespec spec = {
+- sec, ((sec - (double)(time_t)sec) * 1e9) };
++ static_cast<time_t>(sec), static_cast<time_t>((sec - floor(sec)) * 1e9) };
+ return spec;
+ }
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140214/c2eb886b/attachment.html>
More information about the macports-changes
mailing list