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 2 3 PortSystem 1.0 3 4 4 5 name geant4 … … 33 34 34 35 master_sites http://geant4.cern.ch/support/source/ 35 36 36 checksums geant 4.9.3.tar.gz \37 checksums geant${version}.tar.gz \ 37 38 md5 e2b02bac0bba8fb5a01e1caeefe86a7a \ 38 39 sha1 9c657e90675d64993416b46dfce70710804379d4 \ 39 40 rmd160 33f54c2dbf33a7eda1470db1a6bb44de279ac577 \ … … 74 75 reinplace "s/-o/\$(LDFLAGS) -o/g" ${worksrcpath}/GNUmakefile 75 76 76 77 # 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 } 80 83 } 81 84 82 85 # Fix an error message in build phase (I hope that it will not cause any problems) … … 88 91 reinplace "s:\$(G4SYSTEM).gmk:Darwin-g++.gmk:g" ${workpath}/geant${version}/examples/extended/eventgenerator/HepMC/HepMCEx01/external/GNUmakefile 89 92 90 93 # 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] { 92 95 file copy ${file} ${worksrcpath} 93 96 } 94 97 95 98 # Fixes some paths 96 foreach file [ exec find ${worksrcpath} -name "*sh" -print] {99 foreach file [list ${worksrcpath}/env.sh ${worksrcpath}/env.csh] { 97 100 reinplace "s:@PREFIX@:${prefix}:g" ${file} 98 101 reinplace "s:@WORKSRCPATH@:${worksrcpath}:g" ${file} 99 102 reinplace "s:@DESTROOT@:${destroot}:g" ${file} 100 103 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} 101 111 } 102 112 } 103 113 104 configure { } 114 use_configure no 105 115 106 116 build.env G4SYSTEM=${version} 107 117 build.env-append G4INSTALL=${workpath}/geant${version} … … 155 165 156 166 build.env-append XMFLAGS= -I${prefix}/include 157 167 build.env-append XMLIBS= -L${prefix}/lib -lXm -lXpm 158 build.env-append XMFLAGS= -I${prefix}/include159 build.env-append XMLIBS= -L${prefix}/lib -lXm -lXpm168 #build.env-append XMFLAGS= -I${prefix}/include 169 #build.env-append XMLIBS= -L${prefix}/lib -lXm -lXpm 160 170 #build.env-append XAWFLAGS= 161 171 #build.env-append XAWLIBS= 162 172 #build.env-append QTFLAGS= … … 215 225 216 226 puts "Installing headers to ${prefix}/include/" 217 227 218 f oreach file [glob ${workpath}/geant${version}/include/*]{228 fs-traverse file ${workpath}/geant${version}/include/ { 219 229 file copy ${file} ${destroot}${prefix}/include/ 220 230 } 221 231 … … 227 237 228 238 puts "Installing executables to ${prefix}/bin" 229 239 230 f oreach file [glob -nocomplain ${workpath}/geant${version}/bin/*]{240 fs-traverse file ${workpath}/geant${version}/bin/ { 231 241 file copy ${file} ${destroot}${prefix}/bin/ 232 242 } 233 243 }