From b738de2fe943e610467c99fac55cabb949a7da5a Mon Sep 17 00:00:00 2001
From: Alex Smith <alex@alex-smith.me.uk>
Date: Tue, 10 Jul 2012 10:22:07 +0100
Subject: [PATCH] Fixed Mac OS X 10.7 as a build platform.
* Use gcc and g++ rather than cc and c++, as the latter now point to
clang with recent Xcode versions and compilation of the host tools
fail for various reasons with it.
* Replace the case-sensitive filesystem check with a more basic one,
as diskutil no longer supports the behaviour of getting info for the
volume that any path is on.
* Updated ReadMe with a correct list of prerequisites for OS X.
---
ReadMe | 7 +++++++
build/jam/BuildSetup | 7 +++++++
configure | 19 +++++++++++--------
3 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/ReadMe b/ReadMe
index 70ad15e..77ec0e9 100644
a
|
b
|
The following darwin ports need to be installed:
|
75 | 75 | * libiconv |
76 | 76 | * gnuregex |
77 | 77 | * gsed |
| 78 | * cdrtools |
| 79 | * yasm |
| 80 | * wget |
| 81 | * less |
| 82 | * mpfr |
| 83 | * gmp |
| 84 | * libmpc |
78 | 85 | |
79 | 86 | More information about individual distributions of Linux and BSD can be found |
80 | 87 | at http://haiku-os.org/guides/building/pre-reqs |
diff --git a/build/jam/BuildSetup b/build/jam/BuildSetup
index dd4a91d..87129f4 100644
a
|
b
|
if $(HOST_PLATFORM) = linux || $(HOST_PLATFORM) = freebsd
|
609 | 609 | } |
610 | 610 | } |
611 | 611 | |
| 612 | # On recent versions of OS X cc and c++ point to clang, which fails to |
| 613 | # compile some of the host tools. As a workaround, force use of GCC. |
| 614 | if $(HOST_PLATFORM) = darwin { |
| 615 | HOST_CC = gcc ; |
| 616 | HOST_C++ = g++ ; |
| 617 | } |
| 618 | |
612 | 619 | if $(HOST_PLATFORM) = cygwin { |
613 | 620 | HOST_LINKFLAGS += -Xlinker --allow-multiple-definition -Xlinker |
614 | 621 | --enable-auto-import ; |
diff --git a/configure b/configure
index 9d6ca5a..39d894c 100755
a
|
b
|
for sfdiskDir in /sbin /usr/sbin /usr/local/sbin ; do
|
471 | 471 | fi |
472 | 472 | done |
473 | 473 | |
474 | | # check for case-sensitive filesystem if on darwin |
475 | | if [ $HOST_PLATFORM = "darwin" ]; then |
476 | | diskutil info $(pwd)/.. | grep -i "case-sensitive" > /dev/null |
477 | | if [ $? != 0 ]; then |
478 | | echo "You need a case-sensitive file-system to build Haiku." |
479 | | echo "Please see the following guide on how to set one up:" |
480 | | echo "http://haiku-os.org/documents/dev/how_to_build_haiku_on_mac_os_x" |
481 | | exit 1 |
| 474 | # check for case-sensitive filesystem |
| 475 | mkdir haikuCaseTest 2>/dev/null |
| 476 | mkdir haikucasetest 2>/dev/null |
| 477 | caseInsensitive=$? |
| 478 | rm -df haikuCaseTest haikucasetest |
| 479 | if [ $caseInsensitive != 0 ]; then |
| 480 | echo "You need a case-sensitive file-system to build Haiku." |
| 481 | if [ $HOST_PLATFORM = "darwin" ]; then |
| 482 | echo "You can create a case-sensitive disk image using Disk Utility and use" |
| 483 | echo "it to store the Haiku sources on." |
482 | 484 | fi |
| 485 | exit 1 |
483 | 486 | fi |
484 | 487 | |
485 | 488 | # create output directory |