[88880] trunk/dports/_resources/port1.0/group/python-1.0.tcl

jmr at macports.org jmr at macports.org
Sat Jan 14 01:20:08 PST 2012


Revision: 88880
          http://trac.macports.org/changeset/88880
Author:   jmr at macports.org
Date:     2012-01-14 01:20:05 -0800 (Sat, 14 Jan 2012)
Log Message:
-----------
python portgroup: don't add pre/post blocks in stubs

Modified Paths:
--------------
    trunk/dports/_resources/port1.0/group/python-1.0.tcl

Modified: trunk/dports/_resources/port1.0/group/python-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/python-1.0.tcl	2012-01-14 08:24:42 UTC (rev 88879)
+++ trunk/dports/_resources/port1.0/group/python-1.0.tcl	2012-01-14 09:20:05 UTC (rev 88880)
@@ -53,10 +53,6 @@
 
 build.target    build
 
-pre-destroot    {
-    xinstall -d -m 755 ${destroot}${prefix}/share/doc/${subport}/examples
-}
-
 options python.versions python.version python.default_version
 option_proc python.versions python_set_versions
 # py-foo historically meant python24
@@ -95,8 +91,51 @@
             destroot {
                 system "echo $name is a stub port > ${destroot}${prefix}/share/doc/${name}/README"
             }
+        } else {
+            set addcode 1
         }
+    } else {
+        set addcode 1
     }
+    if {[info exists addcode]} {
+        pre-build {
+            if {${python.add_archflags}} {
+                if {[variant_exists universal] && [variant_isset universal]} {
+                    build.env-append CFLAGS="${configure.universal_cflags}" \
+                                     OBJCFLAGS="${configure.universal_cflags}" \
+                                     CXXFLAGS="${configure.universal_cxxflags}" \
+                                     LDFLAGS="${configure.universal_ldflags}"
+                } else {
+                    build.env-append CFLAGS="${configure.cc_archflags}" \
+                                     OBJCFLAGS="${configure.objc_archflags}" \
+                                     CXXFLAGS="${configure.cxx_archflags}" \
+                                     FFLAGS="${configure.f77_archflags}" \
+                                     F90FLAGS="${configure.f90_archflags}" \
+                                     FCFLAGS="${configure.fc_archflags}" \
+                                     LDFLAGS="${configure.ld_archflags}"
+                }
+            }
+            if {${python.set_compiler}} {
+                foreach var {cc objc cxx fc f77 f90} {
+                    if {[set configure.${var}] != ""} {
+                        build.env-append [string toupper $var]="[set configure.${var}]"
+                    }
+                }
+            }
+        }
+        pre-destroot    {
+            xinstall -d -m 755 ${destroot}${prefix}/share/doc/${subport}/examples
+        }
+        post-destroot {
+            if {${python.link_binaries}} {
+                foreach bin [glob -nocomplain -tails -directory "${destroot}${python.prefix}/bin" *] {
+                    if {[catch {file type "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"}]} {
+                        ln -s "${python.prefix}/bin/${bin}" "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"
+                    }
+                }
+            }
+        }
+    }
 }
 
 option_proc python.default_version python_set_default_version
@@ -204,41 +243,6 @@
 options python.set_compiler
 default python.set_compiler yes
 
-pre-build {
-    if {${python.add_archflags}} {
-        if {[variant_exists universal] && [variant_isset universal]} {
-            build.env-append CFLAGS="${configure.universal_cflags}" \
-                             OBJCFLAGS="${configure.universal_cflags}" \
-                             CXXFLAGS="${configure.universal_cxxflags}" \
-                             LDFLAGS="${configure.universal_ldflags}"
-        } else {
-            build.env-append CFLAGS="${configure.cc_archflags}" \
-                             OBJCFLAGS="${configure.objc_archflags}" \
-                             CXXFLAGS="${configure.cxx_archflags}" \
-                             FFLAGS="${configure.f77_archflags}" \
-                             F90FLAGS="${configure.f90_archflags}" \
-                             FCFLAGS="${configure.fc_archflags}" \
-                             LDFLAGS="${configure.ld_archflags}"
-        }
-    }
-    if {${python.set_compiler}} {
-        foreach var {cc objc cxx fc f77 f90} {
-            if {[set configure.${var}] != ""} {
-                build.env-append [string toupper $var]="[set configure.${var}]"
-            }
-        }
-    }
-}
-
 options python.link_binaries python.link_binaries_suffix
 default python.link_binaries {[python_get_defaults link_binaries]}
 default python.link_binaries_suffix {-${python.branch}}
-post-destroot {
-    if {${python.link_binaries}} {
-        foreach bin [glob -nocomplain -tails -directory "${destroot}${python.prefix}/bin" *] {
-            if {[catch {file type "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"}]} {
-                ln -s "${python.prefix}/bin/${bin}" "${destroot}${prefix}/bin/${bin}${python.link_binaries_suffix}"
-            }
-        }
-    }
-}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120114/f615c678/attachment.html>


More information about the macports-changes mailing list