Ticket #19834: boost-1.39.0.diff
File boost-1.39.0.diff, 13.1 KB (added by nox@…, 15 years ago) |
---|
-
files/libs-random-build-Jamfile.v2
1 # Copyright (c) 2006 Tiziano Mueller 2 # 3 # Use, modification and distribution of the file is subject to the 4 # Boost Software License, Version 1.0. 5 # (See at http://www.boost.org/LICENSE_1_0.txt) 6 7 8 project boost/random 9 : source-location ../ ; 10 11 SOURCES = random_device ; 12 13 lib boost_random 14 : $(SOURCES).cpp 15 : <link>shared:<define>BOOST_RANDOM_DYN_LINK=1 ; -
files/patch-configure.diff
1 --- configure.orig 2008-04-29 14:46:53.000000000 -04002 +++ configure 2008-12-07 13:24:30.000000000 -05003 @@ -9,7 +9,11 @@4 5 BJAM=""6 TOOLSET=""7 -BJAM_CONFIG=""8 +BJAM_CONFIG="__MACPORTS_BJAM_CONFIG__"9 +# Handle MACOSX_DEPLOYMENT_TARGET10 +if test "x$MACOSX_DEPLOYMENT_TARGET" != x; then11 + BJAM_CONFIG="$BJAM_CONFIG macosx-version=$MACOSX_DEPLOYMENT_TARGET"12 +fi13 BUILD=""14 PREFIX=/usr/local15 EPREFIX= -
files/patch-libs-mpi-build-Jamfile.v2.diff
1 --- libs/mpi/build/Jamfile.v2.orig 2009-06-11 01:57:28.000000000 +0200 2 +++ libs/mpi/build/Jamfile.v2 2009-06-11 01:57:28.000000000 +0200 3 @@ -99,6 +99,7 @@ 4 <link>shared:<define>BOOST_PYTHON_DYN_LINK=1 5 <link>shared 6 <variant>release 7 + <threading>multi 8 ; 9 } 10 } -
files/patch-libs-random-random_device.cpp.diff
1 --- libs/random/random_device.cpp.orig 2009-06-11 15:27:21.000000000 +0200 2 +++ libs/random/random_device.cpp 2009-06-11 15:28:01.000000000 +0200 3 @@ -22,7 +22,7 @@ 4 #endif 5 6 7 -#if defined(__linux__) || defined (__FreeBSD__) 8 +#if defined(__linux__) || defined (__FreeBSD__) || defined(__APPLE__) 9 10 // the default is the unlimited capacity device, using some secure hash 11 // try "/dev/random" for blocking when the entropy pool has drained -
Portfile
3 3 PortSystem 1.0 4 4 5 5 name boost 6 version 1.3 8.06 version 1.39.0 7 7 categories devel 8 8 maintainers gmail.com:sanchom 9 9 description Collection of portable C++ source libraries 10 long_description 10 long_description Boost provides free portable peer-reviewed C++ \ 11 11 libraries. The emphasis is on portable libraries \ 12 12 which work well with the C++ Standard Library. 13 13 homepage http://www.boost.org 14 14 master_sites sourceforge 15 distname ${name}_[ strsed ${version} {g/[.]/_/}]15 distname ${name}_[join [split ${version} .] _] 16 16 use_bzip2 yes 17 checksums md5 5eca2116d39d61382b8f8235915cb267\18 sha1 b32ff8133b0a38a74553c0d33cb1d70b3ce2d8f1\19 rmd160 1d7eb126151e4363ecd5617082cd45674f1352be17 checksums md5 a17281fd88c48e0d866e1a12deecbcc0 \ 18 sha1 6af42f74ab24ccc51589a025593bad298c8adde8 \ 19 rmd160 4962256b48fa8563bf373b8bed97cc8655206a51 20 20 platforms darwin 21 21 use_parallel_build yes 22 22 23 # not autoconf 24 universal_variant no 23 patchfiles patch-libs-random-random_device.cpp.diff 25 24 26 patchfiles patch-configure.diff 25 post-extract { 26 file mkdir ${worksrcpath}/libs/random/build 27 copy ${filesdir}/libs-random-build-Jamfile.v2 ${worksrcpath}/libs/random/build/Jamfile.v2 28 } 27 29 28 30 depends_build path:bin/bjam:boost-jam 29 31 depends_lib port:zlib port:bzip2 30 32 31 build.env-append BZIP2_INCLUDE=${prefix}/include BZIP2_LIBPATH=${prefix}/lib \ 32 ZLIB_INCLUDE=${prefix}/include ZLIB_LIBPATH=${prefix}/lib 33 destroot.env-append BZIP2_INCLUDE=${prefix}/include BZIP2_LIBPATH=${prefix}/lib \ 34 ZLIB_INCLUDE=${prefix}/include ZLIB_LIBPATH=${prefix}/lib 35 36 platform darwin 9 { 37 depends_build-append port:gmake 38 build.cmd gmake 33 configure { 34 reinplace -E "s|-install_name \"|&${prefix}/lib/|" \ 35 ${worksrcpath}/tools/build/v2/tools/darwin.jam 36 touch ${worksrcpath}/user-config.jam 39 37 } 40 38 41 post-patch { 42 # --layout=system 43 # (don't put compiler name or version number in the libraries; 44 # don't put version number in the include directory) 45 # [default: off] 46 # 47 # link=shared,static (build static and dynamic libraries) 48 # [default: link=shared,static] 49 # 50 # runtime-link=shared,static 51 # (link to static and shared C and C++ runtime (e.g. use -lstdc++-static)) 52 # static runtime-link libraries are of the form *-s.a or -sd.a 53 # [default: runtime-link=shared] 54 # 55 # threading=single,multi 56 # (build single- and multi-threaded libraries) 57 # 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 58 # [default: threading=multi] 59 # 60 # debug release 61 # (buil debug and release versions of libraries) 62 # debug libraries are of the form *-d.dylib, *-d.a, or *-ds.a 63 # [default: release] 64 # 65 set bjam_config "--layout=system link=shared,static runtime-link=shared,static" 66 if { [variant_isset st] } { 67 append bjam_config " threading=single,multi" 68 } 69 if { [variant_isset debug] } { 70 append bjam_config " debug release" 71 } 72 reinplace "s|__MACPORTS_BJAM_CONFIG__|${bjam_config}|" ${worksrcpath}/configure 73 } 39 build.cmd bjam [portbuild::build_getmakejobs] 40 build.target 41 build.args --toolset=darwin \ 42 --debug-configuration \ 43 --ignore-site-config \ 44 --user-config=user-config.jam \ 45 --without-python \ 46 --without-mpi \ 47 -sBZIP2_INCLUDE=${prefix}/include \ 48 -sBZIP2_LIBPATH=${prefix}/lib \ 49 -sZLIB_INCLUDE=${prefix}/include \ 50 -sZLIB_LIBPATH=${prefix}/lib 74 51 75 post-configure { 76 # Ensure that the correct compiler is used 77 reinplace "s|using darwin ;|using darwin : : ${configure.cxx} ;|" ${worksrcpath}/user-config.jam 52 destroot.cmd bjam 53 destroot.destdir --prefix=${destroot}${prefix} 54 55 pre-destroot { 56 eval destroot.args ${build.args} 78 57 } 79 58 80 platform darwin { 81 post-destroot { 82 # ensure the identification name of the dynamic libraries agree 83 # with their final destination path (not the destroot path that 84 # they've just been installed to) 85 foreach lib [glob -directory ${destroot}${prefix}/lib/ *.dylib] { 86 set libtail [file tail ${lib}] 87 system "install_name_tool -id ${prefix}/lib/${libtail} ${lib}" 88 } 59 set pythons_suffixes {24 25 26} 89 60 90 # set the install_name for every library referenced by another library 91 # to include the final destination path as well 92 foreach lib [glob -tails -directory ${destroot}${prefix}/lib/ *.dylib] { 93 set installed_name ${prefix}/lib/${lib} 94 foreach lib2 [glob -directory ${destroot}${prefix}/lib/ *.dylib *.so] { 95 system "install_name_tool -change ${lib} ${installed_name} ${lib2}" 96 } 97 } 61 set pythons_ports {} 62 foreach s ${pythons_suffixes} { 63 lappend pythons_ports python${s} 64 } 98 65 99 # mpi.so needs to be in a specific directory for Python to find it 100 if { [file exists ${destroot}${prefix}/lib/mpi.so] } { 101 if { [variant_isset python24] } { 102 set spkg ${prefix}/lib/python2.4/site-packages 103 } elseif { [variant_isset python25] } { 104 set spkg ${prefix}/lib/python2.5/site-packages 105 } elseif { [variant_isset python26] } { 106 set spkg ${frameworks_dir}/Python.framework/Versions/2.6/lib/python2.6/site-packages 107 } 108 109 set sodir ${spkg}/boost 110 xinstall -m 755 -d ${destroot}${sodir} 111 touch ${destroot}${sodir}/__init__.py 112 system "install_name_tool -id ${sodir}/mpi.so ${destroot}${prefix}/lib/mpi.so" 113 move ${destroot}${prefix}/lib/mpi.so ${destroot}${sodir}/mpi.so 66 proc python_dir {} { 67 global pythons_suffixes 68 foreach s ${pythons_suffixes} { 69 if {[variant_isset python${s}]} { 70 set p python[string index ${s} 0].[string index ${s} 1] 71 return [exec ${p} -c "import sys; print sys.prefix"]/lib/${p}/site-packages 114 72 } 115 73 } 74 error "Python support not enabled." 116 75 } 117 76 118 destroot.destdir prefix=${destroot}${prefix} 119 120 configure.args --without-libraries=python --without-icu --with-bjam=${prefix}/bin/bjam 121 122 variant python24 description {build python 2.4 support} conflicts python25 python26 { 123 set pyversion 2.4 124 depends_lib-append port:python[strsed ${pyversion} {g/[.]//}] 125 126 configure.args-delete --without-libraries=python 127 configure.args-append --with-python=${prefix}/bin/python${pyversion} 77 proc write_jam s { 78 global worksrcpath 79 set config [open ${worksrcpath}/user-config.jam a] 80 puts ${config} ${s} 81 close ${config} 128 82 } 129 83 130 variant python25 description {build python 2.5 support} conflicts python24 python26 { 131 set pyversion 2.5 132 depends_lib-append port:python[strsed ${pyversion} {g/[.]//}] 84 foreach s ${pythons_suffixes} { 85 set p python${s} 86 set v [string index ${s} 0].[string index ${s} 1] 87 set i [lsearch -exact ${pythons_ports} ${p}] 88 set c [lreplace ${pythons_ports} ${i} ${i}] 89 eval [subst { 90 variant ${p} description "Build Boost.Python for Python ${v}" conflicts ${c} { 91 depends_lib-append port:${p} 92 build.args-delete --without-python 133 93 134 configure.args-delete --without-libraries=python 135 configure.args-append --with-python=${prefix}/bin/python${pyversion} 94 post-configure { 95 write_jam "using python : : ${prefix}/bin/python${v} ;" 96 } 97 } 98 }] 136 99 } 137 100 138 variant python26 description {build python 2.6 support} conflicts python24 python25 { 139 set pyversion 2.6 140 depends_lib-append port:python[strsed ${pyversion} {g/[.]//}] 141 142 configure.args-delete --without-libraries=python 143 configure.args-append --with-python=${prefix}/bin/python${pyversion} 144 } 145 146 variant icu description {enable Unicode/ICU support in Regex} { 101 variant icu description {Enable Unicode support in Boost.Regex through ICU} { 147 102 depends_lib-append port:icu 148 149 configure.args-delete --without-icu 150 configure.args-append --with-icu=${prefix} 103 build.args-append -sICU_PATH=${prefix} 151 104 } 152 105 153 variant graphml description { enable GraphML support} {106 variant graphml description {Enable GraphML support in Boost.Graph} { 154 107 depends_lib-append port:expat 155 156 build.env-append EXPAT_INCLUDE=${prefix}/include EXPAT_LIBPATH=${prefix}/lib 157 destroot.env-append EXPAT_INCLUDE=${prefix}/include EXPAT_LIBPATH=${prefix}/lib 108 build.args-append -sEXPAT_INCLUDE=${prefix}/include \ 109 -sEXPAT_LIBPATH=${prefix}/lib 158 110 } 159 111 160 variant openmpi description { build mpi support} {112 variant openmpi description {Build Boost.MPI} { 161 113 depends_lib-append port:openmpi 114 build.args-delete --without-mpi 162 115 163 post-configure { 164 set config [open ${worksrcpath}/user-config.jam a] 165 puts ${config} "\nusing mpi : ${prefix}/bin/openmpicxx ;" 166 close ${config} 167 } 116 post-configure { 117 write_jam "using mpi : ${prefix}/bin/openmpic++ : : ${prefix}/bin/openmpirun ;" 118 } 119 120 if {![catch python_dir]} { 121 if {[variant_isset st]} { 122 patchfiles-append patch-libs-mpi-build-Jamfile.v2.diff 123 } 124 125 post-destroot { 126 set site_packages [python_dir] 127 xinstall -d ${destroot}${site_packages}/boost 128 xinstall -m 644 ${worksrcpath}/libs/mpi/build/__init__.py \ 129 ${destroot}${site_packages}/boost 130 131 set l ${site_packages}/boost/mpi.so 132 move ${destroot}${prefix}/lib/mpi.so ${destroot}${l} 133 system "install_name_tool -id ${l} ${destroot}${l}" 134 } 135 } 168 136 } 169 137 170 variant docs description {install documentation} { 171 post-destroot { 172 # Install HTML documentation 173 xinstall -d ${destroot}${prefix}/share/doc/${name} 174 xinstall -W ${worksrcpath} index.htm index.html boost.css rst.css boost.png \ 175 ${destroot}${prefix}/share/doc/${name} 176 file copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/${name} 177 file copy ${worksrcpath}/more ${destroot}${prefix}/share/doc/${name} 178 file copy ${worksrcpath}/tools ${destroot}${prefix}/share/doc/${name} 179 file copy ${worksrcpath}/libs ${destroot}${prefix}/share/doc/${name} 180 file copy ${worksrcpath}/wiki ${destroot}${prefix}/share/doc/${name} 181 } 138 variant debug description {Build debug libraries} { 139 build.args-append variant=debug,release 182 140 } 183 141 184 variant debug description {build debug libraries} {} 142 variant doc description {Install documentation} { 143 post-destroot { 144 set docdir ${prefix}/share/doc/${name}-${version} 145 xinstall -d ${destroot}${docdir} 146 set l [expr [string length ${worksrcpath}] + 1] 147 fs-traverse f [glob -directory ${worksrcpath} *] { 148 set dest ${destroot}${docdir}/[string range ${f} ${l} end] 149 if {[file isdirectory ${f}]} { 150 xinstall -d ${dest} 151 } elseif {[lsearch -exact {css htm html png svg} [string range [file extension ${f}] 1 end]] != -1} { 152 xinstall -m 644 ${f} ${dest} 153 } 154 } 155 } 156 } 185 157 186 variant st description {build single-threaded libraries} {} 158 variant st description {Build single-threaded libraries} { 159 build.args-append threading=single,multi 160 } 161 162 variant universal { 163 # TODO: Handle 64 bits adressing. 164 build.args-append architecture=combined 165 }