Ticket #23323: Portfile-geant4.2.diff

File Portfile-geant4.2.diff, 3.5 KB (added by cristiano.fontana@…, 15 years ago)
  • Portfile

    old new  
    1 # $Id$
     1# $Id$
     2
    23PortSystem          1.0
    34
    45name                geant4
     
    3334
    3435master_sites        http://geant4.cern.ch/support/source/
    3536
    36 checksums           geant4.9.3.tar.gz \
     37checksums           geant${version}.tar.gz \
    3738                    md5     e2b02bac0bba8fb5a01e1caeefe86a7a \
    3839                    sha1    9c657e90675d64993416b46dfce70710804379d4 \
    3940                    rmd160  33f54c2dbf33a7eda1470db1a6bb44de279ac577 \
     
    7475    reinplace "s/-o/\$(LDFLAGS) -o/g" ${worksrcpath}/GNUmakefile
    7576
    7677    # Replaces g++ with standard compiler
    77     foreach file [exec find ${workpath}/geant${version}/config -name "*.gmk"] {
    78         reinplace "s:g++:${configure.cxx}:g" ${file}
    79         reinplace "s:gfortran:${configure.fc}:g" ${file}
     78    fs-traverse file ${workpath}/geant${version}/config {
     79        if {".gmk" == [file extension ${file}]} {
     80            reinplace "s:g++:${configure.cxx}:g" ${file}
     81            reinplace "s:gfortran:${configure.fc}:g" ${file}
     82        }
    8083    }
    8184
    8285    # Fix an error message in build phase (I hope that it will not cause any problems)
     
    8891    reinplace "s:\$(G4SYSTEM).gmk:Darwin-g++.gmk:g" ${workpath}/geant${version}/examples/extended/eventgenerator/HepMC/HepMCEx01/external/GNUmakefile
    8992
    9093    # Copies some files to fix them
    91     foreach file [ exec find ${filespath} -name "*sh" -print ] {
     94    foreach file [list ${filespath}/env.sh ${filespath}/env.csh] {
    9295        file copy ${file} ${worksrcpath}
    9396    }
    9497
    9598    # Fixes some paths
    96     foreach file [ exec find ${worksrcpath} -name "*sh" -print ] {
     99    foreach file [list ${worksrcpath}/env.sh ${worksrcpath}/env.csh] {
    97100        reinplace "s:@PREFIX@:${prefix}:g" ${file}
    98101        reinplace "s:@WORKSRCPATH@:${worksrcpath}:g" ${file}
    99102        reinplace "s:@DESTROOT@:${destroot}:g" ${file}
    100103        reinplace "s:@VERSION@:${version}:g" ${file}
     104
     105        reinplace "s:@G4NDL_V@:${G4NDL_v}:g" ${file}
     106        reinplace "s:@G4EMLOW_V@:${G4EMLOW_v}:g" ${file}
     107        reinplace "s:@PHOTONEVAPORATION_V@:${PhotonEvaporation_v}:g" ${file}
     108        reinplace "s:@RADIOACTIVEDECAY_V@:${RadioactiveDecay_v}:g" ${file}
     109        reinplace "s:@G4ABLA_V@:${G4ABLA_v}:g" ${file}
     110        reinplace "s:@REALSURFACE_V@:${RealSurface_v}:g" ${file}
    101111    }
    102112}
    103113
    104 configure { }
     114use_configure       no
    105115
    106116build.env           G4SYSTEM=${version}
    107117build.env-append    G4INSTALL=${workpath}/geant${version}
     
    155165
    156166build.env-append    XMFLAGS= -I${prefix}/include
    157167build.env-append    XMLIBS= -L${prefix}/lib -lXm -lXpm
    158 build.env-append    XMFLAGS= -I${prefix}/include
    159 build.env-append    XMLIBS= -L${prefix}/lib -lXm -lXpm
     168#build.env-append    XMFLAGS= -I${prefix}/include
     169#build.env-append    XMLIBS= -L${prefix}/lib -lXm -lXpm
    160170#build.env-append    XAWFLAGS=
    161171#build.env-append    XAWLIBS=
    162172#build.env-append    QTFLAGS=
     
    215225
    216226    puts "Installing headers to ${prefix}/include/"
    217227
    218     foreach file [glob ${workpath}/geant${version}/include/*] {
     228    fs-traverse file ${workpath}/geant${version}/include/ {
    219229        file copy ${file} ${destroot}${prefix}/include/
    220230    }
    221231
     
    227237
    228238    puts "Installing executables to ${prefix}/bin"
    229239
    230     foreach file [glob -nocomplain ${workpath}/geant${version}/bin/*] {
     240    fs-traverse file ${workpath}/geant${version}/bin/ {
    231241        file copy ${file} ${destroot}${prefix}/bin/
    232242    }
    233243}