Ticket #50229: Portfile-py-ngl.diff
File Portfile-py-ngl.diff, 4.5 KB (added by dstrubbe (David Strubbe), 9 years ago) |
---|
-
Portfile
3 3 4 4 PortSystem 1.0 5 5 PortGroup python 1.0 6 PortGroup compilers 1.0 6 7 7 8 name py-ngl 8 version 1.3.0b1 9 revision 1 9 version 1.4.0 10 10 categories-append science 11 11 platforms darwin 12 12 license PyNGL … … 15 15 description Python module to visualize scientific data 16 16 long_description \ 17 17 PyNGL is a Python language module used to visualize scientific data, \ 18 with an emphasis on high 18 with an emphasis on high-quality 2D visualizations. 19 19 20 20 homepage http://www.pyngl.ucar.edu/ 21 21 master_sites http://www.pyngl.ucar.edu/Download/ … … 25 25 sha1 76bbb03c05f0acb1591172543d3decc7c4397422 \ 26 26 rmd160 bd4357d46af0a723cd81c16bdb0ecc3df03fa6a2 27 27 28 fetch {29 if {![file exists ${distpath}/${distfiles}]} {30 xinstall -d ${distpath}31 ui_error "Download ${distfiles} manually and place it in ${distpath}.\n \32 See instructions on ${master_sites}"33 }34 }35 36 28 python.versions 26 27 37 29 38 30 if {${name} ne ${subport}} { … … 41 33 port:xorg-libX11 \ 42 34 port:py${python.version}-nio 43 35 44 # ncarg is not universal, thus py-ngl is neither36 # ncarg is not universal, thus py-ngl isn't either 45 37 universal_variant no 46 38 47 39 patch { … … 52 44 53 45 build.env PNG_PREFIX=${prefix} \ 54 46 ZLIB_PREFIX=${prefix} \ 55 NCARG_ROOT=${prefix} 47 NCARG_ROOT=${prefix} \ 48 CC=${configure.cc} 56 49 57 50 destroot.env NCARG_ROOT=${prefix} 58 51 59 set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9} 60 set default_fortran_variant +gcc48 61 set g95_conflicts {} 52 compilers.choose fc f77 f90 53 compilers.setup require_fortran -dragonegg 62 54 63 foreach ver ${gcc_versions} { 64 set ver_no_dot [join [split ${ver} "."] ""] 65 66 set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}" conflicts g95} 67 68 foreach over ${gcc_versions} { 69 if {${ver} == ${over}} { 70 continue 71 } 72 73 set over_no_dot [join [split ${over} "."] ""] 74 append variant_line " conflicts gcc${over_no_dot}" 75 } 76 append variant_line { {}} 77 78 eval $variant_line 79 80 append g95_conflicts " conflicts gcc${ver_no_dot}" 81 82 if {[variant_isset gcc${ver_no_dot}]} { 83 if {${default_fortran_variant} ne "+gcc${ver_no_dot}"} { 84 set default_fortran_variant "" 85 } 86 } 87 } 88 89 eval [concat {variant g95 description {build with g95}} $g95_conflicts {{}}] 90 91 if {[variant_isset g95]} { 92 if {${default_fortran_variant} ne "+g95"} { 93 set default_fortran_variant "" 94 } 95 } 96 97 if {${default_fortran_variant} ne ""} { 98 default_variants-append "${default_fortran_variant}" 99 } 100 101 foreach ver ${gcc_versions} { 102 set ver_no_dot [join [split ${ver} "."] ""] 103 104 if {[variant_isset gcc${ver_no_dot}]} { 105 depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc 106 depends_build-append port:gcc${ver_no_dot} 107 108 configure.fc ${prefix}/bin/gfortran-mp-${ver} 109 configure.f77 ${prefix}/bin/gfortran-mp-${ver} 110 configure.f90 ${prefix}/bin/gfortran-mp-${ver} 111 112 build.env-append F2CLIBS=gfortran \ 113 F2CLIBS_PREFIX=${prefix}/lib/gcc${ver_no_dot} \ 114 CC=${configure.cc} 115 } 116 } 117 118 if {[variant_isset g95]} { 119 depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc 120 depends_build-append port:g95 121 122 configure.fc ${prefix}/bin/g95 123 configure.f77 ${prefix}/bin/g95 124 configure.f90 ${prefix}/bin/g95 125 55 if {[gcc_variant_isset]} { 56 build.env-append F2CLIBS=gfortran \ 57 F2CLIBS_PREFIX=${prefix}/lib/[gcc_variant_name] 58 } else { 59 # g95 126 60 configure.fflags-append -fno-second-underscore 127 61 128 62 build.env-append F2CLIBS=f95 \ 129 F2CLIBS_PREFIX=${prefix}/lib/ \ 130 CC=${configure.cc} 63 F2CLIBS_PREFIX=${prefix}/lib/ 131 64 } 132 65 133 66 livecheck.type none