[58377] trunk/dports/_resources/port1.0/group/archcheck-1.0.tcl
ryandesign at macports.org
ryandesign at macports.org
Sun Sep 27 16:57:08 PDT 2009
Revision: 58377
http://trac.macports.org/changeset/58377
Author: ryandesign at macports.org
Date: 2009-09-27 16:57:08 -0700 (Sun, 27 Sep 2009)
Log Message:
-----------
archcheck-1.0.tcl: add new portgroup to help avoid issues like #20727, #20912, #21398, #21653, #21461 until a proper solution is implemented in base in #20728.
Added Paths:
-----------
trunk/dports/_resources/port1.0/group/archcheck-1.0.tcl
Added: trunk/dports/_resources/port1.0/group/archcheck-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/archcheck-1.0.tcl (rev 0)
+++ trunk/dports/_resources/port1.0/group/archcheck-1.0.tcl 2009-09-27 23:57:08 UTC (rev 58377)
@@ -0,0 +1,66 @@
+# $Id: php5extension-1.0.tcl 57450 2009-09-11 08:06:58Z ryandesign at macports.org $
+#
+# Copyright (c) 2009 The MacPorts Project
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of The MacPorts Project nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+#
+# This PortGroup checks that the architecture(s) of the given files match
+# the architecture(s) we are trying to install this port as now. This is
+# a crutch to get us by until a proper solution is implemented in base.
+# See #20728.
+#
+# Usage:
+#
+# PortGroup archcheck 1.0
+# archcheck.files file1 file2 ...
+#
+# Files can (and probably usually should) be specified relative to ${prefix}.
+
+options archcheck.files
+default archcheck.files {}
+
+pre-extract {
+ if {[variant_isset universal]} {
+ set requested_archs ${universal_archs}
+ } else {
+ set requested_archs ${build_arch}
+ }
+ foreach file ${archcheck.files} {
+ # Prepend prefix if necessary.
+ if {"/" != [string index ${file} 0]} {
+ set file [file join ${prefix} ${file}]
+ }
+ set file_archs " [strsed [exec lipo -info ${file}] {s/.*://}] "
+ foreach requested_arch ${requested_archs} {
+ if {-1 == [string first " ${requested_arch} " ${file_archs}]} {
+ ui_error "You cannot install ${name} for the architecture(s) ${requested_archs}\nbecause ${file} does not contain the architecture ${requested_arch}.\nYou may want to rebuild the port that provides that file using the universal variant."
+ return -code error "incompatible architectures in dependencies"
+ }
+ }
+ }
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090927/29771200/attachment.html>
More information about the macports-changes
mailing list