Revision: 90058 http://trac.macports.org/changeset/90058 Author: jmr@macports.org Date: 2012-02-20 02:34:14 -0800 (Mon, 20 Feb 2012) Log Message: ----------- add packagemaker_path to macports.conf, use in pkg target, default to /Applications with Xcode 4.3 Modified Paths: -------------- trunk/base/doc/macports.conf.in trunk/base/src/macports1.0/macports.tcl trunk/base/src/package1.0/portpkg.tcl Modified: trunk/base/doc/macports.conf.in =================================================================== --- trunk/base/doc/macports.conf.in 2012-02-20 10:13:15 UTC (rev 90057) +++ trunk/base/doc/macports.conf.in 2012-02-20 10:34:14 UTC (rev 90058) @@ -17,6 +17,14 @@ # Directory containing Xcode Tools (default is to ask xcode-select) #developer_dir @DEVELOPER_DIR@ +# Path to PackageMaker.app +# It may be necessary to set this with Xcode >= 4.3, as that version +# requires PackageMaker to be installed manually from the Auxiliary Tools for +# Xcode disk image. The default is /Applications/PackageMaker.app with Xcode +# 4.3 and ${developer_dir}/Applications/Utilities/PackageMaker.app with older +# versions. +#packagemaker_path /Applications/PackageMaker.app + # Directory containing Applications from ports. applications_dir @MPAPPLICATIONSDIR@ Modified: trunk/base/src/macports1.0/macports.tcl =================================================================== --- trunk/base/src/macports1.0/macports.tcl 2012-02-20 10:13:15 UTC (rev 90057) +++ trunk/base/src/macports1.0/macports.tcl 2012-02-20 10:34:14 UTC (rev 90058) @@ -50,7 +50,8 @@ macportsuser proxy_override_env proxy_http proxy_https proxy_ftp proxy_rsync proxy_skip \ master_site_local patch_site_local archive_site_local buildfromsource \ revupgrade_autorun revupgrade_mode revupgrade_check_id_loadcmds \ - host_blacklist preferred_hosts" + host_blacklist preferred_hosts\ + packagemaker_path" variable user_options "submitter_name submitter_email submitter_key" variable portinterp_options "\ portdbpath porturl portpath portbuildpath auto_path prefix prefix_frozen portsharepath \ @@ -59,7 +60,8 @@ rsync_server rsync_options rsync_dir startupitem_type startupitem_install place_worksymlink macportsuser \ mp_remote_url mp_remote_submit_url configureccache ccache_dir ccache_size configuredistcc configurepipe buildnicevalue buildmakejobs \ applications_dir current_phase frameworks_dir developer_dir universal_archs build_arch \ - os_arch os_endian os_version os_major os_platform macosx_version macosx_deployment_target $user_options" + os_arch os_endian os_version os_major os_platform macosx_version macosx_deployment_target \ + packagemaker_path $user_options" # deferred options are only computed when needed. # they are not exported to the trace thread. Modified: trunk/base/src/package1.0/portpkg.tcl =================================================================== --- trunk/base/src/package1.0/portpkg.tcl 2012-02-20 10:13:15 UTC (rev 90057) +++ trunk/base/src/package1.0/portpkg.tcl 2012-02-20 10:34:14 UTC (rev 90058) @@ -64,8 +64,9 @@ } proc portpkg::package_pkg {portname portversion portrevision} { - global UI_PREFIX portdbpath destpath workpath prefix description package.destpath package.flat long_description homepage portpath porturl - global os.version os.major + global UI_PREFIX portdbpath destpath workpath prefix description \ + package.destpath package.flat long_description homepage portpath porturl \ + os.version os.major xcodeversion packagemaker_path set pkgpath ${package.destpath}/${portname}-${portversion}.pkg @@ -74,7 +75,17 @@ return 0 } - set packagemaker "[option developer_dir]/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker" + if {![info exists packagemaker_path]} { + if {[vercmp $xcodeversion 4.3] >= 0} { + set packagemaker_path /Applications/PackageMaker.app + if {![file exists $packagemaker_path]} { + ui_warn "PackageMaker.app not found; you may need to install it or set packagemaker_path in macports.conf" + } + } else { + set packagemaker_path "[option developer_dir]/Applications/Utilities/PackageMaker.app" + } + } + set packagemaker "${packagemaker_path}/Contents/MacOS/PackageMaker" if ([file exists "$packagemaker"]) { set resourcepath ${workpath}/pkg_resources } else {
participants (1)
-
jmr@macports.org