source: trunk/dports/science/root5/Portfile

Last change on this file was 153541, checked in by mojca@…, 14 months ago

root5: fix build on 10.12 (closes #52465)

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