[41249] trunk/base
pguyot at kallisys.net
pguyot at kallisys.net
Wed Oct 29 02:17:41 PDT 2008
Revision: 41249
http://trac.macports.org/changeset/41249
Author: pguyot at kallisys.net
Date: 2008-10-29 02:17:40 -0700 (Wed, 29 Oct 2008)
Log Message:
-----------
Add support for +universal variants with the xcode portgroup
Modified Paths:
--------------
trunk/base/doc/portgroup.7
trunk/base/src/port1.0/portutil.tcl
trunk/base/src/port1.0/resources/group/xcode-1.0.tcl
Modified: trunk/base/doc/portgroup.7
===================================================================
--- trunk/base/doc/portgroup.7 2008-10-29 08:43:06 UTC (rev 41248)
+++ trunk/base/doc/portgroup.7 2008-10-29 09:17:40 UTC (rev 41249)
@@ -135,6 +135,7 @@
.br
.Sy Example:
.Dl xcode.destroot.type framework
+.br
.It Ic xcode.destroot.path
Where to install the build product.
.br
@@ -157,6 +158,26 @@
.Bd -literal -offset indent -compact
xcode.destroot.settings SKIP_INSTALL=NO
.Ed
+.It Ic xcode.universal.settings
+Settings passed to the xcode build tool when the +universal variant is selected. These settings should be in the X=Y form.
+.br
+.Sy Type:
+.Em optional
+.br
+.Sy Default:
+.Bd -literal -offset indent -compact
+ARCHS="${universal_archs}" MACOSX_DEPLOYMENT_TARGET=${universal_target}
+.Ed
+.It Ic xcode.universal.sdk
+SDK to use when the +universal variant is selected. The argument may be an absolute path to an SDK, or the canonical name of an SDK.
+.br
+.Sy Type:
+.Em optional
+.br
+.Sy Default:
+.Bd -literal -offset indent -compact
+${universal_sysroot}
+.Ed
.El
.Sh STANDARD PORTFILE VARIABLES AFFECTING XCODE PORTGROUP
The following standard Portfile variables actually affect
Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl 2008-10-29 08:43:06 UTC (rev 41248)
+++ trunk/base/src/port1.0/portutil.tcl 2008-10-29 09:17:40 UTC (rev 41249)
@@ -1668,7 +1668,8 @@
} elseif {[exists use_xmkmf] && [option use_xmkmf]} {
ui_debug "using xmkmf, so not adding the default universal variant"
return no
- } elseif {[exists use_configure] && ![option use_configure]} {
+ } elseif {[exists use_configure] && ![option use_configure] && ![exists xcode.universal.settings]} {
+ # Allow +universal if port uses xcode portgroup.
ui_debug "not using configure, so not adding the default universal variant"
return no
} elseif {![exists os.universal_supported] || ![option os.universal_supported]} {
Modified: trunk/base/src/port1.0/resources/group/xcode-1.0.tcl
===================================================================
--- trunk/base/src/port1.0/resources/group/xcode-1.0.tcl 2008-10-29 08:43:06 UTC (rev 41248)
+++ trunk/base/src/port1.0/resources/group/xcode-1.0.tcl 2008-10-29 09:17:40 UTC (rev 41249)
@@ -53,18 +53,24 @@
#
# build and destroot parameters use the following parameters:
# PortGroup specific parameters:
-# xcode.project name (or path relative to build.dir) of the xcode
-# project. Default is "" meaning let xcodebuild figure it
-# out.
-# xcode.configuration xcode buildstyle/configuration. Default is Deployment.
-# xcode.target if present, overrides build.target and destroot.target
-# xcode.build.settings additional settings passed to $xcodebuildcmd (in
-# the X=Y form)
-# xcode.destroot.type install type (application or framework). Default is
-# application. This setting overrides xcode.destroot.path.
-# xcode.destroot.path install path (INSTALL_PATH setting value).
-# xcode.destroot.settings additional settings passed to $xcodebuildcmd (in
-# the X=Y form)
+# xcode.project name (or path relative to build.dir) of the xcode
+# project. Default is "" meaning let xcodebuild figure it
+# out.
+# xcode.configuration xcode buildstyle/configuration. Default is Deployment.
+# xcode.target if present, overrides build.target and destroot.target
+# xcode.build.settings additional settings passed to $xcodebuildcmd (in
+# the X=Y form)
+# xcode.destroot.type install type (application or framework). Default is
+# application. This setting overrides xcode.destroot.path.
+# xcode.destroot.path install path (INSTALL_PATH setting value).
+# xcode.destroot.settings additional settings passed to $xcodebuildcmd (in
+# the X=Y form)
+# xcode.universal.settings settings passed to $xcodebuildcmd when the +universal
+# variant is selected. Defaults to ARCHS="${universal_archs}"
+# MACOSX_DEPLOYMENT_TARGET=${universal_target}.
+# xcode.universal.sdk sdk to use when the +universal variant is selected.
+# Defaults to ${universal_sysroot}. If set to the empty
+# list, no sdk option will be passed to xcodebuild.
#
# Usual parameters:
# destroot where to destroot the project.
@@ -113,6 +119,11 @@
options xcode.destroot.settings
default xcode.destroot.settings ""
+options xcode.universal.settings
+default xcode.universal.settings {ARCHS=\"${universal_archs}\"\ MACOSX_DEPLOYMENT_TARGET=${universal_target}}
+options xcode.universal.sdk
+default xcode.universal.sdk {${universal_sysroot}}
+
namespace eval xcode {}
# Some utility functions.
@@ -257,6 +268,13 @@
set xcode_configuration_arg [xcode::get_configuration_arg ${xcode.configuration}]
set xcode_project_arg [xcode::get_project_arg ${xcode.project}]
set xcode_build_args "OBJROOT=build/ SYMROOT=build/"
+
+ if {[variant_isset universal]} {
+ set xcode_build_args "$xcode_build_args ${xcode.universal.settings}"
+ if {"${xcode.universal.sdk}" != ""} {
+ set xcode_build_args "-sdk ${xcode.universal.sdk} $xcode_build_args"
+ }
+ }
# iterate on targets if there is any, do -alltargets otherwise.
if {"$xcode_targets" == ""} {
@@ -291,6 +309,13 @@
${xcode.destroot.path} ${xcode.destroot.type}]
set xcode_build_args "OBJROOT=build/ SYMROOT=build/"
+ if {[variant_isset universal]} {
+ set xcode_build_args "$xcode_build_args ${xcode.universal.settings}"
+ if {"${xcode.universal.sdk}" != ""} {
+ set xcode_build_args "-sdk ${xcode.universal.sdk} $xcode_build_args"
+ }
+ }
+
# iterate on targets if there is any, do -alltargets otherwise.
if {"$xcode_targets" == ""} {
xcode::destroot_one_target \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081029/219cebbe/attachment-0001.html>
More information about the macports-changes
mailing list