<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/4ce1e96415a0ea29eddee60ef3c84814047289aa">https://github.com/macports/macports-base/commit/4ce1e96415a0ea29eddee60ef3c84814047289aa</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 4ce1e964 Fix and simplify checks for Tiger
</span>4ce1e964 is described below

<span style='display:block; white-space:pre;color:#808000;'>commit 4ce1e96415a0ea29eddee60ef3c84814047289aa
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Wed Apr 14 04:32:32 2021 +1000

<span style='display:block; white-space:pre;color:#404040;'>    Fix and simplify checks for Tiger
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    Closes: https://github.com/macports/macports-base/pull/218
</span><span style='display:block; white-space:pre;color:#404040;'>    Closes: https://trac.macports.org/ticket/61649
</span>---
 Makefile.in               | 2 +-
 portmgr/dmg/postflight.in | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/Makefile.in b/Makefile.in
</span><span style='display:block; white-space:pre;color:#808080;'>index 9b52b647..96119fa8 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -79,7 +79,7 @@ ifeq ($(DESTDIR),)
</span>                 echo "Not updating home directory location for user \"${RUNUSR}\" (not root)" ; \
             fi ; \
         fi ; \
<span style='display:block; white-space:pre;background:#ffe0e0;'>-        if test `sw_vers -productVersion | /usr/bin/awk -F . '{print $$2}'` -eq 4 -a `id -u` -eq 0; then \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+        if test "@OS_MAJOR@" -eq 8 -a `id -u` -eq 0; then \
</span>             GID=`${DSCL} -q . -read "/Groups/${RUNUSR}" PrimaryGroupID | /usr/bin/awk '{print $$2}'` ; \
             if test "`${DSCL} -q . -read "/Users/${RUNUSR}" PrimaryGroupID 2>/dev/null | /usr/bin/awk '{print $$2}'`" != "$$GID"; then \
                 echo "Fixing PrimaryGroupID for user \"${RUNUSR}\"" ; \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/portmgr/dmg/postflight.in b/portmgr/dmg/postflight.in
</span><span style='display:block; white-space:pre;color:#808080;'>index 7d2a4997..7232a979 100755
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/portmgr/dmg/postflight.in
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/portmgr/dmg/postflight.in
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -43,6 +43,7 @@ SBINPATH=${PREFIX}/sbin
</span> CONFIGPATH=${PREFIX}/etc/macports
 MANPAGES=${PREFIX}/share/man
 DSCL=/usr/bin/dscl
<span style='display:block; white-space:pre;background:#e0ffe0;'>+OS_MAJOR=$(uname -r | cut -d . -f 1)
</span> RUNUSR=macports
 TCLSH="@TCLSH@"
 TCL_PACKAGE_PATH="@TCL_PACKAGE_PATH@"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -182,7 +183,7 @@ function create_run_user {
</span>         ${DSCL} -q . -create "/Users/${RUNUSR}" NFSHomeDirectory "${PREFIX}/var/macports/home"
         ${DSCL} -q . -create "/Users/${RUNUSR}" UserShell /usr/bin/false
     fi
<span style='display:block; white-space:pre;background:#ffe0e0;'>-    if [[ $(sw_vers -productVersion | /usr/bin/awk -F . '{print $2}') -eq 4 ]]; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+    if [[ "${OS_MAJOR}" -eq 8 ]]; then
</span>         GID=$(${DSCL} -q . -read "/Groups/${RUNUSR}" PrimaryGroupID | /usr/bin/awk '{print $2}')
         if [[ "$(${DSCL} -q . -read "/Users/${RUNUSR}" PrimaryGroupID 2>/dev/null | /usr/bin/awk '{print $2}')" != "$GID" ]]; then
             echo "Fixing PrimaryGroupID for user \"${RUNUSR}\""
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -279,7 +280,7 @@ if /usr/bin/su "${USER}" -l -c "/usr/bin/printenv MANPATH" > /dev/null; then
</span> fi
 
 # Adding a DISPLAY variable only if we're running on Tiger or less and if it doesn't already exist:
<span style='display:block; white-space:pre;background:#ffe0e0;'>-if (($(sw_vers -productVersion | awk -F . '{print $2}') >= 5)) || /usr/bin/su "${USER}" -l -c "/usr/bin/printenv DISPLAY" > /dev/null > /dev/null; then
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if [[ "${OS_MAJOR}" -ge 9 ]] || /usr/bin/su "${USER}" -l -c "/usr/bin/printenv DISPLAY" > /dev/null; then
</span>     echo "Your shell already has the right DISPLAY environment variable for use with MacPorts!"
 else
     write_setting DISPLAY ":0"
</pre><pre style='margin:0'>

</pre>