Ticket #47438: patch-buildsystem.diff

File patch-buildsystem.diff, 3.7 KB (added by gallafent, 9 years ago)

Revised buildsystem patch, adding detection of Xcode 6.3

  • build.sh

    old new  
    1212# Beware: GNU libtool cannot handle directory names containing whitespace.
    1313#         Therefore, do not set M_CONF_TMPDIR to such a directory.
    1414#
    15 readonly M_CONF_TMPDIR=/tmp
     15readonly M_CONF_TMPDIR=@@TMP@@
    1616readonly M_PLISTSIGNER_TEST_KEY="`dirname $0`/prefpane/autoinstaller/TestKeys/private_key.der"
    1717
    1818# Other constants
     
    105105declare M_XCODE62=""
    106106declare M_XCODE62_VERSION=6.2
    107107readonly M_XCODE62_COMPILER="com.apple.compilers.llvm.clang.1_0"
     108declare M_XCODE63=""
     109declare M_XCODE63_VERSION=6.3
     110readonly M_XCODE63_COMPILER="com.apple.compilers.llvm.clang.1_0"
    108111
    109112declare M_ACTUAL_PLATFORM=""
    110113declare M_PLATFORMS=""
     
    104104declare M_XCODE_VERSION_REQUIRED=""
    105105
    106106# SDK 10.5
    107 readonly M_SDK_105_ARCHS="ppc ppc64 i386 x86_64"
     107readonly M_SDK_105_ARCHS="@@ARCHS@@"
    108108declare M_SDK_105=""
    109109declare M_SDK_105_XCODE=""
    110110declare M_SDK_105_COMPILER=""
    111111
    112112# SDK 10.6
    113 readonly M_SDK_106_ARCHS="i386 x86_64"
     113readonly M_SDK_106_ARCHS="@@ARCHS@@"
    114114declare M_SDK_106=""
    115115declare M_SDK_106_XCODE=""
    116116declare M_SDK_106_COMPILER=""
    117117
    118118# SDK 10.7
    119 readonly M_SDK_107_ARCHS="i386 x86_64"
     119readonly M_SDK_107_ARCHS="@@ARCHS@@"
    120120declare M_SDK_107=""
    121121declare M_SDK_107_XCODE=""
    122122declare M_SDK_107_COMPILER=""
    123123
    124124# SDK 10.8
    125 readonly M_SDK_108_ARCHS="i386 x86_64"
     125readonly M_SDK_108_ARCHS="@@ARCHS@@"
    126126declare M_SDK_108=""
    127127declare M_SDK_108_XCODE=""
    128128declare M_SDK_108_COMPILER=""
    129129
    130130# SDK 10.9
    131 readonly M_SDK_109_ARCHS="i386 x86_64"
     131readonly M_SDK_109_ARCHS="@@ARCHS@@"
    132132declare M_SDK_109=""
    133133declare M_SDK_109_XCODE=""
    134134declare M_SDK_109_COMPILER=""
    135135
    136136# SDK 10.10
    137 readonly M_SDK_1010_ARCHS="i386 x86_64"
     137readonly M_SDK_1010_ARCHS="@@ARCHS@@"
    138138declare M_SDK_1010=""
    139139declare M_SDK_1010_XCODE=""
    140140declare M_SDK_1010_COMPILER=""
     
    18801880
    18811881    local ms_osxfuse_out="$M_CONF_TMPDIR/osxfuse-homebrew-$ms_os_version-$ms_osxfuse_version"
    18821882    local ms_osxfuse_build="$ms_osxfuse_out/build/"
    1883     local ms_osxfuse_root="$m_prefix"
     1883    local ms_osxfuse_root="@@DESTROOT@@$m_prefix"
    18841884
    18851885    if [ -e "$ms_osxfuse_out" ]
    18861886    then
     
    19841984    xcrun make -j4 >$m_stdout 2>$m_stderr
    19851985    m_exit_on_error "make failed while compiling the OSXFUSE library."
    19861986
    1987     xcrun make install >$m_stdout 2>$m_stderr
     1987    xcrun make install DESTDIR="@@DESTROOT@@" >$m_stdout 2>$m_stderr
    19881988    m_exit_on_error "cannot prepare library build for installation."
    19891989
    19901990    for f in "$ms_osxfuse_root"/lib/libosxfuse_i64*.dylib; do
     
    25692572                    M_XCODE62_VERSION=$m_xcode_version
    25702573                fi
    25712574                ;;
     2575            6.3*)
     2576                m_version_compare $M_XCODE63_VERSION $m_xcode_version
     2577                if [[ $? != 2 ]]
     2578                then
     2579                    M_XCODE63="$m_xcode_root"
     2580                    M_XCODE63_VERSION=$m_xcode_version
     2581                fi
     2582                ;;
    25722583            *)
    25732584                m_log "skip unsupported Xcode version in '$m_xcode_root'."
    25742585                ;;
     
    27862797        M_SDK_1010_COMPILER="$M_XCODE62_COMPILER"
    27872798        m_platform_realistic_add "10.10"
    27882799    fi
     2800    if [[ -n "$M_XCODE63" ]]
     2801    then
     2802        m_xcode_latest="$M_XCODE63"
     2803
     2804        M_SDK_109="$M_XCODE63/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"
     2805        M_SDK_109_XCODE="$M_XCODE63"
     2806        M_SDK_109_COMPILER="$M_XCODE63_COMPILER"
     2807        m_platform_realistic_add "10.9"
     2808        m_platform_add "10.10"
     2809
     2810        M_SDK_1010="$M_XCODE63/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk"
     2811        M_SDK_1010_XCODE="$M_XCODE63"
     2812        M_SDK_1010_COMPILER="$M_XCODE63_COMPILER"
     2813        m_platform_realistic_add "10.10"
     2814    fi
    27892815
    27902816    m_read_input "$@"
    27912817