Ticket #16378: Portfile.diff
File Portfile.diff, 6.8 KB (added by adfernandes (Andrew Fernandes), 16 years ago) |
---|
-
Portfile
old new 3 3 PortSystem 1.0 4 4 5 5 name boost 6 version 1.3 5.07 revision 26 version 1.36.0 7 revision 0 8 8 categories devel 9 9 maintainers sanchom@gmail.com 10 10 description Collection of portable C++ source libraries … … 15 15 master_sites sourceforge 16 16 distname ${name}_[strsed ${version} {g/[.]/_/}] 17 17 use_bzip2 yes 18 checksums md5 dce952a7214e72d6597516bcac84048b18 checksums md5 328bfec66c312150e4c2a78dcecb504b 19 19 platforms darwin 20 20 use_parallel_build yes 21 21 22 patchfiles patch-tools-build-v2-tools-darwin.jam \ 23 patch-boost-serialization-utility.hpp \ 24 patch-configure 22 patchfiles patch-configure 25 23 26 24 depends_build bin:bjam:boost-jam 27 25 … … 31 29 } 32 30 33 31 platform darwin { 34 post-destroot {35 32 33 destroot { 34 35 # Rather than using 36 # 37 # destroot.args PREFIX=${destroot}${prefix} EPREFIX=${destroot}${prefix} \ 38 # LIBDIR=${destroot}${prefix}/lib INCLUDEDIR=${destroot}${prefix}/include \ 39 # install 40 # 41 # we use the following install script because boost's installer doesn't know how to handle mpi+python. 42 # See http://lists.boost.org/boost-build/2007/04/16338.php and http://lists.boost.org/boost-build/2007/04/16342.php 43 44 # get the library version as it shows up in the library names: 45 # eg. 1_36 46 # this should be ...] 0 2] {_}] when 1_36_1 and later come out 47 set libver [join [lrange [split ${version} {.}] 0 1] {_}] 48 49 # install the boost headers 50 xinstall -m 755 -d "${destroot}${prefix}/include/boost-${libver}" 51 system "cp -r ${worksrcpath}/boost ${destroot}${prefix}/include/boost-${libver}" 52 system "find ${destroot}${prefix}/include/boost-${libver} -type f -exec chmod 644 {} \\;" 53 system "find ${destroot}${prefix}/include/boost-${libver} -type d -exec chmod 755 {} \\;" 54 system "chown -R root:admin ${destroot}${prefix}/include/boost-${libver}" 55 56 # install the shared libraries 57 foreach dylib [exec find "${worksrcpath}/bin.v2" -iname "*.dylib"] { 58 xinstall -m 755 "${dylib}" "${destroot}${prefix}/lib" 59 } 60 61 # install the static libraries 62 foreach slib [exec find "${worksrcpath}/bin.v2" -iname "*.a"] { 63 xinstall -m 644 "${slib}" "${destroot}${prefix}/lib" 64 } 65 66 # python's mpi extension has an '.so' extension, and needs its installed-names changed 67 if { [variant_isset openmpi] && ( [variant_isset python24] || [variant_isset python25] ) } { 68 if { [variant_isset python24] } { set pyversion 2.4 } 69 if { [variant_isset python25] } { set pyversion 2.5 } 70 set spkg "${prefix}/lib/python${pyversion}/site-packages/" 71 xinstall -m 755 -d "${destroot}${spkg}" 72 foreach mpiso [exec find "${worksrcpath}/bin.v2/libs/mpi" -iname "mpi.so"] { 73 xinstall -m 755 "${mpiso}" "${destroot}${spkg}" 74 system "install_name_tool -id ${spkg}mpi.so ${destroot}${spkg}mpi.so" 75 foreach blib [regexp -all -inline -- {libboost_\S+\.dylib} [exec otool -L "${destroot}${spkg}mpi.so"] ] { 76 system "install_name_tool -change ${blib} ${prefix}/lib/${blib} ${destroot}${spkg}mpi.so" 77 } 78 } 79 } 80 81 } 82 83 post-destroot { 84 36 85 # get the library version as it shows up in the library names: 37 # eg. 1_3 538 # this should be ...] 0 2] {_}] when 1_3 5_1 and later come out86 # eg. 1_36 87 # this should be ...] 0 2] {_}] when 1_36_1 and later come out 39 88 set libver [join [lrange [split ${version} {.}] 0 1] {_}] 40 89 41 90 # ensure the identification name of the dynamic libraries agree … … 89 138 } 90 139 91 140 # create a symbolic link in the include directory pointing to the current 92 # version of the boost include directory (e.g. boost-1_3 5/boost -> include/boost)141 # version of the boost include directory (e.g. boost-1_36/boost -> include/boost) 93 142 system "cd ${destroot}${prefix}/lib; ln -fs boost-${libver}/boost ${destroot}${prefix}/include/boost" 143 94 144 } 95 }96 145 97 destroot.args PREFIX=${destroot}${prefix} EPREFIX=${destroot}${prefix} \ 98 LIBDIR=${destroot}${prefix}/lib INCLUDEDIR=${destroot}${prefix}/include \ 99 install 146 } 100 147 101 148 configure.args --without-libraries=python --without-icu --with-bjam=${prefix}/bin/bjam 102 149 150 variant gcc42 description conflicts gcc43 {Build with gcc42} { 151 configure.compiler macports-gcc-4.2 152 depends_lib-append port:gcc42 153 post-configure { 154 # This gives us many "unrecognized option '-no-cpp-precomp'" warnings; they appear harmless 155 system "perl -ne 's@using darwin ;@using darwin : : ${prefix}/bin/g++-mp-4.2 ;@; print;' < user-config.jam > tmp.jam" 156 system "mv tmp.jam user-config.jam" 157 } 158 } 159 160 variant gcc43 description conflicts gcc42 {Build with gcc43} { 161 configure.compiler macports-gcc-4.3 162 depends_lib-append port:gcc43 163 post-configure { 164 # This gives us many "unrecognized option '-no-cpp-precomp'" warnings; they appear harmless 165 system "perl -ne 's@using darwin ;@using darwin : : ${prefix}/bin/g++-mp-4.3 ;@; print;' < user-config.jam > tmp.jam" 166 system "mv tmp.jam user-config.jam" 167 } 168 } 169 103 170 variant python24 conflicts python25 { 104 171 set pyversion 2.4 105 172 depends_lib-append lib:libpython${pyversion}:python[strsed ${pyversion} {g/[.]//}] 106 107 173 configure.args-delete --without-libraries=python 108 174 configure.args-append --with-python=python${pyversion} 109 175 } … … 111 177 variant python25 conflicts python24 { 112 178 set pyversion 2.5 113 179 depends_lib-append lib:libpython${pyversion}:python[strsed ${pyversion} {g/[.]//}] 114 115 180 configure.args-delete --without-libraries=python 116 181 configure.args-append --with-python=python${pyversion} 117 182 } 118 183 119 184 variant icu { 120 185 depends_lib-append port:icu 121 122 186 configure.args-delete --without-icu 123 187 configure.args-append --with-icu=${prefix} 124 188 } 125 189 126 190 variant graphml { 127 191 depends_lib-append port:expat 128 129 192 configure.env-append EXPAT_INCLUDE=${prefix}/include EXPAT_LIBPATH=${prefix}/lib 130 193 build.env-append EXPAT_INCLUDE=${prefix}/include EXPAT_LIBPATH=${prefix}/lib 131 194 } 132 195 133 196 variant openmpi { 134 197 depends_lib-append port:openmpi 135 136 198 post-configure { 137 199 set config [open user-config.jam a] 138 200 puts ${config} "using mpi : ${prefix}/bin/openmpicxx ;" … … 153 215 } 154 216 } 155 217 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)} { 218 variant complete description {Build all library types (debug, static, single-threaded)} { 159 219 patchfiles-append patch-build-type-Jamroot 160 220 }