[144546] trunk/dports/devel/ld64/Portfile

jeremyhu at macports.org jeremyhu at macports.org
Mon Jan 11 23:44:19 PST 2016


Revision: 144546
          https://trac.macports.org/changeset/144546
Author:   jeremyhu at macports.org
Date:     2016-01-11 23:44:19 -0800 (Mon, 11 Jan 2016)
Log Message:
-----------
ld64: Edit dyld headers to work with Tiger's AvailabilityMacros.h

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

Modified: trunk/dports/devel/ld64/Portfile
===================================================================
--- trunk/dports/devel/ld64/Portfile	2016-01-12 07:34:47 UTC (rev 144545)
+++ trunk/dports/devel/ld64/Portfile	2016-01-12 07:44:19 UTC (rev 144546)
@@ -354,6 +354,21 @@
                 reinplace "s|__${reg}|${reg}|g" ${worksrcpath}/src/ld/parsers/libunwind/Registers.hpp
             }
         }
+
+        foreach header [glob ${workpath}/dyld-${dyld_version}/include/{,*/}*.h] {
+            if {${os.major} < 9} {
+                reinplace "s|__MAC_10_5|__MAC_NA|g" ${header}
+                reinplace "s|AVAILABLE_MAC_OS_X_VERSION_10_\\(.\\)_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5|AVAILABLE_MAC_OS_X_VERSION_10_\\1_AND_LATER|" ${header}
+                reinplace "s|AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER|__attribute__((unavailable))|g" ${header}
+
+                reinplace "s|Availability.h|AvailabilityMacros.h|g" ${header}
+                reinplace "s|__OSX_AVAILABLE_STARTING(__MAC_NA,.*)|__attribute__((unavailable))|g" ${header}
+                reinplace "s|__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_NA,.*)|__attribute__((unavailable))|g" ${header}
+                reinplace "s|__OSX_AVAILABLE_STARTING(__MAC_10_\\(\[^,\]*\\),.*)|AVAILABLE_MAC_OS_X_VERSION_10_\\1_AND_LATER|g" ${header}
+                reinplace "s|__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_\\(\[^,\]*\\),__MAC_NA,.*)|AVAILABLE_MAC_OS_X_VERSION_10_\\1_AND_LATER|g" ${header}
+                reinplace "s|__OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_\\(\[^,\]*\\),__MAC_10_\\(\[^,\]*\\),.*)|AVAILABLE_MAC_OS_X_VERSION_10_\\1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_\\2|g" ${header}
+            }
+        }
     }
 
     configure {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160111/6731720e/attachment-0001.html>


More information about the macports-changes mailing list