<!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>[130870] 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/130870">130870</a></dd>
<dt>Author</dt> <dd>jeremyhu@macports.org</dd>
<dt>Date</dt> <dd>2015-01-03 00:50:38 -0800 (Sat, 03 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>libunwind: New port</pre>

<h3>Added Paths</h3>
<ul>
<li>trunk/dports/devel/libunwind/</li>
<li><a href="#trunkdportsdevellibunwindPortfile">trunk/dports/devel/libunwind/Portfile</a></li>
<li>trunk/dports/devel/libunwind/files/</li>
<li><a href="#trunkdportsdevellibunwindfilesMakefile">trunk/dports/devel/libunwind/files/Makefile</a></li>
<li><a href="#trunkdportsdevellibunwindfileslibunwindavailablepatch">trunk/dports/devel/libunwind/files/libunwind-available.patch</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsdevellibunwindPortfile"></a>
<div class="addfile"><h4>Added: trunk/dports/devel/libunwind/Portfile (0 => 130870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/libunwind/Portfile                                (rev 0)
+++ trunk/dports/devel/libunwind/Portfile        2015-01-03 08:50:38 UTC (rev 130870)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+# $Id$
+
+PortSystem              1.0
+PortGroup               compiler_blacklist_versions 1.0
+
+name                    libunwind
+version                 3.5.0
+categories              lang
+platforms               darwin
+license                 MIT NCSA
+maintainers             jeremyhu openmaintainer
+description             A version of Apple's libunwind library that is included in libSystem
+long_description        Apple's libunwind library (part of libSystem) was \
+                        released as OSS and is now stewarded by the LLVM \
+                        Project.  This version installs outside of the normal \
+                        filesystem hierarchy in order to not accidentally \
+                        conflict with the host implementation that other ports \
+                        may expect.
+
+homepage                http://blog.llvm.org/2013/10/new-libunwind-implementation-in-libcabi.html
+
+master_sites            http://www.llvm.org/releases/${version}/
+dist_subdir             llvm

+use_xz                  yes
+distname                libcxxabi-${version}.src
+
+checksums               rmd160  e4db7c7b07580304c5ae9cf03895d7b6470ecd0b \
+                        sha256  53c6be6a2dd2371f6d92c968cb8a59fbe13c6153583025433df067f706bfacd9
+
+use_configure           no
+
+post-extract {
+    file copy ${filespath}/Makefile ${build.dir}/Makefile
+}
+
+patchfiles \
+    libunwind-available.patch
+
+set cxx_stdlibflags {}
+if {[string match *clang* ${configure.cxx}]} {
+    set cxx_stdlibflags -stdlib=${configure.cxx_stdlib}
+}
+
+build.dir ${worksrcpath}/src/Unwind
+build.args \
+    PREFIX=&quot;${prefix}/lib/${name}&quot; \
+    CC=&quot;${configure.cc}&quot; \
+    CXX=&quot;${configure.cxx}&quot; \
+    CPPFLAGS=&quot;${configure.cppflags} -DNDEBUG&quot; \
+    CFLAGS=&quot;${configure.cflags} [get_canonical_archflags cc]&quot; \
+    CXXFLAGS=&quot;${configure.cxxflags} ${cxx_stdlibflags} [get_canonical_archflags cxx]&quot; \
+    LDFLAGS=&quot;${configure.ldflags} ${cxx_stdlibflags} [get_canonical_archflags ld]&quot;
+
+destroot.dir  ${build.dir}
+destroot.args \
+    PREFIX=&quot;${prefix}/lib/${name}&quot;
+
+livecheck.type          none
</ins><span class="cx">Property changes on: trunk/dports/devel/libunwind/Portfile
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnkeywords"></a>
<div class="addfile"><h4>Added: svn:keywords</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkdportsdevellibunwindfilesMakefile"></a>
<div class="addfile"><h4>Added: trunk/dports/devel/libunwind/files/Makefile (0 => 130870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/libunwind/files/Makefile                                (rev 0)
+++ trunk/dports/devel/libunwind/files/Makefile        2015-01-03 08:50:38 UTC (rev 130870)
</span><span class="lines">@@ -0,0 +1,115 @@
</span><ins>+# Default locations for the build
+ifdef DESTDIR
+DSTROOT = $(DESTDIR)
+endif
+OBJROOT = .
+
+# Default install locations for the library
+PREFIX = /usr
+INCDIR = $(PREFIX)/include
+LIBDIR = $(PREFIX)/lib
+LIBUNWIND_INCDIR = $(INCDIR)/libunwind
+MACHO_INCDIR = $(INCDIR)/mach-o
+LIBUNWIND_FILENAME = libunwind.1.dylib
+LIBUNWIND_SYMLINKNAME = libunwind.dylib
+LIBUNWIND_COMPAT_VERSION = 1.0.0
+LIBUNWIND_CURRENT_VERSION = 1.0.0
+
+# Default toolchain
+CC = $(shell xcrun -find cc)
+CXX = $(shell xcrun -find c++)
+STRIP = $(shell xcrun -find strip)
+STRIP_LIB_FLAGS = -S
+DSYMUTIL = $(shell xcrun -find dsymutil)
+INCLUDES = -I../../include
+
+# Default archs
+RC_ARCHS = i386 x86_64 
+ARC_FLAGS := $(foreach arch,$(RC_ARCHS),-arch $(arch))
+
+# Use an SDK?
+ifdef SDKROOT
+SYSROOT_FLAGS = -isysroot $(SDKROOT)
+endif
+
+C_SRCS = \
+  UnwindLevel1.c \
+  UnwindLevel1-gcc-ext.c \
+  Unwind-sjlj.c
+
+CXX_SRCS = \
+  Unwind_AppleExtras.cpp \
+  libunwind.cpp \
+  Unwind-EHABI.cpp
+
+ASM_SRCS = \
+  UnwindRegistersRestore.S \
+  UnwindRegistersSave.S
+
+HEADERS = \
+  ../../include/libunwind.h \
+  ../../include/unwind.h
+
+LIBUNWIND_HEADERS = \
+  AddressSpace.hpp \
+  assembly.h \
+  CompactUnwinder.hpp \
+  config.h \
+  dwarf2.h \
+  DwarfInstructions.hpp \
+  DwarfParser.hpp \
+  libunwind_ext.h \
+  Registers.hpp \
+  UnwindCursor.hpp \
+  unwind_ext.h
+
+MACHO_HEADERS = \
+  ../../include/mach-o/compact_unwind_encoding.h
+
+OBJS = $(C_SRCS:%.c=$(OBJROOT)/%.o) $(CXX_SRCS:%.cpp=$(OBJROOT)/%.o) $(ASM_SRCS:%.S=$(OBJROOT)/%.o)
+
+$(OBJROOT)/%.o : %.c
+        $(CC) $(ARC_FLAGS) $(SYSROOT_FLAGS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -c -o $@ $&lt;
+
+$(OBJROOT)/%.o : %.cpp
+        $(CXX) $(ARC_FLAGS) $(SYSROOT_FLAGS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $&lt;
+
+$(OBJROOT)/%.o : %.S
+        $(CC) $(ARC_FLAGS) $(SYSROOT_FLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $&lt;
+
+$(OBJROOT)/$(LIBUNWIND_FILENAME): $(OBJS)
+        $(CXX) -o $@ $(ARC_FLAGS) $(SYSROOT_FLAGS) $(LDFLAGS) \
+            -dynamiclib -install_name $(LIBDIR)/$(LIBUNWIND_FILENAME) \
+            -compatibility_version $(LIBUNWIND_COMPAT_VERSION) -current_version $(LIBUNWIND_CURRENT_VERSION) \
+            $(OBJS)
+
+all: $(OBJROOT)/$(LIBUNWIND_FILENAME)
+
+installhdrs:
+        install -d -m 755 $(DSTROOT)$(INCDIR)
+        install -d -m 755 $(DSTROOT)$(LIBUNWIND_INCDIR)
+        install -d -m 755 $(DSTROOT)$(MACHO_INCDIR)
+
+        for f in $(HEADERS); do \
+          install -m 644 $$f $(DSTROOT)$(INCDIR); \
+        done
+
+        for f in $(LIBUNWIND_HEADERS); do \
+          install -m 644 $$f $(DSTROOT)$(LIBUNWIND_INCDIR); \
+        done
+
+        for f in $(MACHO_HEADERS); do \
+          install -m 644 $$f $(DSTROOT)$(MACHO_INCDIR); \
+        done
+
+install: installhdrs $(OBJROOT)/$(LIBUNWIND_FILENAME)
+ifdef SYMROOT
+        install -m 755 $(OBJROOT)/$(LIBUNWIND_FILENAME) $(SYMROOT)
+        $(DSYMUTIL) --out $(SYMROOT)/$(LIBUNWIND_FILENAME).dSYM $(OBJROOT)/$(LIBUNWIND_FILENAME)
+endif
+        install -d -m 755 $(DSTROOT)$(LIBDIR)
+        install -m 755 $(OBJROOT)/$(LIBUNWIND_FILENAME) $(DSTROOT)$(LIBDIR)
+ifneq &quot;NO&quot; &quot;$(STRIP_ON_INSTALL)&quot;
+        $(STRIP) $(STRIP_LIB_FLAGS) $(DSTROOT)$(LIBDIR)/$(LIBUNWIND_FILENAME)
+endif
+
</ins></span></pre></div>
<a id="trunkdportsdevellibunwindfileslibunwindavailablepatch"></a>
<div class="addfile"><h4>Added: trunk/dports/devel/libunwind/files/libunwind-available.patch (0 => 130870)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/libunwind/files/libunwind-available.patch                                (rev 0)
+++ trunk/dports/devel/libunwind/files/libunwind-available.patch        2015-01-03 08:50:38 UTC (rev 130870)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+--- include/libunwind.h.orig        2014-06-25 16:39:00.000000000 -0700
++++ include/libunwind.h        2015-01-03 00:11:33.000000000 -0800
+@@ -25,16 +25,7 @@
+ #define LIBCXXABI_ARM_EHABI 0
+ #endif

+-#if __APPLE__
+-  #include &lt;Availability.h&gt;
+-    #if __arm__
+-       #define LIBUNWIND_AVAIL __attribute__((unavailable))
+-    #else
+-      #define LIBUNWIND_AVAIL __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_5_0)
+-    #endif
+-#else
+-  #define LIBUNWIND_AVAIL
+-#endif
++#define LIBUNWIND_AVAIL

+ /* error codes */
+ enum {
</ins></span></pre>
</div>
</div>

</body>
</html>