<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/dd89bb80ff262bab1403da89d2d09e4a9ef32839">https://github.com/macports/macports-base/commit/dd89bb80ff262bab1403da89d2d09e4a9ef32839</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new dd89bb8 Use pkgbuild when possible
</span>dd89bb8 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit dd89bb80ff262bab1403da89d2d09e4a9ef32839
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Sat Dec 10 22:39:53 2016 +1100
<span style='display:block; white-space:pre;color:#404040;'> Use pkgbuild when possible
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> PackageMaker.app has been removed from Xcode tools for some time, so
</span><span style='display:block; white-space:pre;color:#404040;'> use pkgbuild instead when it's available and we're building flat
</span><span style='display:block; white-space:pre;color:#404040;'> packages.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Fixes: https://trac.macports.org/ticket/42725
</span>---
src/package1.0/portpkg.tcl | 43 ++++++++++++++++++++++++++++---------------
1 file changed, 28 insertions(+), 15 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/package1.0/portpkg.tcl b/src/package1.0/portpkg.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 931b03b..0138930 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/package1.0/portpkg.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/package1.0/portpkg.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -58,23 +58,29 @@ default pkg.asroot no
</span> set_ui_prefix
proc portpkg::pkg_start {args} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global packagemaker_path portpkg::packagemaker \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global packagemaker_path portpkg::packagemaker portpkg::pkgbuild \
</span> portpkg::language xcodeversion portpath porturl \
package.resources package.scripts package.flat \
subport epoch version revision description long_description \
homepage workpath os.major
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![info exists packagemaker_path]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[vercmp $xcodeversion 4.3] >= 0} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set packagemaker_path /Applications/PackageMaker.app
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {![file exists $packagemaker_path]} {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_warn "PackageMaker.app not found; you may need to install it or set packagemaker_path in macports.conf"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[catch {findBinary pkgbuild /usr/bin/pkgbuild} pkgbuild]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set pkgbuild ""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$pkgbuild eq "" || !${package.flat}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # can't use pkgbuild, so fall back to PackageMaker
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![info exists packagemaker_path]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[vercmp $xcodeversion 4.3] >= 0} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set packagemaker_path /Applications/PackageMaker.app
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {![file exists $packagemaker_path]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_warn "PackageMaker.app not found; you may need to install it or set packagemaker_path in macports.conf"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set packagemaker_path "[option developer_dir]/Applications/Utilities/PackageMaker.app"
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- } else {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set packagemaker_path "[option developer_dir]/Applications/Utilities/PackageMaker.app"
</span> }
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ set packagemaker "${packagemaker_path}/Contents/MacOS/PackageMaker"
</span> }
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set packagemaker "${packagemaker_path}/Contents/MacOS/PackageMaker"
</span>
set language "English"
file mkdir "${package.resources}/${language}.lproj"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -112,7 +118,7 @@ proc portpkg::package_pkg {portname portepoch portversion portrevision} {
</span> global UI_PREFIX portdbpath destpath workpath prefix description \
package.flat package.destpath portpath os.version os.major \
package.resources package.scripts portpkg::packagemaker \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- pkg_post_unarchive_deletions portpkg::language
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pkg_post_unarchive_deletions portpkg::language portpkg::pkgbuild
</span>
set portepoch_namestr ""
if {${portepoch} != 0} {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -150,9 +156,8 @@ proc portpkg::package_pkg {portname portepoch portversion portrevision} {
</span> }
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if ([file exists "$packagemaker"]) {
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- ui_debug "Calling $packagemaker for $portname pkg"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set using_pkgbuild [expr {$pkgbuild ne "" && ${package.flat}}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$using_pkgbuild || [file exists "$packagemaker"]} {
</span> if {${os.major} >= 9} {
if {${package.flat}} {
set pkgtarget "10.5"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -165,11 +170,19 @@ proc portpkg::package_pkg {portname portepoch portversion portrevision} {
</span> set infofile "${workpath}/Info.plist"
write_info_plist $infofile $portname $portversion $portrevision
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set cmdline "PMResourceLocale=${language} $packagemaker --root ${destpath} --out ${pkgpath} ${pkgresources} --info $infofile --target $pkgtarget --domain system --id org.macports.$portname"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$using_pkgbuild} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cmdline "$pkgbuild --root ${destpath} ${pkgresources} --info $infofile --install-location / --identifier org.macports.$portname"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set cmdline "PMResourceLocale=${language} $packagemaker --root ${destpath} --out ${pkgpath} ${pkgresources} --info $infofile --target $pkgtarget --domain system --id org.macports.$portname"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> if {${os.major} >= 10} {
set v [mp_version_to_apple_version $portepoch $portversion $portrevision]
append cmdline " --version $v"
<span style='display:block; white-space:pre;background:#ffe0e0;'>- append cmdline " --no-relocate"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {!$using_pkgbuild} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ append cmdline " --no-relocate"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ append cmdline " ${pkgpath}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> } else {
# 10.5 Leopard does not use current language, manually specify
append cmdline " -AppleLanguages \"(${language})\""
</pre><pre style='margin:0'>
</pre>