# $Id: Portfile 37656 2008-06-17 18:26:21Z jmr@macports.org $ PortSystem 1.0 name boost version 1.35.0 revision 2 categories 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 platforms darwin patchfiles patch-tools-build-v2-tools-darwin.jam \ patch-boost-serialization-utility.hpp 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 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 }