[130972] trunk/dports/devel/libunwind

jeremyhu at macports.org jeremyhu at macports.org
Sun Jan 4 01:19:47 PST 2015


Revision: 130972
          https://trac.macports.org/changeset/130972
Author:   jeremyhu at macports.org
Date:     2015-01-04 01:19:47 -0800 (Sun, 04 Jan 2015)
Log Message:
-----------
libunwind: Build on Leopard and fix +universal

Modified Paths:
--------------
    trunk/dports/devel/libunwind/Portfile

Added Paths:
-----------
    trunk/dports/devel/libunwind/files/libunwind-fallback-x86_64.patch

Modified: trunk/dports/devel/libunwind/Portfile
===================================================================
--- trunk/dports/devel/libunwind/Portfile	2015-01-04 09:12:39 UTC (rev 130971)
+++ trunk/dports/devel/libunwind/Portfile	2015-01-04 09:19:47 UTC (rev 130972)
@@ -5,7 +5,7 @@
 
 name                    libunwind
 version                 3.5.0
-revision                1
+revision                2
 epoch                   1
 categories              devel
 platforms               darwin
@@ -33,14 +33,13 @@
 # 3.5 and 3.6 are blacklisted to prevent dependency cycles
 compiler.blacklist *gcc* {clang < 100} macports-clang-3.5 macports-clang-3.6
 
-supported_archs i386 x86_64
-
 post-extract {
     file copy ${filespath}/Makefile ${build.dir}/Makefile
 }
 
 patchfiles \
-    libunwind-available.patch
+    libunwind-available.patch \
+    libunwind-fallback-x86_64.patch
 
 post-patch {
     if {${os.major} < 9} {
@@ -72,6 +71,17 @@
     # Technically not needed, but subports will expect depending on libunwind to pull in the headers
     depends_lib-append port:libunwind-headers
 
+    supported_archs     i386 x86_64
+    variant universal   {}
+
+    if {${os.major} < 10} {
+        # Leopard's libSystem's libmacho does not contain getsectiondata()
+
+        depends_build-append port:libmacho
+        configure.cppflags-append -DUSE_MACPORTS_LIBUNWIND
+        configure.ldflags-append -lmacho
+    }
+
     build.args \
         PREFIX="${prefix}" \
         CC="${configure.cc}" \
@@ -79,11 +89,13 @@
         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]"
+        LDFLAGS="${configure.ldflags} ${cxx_stdlibflags} [get_canonical_archflags ld]" \
+        LIBUNWIND_CURRENT_VERSION=${version}
 
     destroot.target installlibs
     destroot.args \
-        PREFIX="${prefix}"
+        PREFIX="${prefix}" \
+        STRIP_ON_INSTALL="NO"
 }
 
 livecheck.type          none

Added: trunk/dports/devel/libunwind/files/libunwind-fallback-x86_64.patch
===================================================================
--- trunk/dports/devel/libunwind/files/libunwind-fallback-x86_64.patch	                        (rev 0)
+++ trunk/dports/devel/libunwind/files/libunwind-fallback-x86_64.patch	2015-01-04 09:19:47 UTC (rev 130972)
@@ -0,0 +1,14 @@
+--- src/Unwind/AddressSpace.hpp.orig	2015-01-04 00:47:48.000000000 -0800
++++ src/Unwind/AddressSpace.hpp	2015-01-04 00:48:13.000000000 -0800
+@@ -295,7 +295,11 @@ inline LocalAddressSpace::pint_t LocalAd
+       
+       // Find dwarf unwind section in that image.
+       unsigned long size;
++#ifndef __LP64__
+       const uint8_t *p = getsectiondata(mh, "__TEXT", "__eh_frame", &size);
++#else
++      const uint8_t *p = getsectiondata((const struct mach_header_64 *)mh, "__TEXT", "__eh_frame", &size);
++#endif
+       if (!p)
+         return false;
+       
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150104/23f57e52/attachment.html>


More information about the macports-changes mailing list