Ticket #17405: Portfile.patch
File Portfile.patch, 7.5 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.37.0 7 revision 3 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 8d9f990bfb7e83769fa5f1d6f065bc92 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_37 46 # this should be ...] 0 2] {_}] when 1_37_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] || [variant_isset python26] ) } { 68 if { [variant_isset python24] } { set pyversion 2.4 } 69 if { [variant_isset python25] } { set pyversion 2.5 } 70 if { [variant_isset python26] } { set pyversion 2.6 } 71 set spkg "${prefix}/Library/Frameworks/Python.framework/Versions/${pyversion}/lib/python${pyversion}/site-packages/boost/" 72 xinstall -m 755 -d "${destroot}${spkg}" 73 system "touch \"${destroot}${spkg}/__init__.py\"" 74 system "chmod 0644 \"${destroot}${spkg}/__init__.py\"" 75 system "chown -R root:admin \"${destroot}${spkg}/__init__.py\"" 76 foreach mpiso [exec find "${worksrcpath}/bin.v2/libs/mpi" -iname "mpi.so"] { 77 xinstall -m 755 "${mpiso}" "${destroot}${spkg}" 78 system "install_name_tool -id ${spkg}mpi.so ${destroot}${spkg}mpi.so" 79 foreach blib [regexp -all -inline -- {libboost_\S+\.dylib} [exec otool -L "${destroot}${spkg}mpi.so"] ] { 80 system "install_name_tool -change ${blib} ${prefix}/lib/${blib} ${destroot}${spkg}mpi.so" 81 } 82 } 83 } 84 85 } 86 87 post-destroot { 88 36 89 # 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 out90 # eg. 1_37 91 # this should be ...] 0 2] {_}] when 1_37_1 and later come out 39 92 set libver [join [lrange [split ${version} {.}] 0 1] {_}] 40 93 41 94 # ensure the identification name of the dynamic libraries agree … … 89 142 } 90 143 91 144 # 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)145 # version of the boost include directory (e.g. boost-1_37/boost -> include/boost) 93 146 system "cd ${destroot}${prefix}/lib; ln -fs boost-${libver}/boost ${destroot}${prefix}/include/boost" 147 94 148 } 95 }96 149 97 destroot.args PREFIX=${destroot}${prefix} EPREFIX=${destroot}${prefix} \ 98 LIBDIR=${destroot}${prefix}/lib INCLUDEDIR=${destroot}${prefix}/include \ 99 install 150 } 100 151 101 152 configure.args --without-libraries=python --without-icu --with-bjam=${prefix}/bin/bjam 102 153 103 variant python24 conflicts python25 { 154 variant gcc42 description conflicts gcc43 {Build with gcc42} { 155 configure.compiler macports-gcc-4.2 156 depends_lib-append port:gcc42 157 post-configure { 158 # This gives us many "unrecognized option '-no-cpp-precomp'" warnings; they appear harmless 159 system "perl -ne 's@using darwin ;@using darwin : : ${prefix}/bin/g++-mp-4.2 ;@; print;' < user-config.jam > tmp.jam" 160 system "mv tmp.jam user-config.jam" 161 } 162 } 163 164 variant gcc43 description conflicts gcc42 {Build with gcc43} { 165 configure.compiler macports-gcc-4.3 166 depends_lib-append port:gcc43 167 post-configure { 168 # This gives us many "unrecognized option '-no-cpp-precomp'" warnings; they appear harmless 169 system "perl -ne 's@using darwin ;@using darwin : : ${prefix}/bin/g++-mp-4.3 ;@; print;' < user-config.jam > tmp.jam" 170 system "mv tmp.jam user-config.jam" 171 } 172 } 173 174 variant python24 conflicts python25 python26 { 104 175 set pyversion 2.4 105 176 depends_lib-append lib:libpython${pyversion}:python[strsed ${pyversion} {g/[.]//}] 106 107 177 configure.args-delete --without-libraries=python 108 178 configure.args-append --with-python=python${pyversion} 109 179 } 110 180 111 variant python25 conflicts python24 {181 variant python25 conflicts python24 python26 { 112 182 set pyversion 2.5 113 183 depends_lib-append lib:libpython${pyversion}:python[strsed ${pyversion} {g/[.]//}] 184 configure.args-delete --without-libraries=python 185 configure.args-append --with-python=python${pyversion} 186 } 114 187 188 variant python26 conflicts python24 python25 { 189 set pyversion 2.6 190 depends_lib-append lib:libpython${pyversion}:python[strsed ${pyversion} {g/[.]//}] 115 191 configure.args-delete --without-libraries=python 116 192 configure.args-append --with-python=python${pyversion} 117 193 } 118 194 119 195 variant icu { 120 196 depends_lib-append port:icu 121 122 197 configure.args-delete --without-icu 123 198 configure.args-append --with-icu=${prefix} 124 199 } 125 200 126 201 variant graphml { 127 202 depends_lib-append port:expat 128 129 203 configure.env-append EXPAT_INCLUDE=${prefix}/include EXPAT_LIBPATH=${prefix}/lib 130 204 build.env-append EXPAT_INCLUDE=${prefix}/include EXPAT_LIBPATH=${prefix}/lib 131 205 } 132 206 133 207 variant openmpi { 134 208 depends_lib-append port:openmpi 135 136 209 post-configure { 137 210 set config [open user-config.jam a] 138 211 puts ${config} "using mpi : ${prefix}/bin/openmpicxx ;" … … 153 226 } 154 227 } 155 228 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)} { 229 variant complete description {Build all library types (debug, static, single-threaded)} { 159 230 patchfiles-append patch-build-type-Jamroot 160 231 }