Ticket #1516: patch-preview.txt

File patch-preview.txt, 1.7 KB (added by wish, 5 years ago)

Added by email2trac

Line 
1
2[Fix #1516: get link target with bare readlink and OS release from sw_vers on MacOS X
3William Hay (AKA w.hay@ucl.ac.uk) <wish@dumain.com>**20150516141550
4 Ignore-this: 867f89b6e391ab693b6a84cc3cc1316e
5 This patch was created by examining the context free diff submitted by Craig <cestark@uci.edu>
6 and manually making the changes it made where they seem sensible. 
7] hunk ./source/aimk 1087
8       set DEBUG_FLAG = "$DEBUG_FLAG -fprofile-arcs -ftest-coverage"
9    endif
10 
11- -   set REL = `/usr/bin/uname -r`
12+   set REL = `/usr/bin/sw_vers -productVersion`
13    switch ($REL)
14    # These used to define DARWIN7 and DARWIN8, but they're unused.
15    case "7.*":
16hunk ./source/aimk.site 39
17 switch($buildarch)
18    case "aix51":
19    case "darwin":
20+   case "darwin-x64":
21    case "win32-x86":
22    case cygwin-*:
23       set argv = ( -no-jni -no-java $* )
24hunk ./source/aimk.site 97
25    # assuming we have readlink(1).
26    if ( $status == 0 && { test -L "$JAVAC_BIN" } ) then
27        if ( -f /usr/bin/readlink || -f /bin/readlink ) then
28- -          set JAVAC_BIN = `readlink -f "$JAVAC_BIN"`
29+          if($buildarch == "darwin-x64") then
30+             set JAVAC_BIN=`readlink "$JAVAC_BIN"`
31+          else
32+             set JAVAC_BIN=`readlink -f "$JAVAC_BIN"`
33+          endif
34        endif
35    endif
36 
37hunk ./source/dist/util/arch 107
38    esac
39    ;;
40 Darwin)
41+   osrelease=`/usr/bin/sw_vers -productVersion`
42    case $osmachine in
43hunk ./source/dist/util/arch 109
44- -      i386)
45+      i386|x86_64)
46          case $osrelease in
47             10.1.*)
48                darwin_machine=x86
49hunk ./source/dist/util/arch 114
50                ;;
51- -            10.[2-8].*)
52+            10.[2-9].*|10.10.*)
53                darwin_machine=x64
54                ;;
55             *)
56