Gate & Geant4: how to pass the variables from one port to the other

Bradley Giesbrecht pixilla at macports.org
Sun Jul 7 08:22:04 PDT 2013


On Jul 7, 2013, at 5:15 AM, Mojca Miklavec wrote:

> But I still need a way to specify the path somewhere: be
> it by hardcoding it in Gate or by providing a function in the
> portgroup.


You could subport geant4 and gate to share variables.

name geant4
version 0

set geant495_patchlevel 2
set geant496_patchlevel 3

subport geant4.9.5 {
# geant4.9.5 Portfile options
    version 4.9.5.${geant495_patchlevel}
}
subport geant4.9.6 {
# geant4.9.6 Portfile options
    version 4.9.6.${geant496_patchlevel}
}
subport gate {
# gate Portfile options
    variant geant495 conflicts geant496 description {Use Geant4 9.5} {
        depends_lib port:geant4.9.5
        configure.args-append \
            -DGeant4_DIR=${prefix}/lib/Geant4/Geant4.9.5/Geant4-9.5.${geant495_patchlevel}
    }
    variant geant496 conflicts geant495 description {Use Geant4 9.6} {
        depends_lib port:geant4.9.6
        configure.args-append \
            -DGeant4_DIR=${prefix}/lib/Geant4/Geant4.9.6/Geant4-9.6.${geant496_patchlevel}
    }
}
if {${name} eq ${subport}} {
# stub port
}



Regards,
Bradley Giesbrecht (pixilla)



More information about the macports-dev mailing list