Ticket #13223: Portfile

File Portfile, 3.1 KB (added by ralf@…, 17 years ago)

fixed Portfile for OSX 10.5. Pulls in pristine GNU make on this platform (darwin 9).

Line 
1# $Id: Portfile 29408 2007-09-23 06:37:43Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name                    boost
6version                 1.34.1
7revision                1
8categories              devel
9maintainers             sanchom@gmail.com
10description             Collection of portable C++ source libraries
11long_description        Boost provides free portable peer-reviewed C++ \
12                        libraries. The emphasis is on portable libraries \
13                        which work well with the C++ Standard Library.
14homepage                http://www.boost.org
15master_sites            sourceforge
16distname                ${name}_[strsed ${version} {g/[.]/_/}]
17use_bzip2               yes
18checksums               md5 2d938467e8a448a2c9763e0a9f8ca7e5
19platforms               darwin
20
21depends_build           bin:bjam:boost-jam
22
23platform darwin 9 {
24        depends_build-append    port:gmake
25        build.env               MAKE=gmake
26}
27
28platform darwin {
29        post-destroot {
30                cd ${destroot}${prefix}/lib
31
32                # get the library version as it shows up in the library names:
33                # eg. 1_34_1
34                set libver [join [lrange [split ${version} {.}] 0 2] {_}]
35               
36                # ensure the identification name of the dynamic libraries agree
37                # with their final destination path (not the destroot path that
38                # they've just been installed to)
39                foreach lib [glob *-${libver}.dylib] {
40                        system "install_name_tool -id ${prefix}/lib/${lib} ${lib}"
41                }
42
43                # create relative symbolic links to the versioned libraries (.dylib only;
44                # .a were built with unversioned extensions that are duplicate files of the
45                # versioned extensions... handled next)
46                foreach lib [glob *-${libver}.dylib] {
47                        set libname [join [lrange [split [file rootname ${lib}] {-}] 0 end-1] {-}]
48                        set libext [file extension ${lib}]
49                        set liblink "${libname}${libext}"
50                        if {![catch {set libtype [file type ${liblink}]}]} {
51                                if {${libtype} == "link"} {
52                                        file delete -force ${liblink}
53                                }
54                        }
55                        system "ln -s ${lib} ${liblink}"
56                }
57
58                # change the duplicated non-version-named .a libraries to
59                # symbolic links to the version-named .a libraries
60                foreach lib [glob *-${libver}.a] {
61                        set libname [join [lrange [split [file rootname ${lib}] {-}] 0 end-1] {-}]
62                        set libext [file extension ${lib}]
63                        set liblink "${libname}${libext}"
64                        # if this file is around, it is a duplicate, delete it
65                        if {[file exists ${liblink}]} {
66                                file delete -force ${liblink}
67                        }
68                        # add a symbolic link instead
69                        system "ln -s ${lib} ${liblink}"
70                }
71               
72                # create a symbolic link in the include directory pointing to the current
73                # version of the boost include directory (e.g. boost-1_34_1/boost -> include/boost)
74                system "ln -fs boost-${libver}/boost ${destroot}${prefix}/include/boost"
75        }
76}
77
78destroot.args           PREFIX=${destroot}${prefix} EPREFIX=${destroot}${prefix} \
79                        LIBDIR=${destroot}${prefix}/lib INCLUDEDIR=${destroot}${prefix}/include \
80                        install
81
82configure.args          --without-libraries=python --without-icu
83
84variant python24 {
85        set pyversion           2.4
86        depends_lib             lib:libpython${pyversion}:python[strsed ${pyversion} {g/[.]//}]
87
88        configure.args-delete   --without-libraries=python
89}
90
91variant python25 {
92        set pyversion           2.5
93        depends_lib             lib:libpython${pyversion}:python[strsed ${pyversion} {g/[.]//}]
94
95        configure.args-delete   --without-libraries=python
96}
97variant icu {
98        depends_lib             port:icu
99
100        configure.args-delete   --without-icu
101        configure.args-append   --with-icu
102}