# -*- 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 # $Id$ PortSystem 1.0 name fgsl version 0.9.4 revision 2 categories math science maintainers takeshi license GPL-2 description Fortran interface to the GNU scientific library long_description \ A portable, object-based Fortran interface to the GNU scientific library, \ a collection of numerical routines for scientific computing. homepage http://www.lrz.de/services/software/mathematik/gsl/fortran/ platforms darwin master_sites ${homepage} checksums md5 cee6760809bc1ddbb6172fc8818a76b2 \ sha1 82f3047a3b1b1970fae741946fd8479f15595362 \ rmd160 7c12162b4fb64746d91715756c01e52dbb4e0e09 depends_lib port:gsl patch { reinplace "s| \$bits | \"\$bits\" |" ${worksrcpath}/configure reinplace "s|uname -i|uname -m|" ${worksrcpath}/configure reinplace "s|fgsl_doc|share/doc/fgsl|" ${worksrcpath}/Makefile reinplace "s|\$(PREFIX)|\$(DESTDIR)\$(PREFIX)|" ${worksrcpath}/Makefile reinplace "s|error_3\.exe||" ${worksrcpath}/doc/examples/Makefile } set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9} set default_fortran_variant +gcc48 set g95_conflicts {} foreach ver ${gcc_versions} { set ver_no_dot [join [split ${ver} "."] ""] set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}" conflicts g95} foreach over ${gcc_versions} { if {${ver} == ${over}} { continue } set over_no_dot [join [split ${over} "."] ""] append variant_line " conflicts gcc${over_no_dot}" } append variant_line { {}} eval $variant_line append g95_conflicts " conflicts gcc${ver_no_dot}" if {[variant_isset gcc${ver_no_dot}]} { if {${default_fortran_variant} != "+gcc${ver_no_dot}"} { set default_fortran_variant "" } } } eval [concat {variant g95 description {build with g95}} $g95_conflicts {{}}] if {[variant_isset g95]} { if {${default_fortran_variant} != "+g95"} { set default_fortran_variant "" } } if {${default_fortran_variant} != ""} { default_variants-append "${default_fortran_variant}" } foreach ver ${gcc_versions} { set ver_no_dot [join [split ${ver} "."] ""] if {[variant_isset gcc${ver_no_dot}]} { depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc depends_build-append port:gcc${ver_no_dot} configure.fc ${prefix}/bin/gfortran-mp-${ver} configure.f77 ${prefix}/bin/gfortran-mp-${ver} configure.f90 ${prefix}/bin/gfortran-mp-${ver} set f90 gfortran-mp-${ver} } } if {[variant_isset g95]} { depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc depends_build-append port:g95 configure.fc ${prefix}/bin/g95 configure.f77 ${prefix}/bin/g95 configure.f90 ${prefix}/bin/g95 set f90 g95 } else { post-patch { reinplace "s|gfortran|${f90}|" ${worksrcpath}/configure } } configure.pre_args-delete --prefix=${prefix} configure.args "--prefix ${prefix} --f90 ${f90} --cc ${configure.cc} --gsl ${prefix}" post-destroot { xinstall -m 755 -d ${destroot}${prefix}/share/${name}/examples eval xinstall -m 644 [glob ${worksrcpath}/doc/examples/*] ${destroot}${prefix}/share/${name}/examples xinstall -m 644 ${worksrcpath}/make.inc ${destroot}${prefix}/share/${name} reinplace "s|../make.inc|make.inc|" ${destroot}${prefix}/share/${name}/examples/Makefile reinplace "s|-I../..|-I${prefix}/include/\$(F90)|" ${destroot}${prefix}/share/${name}/examples/Makefile } universal_variant no livecheck.type regex livecheck.url ${homepage} livecheck.regex {Download .*version ([0-9]+\.[0-9]+\.*[0-9]*)}