[130870] trunk/dports/devel
jeremyhu at macports.org
jeremyhu at macports.org
Sat Jan 3 00:50:38 PST 2015
Revision: 130870
https://trac.macports.org/changeset/130870
Author: jeremyhu at macports.org
Date: 2015-01-03 00:50:38 -0800 (Sat, 03 Jan 2015)
Log Message:
-----------
libunwind: New port
Added Paths:
-----------
trunk/dports/devel/libunwind/
trunk/dports/devel/libunwind/Portfile
trunk/dports/devel/libunwind/files/
trunk/dports/devel/libunwind/files/Makefile
trunk/dports/devel/libunwind/files/libunwind-available.patch
Added: trunk/dports/devel/libunwind/Portfile
===================================================================
--- trunk/dports/devel/libunwind/Portfile (rev 0)
+++ trunk/dports/devel/libunwind/Portfile 2015-01-03 08:50:38 UTC (rev 130870)
@@ -0,0 +1,59 @@
+# $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="${prefix}/lib/${name}" \
+ CC="${configure.cc}" \
+ CXX="${configure.cxx}" \
+ CPPFLAGS="${configure.cppflags} -DNDEBUG" \
+ CFLAGS="${configure.cflags} [get_canonical_archflags cc]" \
+ CXXFLAGS="${configure.cxxflags} ${cxx_stdlibflags} [get_canonical_archflags cxx]" \
+ LDFLAGS="${configure.ldflags} ${cxx_stdlibflags} [get_canonical_archflags ld]"
+
+destroot.dir ${build.dir}
+destroot.args \
+ PREFIX="${prefix}/lib/${name}"
+
+livecheck.type none
Property changes on: trunk/dports/devel/libunwind/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/devel/libunwind/files/Makefile
===================================================================
--- trunk/dports/devel/libunwind/files/Makefile (rev 0)
+++ trunk/dports/devel/libunwind/files/Makefile 2015-01-03 08:50:38 UTC (rev 130870)
@@ -0,0 +1,115 @@
+# 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 $@ $<
+
+$(OBJROOT)/%.o : %.cpp
+ $(CXX) $(ARC_FLAGS) $(SYSROOT_FLAGS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
+
+$(OBJROOT)/%.o : %.S
+ $(CC) $(ARC_FLAGS) $(SYSROOT_FLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $<
+
+$(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 "NO" "$(STRIP_ON_INSTALL)"
+ $(STRIP) $(STRIP_LIB_FLAGS) $(DSTROOT)$(LIBDIR)/$(LIBUNWIND_FILENAME)
+endif
+
Added: trunk/dports/devel/libunwind/files/libunwind-available.patch
===================================================================
--- 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)
@@ -0,0 +1,20 @@
+--- 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 <Availability.h>
+- #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 {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150103/6111a749/attachment.html>
More information about the macports-changes
mailing list