[79469] trunk/dports/science

Ryan Schmidt ryandesign at macports.org
Tue Jun 14 14:20:12 PDT 2011


On Jun 14, 2011, at 10:45, pixilla at macports.org wrote:

> Revision: 79469
>          http://trac.macports.org/changeset/79469
> Author:   pixilla at macports.org
> Date:     2011-06-14 08:45:16 -0700 (Tue, 14 Jun 2011)
> Log Message:
> -----------
> science/splash: New port. Closes #28811
> 
> Added Paths:
> -----------
>    trunk/dports/science/splash/
>    trunk/dports/science/splash/Portfile
> 
> Added: trunk/dports/science/splash/Portfile
> ===================================================================
> --- trunk/dports/science/splash/Portfile	                        (rev 0)
> +++ trunk/dports/science/splash/Portfile	2011-06-14 15:45:16 UTC (rev 79469)
> @@ -0,0 +1,77 @@
> +# -*- 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                splash
> +version             1.14.1
> +categories          science graphics
> +platforms           darwin
> +maintainers         monash.edu:daniel.price
> +description         Smoothed Particle Hydrodynamics visualisation tool
> +long_description    SPLASH is a tool for visualisation of (mainly astrophysical) \
> +                    Smoothed Particle Hydrodynamics simulations
> +                    
> +homepage            http://users.monash.edu.au/~dprice/splash
> +master_sites        ${homepage}/download/
> +license             GPL-2+
> +
> +worksrcdir          ${name}
> +
> +checksums           rmd160  fab3970055412a026ae7ace6907af678a215784b \
> +                    sha256  91d3594ecad7537d72e8f16fe25fac6afbe093bb43ec9c82f4fd566e6096088e

MacPorts 1.9.x does not support sha256 checksums. Please list sha1 and rmd160 checksums in portfiles until after MacPorts 2.0 is released. See:

http://lists.macosforge.org/pipermail/macports-dev/2011-June/014851.html

> +depends_build       

This line does nothing and should be removed.

> +default_variants    +gcc44 +pgplot

gcc44 should only be a default variant if the user has not already selected another gcc variant. See:

https://trac.macports.org/wiki/PortfileRecipes#gcc

> +use_configure       no

Use of "use_configure no" suggests you need to manually ensure you're using the right compiler and build arch:

https://trac.macports.org/wiki/UsingTheRightCompiler

> +build.cmd           make SYSTEM=gfortran
> +
> +destroot.args       PREFIX=${prefix}
> +use_parallel_build  no
> +
> +variant pgplot description {use PGPLOT as the backend graphics library} {
> +   depends_lib      port:pgplot

In all of the variants, you should be appending to the dependencies, not overwriting them. In particular what would happen if the user requested both the pgplot and read_hdf5formats variants? One of those variants' library dependencies would overwrite the other's.

> +   build.env        PGPLOT_DIR=${prefix}/lib \
> +                    PGPLOT_DEV=/xw

Same here: append to the environment, don't overwrite it. It may not matter right this second, but it will matter if later another variant is added that needs to deal with build.env, or if the port gets a global build.env setting.

> +}
> +
> +variant gcc46 description {build with gfortran/gcc v4.6} conflicts gcc42 gcc43 gcc44 gcc45 {
> +   depends_build    port:gcc46
> +   build.cmd        make SYSTEM=gfortran F90C=gfortran-mp-4.6

Why overwrite the build.cmd in each of these variants? Why not just append F90C=gfortran-mp-4.x to build.args?

> +}
> +
> +variant gcc45 description {build with gfortran/gcc v4.5} conflicts gcc42 gcc43 gcc44 gcc46 {
> +   depends_build    port:gcc45
> +   build.cmd        make SYSTEM=gfortran F90C=gfortran-mp-4.5
> +}
> +
> +variant gcc44 description {build with gfortran/gcc v4.4} conflicts gcc42 gcc43 gcc45 gcc46 {
> +   depends_build    port:gcc44
> +   build.cmd        make SYSTEM=gfortran F90C=gfortran-mp-4.4
> +}
> +
> +variant gcc43 description {build with gfortran/gcc v4.3} conflicts gcc42 gcc44 gcc45 gcc46 {
> +   depends_build    port:gcc43
> +   build.cmd        make SYSTEM=gfortran F90C=gfortran-mp-4.3
> +}
> +
> +variant gcc42 description {build with gfortran/gcc v4.2} conflicts gcc43 gcc44 gcc45 gcc46 {
> +   depends_build    port:gcc42
> +   build.cmd        make SYSTEM=gfortran F90C=gfortran-mp-4.2
> +}
> +
> +variant read_hdf5formats description {compiles data reads that depend on HDF5} conflicts read_extraformats1 {
> +   build.args       flash HDF5ROOT=${prefix}

Append to build.args, don't overwrite it.

> +   depends_lib      port:hdf5
> +}
> +
> +variant read_extraformats1 description {compiles additional data reads: foulkes, mbatesph, oilonwater, rsph, urban (f/b/o/r/usplash)} conflicts read_extraformats2 {
> +   build.args       all foulkes mbatesph oilonwater rsph urban
> +}
> +
> +variant read_extraformats2 description {compiles additional data reads: Bauswein, UCLA, vanaverbeke data read (bsplash, usplash, vsplash)} conflicts read_extraformats1 {
> +   build.args       all bauswein ucla vanaverbeke
> +}

What is the situation with these read_extraformats variants? Why aren't these extra formats enabled all the time?

If there really is a value to making these extra formats optional, then why must the variants conflict with one another? I think they should be appending to build.args, not overwriting it.





More information about the macports-dev mailing list