<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[152202] trunk/dports/devel</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/152202">152202</a></dd>
<dt>Author</dt> <dd>sean@macports.org</dd>
<dt>Date</dt> <dd>2016-08-31 13:59:44 -0700 (Wed, 31 Aug 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>folly: add new port</pre>

<h3>Added Paths</h3>
<ul>
<li>trunk/dports/devel/folly/</li>
<li><a href="#trunkdportsdevelfollyPortfile">trunk/dports/devel/folly/Portfile</a></li>
<li>trunk/dports/devel/folly/files/</li>
<li><a href="#trunkdportsdevelfollyfilespatchallocdiff">trunk/dports/devel/folly/files/patch-alloc.diff</a></li>
<li><a href="#trunkdportsdevelfollyfilespatchmallocdiff">trunk/dports/devel/folly/files/patch-malloc.diff</a></li>
<li><a href="#trunkdportsdevelfollyfilespatchreferencediff">trunk/dports/devel/folly/files/patch-reference.diff</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsdevelfollyPortfile"></a>
<div class="addfile"><h4>Added: trunk/dports/devel/folly/Portfile (0 => 152202)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/folly/Portfile                                (rev 0)
+++ trunk/dports/devel/folly/Portfile        2016-08-31 20:59:44 UTC (rev 152202)
</span><span class="lines">@@ -0,0 +1,48 @@
</span><ins>+# -*- 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
+PortGroup           github 1.0
+PortGroup           cxx11 1.0
+
+github.setup        facebook folly 2016.08.22.00 v
+categories          devel
+platforms           darwin
+license             Apache-2
+
+maintainers         sean openmaintainer
+
+description         An open-source C++ library developed and used at Facebook.
+long_description    ${description}
+
+checksums           rmd160  eae22943df01420f1e524a8d288b4d43ff1d3542 \
+                    sha256  fad4cc85dc7d20c62672ec438b38e852e6e58119d519a1607c678e71edef47eb
+
+use_autoreconf      yes
+
+worksrcdir          ${worksrcdir}/folly
+
+# can remove after next version is released
+patch.pre_args      -p2
+patchfiles-append   patch-alloc.diff \
+                    patch-malloc.diff \
+                    patch-reference.diff
+
+# needed for ax_boost and friends
+depends_build-append \
+                    port:autoconf-archive \
+                    port:pkgconfig
+
+depends_lib-append  port:boost \
+                    port:python27 \
+                    port:gflags \
+                    port:google-glog \
+                    port:double-conversion \
+                    port:libevent \
+                    port:snappy \
+                    port:lz4 \
+                    port:lzma \
+                    port:xz \
+                    port:openssl \
+                    port:zlib \
+                    port:zstd
</ins></span></pre></div>
<a id="trunkdportsdevelfollyfilespatchallocdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/devel/folly/files/patch-alloc.diff (0 => 152202)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/folly/files/patch-alloc.diff                                (rev 0)
+++ trunk/dports/devel/folly/files/patch-alloc.diff        2016-08-31 20:59:44 UTC (rev 152202)
</span><span class="lines">@@ -0,0 +1,55 @@
</span><ins>+From 2a0c9d069374e5953625ae45aaa9ccbece7a7f5d Mon Sep 17 00:00:00 2001
+From: Christopher Dykes &lt;cdykes@fb.com&gt;
+Date: Mon, 22 Aug 2016 09:52:34 -0700
+Subject: [PATCH] More fixup of the build on Mac for HHVM
+
+Summary: `std::__throw_bad_alloc()` is defined in `&lt;new&gt;` on OSX, so bring back the `#ifdef` guards that were there previously.
+
+Reviewed By: markw65
+
+Differential Revision: D3749714
+
+fbshipit-source-id: 0338a4cece928fce0b9d33d41c17cfa99a319abe
+---
+ folly/portability/BitsFunctexcept.cpp | 2 ++
+ folly/portability/BitsFunctexcept.h   | 4 ++++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/folly/portability/BitsFunctexcept.cpp b/folly/portability/BitsFunctexcept.cpp
+index 55b9561..1a72b69 100644
+--- a/folly/portability/BitsFunctexcept.cpp
++++ b/folly/portability/BitsFunctexcept.cpp
+@@ -33,9 +33,11 @@ void __throw_out_of_range(const char* msg) {
+   throw std::out_of_range(msg);
+ }

++#ifdef _MSC_VER
+ void __throw_bad_alloc() {
+   throw std::bad_alloc();
+ }
++#endif

+ FOLLY_NAMESPACE_STD_END
+ #endif
+diff --git a/folly/portability/BitsFunctexcept.h b/folly/portability/BitsFunctexcept.h
+index 80b2cb2..098d1e7 100644
+--- a/folly/portability/BitsFunctexcept.h
++++ b/folly/portability/BitsFunctexcept.h
+@@ -21,13 +21,17 @@
+ #if FOLLY_HAVE_BITS_FUNCTEXCEPT_H
+ #include &lt;bits/functexcept.h&gt;
+ #else
++#include &lt;new&gt; // Some platforms define __throw_bad_alloc() here.
+ #include &lt;folly/Portability.h&gt;
+ FOLLY_NAMESPACE_STD_BEGIN

+ [[noreturn]] void __throw_length_error(const char* msg);
+ [[noreturn]] void __throw_logic_error(const char* msg);
+ [[noreturn]] void __throw_out_of_range(const char* msg);
++
++#ifdef _MSC_VER
+ [[noreturn]] void __throw_bad_alloc();
++#endif

+ FOLLY_NAMESPACE_STD_END
+ #endif
</ins></span></pre></div>
<a id="trunkdportsdevelfollyfilespatchmallocdiff"></a>
<div class="addfile"><h4>Added: trunk/dports/devel/folly/files/patch-malloc.diff (0 => 152202)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/folly/files/patch-malloc.diff                                (rev 0)
+++ trunk/dports/devel/folly/files/patch-malloc.diff        2016-08-31 20:59:44 UTC (rev 152202)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+From 89166c82417a52f99dd373f510dd5119574dbf33 Mon Sep 17 00:00:00 2001
+From: Giuseppe Ottaviano &lt;ott@fb.com&gt;
+Date: Tue, 23 Aug 2016 10:14:40 -0700
+Subject: [PATCH] Make Malloc.h self-contained again
+
+Summary: D3743475 adds to `Malloc.h` a dependency on another folly header, which breaks it when used in stand-alone mode. This diff moves the include to the right `#ifdef` section.
+
+Reviewed By: Gownta
+
+Differential Revision: D3757819
+
+fbshipit-source-id: 71664ca6a3a47b6e4449a4ef603fedf052c5df3b
+---
+ folly/Malloc.h | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/folly/Malloc.h b/folly/Malloc.h
+index 64fd393..fec188f 100644
+--- a/folly/Malloc.h
++++ b/folly/Malloc.h
+@@ -20,8 +20,6 @@
+ #pragma once
+ #define FOLLY_MALLOC_H_

+-#include &lt;folly/portability/BitsFunctexcept.h&gt;
+-
+ /**
+  * Define various MALLOCX_* macros normally provided by jemalloc.  We define
+  * them so that we don't have to include jemalloc.h, in case the program is
+@@ -42,6 +40,7 @@
+ #if defined(_GLIBCXX_USE_FB) &amp;&amp; !defined(_LIBSTDCXX_FBSTRING)

+ #include &lt;folly/detail/Malloc.h&gt;
++#include &lt;folly/portability/BitsFunctexcept.h&gt;

+ #include &lt;string&gt;

+@@ -87,13 +86,19 @@ extern &quot;C&quot; int mallctlbymib(const size_t*, size_t, void*, size_t*, void*,
+                             size_t)
+ __attribute__((__weak__));

++#include &lt;bits/functexcept.h&gt;
++
+ #define FOLLY_HAVE_MALLOC_H 1
+-#else
++
++#else // !defined(_LIBSTDCXX_FBSTRING)
++
+ #include &lt;folly/detail/Malloc.h&gt; /* nolint */
++#include &lt;folly/portability/BitsFunctexcept.h&gt; /* nolint */
++
+ #endif

+ // for malloc_usable_size
+-// NOTE: FreeBSD 9 doesn't have malloc.h.  It's defitions
++// NOTE: FreeBSD 9 doesn't have malloc.h.  Its definitions
+ // are found in stdlib.h.
+ #if FOLLY_HAVE_MALLOC_H
+ #include &lt;malloc.h&gt;
</ins></span></pre></div>
<a id="trunkdportsdevelfollyfilespatchreferencediff"></a>
<div class="addfile"><h4>Added: trunk/dports/devel/folly/files/patch-reference.diff (0 => 152202)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/folly/files/patch-reference.diff                                (rev 0)
+++ trunk/dports/devel/folly/files/patch-reference.diff        2016-08-31 20:59:44 UTC (rev 152202)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+From b646787c313a85935a894d6fb50e60e30d9f3b33 Mon Sep 17 00:00:00 2001
+From: Christopher Dykes &lt;cdykes@fb.com&gt;
+Date: Mon, 22 Aug 2016 15:55:49 -0700
+Subject: [PATCH] Fixup a reference to detail/FunctionalExcept.cpp
+
+Summary: I missed this reference when I moved it to the portability folder. It is already being compiled at its new location.
+
+Reviewed By: yfeldblum
+
+Differential Revision: D3754227
+
+fbshipit-source-id: 357b0c26ddbcefdc7640f6a334150abba90ed711
+---
+ folly/Makefile.am | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/folly/Makefile.am b/folly/Makefile.am
+index 5df00b8..a51285f 100644
+--- a/folly/Makefile.am
++++ b/folly/Makefile.am
+@@ -497,10 +497,6 @@ if !HAVE_WEAK_SYMBOLS
+ libfollybase_la_SOURCES += detail/MallocImpl.cpp
+ endif

+-if !HAVE_BITS_FUNCTEXCEPT_H
+-libfollybase_la_SOURCES += detail/FunctionalExcept.cpp
+-endif
+-
+ if HAVE_BOOST_CONTEXT
+ nobase_follyinclude_HEADERS += \
+         fibers/AddTasks.h \
</ins></span></pre>
</div>
</div>

</body>
</html>