[92204] trunk/dports/devel/dyld-headers/Portfile

jeremyhu at macports.org jeremyhu at macports.org
Sat Apr 21 15:42:45 PDT 2012


Revision: 92204
          https://trac.macports.org/changeset/92204
Author:   jeremyhu at macports.org
Date:     2012-04-21 15:42:44 -0700 (Sat, 21 Apr 2012)
Log Message:
-----------
dyld-headers: Use the latest version consistently

Modified Paths:
--------------
    trunk/dports/devel/dyld-headers/Portfile

Modified: trunk/dports/devel/dyld-headers/Portfile
===================================================================
--- trunk/dports/devel/dyld-headers/Portfile	2012-04-21 22:33:35 UTC (rev 92203)
+++ trunk/dports/devel/dyld-headers/Portfile	2012-04-21 22:42:44 UTC (rev 92204)
@@ -18,32 +18,35 @@
 checksums               rmd160  440c49f641e45a7bce459aaea2c4fe0dd0385351 \
                         sha256  69296e9b4192bdac778ea899fffc18b02be62b51b5e8474b4cf85ae5f2b08aa4
 
-if {${os.major} < 9} {
-    # The main reason for using the older 97.1 on Tiger is because of the change for Availability.h
-    version             97.1
-    revision            1
-    distname            dyld-${version}
-    checksums           rmd160  86f82f58d610e7beea4b035aa528d2fdea85dcb8 \
-                        sha256  917c88c6efb507511353e82ce9b453ac9c4da3156fafae4955ae11d2fcc4f181
-} elseif {${os.major} < 11} {
-    # We can probably use 195 headers or later on Leopard but I haven't verified yet.
-    version             132.13
-    revision            1
-    distname            dyld-${version}
-    checksums           rmd160  15636fd3b237575a8301d0d1d659f4aa7e018012 \
-                        sha256  31d8767d4fcb2b9f861fe91cae97f411fe0df48b1bd5f5725d09311b5e62346e
-}
-
 post-patch {
     reinplace "s|/usr/local|${prefix}|g" \
             ${worksrcpath}/dyld.xcodeproj/project.pbxproj
     reinplace "s|/usr|${prefix}|g" \
             ${worksrcpath}/dyld.xcodeproj/project.pbxproj
 
-    if {${os.major} < 9} {
-        reinplace "/version.pl/s/\".*\"/\"echo 'const char __dyld_version\[\] = \\\\\"@(#) dyld-97.1\\\\\";' > \${BUILT_PRODUCTS_DIR}\\/version.c\\\\n\"/" ${worksrcpath}/dyld.xcodeproj/project.pbxproj
-        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/" ${worksrcpath}/include/mach-o/dyld.h
-        reinplace "s/AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER/__attribute__((weak_import))/" ${worksrcpath}/include/dlfcn.h
+    foreach header [glob ${worksrcpath}/include/{,*/}*.h] {
+        if {${os.major} < 11} {
+            reinplace "s|__MAC_10_7|1070|g" ${header}
+            reinplace "s|AVAILABLE_MAC_OS_X_VERSION_10_\\(.\\)_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7|AVAILABLE_MAC_OS_X_VERSION_10_\\1_AND_LATER|" ${header}
+            reinplace "s|AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER|__attribute__((unavailable))|g" ${header}
+        }
+        if {${os.major} < 10} {
+            reinplace "s|__MAC_10_6|1060|g" ${header}
+            reinplace "s|AVAILABLE_MAC_OS_X_VERSION_10_\\(.\\)_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6|AVAILABLE_MAC_OS_X_VERSION_10_\\1_AND_LATER|" ${header}
+            reinplace "s|AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER|__attribute__((unavailable))|g" ${header}
+        }
+        if {${os.major} < 9} {
+            reinplace "s|__MAC_10_5|1050|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(10.*)|__attribute__((unavailable))|g" ${header}
+            reinplace "s|__OSX_AVAILABLE_BUT_DEPRECATED(10.*)|__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_\\(\[^,\]*\\),10.*)|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}
+        }
     }
 }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120421/6d7ac2da/attachment-0001.html>


More information about the macports-changes mailing list