1 | # -*- coding: utf-8; mode: tcl; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; truncate-lines: t -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 72782 2010-10-26 19:34:05Z michaelld@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name root |
---|
7 | version 5.28.00c |
---|
8 | revision 0 |
---|
9 | categories science |
---|
10 | maintainers gmail.com:mattiafrancescomoro |
---|
11 | license LGPLv2.1 |
---|
12 | description Root cern data analysis framework |
---|
13 | long_description The ROOT system provides a set of frameworks with all \ |
---|
14 | the functionality needed to handle and analyze large amounts \ |
---|
15 | of data in a very efficient way |
---|
16 | homepage http://root.cern.ch/ |
---|
17 | platforms darwin |
---|
18 | distname ${name}_v${version}.source |
---|
19 | master_sites ftp://root.cern.ch/root/ |
---|
20 | |
---|
21 | checksums md5 0e997f14cb1c671987e1780d2b6375f8 \ |
---|
22 | sha1 d92569b06fd2b34bf44d077cca8b3b9ebc4d1dd5 \ |
---|
23 | rmd160 5ce591b1f67121f1e78aeb30ec4fbffcf0318b2d |
---|
24 | |
---|
25 | worksrcdir root |
---|
26 | |
---|
27 | depends_lib port:freetype \ |
---|
28 | port:pcre \ |
---|
29 | port:Xft2 \ |
---|
30 | port:xorg-libX11 \ |
---|
31 | port:xpm \ |
---|
32 | port:zlib \ |
---|
33 | port:gsl \ |
---|
34 | port:graphviz \ |
---|
35 | port:jpeg \ |
---|
36 | port:libpng \ |
---|
37 | port:tiff |
---|
38 | |
---|
39 | pre-configure { |
---|
40 | build.args CC=${configure.cc} \ |
---|
41 | CXX=${configure.cxx} \ |
---|
42 | F77=${configure.f77} |
---|
43 | |
---|
44 | reinplace "s|-lfreetype| \`freetype-config --libs\`|g" ${worksrcpath}/config/root-config.in |
---|
45 | reinplace "s|\"/usr/include\"|\"${prefix}/include/\" \"/usr/include\"|g" ${worksrcpath}/configure |
---|
46 | reinplace "s|/usr/lib |${prefix}/lib /usr/lib |g" ${worksrcpath}/configure |
---|
47 | reinplace "s|/usr/include |${prefix}/include /usr/include |g" ${worksrcpath}/configure |
---|
48 | reinplace "s|\"/usr/lib\"|\"${prefix}/lib/\" \"/usr/lib\"g|" ${worksrcpath}/configure |
---|
49 | |
---|
50 | # the build type (32 or 64 bit) -must- be for first argument |
---|
51 | if {${build_arch} == "i386" || ${build_arch} == "ppc"} { |
---|
52 | configure.pre_args macosx --prefix=${prefix} |
---|
53 | } else { |
---|
54 | configure.pre_args macosx64 --prefix=${prefix} |
---|
55 | } |
---|
56 | } |
---|
57 | |
---|
58 | configure.args --with-cc=${configure.cc} \ |
---|
59 | --with-f77=${configure.f77} \ |
---|
60 | --with-cxx=${configure.cxx} \ |
---|
61 | --docdir=${prefix}/share/doc/${name}-${version} \ |
---|
62 | --libdir=${prefix}/lib/root \ |
---|
63 | --testdir=${prefix}/share/root/test \ |
---|
64 | --tutdir=${prefix}/share/root/tutorials \ |
---|
65 | --etcdir=${prefix}/etc/root \ |
---|
66 | --disable-builtin-afterimage \ |
---|
67 | --disable-builtin-freetype \ |
---|
68 | --disable-builtin-glew \ |
---|
69 | --disable-builtin-ftgl \ |
---|
70 | --disable-builtin-pcre \ |
---|
71 | --disable-builtin-zlib \ |
---|
72 | --disable-fftw3 \ |
---|
73 | --disable-krb5 \ |
---|
74 | --disable-ldap \ |
---|
75 | --disable-mysql \ |
---|
76 | --disable-odbc \ |
---|
77 | --disable-opengl \ |
---|
78 | --disable-pythia8 \ |
---|
79 | --disable-qt \ |
---|
80 | --disable-qtgsi \ |
---|
81 | --disable-roofit \ |
---|
82 | --disable-ssl \ |
---|
83 | --disable-xml \ |
---|
84 | --disable-python \ |
---|
85 | --with-x11-libdir=${prefix}/lib \ |
---|
86 | --with-xpm-libdir=${prefix}/lib |
---|
87 | |
---|
88 | universal_variant no |
---|
89 | |
---|
90 | default_variants +ssl +builtin_ftgl +roofit +xml +opengl +python |
---|
91 | |
---|
92 | variant fftw3 description {Builds port with fftw3 support} { |
---|
93 | configure.args-delete --disable-fftw3 |
---|
94 | configure.args-append --enable-fftw3 \ |
---|
95 | --with-fftw3-incdir="${prefix}/include/" \ |
---|
96 | --with-fftw3-libdir="${prefix}/lib" |
---|
97 | depends_lib-append port:fftw-3 |
---|
98 | } |
---|
99 | |
---|
100 | variant kerberos5 description {Builds port with kerberos5 support} { |
---|
101 | configure.args-delete --disable-krb5 |
---|
102 | configure.args-append --enable-krb5 \ |
---|
103 | --with-krb5-incdir="${prefix}/include/" \ |
---|
104 | --with-krb5-libdir="${prefix}/lib" |
---|
105 | depends_lib-append port:kerberos5 |
---|
106 | } |
---|
107 | |
---|
108 | variant odbc description {Builds port with odbc support} { |
---|
109 | configure.args-delete --disable-odbc |
---|
110 | configure.args-append --enable-odbc\ |
---|
111 | --with-odbc-incdir="${prefix}/include/" \ |
---|
112 | --with-odbc-libdir="${prefix}/lib" |
---|
113 | depends_lib-append port:unixODBC |
---|
114 | } |
---|
115 | |
---|
116 | variant ldap description {Builds port with lpap support} { |
---|
117 | configure.args-delete --disable-ldap |
---|
118 | configure.args-append --enable-ldap\ |
---|
119 | --with-ldap-incdir="${prefix}/include/" \ |
---|
120 | --with-ldap-libdir="${prefix}/lib" |
---|
121 | depends_lib-append port:openldap |
---|
122 | } |
---|
123 | |
---|
124 | variant roofit description { Build the libRooFit advanced fitting package} { |
---|
125 | configure.args-delete --disable-roofit |
---|
126 | configure.args-append --enable-roofit |
---|
127 | } |
---|
128 | |
---|
129 | variant opengl description {Builds port with opengl support} { |
---|
130 | configure.args-delete --disable-opengl |
---|
131 | configure.args-append --enable-opengl \ |
---|
132 | --with-opengl-incdir="${prefix}/include" \ |
---|
133 | --with-opengl-libdir="${prefix}/lib" \ |
---|
134 | --with-glew-incdir="${prefix}/include/" \ |
---|
135 | --with-glew-libdir="${prefix}/lib" |
---|
136 | depends_lib-append port:glew |
---|
137 | } |
---|
138 | |
---|
139 | variant python description {Builds port with python support} { |
---|
140 | configure.args-delete --disable-python |
---|
141 | configure.args-append --enable-python |
---|
142 | depends_lib-append port:python26 |
---|
143 | } |
---|
144 | |
---|
145 | variant ssl description {Builds port with ssl support} { |
---|
146 | configure.args-delete --disable-ssl |
---|
147 | configure.args-append --enable-ssl \ |
---|
148 | --with-ssl-shared=yes \ |
---|
149 | --with-ssl-incdir="${prefix}/include" \ |
---|
150 | --with-ssl-libdir="${prefix}/lib" |
---|
151 | depends_lib-append port:openssl |
---|
152 | } |
---|
153 | |
---|
154 | variant builtin_ftgl description {Builds port with builtin-ftgl support} { |
---|
155 | configure.args-delete --disable-builtin-ftgl |
---|
156 | configure.args-append --enable-builtin-ftgl |
---|
157 | } |
---|
158 | |
---|
159 | variant ftgl description {Builds port with ftgl support} { |
---|
160 | configure.args-append --with-ftgl-incdir="${prefix}/include" \ |
---|
161 | --with-ftgl-libdir="${prefix}/lib" |
---|
162 | depends_lib-append port:ftgl |
---|
163 | } |
---|
164 | |
---|
165 | variant xml description {Builds port with xml support} { |
---|
166 | configure.args-delete --disable-xml |
---|
167 | configure.args-append --enable-xml \ |
---|
168 | --with-xml-incdir="${prefix}/include/libxml2" \ |
---|
169 | --with-xml-libdir="${prefix}/lib" |
---|
170 | depends_lib-append port:libxml2 |
---|
171 | } |
---|
172 | |
---|
173 | variant qt_x11 conflicts qt_mac description {Builds port with Qt support via X11 UI} { |
---|
174 | # fix where "qglobal.h" is found in all files that use or reference it |
---|
175 | post-patch { |
---|
176 | foreach tpf { configure graf2d/qt/src/TGQt.cxx } { |
---|
177 | reinplace "s@Qt/qglobal\\.h@QtCore/qglobal\\.h@g" \ |
---|
178 | ${worksrcpath}/${tpf} |
---|
179 | } |
---|
180 | reinplace "/qttestdir/s@Qt@QtCore@g" ${worksrcpath}/configure |
---|
181 | } |
---|
182 | |
---|
183 | configure.env-append QTDIR=${prefix}/libexec/qt4-x11 |
---|
184 | configure.args-delete --disable-qt |
---|
185 | configure.args-append --enable-qt |
---|
186 | depends_lib-append port:qt4-x11 |
---|
187 | } |
---|
188 | |
---|
189 | if {[variant_isset qt_mac]} { |
---|
190 | PortGroup qt4 1.0 |
---|
191 | } |
---|
192 | |
---|
193 | variant qt_mac conflicts qt_x11 description {Builds port with Qt support via Mac UI} { |
---|
194 | post-patch { |
---|
195 | # fix where "qglobal.h" is found in all files that use or reference it |
---|
196 | foreach tpf { configure graf2d/qt/src/TGQt.cxx } { |
---|
197 | reinplace "s@Qt/qglobal\\.h@QtCore/qglobal\\.h@g" \ |
---|
198 | ${worksrcpath}/${tpf} |
---|
199 | } |
---|
200 | reinplace "/qttestdir/s@Qt@QtCore@g" ${worksrcpath}/configure |
---|
201 | |
---|
202 | # fix library search extensions to include ".la" |
---|
203 | # for Qt framework libraries (only) |
---|
204 | reinplace "s@\\(\\.so \\.sl \\.dylib \\.dll\\.a\\)@\\1 \\.la@g" \ |
---|
205 | ${worksrcpath}/configure |
---|
206 | } |
---|
207 | |
---|
208 | configure.args-delete --disable-qt |
---|
209 | configure.args-append --enable-qt |
---|
210 | |
---|
211 | post-configure { |
---|
212 | # patch up the Makefile.config to handle the QTLIB frameworks correctly |
---|
213 | reinplace "/QTLIB\[ \]/s@:= @:= -F${qt_libs_dir} @" \ |
---|
214 | ${worksrcpath}/config/Makefile.config |
---|
215 | reinplace "/QTLIB\[ \]/s@\\(Qt\[^ \]*\\).la@-framework \\1@g" \ |
---|
216 | ${worksrcpath}/config/Makefile.config |
---|
217 | } |
---|
218 | } |
---|
219 | |
---|
220 | variant mysql description {Builds port with mysql support} { |
---|
221 | configure.args-delete --disable-mysql |
---|
222 | configure.args-append --enable-mysql \ |
---|
223 | --with-mysql-incdir="${prefix}/include/" \ |
---|
224 | --with-mysql-libdir="${prefix}/lib" |
---|
225 | depends_lib-append port:mysql5 |
---|
226 | } |
---|
227 | |
---|
228 | variant pythia description {Pythia support for root} { |
---|
229 | configure.args-delete --disable-pythia8 |
---|
230 | configure.args-append --enable-pythia8 \ |
---|
231 | --with-pythia8-incdir=${prefix}/include \ |
---|
232 | --with-pythia8-libdir=${prefix}/lib |
---|
233 | depends_lib-append port:pythia |
---|
234 | } |
---|
235 | |
---|
236 | variant gfortran description {Adds support for fortran compilation} { |
---|
237 | configure.args-append --with-f77=gfortran-mp-4.2 |
---|
238 | depends_lib-append port:gcc42 |
---|
239 | } |
---|
240 | |
---|
241 | livecheck.type regex |
---|
242 | livecheck.url [lindex ${master_sites} 0] |
---|
243 | livecheck.regex ${name}_v(\[0-9a-z.\]+)\\.source |
---|