source: trunk/dports/science/root5/Portfile @ 139229

Last change on this file since 139229 was 139229, checked in by jeremyhu@…, 4 years ago

misc: Change port:openssl dependency to path:lib/libssl.dylib:openssl

This should allow usage of libressl as a replacement for openssl in relevant
ports. Not all ports have been tested, but libressl aims for API
compatibility with OpenSSL, so it is expected to work.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 26.7 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 139229 2015-08-08 03:10:35Z jeremyhu@macports.org $
3
4PortSystem          1.0
5
6PortGroup           active_variants 1.1
7PortGroup           select 1.0
8PortGroup           compiler_blacklist_versions 1.0
9PortGroup           github 1.0
10
11github.setup        root-mirror root 5-34-32 v
12version             5.34.32
13
14set version_major   [lindex [split ${version} .] 0]
15
16checksums           rmd160  2274c6e970da504a4adcf8e39eedecdee9e59521 \
17                    sha256  be5b0d8cc82f74e78a250b0a1327b57ca5a48e232e8d5bb2a5856ebbf95b8054
18
19name                root${version_major}
20categories          science
21maintainers         hep.phy.cam.ac.uk:jonesc gmail.com:mattiafrancescomoro
22license             LGPL-2.1+
23
24description         ROOT is a data analysis framework from CERN
25long_description    The ROOT system provides a set of frameworks with all \
26                    the functionality needed to handle and analyze large amounts \
27                    of data in a very efficient way.
28
29homepage            http://root.cern.ch/
30platforms           darwin
31
32dist_subdir         root
33
34depends_lib         port:xz \
35                    port:pcre \
36                    port:zlib \
37                    port:jpeg \
38                    port:libpng \
39                    port:giflib \
40                    port:tiff \
41                    port:gmp \
42                    port:expat \
43                    port:lzma
44                  # port:freetype
45
46depends_run         port:root_select
47
48# TODO: the file ${filespath}/${name} would have to be generated on the fly instead
49select.group        root
50select.file         ${filespath}/${name}
51
52post-patch {
53#   reinplace "s|-lfreetype| \`freetype-config --libs\`|g" ${worksrcpath}/config/root-config.in
54    reinplace "s|\"/usr/include\"|\"${prefix}/include /usr/include\"|g" ${worksrcpath}/configure
55    reinplace "s|/usr/lib |${prefix}/lib /usr/lib |g" ${worksrcpath}/configure
56    reinplace "s|/usr/include |${prefix}/include /usr/include |g" ${worksrcpath}/configure
57    reinplace "s|\"/usr/lib\"|\"${prefix}/lib /usr/lib\"|g" ${worksrcpath}/configure
58}
59
60# port specific location
61set install_prefix ${prefix}/libexec/root${version_major}
62
63pre-configure {
64    configure.args-append \
65        --with-cc=${configure.cc} \
66        --with-cxx=${configure.cxx} \
67        --with-ld=${configure.cxx} \
68        --with-f77=${configure.f77}
69    # the build type (32 or 64 bit) -must- be for first argument
70    if {${build_arch} eq "i386" || ${build_arch} eq "ppc"} {
71        configure.pre_args macosx --prefix=${install_prefix}
72    } else {
73        configure.pre_args macosx64 --prefix=${install_prefix}
74    }
75}
76
77configure.args      --etcdir=${install_prefix}/etc/root \
78                    --disable-builtin-glew \
79                    --disable-builtin-pcre \
80                    --disable-builtin-zlib \
81                    --disable-builtin-lzma \
82                    --disable-fftw3 \
83                    --disable-krb5 \
84                    --disable-ldap \
85                    --disable-mysql \
86                    --disable-sqlite \
87                    --disable-odbc \
88                    --disable-opengl \
89                    --disable-pythia6 \
90                    --disable-pythia8 \
91                    --disable-roofit \
92                    --disable-ssl \
93                    --disable-xml \
94                    --disable-python \
95                    --disable-fitsio \
96                    --disable-gsl-shared \
97                    --disable-pgsql \
98                    --disable-dcache \
99                    --disable-chirp \
100                    --disable-hdfs \
101                    --disable-ruby \
102                    --disable-minuit2 \
103                    --disable-tmva \
104                    --disable-qt \
105                    --disable-qtgsi \
106                    --disable-bonjour \
107                    --disable-gviz \
108                    --disable-soversion \
109                    --disable-c++11 \
110                    --disable-xrootd \
111                    --disable-oracle \
112                    --disable-http \
113                    --disable-vc \
114                    --enable-builtin-ftgl \
115                    --enable-mathmore \
116                    --enable-genvector \
117                    --enable-memstat \
118                    --enable-unuran \
119                    --enable-reflex \
120                    --enable-table \
121                    --enable-fink \
122                    --enable-gdml \
123                    --enable-builtin-freetype
124
125platform darwin {
126    if {${configure.cxx_stdlib} eq "libc++"} {
127        configure.args-replace --disable-c++11 --enable-c++11
128    }
129}
130
131post-destroot {
132    # create versioned symlinks for the content of libexec
133    # bin dir
134    foreach f [glob -directory ${destroot}${install_prefix}/bin *] {
135        set filename  [file tail $f]
136        set extension [file extension $filename]
137        set base      [file rootname $filename]
138        set versioned_filename ${base}${version_major}${extension}
139        ln -s ${install_prefix}/bin/${filename} ${destroot}${prefix}/bin/${versioned_filename}
140    }
141    # lib dir
142    ln -s ${install_prefix}/lib/root ${destroot}${prefix}/lib/root${version_major}
143    # include dir
144    ln -s ${install_prefix}/include/root ${destroot}${prefix}/include/root${version_major}
145    # etc dir
146    ln -s ${install_prefix}/etc/root ${destroot}${prefix}/etc/root${version_major}
147    # share dir
148    ln -s ${install_prefix}/share ${destroot}${prefix}/share/root${version_major}
149    # 'Fix' genreflex
150    reinplace "s|lib/python/genreflex|lib/root${version_major}/python/genreflex|g" ${destroot}${install_prefix}/bin/genreflex
151    # Compress manpages in custom location (borrowed from mariadb)
152    set manpath ${install_prefix}/share/man
153    set gzip [findBinary gzip ${portutil::autoconf::gzip_path}]
154    foreach manpage [glob -type f ${destroot}${manpath}/man1/*] {
155        # Zip the man file
156        system "$gzip -9vf ${manpage}"
157        # Create man pages for versioned files
158        set filename  [file tail $manpage]
159        set extension [file extension $filename]
160        set base      [file rootname $filename]
161        set versioned_filename ${base}${version_major}${extension}.gz
162        set d [file tail $manpage]
163        ln -s ${manpath}/man1/${d}.gz ${destroot}${prefix}/share/man/man1/${versioned_filename}
164    }
165}
166
167set run_port_select "No"
168pre-activate {
169  if { ![file exists ${prefix}/bin/root]  &&
170       ![file exists ${prefix}/bin/root5] &&
171       ![file exists ${prefix}/bin/root6] } {
172     set run_port_select "Yes"
173  }
174}
175
176post-activate {
177  ui_msg "======================================================================================"
178  if { ${run_port_select} == "Yes" } {
179      ui_msg "  Making root${version_major} your default root version. To change this run 'sudo port select root'"
180      catch { system "port select root root${version_major}" }
181  } else {
182      ui_msg "  To make root${version_major} your default root version, run 'sudo port select root root${version_major}'"
183  }
184  ui_msg "======================================================================================"
185}
186
187universal_variant   no
188
189default_variants    +ssl +xml +gsl +minuit2 +tmva +roofit +graphviz +opengl +soversion +http
190
191# Since ROOT 5.34.15 the cocoa backend is default on OSX 10.8 or newer
192# We also make it default on 10.7
193if {${os.major} > 10} {
194    set default_gui_variant +cocoa
195} else {
196    set default_gui_variant +x11
197}
198
199variant http description {Build with HTTP Server library support} {
200    configure.args-replace --disable-http --enable-http
201}
202
203variant vc description {Build with Vc library support} {
204    configure.args-replace --disable-vc --enable-vc
205}
206
207variant debug description {Enable a debug build} {
208    configure.args-append --build=debug
209}
210
211variant xrootd description {Build with XRootD support} {
212    configure.args-delete   --disable-xrootd
213    configure.args-append   --enable-xrootd \
214                            --with-xrootd-incdir="${prefix}/include/xrootd" \
215                            --with-xrootd-libdir="${prefix}/lib"
216    depends_lib-append      port:xrootd
217}
218
219variant soversion description {Build with soversion support} {
220    configure.args-replace --disable-soversion --enable-soversion
221}
222
223variant graphviz description {Build with graphviz support} {
224    configure.args-delete   --disable-gviz
225    configure.args-append   --enable-gviz \
226                            --with-gviz-incdir="${prefix}/include/graphviz" \
227                            --with-gviz-libdir="${prefix}/lib"
228    depends_lib-append      path:bin/dot:graphviz
229}
230
231variant avahi description {Build with avahi support} {
232    configure.args-delete   --disable-bonjour
233    configure.args-append   --enable-bonjour \
234                            --with-avahi-incdir="${prefix}/include" \
235                            --with-avahi-libdir="${prefix}/lib"
236    depends_lib-append      port:avahi
237}
238
239variant fftw3 description {Build with fftw3 support} {
240    configure.args-delete   --disable-fftw3
241    configure.args-append   --enable-fftw3 \
242                            --with-fftw3-incdir="${prefix}/include" \
243                            --with-fftw3-libdir="${prefix}/lib"
244    depends_lib-append      port:fftw-3
245}
246
247variant gsl description {Build with gsl support} {
248    configure.args-delete   --disable-gsl-shared
249    configure.args-append   --enable-gsl-shared \
250                            --with-gsl-incdir="${prefix}/include" \
251                            --with-gsl-libdir="${prefix}/lib"
252    depends_lib-append      port:gsl
253}
254
255variant fitsio description {Build with fitsio support} {
256    configure.args-delete   --disable-fitsio
257    configure.args-append   --enable-fitsio \
258                            --with-cfitsio-incdir="${prefix}/include" \
259                            --with-cfitsio-libdir="${prefix}/lib"
260    depends_lib-append      port:cfitsio
261}
262
263variant odbc description {Build with odbc support} {
264    configure.args-delete   --disable-odbc
265    configure.args-append   --enable-odbc \
266                            --with-odbc-incdir="${prefix}/include" \
267                            --with-odbc-libdir="${prefix}/lib"
268    depends_lib-append      port:libiodbc
269}
270
271variant ldap description {Build with ldap support} {
272    configure.args-delete   --disable-ldap
273    configure.args-append   --enable-ldap \
274                            --with-ldap-incdir="${prefix}/include" \
275                            --with-ldap-libdir="${prefix}/lib"
276    depends_lib-append      port:openldap
277}
278
279variant roofit description {Build the RooFit advanced fitting package} {
280    configure.args-replace  --disable-roofit --enable-roofit
281}
282
283variant tmva description {Build the TMVA package} {
284    configure.args-replace  --disable-tmva --enable-tmva
285    post-destroot {
286        set tmvaTuts ${destroot}${install_prefix}/share/root/tutorial/tmva
287        file mkdir ${tmvaTuts}
288        foreach f [glob ${worksrcpath}/tmva/test/*] { file copy $f ${tmvaTuts}/ }
289    }
290}
291
292variant minuit2 description {Build with minuit2 support} {
293    configure.args-replace  --disable-minuit2 --enable-minuit2
294}
295
296variant opengl description {Build with opengl support} {
297    configure.args-delete   --disable-opengl
298    configure.args-delete   --disable-builtin-glew
299    configure.args-append   --enable-opengl --enable-builtin-glew
300}
301
302# ========================================================================================
303# Setup various python variants
304# ========================================================================================
305
306# List of possible python versions
307set python_versions { 2.6 2.7 3.3 3.4 }
308
309# Define the available variants
310foreach ver ${python_versions} {
311    set ver_no_dot [join [split ${ver} "."] ""]
312    set variant_line {variant python${ver_no_dot} description "Build with python ${ver} support"}
313    foreach over ${python_versions} {
314        if { ${ver} == ${over} } { continue }
315        set over_no_dot [join [split ${over} "."] ""]
316        append variant_line " conflicts python${over_no_dot}"
317    }
318    append variant_line { { } }
319    eval $variant_line
320}
321
322# Is a variant active ?
323set active_python_variant ""
324foreach ver ${python_versions} {
325    set ver_no_dot [join [split ${ver} "."] ""]
326    if {[variant_isset python${ver_no_dot}]} {
327        set active_python_variant ${ver}
328    }
329}
330
331# If so, set it up.
332if { ${active_python_variant} != "" } {
333    set ver_no_dot [join [split ${active_python_variant} "."] ""]
334    if {![catch {set result [active_variants root6 python${ver_no_dot}]}]} {
335        if {$result} {
336            ui_error "Cannot install ${name} with +python${ver_no_dot} variant"
337            return -code error "root6 port is already installed with +python${ver_no_dot} and both cannot be active at once. Pick a different python variant."
338        }
339    }
340    set mypydir ${prefix}/Library/Frameworks/Python.framework/Versions/${active_python_variant}
341    configure.args-delete   --disable-python
342    configure.args-append   --enable-python \
343                            --with-python-incdir="${mypydir}/Headers" \
344                            --with-python-libdir="${mypydir}"
345    depends_lib-append      port:python${ver_no_dot}
346    post-destroot {
347        set mypylibdir  ${prefix}/Library/Frameworks/Python.framework/Versions/${active_python_variant}/lib/python${active_python_variant}
348        set mypysitedir ${mypylibdir}/site-packages/
349        file mkdir ${destroot}${mypysitedir}
350        foreach pyfile [glob ${destroot}${install_prefix}/lib/root/*.py*] { move $pyfile ${destroot}${mypysitedir}/ }
351        ln -sf ${install_prefix}/lib/root/libPyROOT.so ${destroot}${mypylibdir}/
352    }
353}
354
355# ========================================================================================
356
357variant ssl description {Build with ssl support} {
358    configure.args-delete   --disable-ssl
359    configure.args-append   --enable-ssl \
360                            --with-ssl-shared=yes \
361                            --with-ssl-incdir="${prefix}/include" \
362                            --with-ssl-libdir="${prefix}/lib"
363    depends_lib-append      path:lib/libssl.dylib:openssl
364}
365
366variant xml description {Build with xml support} {
367    configure.args-delete   --disable-xml
368    configure.args-append   --enable-xml \
369                            --with-xml-incdir="${prefix}/include/libxml2" \
370                            --with-xml-libdir="${prefix}/lib"
371    depends_lib-append      port:libxml2
372}
373
374variant sqlite3 description {Build with sqlite3 support} {
375    configure.args-delete   --disable-sqlite
376    configure.args-append   --enable-sqlite \
377                            --with-sqlite-incdir="${prefix}/include" \
378                            --with-sqlite-libdir="${prefix}/lib"
379    depends_lib-append      port:sqlite3
380}
381
382variant mysql conflicts mysql51 mysql55 mysql56 mariadb percona description {Build with mysql5 support} {
383    configure.args-delete   --disable-mysql
384    configure.args-append   --enable-mysql \
385                            --with-mysql-incdir="${prefix}/include/mysql5/mysql" \
386                            --with-mysql-libdir="${prefix}/lib/mysql5/mysql"
387    depends_lib-append      port:mysql5
388}
389
390variant mysql51 conflicts mysql mysql55 mysql56 mariadb percona description {Build with mysql51 support} {
391    configure.args-delete   --disable-mysql
392    configure.args-append   --enable-mysql \
393                            --with-mysql-incdir="${prefix}/include/mysql51/mysql" \
394                            --with-mysql-libdir="${prefix}/lib/mysql51/mysql"
395    depends_lib-append      port:mysql51
396}
397
398variant mysql55 conflicts mysql mysql51 mysql56 mariadb percona description {Build with mysql55 support} {
399    configure.args-delete   --disable-mysql
400    configure.args-append   --enable-mysql \
401                            --with-mysql-incdir="${prefix}/include/mysql55/mysql" \
402                            --with-mysql-libdir="${prefix}/lib/mysql55/mysql"
403    depends_lib-append      port:mysql55
404}
405
406variant mysql56 conflicts mysql mysql51 mysql55 mariadb percona description {Build with mysql56 support} {
407    configure.args-delete   --disable-mysql
408    configure.args-append   --enable-mysql \
409                            --with-mysql-incdir="${prefix}/include/mysql56/mysql" \
410                            --with-mysql-libdir="${prefix}/lib/mysql56/mysql"
411    depends_lib-append      port:mysql56
412}
413
414variant mariadb conflicts mysql mysql51 mysql55 mysql56 percona description {Build with mariadb support} {
415    configure.args-delete   --disable-mysql
416    configure.args-append   --enable-mysql \
417                            --with-mysql-incdir="${prefix}/include/mariadb/mysql" \
418                            --with-mysql-libdir="${prefix}/lib/mariadb/mysql"
419    depends_lib-append      port:mariadb
420}
421
422variant percona conflicts mysql mysql51 mysql55 mysql56 mariadb description {Build with percona support} {
423    configure.args-delete   --disable-mysql
424    configure.args-append   --enable-mysql \
425                            --with-mysql-incdir="${prefix}/include/percona/mysql" \
426                            --with-mysql-libdir="${prefix}/lib/percona/mysql"
427    depends_lib-append      port:percona
428}
429
430variant postgresql90 conflicts postgresql92 description {Build with PostgreSQL 9.0 support} {
431    configure.args-delete   --disable-pgsql
432    configure.args-append   --enable-pgsql \
433                            --with-pgsql-incdir="${prefix}/include/postgresql90" \
434                            --with-pgsql-libdir="${prefix}/lib/postgresql90"
435    depends_lib-append      port:libpqxx port:postgresql90
436}
437
438variant postgresql92 conflicts postgresql90 description {Build with PostgreSQL 9.2 support} {
439    configure.args-delete   --disable-pgsql
440    configure.args-append   --enable-pgsql \
441                            --with-pgsql-incdir="${prefix}/include/postgresql92" \
442                            --with-pgsql-libdir="${prefix}/lib/postgresql92"
443    depends_lib-append      port:libpqxx port:postgresql92
444}
445
446# variant oracle description {Build with Oracle support} {
447#     configure.args-replace --disable-oracle --enable-oracle
448#     configure.args-append  --with-oracle-incdir="${prefix}/lib/oracle/sdk/include" \
449#                            --with-oracle-libdir="${prefix}/lib/oracle"
450#     depends_lib-append     port:oracle-instantclient
451# }
452
453variant pythia description {Pythia 8 support for root} {
454    configure.args-delete   --disable-pythia8
455    configure.args-append   --enable-pythia8 \
456                            --with-pythia8-incdir=${prefix}/include/pythia \
457                            --with-pythia8-libdir=${prefix}/lib
458    depends_lib-append      port:pythia
459}
460
461variant cocoa conflicts x11 description {Enables native OSX graphical backend} {
462    # Force a compatible clang compiler
463    PortGroup compiler_blacklist_versions 1.0
464    compiler.blacklist-append {clang < 425} *gcc* macports-clang-2.9
465    compiler.fallback-append macports-clang-3.4 macports-clang-3.3 macports-clang-3.2
466    # Enable cocoa support in configure
467    configure.args-delete --disable-cocoa
468    configure.args-append --enable-cocoa
469    # patch afterimage build to make sure TIFF suport is disabled. Causes problems with cocoa...
470    patchfiles-append patch-builtin-afterimage-disabletiff.diff
471}
472
473variant x11 conflicts cocoa description {Enables X11 graphical backend} {
474    # Dependencies on X11 ports
475    depends_lib-append port:xorg-libX11 port:mesa port:libGLU port:Xft2 port:xpm
476    # Disable cocoa
477    configure.args-append --disable-cocoa
478}
479
480# If neither graphical variant is set, use default
481if { ![variant_isset cocoa] && ![variant_isset x11] } {
482    default_variants-append ${default_gui_variant}
483}
484
485# ========================================================================================
486# Setup various clang variants, to provide alternative C++ compilers that support cocoa
487# ========================================================================================
488
489# List of possible clang versions that work
490set clang_versions { 3.3 3.4 3.5 }
491
492# Define the available variants
493foreach ver ${clang_versions} {
494    set ver_no_dot [join [split ${ver} "."] ""]
495    set variant_line {variant clang${ver_no_dot} description "Compile using MacPorts clang ${ver}"}
496    foreach over ${clang_versions} {
497        if { ${ver} == ${over} } { continue }
498        set over_no_dot [join [split ${over} "."] ""]
499        append variant_line " conflicts clang${over_no_dot}"
500    }
501    append variant_line { { } }
502    eval $variant_line
503}
504
505# make sure that the proper variant is automatically selected
506# (ROOT crashes if the compiler it was built with doesn't exist)
507if {![variant_isset clang33] && ![variant_isset clang34] && ![variant_isset clang35]} {
508    if { ${configure.compiler} eq "macports-clang-3.3" } {
509        default_variants-append +clang33
510    } elseif { ${configure.compiler} eq "macports-clang-3.4" } {
511        default_variants-append +clang34
512    } elseif { ${configure.compiler} eq "macports-clang-3.5" } {
513        default_variants-append +clang35
514    }
515}
516
517# Is a variant active ?
518set active_clang_variant ""
519foreach ver ${clang_versions} {
520    set ver_no_dot [join [split ${ver} "."] ""]
521    if {[variant_isset clang${ver_no_dot}]} {
522        set active_clang_variant ${ver}
523    }
524}
525
526# If so, set it up.
527if { ${active_clang_variant} != "" } {
528    configure.compiler      macports-clang-${active_clang_variant}
529    configure.args-append   --with-llvm-config="${prefix}/bin/llvm-config-mp-"${active_clang_variant}
530    depends_run-append      port:clang-${active_clang_variant}
531}
532
533# ========================================================================================
534
535variant qt_mac description {Build with Qt support via Mac UI} {
536    post-patch {
537        # fix where "qglobal.h" is found in all files that use or reference it
538        foreach tpf { configure graf2d/qt/src/TGQt.cxx } {
539            reinplace "s@Qt/qglobal\\.h@QtCore/qglobal\\.h@g" \
540                ${worksrcpath}/${tpf}
541        }
542        reinplace "/qttestdir/s@Qt@QtCore@g" ${worksrcpath}/configure
543
544        # fix library search extensions to include ".la"
545        # for Qt framework libraries (only)
546        reinplace "s@\\(\\.so \\.sl \\.dylib \\.dll\\.a\\)@\\1 \\.la@g" \
547            ${worksrcpath}/configure
548    }
549
550    configure.args-delete   --disable-qt
551    configure.args-delete   --disable-qtgsi
552    configure.args-append   --enable-qt --enable-qtgsi \
553                            --with-qt-incdir="${prefix}/include" \
554                            --with-qt-libdir="${prefix}/lib"
555    depends_lib-append      port:qt4-mac
556
557    post-configure {
558        # patch up the Makefile.config to handle the QTLIB frameworks correctly
559        reinplace "/QTLIB\[ \]/s@:= @:= -F${qt_libs_dir} @" \
560            ${worksrcpath}/config/Makefile.config
561        reinplace "/QTLIB\[ \]/s@\\(Qt\[^ \]*\\).la@-framework \\1@g" \
562            ${worksrcpath}/config/Makefile.config
563    }
564}
565
566if {[variant_isset qt_mac]} {
567    PortGroup qt4 1.0
568}
569
570# ========================================================================================
571# Following is for fortran support
572# Might eventually move to a portgroup, or similar, so could be simplified.
573# Based on recipe from https://trac.macports.org/wiki/PortfileRecipes#fortran
574# Note that g95 does not work here, so that variant is removed
575# ========================================================================================
576
577set gcc_versions { 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5 }
578set default_fortran_variant +gcc48
579
580foreach ver ${gcc_versions} {
581    set ver_no_dot [join [split ${ver} "."] ""]
582
583    set variant_line {variant gcc${ver_no_dot} description "Build with gfortran from gcc${ver_no_dot}"}
584
585    foreach over ${gcc_versions} {
586        if {${ver} == ${over}} {
587            continue
588        }
589
590        set over_no_dot [join [split ${over} "."] ""]
591        append variant_line " conflicts gcc${over_no_dot}"
592    }
593    append variant_line { { } }
594
595    eval $variant_line
596
597    if {[variant_isset gcc${ver_no_dot}]} {
598        if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
599            set default_fortran_variant ""
600        }
601    }
602}
603
604if {${default_fortran_variant} != ""} {
605    default_variants-append "${default_fortran_variant}"
606}
607
608foreach ver ${gcc_versions} {
609    set ver_no_dot [join [split ${ver} "."] ""]
610
611    if {[variant_isset gcc${ver_no_dot}]} {
612        depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
613        depends_build-append port:gcc${ver_no_dot}
614
615        configure.fc  ${prefix}/bin/gfortran-mp-${ver}
616        configure.f77 ${prefix}/bin/gfortran-mp-${ver}
617        configure.f90 ${prefix}/bin/gfortran-mp-${ver}
618    }
619}
620
621# ========================================================================================
622
623livecheck.type              regex
624livecheck.url               [lindex ${master_sites} 0]
625livecheck.regex             root_v(\[0-9a-z.\]+)\\.source
626
627# ========================================================================================
628# The following have build issues, are obsolete or experimental.
629# ========================================================================================
630
631# Problems finding includes ...
632# variant ruby description {Build with ruby support} {
633#     configure.args-delete   --disable-ruby
634#     configure.args-append   --enable-ruby \
635#                             --with-ruby-incdir="${prefix}/include/ruby-1.9.1" \
636#                             --with-ruby-libdir="${prefix}/lib"
637#     depends_lib-append      port:ruby19
638# }
639
640# Intefers with builtin freetype build (enforced by cocoa variant)
641# Also do not seem to be actually needed any more
642#pre-build {
643#    build.args      CC=${configure.cc} \
644#                    CXX=${configure.cxx} \
645#                    F77=${configure.f77}
646#}
647
648# variant kerberos5 description {Build with kerberos5 support} {
649#     configure.args-delete   --disable-krb5
650#     configure.args-append   --enable-krb5 \
651#                             --with-krb5-incdir="${prefix}/include" \
652#                             --with-krb5-libdir="${prefix}/lib"
653#      depends_lib-append      port:kerberos5
654# }
655
656# variant ftgl description {Build with ftgl support} {
657#     configure.args-delete   --enable-builtin-ftgl
658#     configure.args-append   --disable-builtin-ftgl \
659#     configure.args-append   --with-ftgl-incdir="${prefix}/include" \
660#                             --with-ftgl-libdir="${prefix}/lib"
661#     depends_lib-append      port:ftgl
662# }
663
664# variant qt_x11 conflicts qt_mac description {Build with Qt support via X11 UI} {
665#     # fix where "qglobal.h" is found in all files that use or reference it
666#     post-patch {
667#         foreach tpf { configure graf2d/qt/src/TGQt.cxx } {
668#             reinplace "s@Qt/qglobal\\.h@QtCore/qglobal\\.h@g" \
669#                 ${worksrcpath}/${tpf}
670#         }
671#         reinplace "/qttestdir/s@Qt@QtCore@g" ${worksrcpath}/configure
672#     }
673
674#     configure.env-append    QTDIR=${prefix}/libexec/qt4-x11
675#     configure.args-delete   --disable-qt
676#     configure.args-delete   --disable-qtgsi
677#     configure.args-append   --enable-qt --enable-qtgsi \
678#                             --with-qt-incdir="${prefix}/include" \
679#                             --with-qt-libdir="${prefix}/lib"
680#     depends_lib-append      port:qt4-x11
681# }
Note: See TracBrowser for help on using the repository browser.