Boost version 1.35.0 - How to Download and Install on Mac OS X
Saturday the 4th of July, 2009

    version 1.35.0

      View the most recent changes for the boost port at: boost.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for boost.
      The raw portfile for boost 1.35.0 is located here:
      http://boost.darwinports.com/dports/devel/boost/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/boost


      The boost Portfile 39290 2008-08-16 04:11:19Z toby macports.org $

      PortSystem 1.0

      Name: boost
      Version: 1.35.0
      Revision: 2
      Category: devel
      Maintainers: sanchom gmail.com
      Description: Collection of portable C++ source libraries
      Long Description: Boost provides free portable peer-reviewed C++ libraries. The emphasis is on portable libraries which work well with the C++ Standard Library.
      Homepage: http://www.boost.org
      Master Sites: sourceforge
      distname ${name}_[strsed ${version} {g/[.]/_/}]
      use_bzip2 yes
      Checksums: md5 dce952a7214e72d6597516bcac84048b
      Platform: darwin
      use_parallel_build yes

      Patch Files: patch-tools-build-v2-tools-darwin.jam patch-boost-serialization-utility.hpp patch-configure

      depends_build bin:bjam:boost-jam

      platform darwin 9 {
      depends_build-append port:gmake
      build.cmd gmake
      }

      platform darwin {
      post-destroot {

      # get the library version as it shows up in the library names:
      # eg. 1_35
      # this should be ...] 0 2] {_}] when 1_35_1 and later come out
      set libver [join [lrange [split ${version} {.}] 0 1] {_}]

      # ensure the identification name of the dynamic libraries agree
      # with their final destination path (not the destroot path that
      # they've just been installed to)
      foreach lib [glob -directory ${destroot}${prefix}/lib/ *-${libver}.dylib] {
      set libtail [file tail ${lib}]
      system "install_name_tool -id ${prefix}/lib/${libtail} ${lib}"
      }
      # set the install_name for every library referenced by another library
      # to include the final destination path as well
      foreach lib [glob -directory ${destroot}${prefix}/lib/ *-${libver}.dylib] {
      set libtail [file tail ${lib}]
      set installed_name ${prefix}/lib/${libtail}
      foreach lib2 [glob -directory ${destroot}${prefix}/lib/ *-${libver}.dylib] {
      system "install_name_tool -change ${libtail} ${installed_name} ${lib2}"
      }
      }

      # create relative symbolic links to the versioned libraries (.dylib only;
      # .a were built with unversioned extensions that are duplicate files of the
      # versioned extensions... handled next)
      foreach lib [glob -directory ${destroot}${prefix}/lib/ *-${libver}.dylib] {
      set libtail [file tail ${lib}]
      set libroot [join [lrange [split [file rootname ${lib}] {-}] 0 end-1] {-}]
      set libname [file tail ${libroot}]
      set libext [file extension ${lib}]
      set liblink "${libroot}${libext}"
      if {![catch {set libtype [file type ${liblink}]}]} {
      if {${libtype} == "link"} {
      file delete -force ${liblink}
      }
      }
      system "cd ${destroot}${prefix}/lib;ln -s ${libtail} ${libname}${libext}"
      }

      # change the duplicated non-version-named .a libraries to
      # symbolic links to the version-named .a libraries
      foreach lib [glob -directory ${destroot}${prefix}/lib/ *-${libver}.a] {
      set libtail [file tail ${lib}]
      set libroot [join [lrange [split [file rootname ${lib}] {-}] 0 end-1] {-}]
      set libname [file tail ${libroot}]
      set libext [file extension ${lib}]
      set liblink "${libroot}${libext}"
      # if this file is around, it is a duplicate, delete it
      if {[file exists ${liblink}]} {
      file delete -force ${liblink}
      }
      # add a symbolic link instead
      system "cd ${destroot}${prefix}/lib; ln -s ${libtail} ${libname}${libext}"
      }

      # create a symbolic link in the include directory pointing to the current
      # version of the boost include directory (e.g. boost-1_35/boost -> include/boost)
      system "cd ${destroot}${prefix}/lib; ln -fs boost-${libver}/boost ${destroot}${prefix}/include/boost"
      }
      }

      destroot.args PREFIX=${destroot}${prefix} EPREFIX=${destroot}${prefix} LIBDIR=${destroot}${prefix}/lib INCLUDEDIR=${destroot}${prefix}/include install

      configure.args --without-libraries=python --without-icu --with-bjam=${prefix}/bin/bjam

      Variant: python24 conflicts python25 {
      set pyversion 2.4
      depends_lib-append lib:libpython${pyversion}:python[strsed ${pyversion} {g/[.]//}]

      configure.args-delete --without-libraries=python
      configure.args-append --with-python=python${pyversion}
      }

      Variant: python25 conflicts python24 {
      set pyversion 2.5
      depends_lib-append lib:libpython${pyversion}:python[strsed ${pyversion} {g/[.]//}]

      configure.args-delete --without-libraries=python
      configure.args-append --with-python=python${pyversion}
      }

      Variant: icu {
      depends_lib-append port:icu

      configure.args-delete --without-icu
      configure.args-append --with-icu=${prefix}
      }

      Variant: graphml {
      depends_lib-append port:expat

      configure.env-append EXPAT_INCLUDE=${prefix}/include EXPAT_LIBPATH=${prefix}/lib
      build.env-append EXPAT_INCLUDE=${prefix}/include EXPAT_LIBPATH=${prefix}/lib
      }

      Variant: openmpi {
      depends_lib-append port:openmpi

      post-configure {
      set config [open user-config.jam a]
      puts ${config} "using mpi : ${prefix}/bin/openmpicxx ;"
      close ${config}
      }
      }

      Variant: docs {
      post-destroot {
      # Install HTML documentation
      xinstall -d ${destroot}${prefix}/share/doc/${name}
      xinstall -W ${worksrcpath} index.htm index.html boost.css rst.css boost.png ${destroot}${prefix}/share/doc/${name}
      file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name}
      file copy ${worksrcpath}/more ${destroot}${prefix}/share/doc/${name}
      file copy ${worksrcpath}/tools ${destroot}${prefix}/share/doc/${name}
      file copy ${worksrcpath}/libs ${destroot}${prefix}/share/doc/${name}
      }
      }

      # Should no longer conflict with icu in version 1.35.1, see:
      # http://svn.boost.org/trac/boost/ticket/1928
      Variant: complete conflicts icu description {Build all library types (debug, static, single-threaded)} {
      patchfiles-append patch-build-type-Jamroot
      }

    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/boost
      % sudo port install boost
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching boost
      ---> Verifying checksum for boost
      ---> Extracting boost
      ---> Configuring boost
      ---> Building boost with target all
      ---> Staging boost into destroot
      ---> Installing boost
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using boost with these commands:
      %  man boost
      % apropos boost
      % which boost
      % locate boost

     Where to find more information:

    Darwin Ports



    Lightbox this page.