Ticket #12096: Portfile.diff
File Portfile.diff, 4.5 KB (added by sanchom (Sancho McCann), 17 years ago) |
---|
-
Portfile
old new 1 # $Id: Portfile 20404 200 6-11-03 02:13:21Z jberry@macports.org$1 # $Id: Portfile 20404 2007-06-09 17:39:21Z sanchom@gmail.com $ 2 2 3 3 PortSystem 1.0 4 4 5 5 name boost 6 version 1.3 3.16 version 1.34.0 7 7 categories devel 8 maintainers nomaintainer@macports.org8 maintainers sanchom@gmail.com 9 9 description Collection of portable C++ source libraries 10 10 long_description Boost provides free portable peer-reviewed C++ \ 11 11 libraries. The emphasis is on portable libraries \ … … 14 14 master_sites sourceforge 15 15 distname ${name}_[strsed ${version} {g/[.]/_/}] 16 16 use_bzip2 yes 17 checksums md5 2b999b2fb7798e1737d1fff8fac602ef17 checksums md5 ed5b9291ffad776f8757a916e1726ad0 18 18 platforms darwin 19 19 20 20 depends_build bin:bjam:boost-jam 21 21 22 patchfiles patch-libs-test-build-Jamfile \23 patch-tools-build-v1-allyourbase.jam24 25 # Note: Boost will not build properly on Jaguar (to my knowledge)26 # Additional note: MACOSX_DEPLOYMENT_TARGET of at least 10.3 necessary27 # to allow dynamic lookup at runtime, preventing libtool to fail when28 # building tests29 30 22 platform darwin { 31 build.env-append MACOSX_DEPLOYMENT_TARGET=10.332 build.args-append -sTOOLS=darwin33 34 destroot.env-append MACOSX_DEPLOYMENT_TARGET=10.335 destroot.args-append -sTOOLS=darwin36 23 post-destroot { 37 24 cd ${destroot}${prefix}/lib 38 set libver [join [lrange [split ${version} {.}] 0 2] {_}] 25 26 # get the library version as it shows up in the library names: 27 # eg. 1_34 28 set libver [join [lrange [split ${version} {.}] 0 1] {_}] 29 30 # ensure the identification name of the dynamic libraries agree 31 # with their final destination path (not the destroot path that 32 # they've just been installed to) 39 33 foreach lib [glob *-${libver}.dylib] { 40 34 system "install_name_tool -id ${prefix}/lib/${lib} ${lib}" 41 35 } 42 foreach lib [glob *-${libver}.a *-${libver}.dylib] { 36 37 # create relative symbolic links to the versioned libraries (.dylib only; 38 # .a were built with unversioned extensions that are duplicate files of the 39 # versioned extensions... handled next) 40 foreach lib [glob *-${libver}.dylib] { 43 41 set libname [join [lrange [split [file rootname ${lib}] {-}] 0 end-1] {-}] 44 42 set libext [file extension ${lib}] 45 43 set liblink "${libname}${libext}" … … 50 48 } 51 49 system "ln -s ${lib} ${liblink}" 52 50 } 53 }54 }55 51 56 use_configure no 57 58 build.cmd bjam 59 build.pre_args --prefix=${prefix} 60 build.args --without-python \ 61 -sgPYTHON_CONFIG_CHECKED=true \ 62 -sgNO_PYTHON_INSTALL=true 63 64 destroot.cmd bjam 65 destroot.pre_args --prefix=${destroot}${prefix} 66 destroot.args --without-python \ 67 -sgPYTHON_CONFIG_CHECKED=true \ 68 -sgNO_PYTHON_INSTALL=true 69 destroot.post_args install 70 post-destroot { 71 set incdirver [join [lrange [split ${version} {.}] 0 2] {_}] 72 system "ln -fs boost-${incdirver}/boost ${destroot}${prefix}/include/boost" 52 # change the duplicated non-version-named .a libraries to 53 # symbolic links to the version-named .a libraries 54 foreach lib [glob *-${libver}.a] { 55 set libname [join [lrange [split [file rootname ${lib}] {-}] 0 end-1] {-}] 56 set libext [file extension ${lib}] 57 set liblink "${libname}${libext}" 58 # if this file is around, it is a duplicate, delete it 59 if {[file exists ${liblink}]} { 60 file delete -force ${liblink} 61 } 62 # add a symbolic link instead 63 system "ln -s ${lib} ${liblink}" 64 } 65 } 73 66 } 74 67 75 variant icu { 76 depends_lib lib:libicuuc:icu 77 78 build.args-append -sHAVE_ICU=1 \ 79 -sICU_PATH=${prefix} 68 destroot.args PREFIX=${destroot}${prefix} EPREFIX=${destroot}${prefix} \ 69 LIBDIR=${destroot}${prefix}/lib INCLUDEDIR=${destroot}${prefix}/include \ 70 install 80 71 81 destroot.args-append -sHAVE_ICU=1 \ 82 -sICU_PATH=${prefix} 83 } 72 configure.args --without-libraries=python 84 73 85 74 variant python { 86 set pyversion 2.4 87 75 set pyversion 2.4 88 76 depends_lib lib:libpython${pyversion}:python[strsed ${pyversion} {g/[.]//}] 89 77 90 build.args-delete --without-python \ 91 -sgPYTHON_CONFIG_CHECKED=true \ 92 -sgNO_PYTHON_INSTALL=true 93 build.args-append -sPYTHON_ROOT=${prefix} \ 94 -sPYTHON_VERSION=${pyversion} \ 95 --with-python-root=${prefix} 96 97 destroot.args-delete --without-python \ 98 -sgPYTHON_CONFIG_CHECKED=true \ 99 -sgNO_PYTHON_INSTALL=true 100 destroot.args-append -sPYTHON_ROOT=${prefix} \ 101 -sPYTHON_VERSION=${pyversion} \ 102 --with-python-root=${prefix} 78 configure.args-delete --without-libraries=python 103 79 }