Changeset 43281


Ignore:
Timestamp:
Dec 8, 2008, 6:28:38 AM (9 years ago)
Author:
mcalhoun@…
Message:

boost: version update 1.35.0 -> 1.37.0
Use MacPorts zlib and bzip2.
Ensure that correct c++ compiler is used.
Add python 2.6 support.
Add variant descriptions.
Split complete variant into debug and st variants.
Libraries no longer contain compiler name and version number.
Attempt to fix #15664, #15671, #16378, #17338, #17405, and #13843 (maintainer timeout).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/devel/boost/Portfile

    r39290 r43281  
    44
    55name                    boost
    6 version                 1.35.0
    7 revision                2
     6version                 1.37.0
    87categories              devel
    9 maintainers             sanchom@gmail.com
     8maintainers             gmail.com:sanchom
    109description             Collection of portable C++ source libraries
    1110long_description        Boost provides free portable peer-reviewed C++ \
     
    1615distname                ${name}_[strsed ${version} {g/[.]/_/}]
    1716use_bzip2               yes
    18 checksums               md5 dce952a7214e72d6597516bcac84048b
     17checksums               md5 8d9f990bfb7e83769fa5f1d6f065bc92 \
     18                        sha1 c0d0cf9ad8d954507824aed51a3e93e6a9da1d99 \
     19                        rmd160 3c4cf7eb97a8fb126e564ba529ed9edec8765185
    1920platforms               darwin
    2021use_parallel_build      yes
    2122
    22 patchfiles              patch-tools-build-v2-tools-darwin.jam \
    23                         patch-boost-serialization-utility.hpp \
    24                         patch-configure
     23patchfiles              patch-configure.diff
    2524
    26 depends_build           bin:bjam:boost-jam
     25depends_build           path:bin/bjam:boost-jam
     26depends_lib             port:zlib port:bzip2
     27
     28build.env-append        BZIP2_INCLUDE=${prefix}/include BZIP2_LIBPATH=${prefix}/lib \
     29                        ZLIB_INCLUDE=${prefix}/include ZLIB_LIBPATH=${prefix}/lib
     30destroot.env-append     BZIP2_INCLUDE=${prefix}/include BZIP2_LIBPATH=${prefix}/lib \
     31                        ZLIB_INCLUDE=${prefix}/include ZLIB_LIBPATH=${prefix}/lib
    2732
    2833platform darwin 9 {
     
    3136}
    3237
     38post-patch {
     39        # --layout=system
     40        #     (don't put compiler name or version number in the libraries;
     41        #      don't put version number in the include directory)
     42        #     [default: off]
     43        #
     44        # link=shared,static (build static and dynamic libraries)
     45        #     [default: link=shared,static]
     46        #
     47        # runtime-link=shared,static
     48        #     (link to static and shared C and C++ runtime (e.g. use -lstdc++-static))
     49        #     static runtime-link libraries are of the form *-s.a or -sd.a
     50        #     [default: runtime-link=shared]
     51        #
     52        # threading=single,multi
     53        #     (build single- and multi-threaded libraries)
     54        #     multi-threaded libraries are of the form of *-mt.dylib, -mt-d.dylib, *-mt.a, *-mt-s.a, *-mt-d.a, or *-mt-ds.a
     55        #     [default: threading=multi]
     56        #
     57        # debug release
     58        #     (buil debug and release versions of libraries)
     59        #     debug libraries are of the form *-d.dylib, *-d.a, or *-ds.a
     60        #     [default: release]
     61        #
     62        set bjam_config "--layout=system link=shared,static runtime-link=shared,static"
     63        if { [variant_isset st] } {
     64                append bjam_config " threading=single,multi"
     65        }
     66        if { [variant_isset debug] } {
     67                append bjam_config " debug release"
     68        }
     69        reinplace "s|__MACPORTS_BJAM_CONFIG__|${bjam_config}|" ${worksrcpath}/configure
     70}
     71
     72post-configure {
     73        # Ensure that the coorect compiler is used
     74        reinplace "s|using darwin ;|using darwin : : ${configure.cxx} ;|" ${worksrcpath}/user-config.jam
     75}
     76
    3377platform darwin {
    3478        post-destroot {
    35 
    36                 # get the library version as it shows up in the library names:
    37                 # eg. 1_35
    38                 # this should be ...] 0 2] {_}] when 1_35_1 and later come out
    39                 set libver [join [lrange [split ${version} {.}] 0 1] {_}]
    40                
    4179                # ensure the identification name of the dynamic libraries agree
    4280                # with their final destination path (not the destroot path that
    4381                # they've just been installed to)
    44                 foreach lib [glob -directory ${destroot}${prefix}/lib/ *-${libver}.dylib] {
     82                foreach lib [glob -directory ${destroot}${prefix}/lib/ *.dylib] {
    4583                        set libtail [file tail ${lib}]
    4684                        system "install_name_tool -id ${prefix}/lib/${libtail} ${lib}"
    4785                }
     86
    4887                # set the install_name for every library referenced by another library
    4988                # to include the final destination path as well
    50                 foreach lib [glob -directory ${destroot}${prefix}/lib/ *-${libver}.dylib] {
    51                         set libtail [file tail ${lib}]
    52                         set installed_name ${prefix}/lib/${libtail}
    53                         foreach lib2 [glob -directory ${destroot}${prefix}/lib/ *-${libver}.dylib] {
    54                                 system "install_name_tool -change ${libtail} ${installed_name} ${lib2}"
     89                foreach lib [glob -tails -directory ${destroot}${prefix}/lib/ *.dylib] {
     90                        set installed_name ${prefix}/lib/${lib}
     91                        foreach lib2 [glob -directory ${destroot}${prefix}/lib/ *.dylib *.so] {
     92                                system "install_name_tool -change ${lib} ${installed_name} ${lib2}"
    5593                        }
    5694                }
    5795
    58                 # create relative symbolic links to the versioned libraries (.dylib only;
    59                 # .a were built with unversioned extensions that are duplicate files of the
    60                 # versioned extensions... handled next)
    61                 foreach lib [glob -directory ${destroot}${prefix}/lib/ *-${libver}.dylib] {
    62                         set libtail [file tail ${lib}]
    63                         set libroot [join [lrange [split [file rootname ${lib}] {-}] 0 end-1] {-}]
    64                         set libname [file tail ${libroot}]
    65                         set libext [file extension ${lib}]
    66                         set liblink "${libroot}${libext}"
    67                         if {![catch {set libtype [file type ${liblink}]}]} {
    68                                 if {${libtype} == "link"} {
    69                                         file delete -force ${liblink}
    70                                 }
     96                # mpi.so needs to be in a specific directory for Python to find it
     97                if { [file exists ${destroot}${prefix}/lib/mpi.so] } {
     98                        # Can be removed once MacPorts 1.7.0 is released
     99                        if {![info exists frameworks_dir]} {
     100                                set frameworks_dir ${prefix}/Library/Frameworks
    71101                        }
    72                         system "cd  ${destroot}${prefix}/lib;ln -s ${libtail} ${libname}${libext}"
     102                        if { [variant_isset python24] } {
     103                                set spkg ${prefix}/lib/python2.4/site-packages
     104                        } elseif { [variant_isset python25] } {
     105                                set spkg ${prefix}/lib/python2.5/site-packages
     106                        } elseif { [variant_isset python26] } {
     107                                set spkg ${frameworks_dir}/Python.framework/Versions/2.6/lib/python2.6/site-packages
     108                        }
     109
     110                        set sodir ${spkg}/boost
     111                        xinstall -m 755 -d ${destroot}${sodir}
     112                        touch ${destroot}${sodir}/__init__.py
     113                        system "install_name_tool -id ${sodir}/mpi.so ${destroot}${prefix}/lib/mpi.so"
     114                        move ${destroot}${prefix}/lib/mpi.so ${destroot}${sodir}/mpi.so
    73115                }
    74 
    75                 # change the duplicated non-version-named .a libraries to
    76                 # symbolic links to the version-named .a libraries
    77                 foreach lib [glob -directory ${destroot}${prefix}/lib/ *-${libver}.a] {
    78                         set libtail [file tail ${lib}]
    79                         set libroot [join [lrange [split [file rootname ${lib}] {-}] 0 end-1] {-}]
    80                         set libname [file tail ${libroot}]
    81                         set libext [file extension ${lib}]
    82                         set liblink "${libroot}${libext}"
    83                         # if this file is around, it is a duplicate, delete it
    84                         if {[file exists ${liblink}]} {
    85                                 file delete -force ${liblink}
    86                         }
    87                         # add a symbolic link instead
    88                         system "cd  ${destroot}${prefix}/lib; ln -s ${libtail} ${libname}${libext}"
    89                 }
    90                
    91                 # create a symbolic link in the include directory pointing to the current
    92                 # version of the boost include directory (e.g. boost-1_35/boost -> include/boost)
    93                 system "cd  ${destroot}${prefix}/lib; ln -fs boost-${libver}/boost ${destroot}${prefix}/include/boost"
    94116        }
    95117}
    96118
    97 destroot.args           PREFIX=${destroot}${prefix} EPREFIX=${destroot}${prefix} \
    98                         LIBDIR=${destroot}${prefix}/lib INCLUDEDIR=${destroot}${prefix}/include \
    99                         install
     119destroot.destdir        prefix=${destroot}${prefix}
    100120
    101121configure.args          --without-libraries=python --without-icu --with-bjam=${prefix}/bin/bjam
    102122
    103 variant python24 conflicts python25 {
     123variant python24 description {build python 2.4 support} conflicts python25 python26 {
    104124        set pyversion           2.4
    105         depends_lib-append      lib:libpython${pyversion}:python[strsed ${pyversion} {g/[.]//}]
     125        depends_lib-append      port:python[strsed ${pyversion} {g/[.]//}]
    106126
    107127        configure.args-delete   --without-libraries=python
    108         configure.args-append   --with-python=python${pyversion}
     128        configure.args-append   --with-python=${prefix}/bin/python${pyversion}
    109129}
    110130
    111 variant python25 conflicts python24 {
     131variant python25 description {build python 2.5 support} conflicts python24 python26 {
    112132        set pyversion           2.5
    113         depends_lib-append      lib:libpython${pyversion}:python[strsed ${pyversion} {g/[.]//}]
     133        depends_lib-append      port:python[strsed ${pyversion} {g/[.]//}]
    114134
    115135        configure.args-delete   --without-libraries=python
    116         configure.args-append   --with-python=python${pyversion}
     136        configure.args-append   --with-python=${prefix}/bin/python${pyversion}
    117137}
    118138
    119 variant icu {
     139variant python26 description {build python 2.6 support} conflicts python24 python25 {
     140        set pyversion           2.6
     141        depends_lib-append      port:python[strsed ${pyversion} {g/[.]//}]
     142
     143        configure.args-delete   --without-libraries=python
     144        configure.args-append   --with-python=${prefix}/bin/python${pyversion}
     145}
     146
     147variant icu description {enable Unicode/ICU support in Regex} {
    120148        depends_lib-append      port:icu
    121149
     
    124152}
    125153
    126 variant graphml {
     154variant graphml description {enable GraphML support} {
    127155        depends_lib-append      port:expat
    128156
    129         configure.env-append    EXPAT_INCLUDE=${prefix}/include EXPAT_LIBPATH=${prefix}/lib
    130157        build.env-append            EXPAT_INCLUDE=${prefix}/include EXPAT_LIBPATH=${prefix}/lib
     158        destroot.env-append         EXPAT_INCLUDE=${prefix}/include EXPAT_LIBPATH=${prefix}/lib
    131159}
    132160
    133 variant openmpi {
     161variant openmpi description {build mpi support} {
    134162        depends_lib-append      port:openmpi
    135163
    136164    post-configure {
    137         set config [open user-config.jam a]
    138         puts ${config} "using mpi : ${prefix}/bin/openmpicxx ;"
     165        set config [open ${worksrcpath}/user-config.jam a]
     166        puts ${config} "\nusing mpi : ${prefix}/bin/openmpicxx ;"
    139167        close ${config}
    140168    }
    141169}
    142170
    143 variant docs {
     171variant docs description {install documentation} {
    144172    post-destroot {
    145173        # Install HTML documentation
     
    151179        file copy ${worksrcpath}/tools ${destroot}${prefix}/share/doc/${name}
    152180        file copy ${worksrcpath}/libs ${destroot}${prefix}/share/doc/${name}
     181        file copy ${worksrcpath}/wiki ${destroot}${prefix}/share/doc/${name}
    153182    }
    154183}
    155184
    156 # Should no longer conflict with icu in version 1.35.1, see:
    157 # http://svn.boost.org/trac/boost/ticket/1928
    158 variant complete conflicts icu description {Build all library types (debug, static, single-threaded)} {
    159     patchfiles-append   patch-build-type-Jamroot
    160 }
     185variant debug description {build debug libraries} {}
     186
     187variant st description {build single-threaded libraries} {}
Note: See TracChangeset for help on using the changeset viewer.