Ticket #39719: patch-README.macos.diff

File patch-README.macos.diff, 2.8 KB (added by gallafent, 10 years ago)
  • ./README.macos

    old new  
    2727
    2828The next pieces need to be compiled manually. To ensure compatibility with multiple mac os version it is recommended to do:
    2929 $ export MACOSX_DEPLOYMENT_TARGET=10.6
    30  $ export CFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=10.5"
    31  $ export OBJCFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=10.5"
    32  $ export CXXFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=10.5"
    33  $ export LDFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=10.5 -Wl,-headerpad_max_install_names -Wl,-read_only_relocs -Wl,suppress"
     30 $ export CFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=10.7"
     31 $ export OBJCFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=10.7"
     32 $ export CXXFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=10.7"
     33 $ export LDFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=10.7 -Wl,-headerpad_max_install_names -Wl,-read_only_relocs -Wl,suppress"
    3434
    3535- (Optional) libvpx-1.2 has a bug on macos resulting in ugly video. It is recommended to upgrade it manually to 1.3 from source.
    3636  The libvpx build isn't able to produce dual architecture files. To workaround this, configure libvpx twice and use lipo to create a dual architecture
     
    6464 $ sudo port install cmake
    6565 $ git clone https://github.com/wernerd/ZRTPCPP.git
    6666 $ cd ZRTPCPP
    67  $ cmake -DCORE_LIB=true -DSDES=false CMAKE_INSTALL_NAME_DIR=/usr/local/lib/ -DCMAKE_C_FLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=10.5" -DCMAKE_CXX_FLAGS="-arch i386 -arch x86_64 --stdlib=libstdc++ -std=c++11 -lstdc++ -mmacosx-version-min=10.5"  -DCMAKE_C_COMPILER=`xcrun --find clang` -DCMAKE_CXX_COMPILER=`xcrun --find clang` .
     67 $ cmake -DCORE_LIB=true -DSDES=false CMAKE_INSTALL_NAME_DIR=/usr/local/lib/ -DCMAKE_C_FLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=10.7" -DCMAKE_CXX_FLAGS="-arch i386 -arch x86_64 --stdlib=libstdc++ -std=c++11 -lstdc++ -mmacosx-version-min=10.7"  -DCMAKE_C_COMPILER=`xcrun --find clang` -DCMAKE_CXX_COMPILER=`xcrun --find clang` .
    6868$ sudo make install
    6969
    7070
     
    135135 $ wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
    136136 $ cd libiconv-1.14
    137137 $ patch -p1 < ../linphone/build/macos/libiconv-macos.patch
    138  $ ./configure --prefix=/opt/local --disable-static 'CFLAGS=-arch i386 -arch x86_64 -mmacosx-version-min=10.5' 'LDFLAGS=-arch i386 -arch x86_64 -mmacosx-version-min=10.5'  CXXFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=10.5" && make
     138 $ ./configure --prefix=/opt/local --disable-static 'CFLAGS=-arch i386 -arch x86_64 -mmacosx-version-min=10.7' 'LDFLAGS=-arch i386 -arch x86_64 -mmacosx-version-min=10.7'  CXXFLAGS="-arch i386 -arch x86_64 -mmacosx-version-min=10.7" && make
    139139 $ make install DESTDIR=/tmp
    140140
    141141The resulted library can be found in /tmp/opt/local/lib