davidandreoletti/boostoniphone-generic — pull request #2 by paleozogt (2013-01-28 23:28:50+00:00)
Title: fix detection of COMPILER_ARM_PATH/COMPILER_SIM_PATH

The detection of COMPILER_ARM_PATH/COMPILER_SIM_PATH is broken. Since it uses /usr/bin/clang, it might get a version that doesn't work with what boost sees when it uses the actual SDK binaries. While this will compile fine, it breaks the lipo step of the script, as it doesn't know where to find the .a files.

For example, the script may detect darwin-4.1 like this:
```
COMPILER_SIM_PATH: /usr/bin/clang++
COMPILER_ARM_PATH: /usr/bin/clang
COMPILER_ARM_VERSION: 4.1
COMPILER_SIM_VERSION: 4.1
```

But then boost builds files with different naming (darwin-5.1):
```
...found 14 targets...
...updating 8 targets...
common.mkdir bin.v2
common.mkdir bin.v2/libs
common.mkdir bin.v2/libs/regex
common.mkdir bin.v2/libs/regex/build
common.mkdir bin.v2/libs/regex/build/darwin-5.1~iphone
common.mkdir bin.v2/libs/regex/build/darwin-5.1~iphone/debug
darwin.compile.c++ bin.v2/libs/regex/build/darwin-5.1~iphone/debug/has_icu_test.o
```

Finally, the lipo step falls down because the script thinks files are in darwin-4.1 while boost actually built them in darwin5.1:
```
Splitting all existing fat binaries...
lipo: can't open input file: /Users/asimmons/Development/boostoniphone-generic/src/boost_1_44_0/bin.v2/libs/date_time/build/darwin-4.1~iphone/release/architecture-arm/link-static/macosx-version-iphone-6.0/pch-off/target-os-iphone/threading-multi/libboost_date_time.a (No such file or directory)
lipo: can't open input file: /Users/asimmons/Development/boostoniphone-generic/src/boost_1_44_0/bin.v2/libs/date_time/build/darwin-4.1~iphone/release/architecture-arm/link-static/macosx-version-iphone-6.0/pch-off/target-os-iphone/threading-multi/libboost_date_time.a (No such file or directory)
```

The solution to this problem is to change what the script uses to detect the darwin version. This pull request fixes that.